diff --git a/README.md b/README.md index c8d14b377..27e9cea3f 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,10 @@ Executes Javascript, Typescript Scripts. --> ## Changelog +### **WORK IN PROGRESS** +* (@GermanBluefox) Implemented the support for credentials manager in the configuration +* (@GermanBluefox) Added the possiblilty to execute scripts from AI agent + ### 9.2.4 (2026-06-08) * (arteck) Performance optimizations part 2 * (arteck) fix filter in tab scripts @@ -57,6 +61,20 @@ Executes Javascript, Typescript Scripts. * (Eistee82) `search_datapoints` covers every object type (channels, devices, folders, enums, …) and matches on role; `get_object_info` lists children for containers — fixes finding aliases/motion-sensors modeled as channels * (Eistee82) Non-chat model filter expanded (embeddings, image/audio/video/TTS, transcription, moderation, web-search, Ollama single-task models, …) +### 9.2.0 (2026-04-11) +* (Eistee82) AI Chat panel with multi-provider support, tool calling, inline completions, and smart-apply +* (Eistee82) Fix: prevent duplicate 'Stopping script' log when script is not running +* (Eistee82) Fix: only restart scripts on the instance that owns them +* (Eistee82) Added OID display mode toggle for Blockly editor: 4 display modes (Name, Name path, State ID, Full ID) with toolbar dropdown, context menu, optional object icons, and translations in 11 languages +* (Eistee82) Node 25 compatibility: replaced deprecated rmdirSync with rmSync in build tasks +* (@GermanBluefox) Added support for plain import/export +* (@GermanBluefox) Correcting error in configuration +* (@GermanBluefox) disallow writing into node_modules folder by scripts +* (@GermanBluefox) Correcting start of the script more than one time if restart is triggered +* (@GermanBluefox) All delayed writings are stopped by the script stop +* (@GermanBluefox) Added check if a script has been modified by another user/window +* (@GermanBluefox) Make the instance number more prominent + ## License The MIT License (MIT) diff --git a/admin/assets/AiChatPanel-CZ2o6xnT.js b/admin/assets/AiChatPanel-CZ2o6xnT.js new file mode 100644 index 000000000..25ac9cbe4 --- /dev/null +++ b/admin/assets/AiChatPanel-CZ2o6xnT.js @@ -0,0 +1,317 @@ +import{c as Se,j as o}from"./createSvgIcon-DYs_tNrE.js";import{k as J,j as te,b as ne,c as xe,l as Ae}from"./iobroker_javascript__loadShare__react__loadShare__.mjs-CTZOFJS2.js";import{z as L,P as ve,o as we,a0 as ct,a1 as lt,i as We,J as dt,r as ut,s as pt,u as mt,a2 as Fe,c as ft,f as He,g as ze,a3 as Oe,a4 as Ve,a5 as ht}from"./iobroker_javascript__loadShare___mf_0_mui_mf_1_material__loadShare__.mjs-CV1_X-Lf.js";import{_ as u}from"./iobroker_javascript__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.mjs-DkBjPSMw.js";import{_ as Ze}from"./preload-helper-BDBacUwf.js";import{C as gt,b as yt,I as bt,R as xt}from"./index-45IwpC7_.js";import{i as vt,k as qe,l as wt,n as St}from"./index-Blu2oA9H.js";import{g as kt,c as jt}from"./index-wHNMOf-c.js";import"./iobroker_javascript__loadShare__react__loadShare__.mjs_commonjs-proxy-CE9lvhW8.js";import"./iobroker_javascript__loadShare__prop_mf_2_types__loadShare__.mjs-BCtSFofY.js";import"./virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-Dus28I2g.js";import"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-RQRRZMX5.js";import"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs-DeVAS-oa.js";import"./inheritsLoose-CIXm_zPk.js";const et=Se(o.jsx("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"AddCircleOutline"),_t=Se(o.jsx("path",{d:"M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4zM17 11h-4v4h-2v-4H7V9h4V5h2v4h4z"}),"AddComment"),Tt=Se(o.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10h5v-2h-5c-4.34 0-8-3.66-8-8s3.66-8 8-8 8 3.66 8 8v1.43c0 .79-.71 1.57-1.5 1.57s-1.5-.78-1.5-1.57V12c0-2.76-2.24-5-5-5s-5 2.24-5 5 2.24 5 5 5c1.38 0 2.64-.56 3.54-1.47.65.89 1.77 1.47 2.96 1.47 1.97 0 3.5-1.6 3.5-3.57V12c0-5.52-4.48-10-10-10m0 13c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3"}),"AlternateEmail"),Ct=Se(o.jsx("path",{d:"M9.01 14H2v2h7.01v3L13 15l-3.99-4zm5.98-1v-3H22V8h-7.01V5L11 9z"}),"CompareArrows"),It=Se(o.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"Person"),Ot=Se(o.jsx("path",{d:"M3 10h11v2H3zm0-4h11v2H3zm0 8h7v2H3zm17.59-2.07-4.25 4.24-2.12-2.12-1.41 1.41L16.34 19 22 13.34z"}),"PlaylistAddCheck"),Et=Se(o.jsx("path",{d:"M2.01 21 23 12 2.01 3 2 10l15 2-15 2z"}),"Send"),Nt=Se(o.jsx("path",{d:"M20 9V7c0-1.1-.9-2-2-2h-3c0-1.66-1.34-3-3-3S9 3.34 9 5H6c-1.1 0-2 .9-2 2v2c-1.66 0-3 1.34-3 3s1.34 3 3 3v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c1.66 0 3-1.34 3-3s-1.34-3-3-3M7.5 11.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5S9.83 13 9 13s-1.5-.67-1.5-1.5M16 17H8v-2h8zm-1-4c-.83 0-1.5-.67-1.5-1.5S14.17 10 15 10s1.5.67 1.5 1.5S15.83 13 15 13"}),"SmartToy"),Rt=Ze(()=>import("./docs-compact-CKNGiYh2.js"),[],import.meta.url),$t={openai:"img/openai.svg",anthropic:"img/anthropic.svg",gemini:"img/gemini.svg",deepseek:"img/deepseek.svg",custom:"img/custom.svg"},Lt={width:16,height:16,flexShrink:0,opacity:.7},Mt={ru:"Russian",en:"English",de:"German",es:"Spanish",fr:"French",it:"Italian",pl:"Polish",nl:"Dutch",pt:"Portuguese",uk:"Ukrainian","zh-cn":"Chinese"};let $e=null,Je=null,Le=null,Me=null;function Dt(){$e=null,Je=null,Le=null,Me=null}async function De(r,e){if($e)return $e;const n=Object.keys(e)[0];if(!n)return null;const t=await r.sendTo(n,"getAvailableAiProviders",{}),i=((t==null?void 0:t.providers)||[]).map(a=>a.provider),s=((t==null?void 0:t.providers)||[]).find(a=>a.provider==="custom");return i.length?($e={providers:i,gptBaseUrl:s==null?void 0:s.baseUrl},$e):null}const Bt=["embedding","text-embedding","textembedding","embeddinggemma","embed-","-embed","bge-","mxbai-embed","nomic-embed","arctic-embed","snowflake-arctic-embed","all-minilm","multilingual-e5","jina-embed","voyage-","gecko","paraphrase-multilingual","dall-e","gpt-image","image-edit","-image-preview","-image-latest","flash-image","nano-banana","stable-diffusion","sdxl","midjourney","flux-","imagen","sora","veo-","cogvideo","runway-","lumiere","lyria","whisper","tts-","-tts","speech-","audio-preview","mini-tts","mini-transcribe","-transcribe","native-audio","flash-live","gpt-audio","realtime","bark-","xtts","voicebox","moderation","omni-moderation","llama-guard","shieldgemma","prompt-guard","-guardian","safeguard","rerank","reranker","babbage-","davinci-","curie-","text-ada-","text-davinci","text-curie","text-babbage","instructgpt","code-davinci","code-cushman","-turbo-instruct","-search-preview","-search-api","code-search","text-search","similarity-","computer-use-preview","deep-research","robotics","aqa","reader-lm","-nsql","minicheck"];function zt(r){const e=r.toLowerCase();return!(Bt.some(n=>e.includes(n))||e.startsWith("claude-1")||e.startsWith("claude-instant"))}async function Pt(r,e){const n=await De(r,e);if(!n)return{models:[],providerMap:{},errors:["No API keys configured"]};const t=Object.keys(e)[0];if(!t)return{models:[],providerMap:{},errors:[u.I18n.t("No running javascript instance found")]};const i=[],s={},a=[],p=(c,y)=>{for(const d of c)zt(d)&&(s[d]||(i.push(d),s[d]=y))},l=[],m=(c,y)=>{l.push(r.sendTo(t,"testApiConnection",{provider:c==="custom"?"openai":c}).then(d=>{d.models?p(d.models,c):d.error&&a.push(`${y||c}: ${d.error}`)}).catch(d=>{a.push(`${y||c}: ${String(d)}`)}))},g={openai:"OpenAI",anthropic:"Anthropic",gemini:"Gemini",deepseek:"DeepSeek",custom:"Custom"};for(const c of n.providers)m(c,g[c]);return await Promise.all(l),i.sort(),{models:i,providerMap:s,errors:a}}async function Ne(r,e,n){var i;return await r.sendTo(e,"chatCompletion",{timeout:n.timeout||6e5,model:n.model,provider:n.provider,messages:n.messages,...n.baseUrl?{baseUrl:n.baseUrl}:{},...(i=n.tools)!=null&&i.length?{tools:n.tools}:{}})}async function tt(r){if(Me)return Me;const e=await r.getObjectViewSystem("state","","香"),n=await r.getObjectViewSystem("channel","","香"),t=await r.getObjectViewSystem("device","","香"),i=await r.getObjectViewSystem("folder","","香"),s=await r.getObjectViewSystem("enum","","香");return Me=Object.assign(e,n,t,i,s),Me}async function nt(r){return tt(r)}function Ce(r,e){return r&&typeof r=="object"?r[e]||r.en:r||""}async function Ge(r){var S,b,v,H;if(Je)return Je;const e=u.I18n.getLanguage(),n=await tt(r),t=Object.keys(n).sort(),i=new gt,s=[],a=["UNREACH_STICKY"],p=[yt.Types.info],l=[],m=[],g=[],c=[];t.forEach(E=>{var C,x,w;((C=n[E])==null?void 0:C.type)==="enum"?l.push(E):(w=(x=n[E])==null?void 0:x.common)!=null&&w.smartName&&c.push(E)}),l.forEach(E=>{E.startsWith("enum.rooms.")?m.push(E):E.startsWith("enum.functions.")&&g.push(E);const C=n[E].common.members;C!=null&&C.length&&C.forEach(x=>{n[x]&&!c.includes(x)&&c.push(x)})});const y={id:"",objects:n,_keysOptional:t,_usedIdsOptional:s,ignoreIndicators:a,excludedTypes:p},d=[];c.forEach(E=>{y.id=E;const C=i.detect(y);C&&C.forEach(x=>{var de;const w=(de=x.states.find(I=>I.id))==null?void 0:de.id;if(!w||d.find(I=>I.id===w))return;const M=n[w],re={id:w,name:Ce(M.common.name,e),type:M.type,deviceType:x.type,states:x.states.filter(I=>I.id).map(I=>({id:I.id,name:I.name,role:I.defaultRole,type:n[I.id].common.type,unit:n[I.id].common.unit,read:n[I.id].common.read??!0,write:n[I.id].common.write??!0}))},G=w.split(".");let _,Y;(M.type==="channel"||M.type==="state")&&(G.pop(),_=G.join("."),n[_]&&(n[_].type==="channel"||n[_].type==="folder")?(G.pop(),Y=G.join("."),(!n[Y]||n[Y].type!=="device"&&n[_].type!=="folder")&&(Y=void 0)):_=void 0);const le=m.find(I=>{var A,X,Q;return(A=n[I].common.members)!=null&&A.includes(w)||_&&((X=n[I].common.members)!=null&&X.includes(_))?!0:Y&&((Q=n[I].common.members)==null?void 0:Q.includes(Y))});le&&(re.room=Ce(n[le].common.name,e));const K=g.find(I=>{var A,X,Q;return(A=n[I].common.members)!=null&&A.includes(w)||_&&((X=n[I].common.members)!=null&&X.includes(_))?!0:Y&&((Q=n[I].common.members)==null?void 0:Q.includes(Y))});K&&(re.function=Ce(n[K].common.name,e)),d.push(re)})});for(let E=0;E { + // obj.state.val = the new value (boolean or number) + // obj.id = the state ID that changed + setState('zigbee.0.lamp.state', obj.state.val); + log('Changed to ' + obj.state.val); +}); + +// CORRECT: on() with filter +on({id: /zigbee\\.0\\..*\\.state$/, change: 'ne'}, (obj) => { + if (obj.state.val === true) { + setState('zigbee.0.other.state', true); + } +}); + +// Other correct examples: +setState('id', true); +setState('id', 50); +const val = getState('id').val; +schedule('0 7 * * *', () => { log('runs daily at 07:00'); }); +schedule('0 22 * * *', () => { setState('id', false); }); + +// CORRECT Telegram: always use sendTo, NEVER setState on telegram +sendTo('telegram.0', 'send', {text: 'Alert: ' + someValue}); + +// CORRECT httpGet: res.data is a STRING, parse JSON with JSON.parse +httpGet('https://api.example.com/data', (err, res) => { + const data = JSON.parse(res.data); + log('Temperature: ' + data.main.temp); +}); + +$('state[state.id=*.state](rooms=Room)').each((id) => { setState(id, false); }); +createState('name', 0, {type: 'number', name: 'Name'}); +// CORRECT: one-time delayed action (turn off after 5 minutes = 300000ms) +setStateDelayed('zigbee.0.lamp.state', false, false, 5 * 60 * 1000); +log(formatDate(new Date(), 'DD.MM.YYYY hh:mm')); + +WRONG: on('id', (id, state) => {}) CORRECT: on('id', (obj) => {}) +WRONG: set('id', true) CORRECT: setState('id', true) +WRONG: adapter.setState('id', true) CORRECT: setState('id', true) +WRONG: obj.val or newState.val CORRECT: obj.state.val +WRONG: on('change', {id: 'x'}, cb) CORRECT: on({id: 'x', change: 'ne'}, cb) +WRONG: setState('telegram.0', text) CORRECT: sendTo('telegram.0', 'send', {text: text}) +WRONG: res.body.main.temp CORRECT: JSON.parse(res.data).main.temp +WRONG: function myFunc() {} CORRECT: write code directly, no function definitions +WRONG: setTimeout(fn, ms) CORRECT: setStateDelayed(id, val, false, ms) for one-time delay +WRONG: schedule('*/5 * * * *', fn) for one-time delay. schedule() is ONLY for recurring tasks +Values are boolean (true/false) or numbers, NEVER strings like 'ON'/'OFF'. +NEVER use: function keyword, require, import, setInterval, setTimeout, console.log, debug(). + +All available functions (use syntax from examples above): +on(pattern, (obj)=>{}) | once(pattern, (obj)=>{}) | unsubscribe(handler) +setState(id, val) | getState(id).val | setStateChanged(id, val) | setStateDelayed(id, val, ack, ms) | clearStateDelayed(id) +existsState(id) | existsObject(id) | getObject(id) | setObject(id, obj) | extendObject(id, obj) | deleteObject(id) +createState(name, initVal, {type,name,role}) | deleteState(name) | createAlias(name, alias) +schedule(cron, ()=>{}) | clearSchedule(obj) | scheduleById(id, (obj)=>{}) | getSchedules() +sendTo(adapter, cmd, msg) | sendToHost(host, cmd, msg) +$('selector').each((id)=>{}) | $('selector').setState(val) | $('selector').getState() +log(text) | formatDate(date, 'DD.MM.YYYY hh:mm') | formatTimeDiff(ms) | formatValue(val, decimals) +getDateObject(str) | getAstroDate(pattern) | isAstroDay() | compareTime(start, end, op) +exec(cmd, (err,stdout,stderr)=>{}) | httpGet(url, (err,res)=>{}) | httpPost(url, data, (err,res)=>{}) +readFile(adapter, name, (err,data)=>{}) | writeFile(adapter, name, data, cb) | delFile(adapter, name, cb) +onFile(id, name, withFile, cb) | offFile(id, name) | onStop(cb, timeout) +getHistory(inst, {id,start,end,aggregate,count}, cb) | getEnums(name) | getIdByName(name) +wait(ms) | toInt(val) | toFloat(val) | toBoolean(val) +messageTo(target, data) | onMessage(name, cb) | onLog(severity, cb) +runScript(name) | startScript(name) | stopScript(name) | isScriptActive(name) + +Write comments in ${r}. Put code in a \`\`\`javascript code block.`}function Xe(r){return`You generate ioBroker Blockly XML blocks. Return Blockly XML in a \`\`\`xml code block. +Use EXACT state IDs from the plan. Write text/comments in ${r}. + +IMPORTANT RULES: +- Return ONLY the inner blocks (no wrapper needed) +- Use the exact block types shown below +- State IDs must be full paths like "zigbee2mqtt.0.0x1234.state" +- Values are boolean (true/false) or numbers, NEVER strings like "ON"/"OFF" +- For Telegram use sendto_custom block, NEVER setState on telegram + +## Block Templates + +### Trigger: on_ext (react to state changes) + + + ne + + + STATE_ID_HERE + + + + + + +### Schedule: schedule (cron-based) + + 0 7 * * * + + + + + +### Set State: control + + + STATE_ID_HERE + FALSE + + TRUE + + + +### Get State Value: get_value + + val + STATE_ID_HERE + + +### Log: debug + + log + + Message here + + + +### SendTo (Telegram): sendto_custom + + + telegram.0 + send + + + Message text + + + text + + + +### Timeout: timeouts_settimeout + + timeout1 + 5000 + ms + + + + + +### If/Else: controls_if + + + + + EQ + valSTATE_ID + TRUE + + + + + + +### Number value +0 + +### Text value +hello + +### Boolean value +TRUE + +### Comparison: logic_compare + + EQ + + + + + +## Common Patterns + +### Turn on light when sensor triggers: + + + ne + + + zigbee2mqtt.0.0xSENSOR.occupancy + + + + + + EQ + valzigbee2mqtt.0.0xSENSOR.occupancy + TRUE + + + + + + zigbee2mqtt.0.0xLAMP.state + FALSE + TRUE + + + + + + +Write comments in ${r}. Put blocks in a \`\`\`xml code block.`}function Pe(r){let e=r;return e=e.replace(/[\s\S]*?<\/think>/gi,""),e=e.replace(/<\|endoftext\|>/g,""),e=e.replace(/<\|im_start\|>[\s\S]*?<\|im_end\|>/g,""),e=e.replace(/<\|im_start\|>[\s\S]*/g,""),e.trim()}const Ut=[{type:"function",function:{name:"search_datapoints",description:'Search ALL ioBroker objects by ID, name, or role — includes states, channels, devices, folders, enums (rooms/functions), adapters, instances, scripts, meta, etc. Returns matching IDs with object type, name, role, unit, and a hasChildren hint for containers. IMPORTANT: Aliases and physical device groupings are usually CHANNELS containing multiple state children (e.g. a motion sensor is often a channel alias.0.Floor.Room.MotionSensor with states ACTUAL, BATTERY, STATE under it). If a channel/device/folder matches your query, call get_object_info on its ID to list its state children. Role-based queries work too: "sensor.motion", "switch.light", "value.temperature".',parameters:{type:"object",properties:{query:{type:"string",description:'Search pattern (case-insensitive substring) - matches against object ID, name, and role. Examples: "bewegungsmelder", "temperature", "sensor.motion", "alias.0", "küche", "zigbee2mqtt.0.lamp".'},max_results:{type:"number",description:"Maximum number of results to return (default: 20)."},object_type:{type:"string",description:'Optional filter by object type: "state", "channel", "device", "folder", "enum", "adapter", "instance", "script", "meta", etc. Omit to search every type.'}},required:["query"]}}},{type:"function",function:{name:"get_state_value",description:"Get the current value of an ioBroker state/datapoint. Returns value, timestamp, and acknowledgment flag.",parameters:{type:"object",properties:{id:{type:"string",description:'The full state ID, e.g. "zigbee2mqtt.0.sensor.temperature"'}},required:["id"]}}},{type:"function",function:{name:"get_object_info",description:"Get detailed info about ANY ioBroker object + its full parent hierarchy + direct children. Works for every object type: state, channel, device, folder, adapter, instance, enum, meta, script. Returns: the object itself, parent chain (all non-state ancestors up to the adapter), and — if the object is a container (channel/device/folder/enum/instance/adapter/meta) — the list of direct children with their types, names, roles and units. Use this to navigate the object tree: start from a channel found by search_datapoints, read its children to see the actual state IDs underneath.",parameters:{type:"object",properties:{id:{type:"string",description:'The full object ID, e.g. "zigbee2mqtt.0.0x1234.state", "alias.0.Room.MotionSensor", or "enum.rooms.kitchen".'}},required:["id"]}}},{type:"function",function:{name:"search_scripts",description:"Search through all ioBroker JavaScript/Blockly/Rules scripts. Can search by script name/path OR by content (e.g. find all scripts that use a specific datapoint ID). Returns matching script names, paths, and matching lines.",parameters:{type:"object",properties:{query:{type:"string",description:'Search term - matches against script name, path, AND source code content. Examples: "carport", "zigbee2mqtt.0.lamp.state", "telegram"'},max_results:{type:"number",description:"Maximum number of scripts to return (default: 10)"}},required:["query"]}}},{type:"function",function:{name:"read_script",description:"Read the full source code of a specific ioBroker script by its ID or path. Use search_scripts first to find the script ID, then read_script to see its complete code.",parameters:{type:"object",properties:{id:{type:"string",description:'The script ID (e.g. "script.js.common.Licht.Carport") or path (e.g. "common/Licht/Carport")'}},required:["id"]}}},{type:"function",function:{name:"list_scripts",description:"List ALL available ioBroker scripts with their names, paths, types (JavaScript/Blockly/TypeScript), and enabled status. Use this to get an overview of all scripts before searching or reading specific ones.",parameters:{type:"object",properties:{}}}},{type:"function",function:{name:"run_script",description:"Execute a JavaScript or TypeScript snippet in the live ioBroker javascript engine and get back everything it logged. The code runs with the full script API (log, console.*, setState, getState, on, schedule, $, exec, httpGet, …) in VERBOSE mode, so internal operations (setState/getState/subscribe/…) are logged too — ideal for diagnosing behaviour or inspecting values. The snippet runs for a short window and is then automatically STOPPED and fully cleaned up (timers, subscriptions, schedules removed); it does NOT create a persistent script. Use `log(...)` or `console.log(...)` in the code to surface the values you want to inspect. WARNING: side effects are real (e.g. setState changes actual devices) — prefer read-only diagnostics unless the user explicitly asked to change something.",parameters:{type:"object",properties:{source:{type:"string",description:"The JavaScript (or TypeScript) source to execute. Log the values you want to inspect via log(...) / console.log(...). Top-level await is supported."},engineType:{type:"string",description:'Optional. "TypeScript/ts" to run the code as TypeScript. Defaults to JavaScript.'},timeout:{type:"number",description:"Optional. Milliseconds to keep the script alive to collect asynchronous logs before it is stopped (default 5000, max 60000). Increase when waiting for timers, subscriptions or HTTP responses."},logLevel:{type:"string",description:"Optional minimum severity to return: silly, debug, info, warn, error. Default silly (everything)."}},required:["source"]}}},{type:"function",function:{name:"get_editor_selection",description:'Read what the user has currently selected in the script editor. Returns the selected text and its line/column range, or a message if nothing is selected. Use this when the user refers to "this", "das hier", "the selection", or asks about a specific piece of code they highlighted.',parameters:{type:"object",properties:{}}}},{type:"function",function:{name:"get_editor_content",description:"Read the full current content of the script editor (may differ from the initial script version if the user has made edits). Use this when you need the live editor state rather than the saved script.",parameters:{type:"object",properties:{}}}},{type:"function",function:{name:"get_cursor_position",description:"Read the current cursor position (line and column, 1-based) in the script editor.",parameters:{type:"object",properties:{}}}},{type:"function",function:{name:"highlight_text_in_editor",description:"Search for a literal text in the script editor and select + scroll to it. Returns how many occurrences were found. Use this to draw the user's attention to a specific snippet you are discussing.",parameters:{type:"object",properties:{text:{type:"string",description:"Exact substring to search for (case-sensitive)."}},required:["text"]}}},{type:"function",function:{name:"highlight_line_range",description:"Select and scroll to a range of lines in the editor. Both line numbers are 1-based and inclusive. Use this to show the user which block of code you are referring to.",parameters:{type:"object",properties:{start_line:{type:"number",description:"First line (1-based, inclusive)."},end_line:{type:"number",description:"Last line (1-based, inclusive)."}},required:["start_line","end_line"]}}},{type:"function",function:{name:"go_to_line",description:"Move the cursor to a specific line (and optional column) and scroll that line into view. Use this to navigate the user to a relevant spot.",parameters:{type:"object",properties:{line:{type:"number",description:"1-based line number."},column:{type:"number",description:"1-based column (optional, default 1)."}},required:["line"]}}},{type:"function",function:{name:"insert_text_at_cursor",description:"Insert text at the current cursor position in the editor (or replace the current selection if one exists). Use sparingly — prefer returning code in a fenced markdown block so the user can review and smart-apply it. Only use direct insertion when the user explicitly asked you to write something into the editor.",parameters:{type:"object",properties:{text:{type:"string",description:"Text to insert."}},required:["text"]}}},{type:"function",function:{name:"replace_selection",description:"Replace the currently selected text in the editor with new text. Fails if nothing is selected. Use this to refactor or rewrite a specific highlighted snippet.",parameters:{type:"object",properties:{text:{type:"string",description:"Replacement text."}},required:["text"]}}},{type:"function",function:{name:"get_diagnostics",description:"Read all active Monaco diagnostics (errors, warnings, info, hints) from the current editor model — this is what shows up as red/yellow squiggles. Use this to find syntax errors, unused variables, missing types, or other editor-reported issues the user might be asking about.",parameters:{type:"object",properties:{}}}},{type:"function",function:{name:"get_document_symbols",description:"Get the document outline of the current script: all top-level functions, classes, constants, and variables with their line numbers. Use this to understand the structure of a long script or to find where a specific function is defined.",parameters:{type:"object",properties:{}}}}];function Ue(r){return r&&typeof r=="object"?r.en||r.de||"":r||""}function Wt(r,e,n){const t=(n||"").toLowerCase();if(!t)return!1;if(r.toLowerCase().includes(t))return!0;const i=e==null?void 0:e.common;if(!i)return!1;const s=Ue(i.name).toLowerCase();if(s&&s.includes(t))return!0;const a=(i.role||"").toLowerCase();return!!(a&&a.includes(t))}async function Ft(r,e,n=20,t){const i=await nt(r),s=t==null?void 0:t.toLowerCase(),a=[],p=Object.keys(i),l=new Set;for(const m of p){const g=m.lastIndexOf(".");g>0&&l.add(m.substring(0,g))}for(const m of p){const g=i[m],c=g==null?void 0:g.type;if(!c||s&&c!==s||!Wt(m,g,e))continue;const y=g.common,d={id:m,type:c,name:Ue(y==null?void 0:y.name)};if(y!=null&&y.role&&(d.role=y.role),c==="state"?(d.stateType=(y==null?void 0:y.type)||"",y!=null&&y.unit&&(d.unit=y.unit)):l.has(m)&&(d.hasChildren=!0),a.push(d),a.length>=n)break}return a.length===0?JSON.stringify({message:`No objects found matching "${e}". Hint: try a role like "sensor.motion" or a partial path.`}):JSON.stringify(a)}async function Ht(r,e){try{const n=await r.getState(e);return JSON.stringify(n?{val:n.val,ts:n.ts?new Date(n.ts).toISOString():null,ack:n.ack,from:n.from}:{error:`State '${e}' not found`})}catch{return JSON.stringify({error:`Failed to read state '${e}'`})}}const Vt=new Set(["channel","device","folder","adapter","instance","enum","meta"]),Ke=50;async function qt(r,e){var n;try{const t=await r.getObject(e);if(!t)return JSON.stringify({error:`Object '${e}' not found`});const i={id:t._id,type:t.type,common:t.common},s=e.split("."),a=[];for(let p=s.length-1;p>=2;p--){const l=s.slice(0,p).join(".");try{const m=await r.getObject(l);m&&m.type!=="state"&&a.push({id:m._id,type:m.type,name:Ue((n=m.common)==null?void 0:n.name),common:m.common})}catch{}}if(a.length>0&&(i.parents=a),Vt.has(t.type)){const p=await nt(r),l=[],m=`${e}.`;let g=!1;for(const c of Object.keys(p))if(c.startsWith(m)&&!c.substring(m.length).includes(".")){const y=p[c],d=y==null?void 0:y.common,S={id:c,name:Ue(d==null?void 0:d.name),type:(y==null?void 0:y.type)||""};if(d!=null&&d.role&&(S.role=d.role),(y==null?void 0:y.type)==="state"&&(d!=null&&d.unit)&&(S.unit=d.unit),l.push(S),l.length>=Ke){g=!0;break}}l.length>0&&(i.children=l,g&&(i.childrenTruncated=!0,i.childrenHint=`Only the first ${Ke} children are shown. Use search_datapoints with a more specific query or the object_type filter to narrow down.`))}return JSON.stringify(i)}catch{return JSON.stringify({error:`Failed to read object '${e}'`})}}function st(r){return vt(r)||r}function Gt(r,e,n=10){const t=e.toLowerCase(),i=[];for(const s of r){const a=s.id.toLowerCase(),p=s.name.toLowerCase(),l=s.id.replace(/^script\.js\./,"").replace(/\./g,"/"),m=s.engineType==="Blockly"||s.engineType==="Rules",g=a.includes(t)||p.includes(t),c=m?st(s.source):s.source,y=c.toLowerCase().includes(t);if(g||y){const d={id:s.id,path:l,name:s.name,type:m?"Blockly":s.engineType.includes("TypeScript")?"TypeScript":"JavaScript",enabled:s.enabled};if(y){const S=c.split(` +`),b=[];for(let v=0;v=5));v++);b.length>0&&(d.matchingLines=b)}if(i.push(d),i.length>=n)break}}return i.length===0?JSON.stringify({message:`No scripts found matching "${e}"`}):JSON.stringify(i)}function Yt(r,e){const n=e.replace(/\//g,".").toLowerCase(),t=r.find(p=>{const l=p.id.toLowerCase();return l===n||l===`script.js.${n}`||l.endsWith(`.${n}`)});if(!t)return JSON.stringify({error:`Script '${e}' not found. Use search_scripts to find available scripts.`});const i=t.engineType==="Blockly"||t.engineType==="Rules",s=i?st(t.source):t.source,a=t.id.replace(/^script\.js\./,"").replace(/\./g,"/");return JSON.stringify({id:t.id,path:a,name:t.name,type:i?"Blockly":t.engineType.includes("TypeScript")?"TypeScript":"JavaScript",enabled:t.enabled,source:s})}function Xt(r){const e=r.map(n=>({id:n.id,path:n.id.replace(/^script\.js\./,"").replace(/\./g,"/"),name:n.name,type:n.engineType==="Blockly"||n.engineType==="Rules"?"Blockly":n.engineType.includes("TypeScript")?"TypeScript":"JavaScript",enabled:n.enabled}));return JSON.stringify(e)}function he(){return JSON.stringify({error:"Editor is not available. This tool requires the script editor to be open."})}async function Kt(r,e,n){var i;if(!e)return JSON.stringify({error:"No running javascript instance found to execute the script."});const t=n.source;if(!t||typeof t!="string")return JSON.stringify({error:"No source code provided."});try{const s=await r.sendTo(e,"execute",{source:t,engineType:n.engineType,timeout:n.timeout,logLevel:n.logLevel});return!s||s.ok===!1?JSON.stringify({error:(s==null?void 0:s.error)||"Execution failed",logs:(s==null?void 0:s.logs)||[]}):JSON.stringify({engineType:s.engineType,runtime:s.runtime,truncated:s.truncated||!1,logCount:((i=s.logs)==null?void 0:i.length)||0,logs:s.logs||[],output:s.output||""})}catch(s){return JSON.stringify({error:`Failed to execute script: ${s instanceof Error?s.message:String(s)}`})}}async function Qt(r,e,n,t,i){let s;try{s=JSON.parse(e.function.arguments)}catch{return JSON.stringify({error:`Invalid arguments: ${e.function.arguments}`})}switch(e.function.name){case"search_datapoints":return Ft(r,s.query,s.max_results||20,s.object_type);case"get_state_value":return Ht(r,s.id);case"get_object_info":return qt(r,s.id);case"search_scripts":return Gt(n||[],s.query,s.max_results||10);case"read_script":return Yt(n||[],s.id);case"list_scripts":return Xt(n||[]);case"run_script":return Kt(r,i,s);case"get_editor_selection":{if(!(t!=null&&t.getSelection))return he();const a=t.getSelection();return JSON.stringify(a||{message:"No text is currently selected in the editor."})}case"get_editor_content":return t!=null&&t.getContent?JSON.stringify({content:t.getContent()}):he();case"get_cursor_position":{if(!(t!=null&&t.getCursorPosition))return he();const a=t.getCursorPosition();return JSON.stringify(a||{message:"Editor has no cursor position (not focused)."})}case"highlight_text_in_editor":{if(!(t!=null&&t.highlightText))return he();const a=t.highlightText(s.text);return JSON.stringify({matches:a,message:a===0?`Text "${s.text}" was not found in the editor.`:`Highlighted ${a} occurrence(s) of "${s.text}".`})}case"highlight_line_range":{if(!(t!=null&&t.highlightLineRange))return he();const a=t.highlightLineRange(s.start_line,s.end_line);return JSON.stringify({success:a,message:a?`Selected lines ${s.start_line}-${s.end_line}.`:"Could not select the requested line range."})}case"go_to_line":{if(!(t!=null&&t.goToLine))return he();const a=t.goToLine(s.line,s.column);return JSON.stringify({success:a,message:a?`Cursor moved to line ${s.line}.`:"Could not move the cursor."})}case"insert_text_at_cursor":{if(!(t!=null&&t.insertTextAtCursor))return he();const a=t.insertTextAtCursor(s.text);return JSON.stringify({success:a,message:a?"Text inserted at cursor.":"Editor rejected the insertion."})}case"replace_selection":{if(!(t!=null&&t.replaceSelection))return he();const a=t.replaceSelection(s.text);return JSON.stringify({success:a,message:a?"Selection replaced.":"No text was selected to replace."})}case"get_diagnostics":{if(!(t!=null&&t.getDiagnostics))return he();const a=t.getDiagnostics();return JSON.stringify({count:a.length,diagnostics:a})}case"get_document_symbols":{if(!(t!=null&&t.getSymbols))return he();const a=await t.getSymbols();return JSON.stringify({count:a.length,symbols:a})}default:return JSON.stringify({error:`Unknown tool: ${e.function.name}`})}}let Zt=0;function Re(){return`msg_${Date.now()}_${++Zt}`}function en(r){const{socket:e,runningInstances:n,currentCode:t,currentLanguage:i,allScripts:s,editorApi:a,currentScriptId:p}=r,l=J((f,O,N)=>f==="none"||!N?null:{range:O,scriptId:p||"",scriptVersion:(t||"").length,kind:f,originalText:N},[p,t]),[m,g]=te(()=>{try{const f=window.localStorage.getItem("Editor.aiChatMessages");return f?JSON.parse(f):[]}catch{return[]}}),c=J(f=>{g(O=>{const N=typeof f=="function"?f(O):f,R=N.length>100?N.slice(-100):N;try{window.localStorage.setItem("Editor.aiChatMessages",JSON.stringify(R))}catch{try{const W=R.slice(-20);window.localStorage.setItem("Editor.aiChatMessages",JSON.stringify(W))}catch{}}return R})},[]),[y,d]=te(!1),[S,b]=te(null),[v,H]=te(window.localStorage.getItem("Editor.aiChatMode")||"agent"),E=J(f=>{H(f),window.localStorage.setItem("Editor.aiChatMode",f)},[]),[C,x]=te(null),[w,M]=te(window.localStorage.getItem("openai-model")||""),[re,G]=te([]),[_,Y]=te({}),[le,K]=te(!0),[de,I]=te(null),A=ne(null),X=ne(null),Q=ne(null),h=ne(null),T=J(f=>{M(f),window.localStorage.setItem("openai-model",f)},[]),k=J(async()=>{K(!0),I(null);try{const f=await Pt(e,n);if(G(f.models),Y(f.providerMap),f.models.length>0){const O=window.localStorage.getItem("openai-model");O&&f.models.includes(O)?M(O):M(f.models[0])}f.errors.length>0&&I(f.errors.join("; "))}catch(f){I(String(f))}K(!1)},[e,n]);xe(()=>{k()},[k]);const z=J(f=>{let O=!1,N=!1;const R=[];let W=!1;const ge=/@([\w/äöüÄÖÜß-]+)/g;let D;for(;(D=ge.exec(f))!==null;){const B=D[1].toLowerCase();if(B==="alle"||B==="all")O=!0;else if(B==="geräte"||B==="devices"||B==="geraete")N=!0;else if(W=!0,s&&s.length>0){const V=D[1].replace(/\//g,".").toLowerCase(),oe=V.split("."),ie=s.find(ye=>{const pe=ye.id.toLowerCase(),Z=pe.replace(/^script\.js\./,"");if(Z===V||Z.endsWith(`.${V}`)||pe===`script.js.${V}`)return!0;let _e=0;for(const me of oe){const Te=Z.indexOf(me,_e);if(Te===-1)return!1;_e=Te+me.length}return!0});if(ie)R.push(ie.id);else for(const ye of oe){if(ye.length<3)continue;const pe=s.filter(Z=>Z.id.toLowerCase().includes(`.${ye}`)||Z.name.toLowerCase().includes(ye));for(const Z of pe)R.includes(Z.id)||R.push(Z.id)}}}return W&&R.length===0&&(O=!0),{cleanMessage:f.replace(/@[\w/äöüÄÖÜß]+\s*/g,"").trim(),mentionedScriptIds:R,includeAll:O,includeDevices:N}},[s]),se=J(async(f,O,N)=>{h.current||(h.current=await Jt()),A.current||(A.current=await De(e,n));const R=Ye(),W=i==="blockly",ge=f||N.length>0;let D=`You are an AI assistant for ioBroker JavaScript adapter scripting. Help the user write, debug, and understand ioBroker scripts. Write comments in ${R}. Use the ioBroker JavaScript API correctly. + +ioBroker object hierarchy: adapter.instance.device.channel.state +- A "state" is a single datapoint (e.g. zigbee2mqtt.0.0x1234.temperature) +- A "channel" groups related states (e.g. zigbee2mqtt.0.0x1234 contains temperature, humidity, battery) +- A "device" groups channels (e.g. zigbee2mqtt.0.0x1234) +- The channel/device often has the human-readable name (e.g. "Living Room Sensor") +When looking up info about a datapoint, ALWAYS also check its parent channel/device for the device name and context. Use get_object_info which returns the full parent hierarchy automatically. + +To verify code or diagnose runtime behaviour, you can use the run_script tool: it executes a JavaScript/TypeScript snippet in the live engine (verbose mode) and returns everything it logged, then auto-stops it. Log the values you want to inspect via log(...) / console.log(...). It runs against the live system, so prefer read-only diagnostics (getState, $, getObject) and only call setState when the user explicitly asked to change something. + +Available API and syntax rules: +${h.current}`;if(W&&(D+="\n\nThe user is working in the Blockly visual editor. When asked to create or modify code, respond with Blockly XML in a ```xml code block instead of JavaScript."),(O||f)&&(Q.current||(Q.current=await Ge(e)),D+=` + +Available smart home devices: +${JSON.stringify(Q.current,null,0)}`),!ge&&t)if(W){const F="%%BLOCKLY_XML%%",B=t.indexOf(F),V=B!==-1?t.substring(0,B).trim():t,oe=B!==-1?t.substring(B+F.length).trim():"";D+=` + +The user is working on this Blockly script (currently open in the editor). + +Generated JavaScript (shows the logic): +\`\`\`javascript +${V} +\`\`\``,oe&&(D+=` + +Blockly XML (use for modifications): +\`\`\`xml +${oe} +\`\`\``)}else D+=` + +The user's question is about this script (currently open in the editor, ${i||"javascript"}): +\`\`\`${i||"javascript"} +${t} +\`\`\``;if(f&&s&&s.length>0)D+=` + +The user requested ALL scripts. Search through all of them to answer the question. Always identify WHICH script you describe by its full ID. Scripts may reference datapoint IDs via variables. + +${qe(s,!0)}`;else if(N.length>0&&s){const F=s.filter(B=>N.includes(B.id));F.length>0&&(D+=` + +IMPORTANT: The user is asking about the following script(s). Answer ONLY about these scripts, NOT about the currently open editor tab. Analyze the source code below carefully: + +${qe(F,!0)}`)}return W&&(D+=` + +${Xe(R)}`),[{role:"system",content:D}]},[e,n,t,i,s]),ke=J(async f=>{if(!f.trim()||y)return;const O=_[w];if(!O){x(u.I18n.t("Please select a valid model"));return}const N=A.current||await De(e,n);if(A.current=N,!N){x(u.I18n.t("No API keys configured"));return}const R=Object.keys(n)[0];if(!R){x(u.I18n.t("No running javascript instance found"));return}const W=O==="custom"&&N.gptBaseUrl||"",ge={id:Re(),role:"user",content:f,timestamp:Date.now()},D={id:Re(),role:"assistant",content:`⏳ ${u.I18n.t("Generating plan...")}`,timestamp:Date.now()};c(F=>[...F,ge,D]),d(!0),x(null);try{const F=Ye();Q.current||(Q.current=await Ge(e));const B=Q.current||[],V=`Devices in my smart home: +${JSON.stringify(B)} + +I need a plan for this task: ${f} + +Answer with max 6 lines. Use FULL device IDs from the list above (e.g. zigbee2mqtt.0.0xa4c1383f5ef5fb07.state). No explanation. No reasoning. +1. IDs: +2. Trigger: +3. Condition: +4. Actions: +5. Else: +6. Extra: +Values are boolean (true/false) or numbers, not strings. Use .state not .state_toggle.`,oe=await Ne(e,R,{messages:[{role:"user",content:V}],model:w,provider:O,baseUrl:W});if(oe.error){x(oe.error),c(ae=>ae.slice(0,-2)),d(!1);return}const ie=Pe(oe.content||"");c(ae=>{const j=[...ae],P=j[j.length-1];return(P==null?void 0:P.role)==="assistant"&&(j[j.length-1]={...P,content:`📋 **${u.I18n.t("Plan")}:** +${ie}`}),j});const ye={id:Re(),role:"assistant",content:`⏳ ${u.I18n.t("Generating code...")}`,timestamp:Date.now()};c(ae=>[...ae,ye]);const pe=i==="blockly",Z=pe?`TASK: ${f} + +PLAN: +${ie} + +Generate Blockly XML blocks for this ioBroker automation. Use the exact state IDs from the plan. If the plan contains TODO_DEVICE_ID, keep it as a placeholder. Write comments in ${F}. Put the blocks in a \`\`\`xml code block. You may add a short explanation before or after the XML.`:`TASK: ${f} + +PLAN: +${ie} + +Write the ioBroker script. Use the exact state IDs from the plan. If the plan contains TODO_DEVICE_ID, keep it as a placeholder with a comment so the user can fill in the correct ID. Write comments in ${F}. Put the code in a \`\`\`javascript code block. You may add a short explanation before or after the code.`,_e=pe?Xe(F):At(F),me=await Ne(e,R,{messages:[{role:"system",content:_e},{role:"user",content:Z}],model:w,provider:O,baseUrl:W});if(me.error){x(me.error),c(ae=>ae.slice(0,-1)),d(!1);return}const Te=Pe(me.content||"");c(ae=>{const j=[...ae],P=j[j.length-1];return(P==null?void 0:P.role)==="assistant"&&(j[j.length-1]={...P,content:Te}),j}),b(`${u.I18n.t("devices")}: ${B.length}`)}catch(F){x(String(F)),c(B=>B.slice(0,-1))}d(!1)},[w,_,y,e,n,i,c]),U=J(async f=>{var ae;if(v==="code")return ke(f);if(!f.trim()||y)return;const O=_[w];if(!O){x(u.I18n.t("Please select a valid model"));return}const N=A.current||await De(e,n);if(A.current=N,!N){x(u.I18n.t("No API keys configured"));return}const R=Object.keys(n)[0];if(!R){x(u.I18n.t("No running javascript instance found"));return}let W=X.current;if(X.current=null,!W)try{const j=(ae=a==null?void 0:a.getSelection)==null?void 0:ae.call(a);j&&j.text&&(W=l("selection",j.range,j.text))}catch{}const ge={id:Re(),role:"user",content:f,timestamp:Date.now(),sourceRange:W},D={id:Re(),role:"assistant",content:"",timestamp:Date.now(),sourceRange:W};c(j=>[...j,ge,D]),d(!0),x(null);const{cleanMessage:F,mentionedScriptIds:B,includeAll:V,includeDevices:oe}=z(f),ie=[];if(V)ie.push(`${u.I18n.t("all scripts")} (${(s==null?void 0:s.length)||0})`);else if(B.length>0){const j=B.map(P=>P.replace(/^script\.js\./,""));ie.push(j.join(", "))}else ie.push(u.I18n.t("current script"));oe&&ie.push(u.I18n.t("devices")),b(`${u.I18n.t("Context")}: ${ie.join(" + ")}`);const ye=await se(V,oe,B),pe=O==="custom"&&N.gptBaseUrl||"";let Z=F||f;if(s&&s.length>0){const j=Z.match(/\b[\w-]+\.\d+\.[\w.-]+/g);if(j){const P=[];for(const ee of new Set(j)){const be=wt(s,ee);be.length>0&&P.push(`Datapoint "${ee}" is used in: +${be.map(je=>` - ${je.scriptName} (${je.scriptId}) line ${je.lineNumber}: ${je.usageType} → ${je.line}`).join(` +`)}`)}P.length>0&&(Z+=` + +[Automatic analysis results] +${P.join(` + +`)}`)}}const _e=[...ye,...m.filter(j=>j.role!=="system").map(j=>({role:j.role,content:j.content})),{role:"user",content:Z}],me=v==="agent",Te=5;try{const j=[..._e];for(let P=0;P$.slice(0,-1));else{const $=Pe(q.content||"");c(ce=>{const fe=[...ce],Be=fe[fe.length-1];return(Be==null?void 0:Be.role)==="assistant"&&(fe[fe.length-1]={...Be,content:$}),fe})}break}x(ee.error),c(q=>q.slice(0,-1));break}let be=ee.tool_calls;if((!be||be.length===0)&&me&&ee.content){const q=ee.content.trim();try{const $=JSON.parse(q);$.name&&$.arguments&&(be=[{id:`text_tool_${Date.now()}`,type:"function",function:{name:$.name,arguments:JSON.stringify($.arguments)}}])}catch{}}if(!be||be.length===0){const q=Pe(ee.content||"");c($=>{const ce=[...$],fe=ce[ce.length-1];return(fe==null?void 0:fe.role)==="assistant"&&(ce[ce.length-1]={...fe,content:q}),ce});break}ee.tool_calls=be;const je=ee.tool_calls.map(q=>{let $={};try{$=JSON.parse(q.function.arguments)}catch{}switch(q.function.name){case"search_datapoints":return`🔍 ${u.I18n.t("Searching datapoints")}: "${String($.query||"")}"`;case"get_state_value":return`📊 ${u.I18n.t("Reading value")}: ${String($.id||"")}`;case"get_object_info":return`📋 ${u.I18n.t("Loading object info")}: ${String($.id||"")}`;case"search_scripts":return`🔍 ${u.I18n.t("Searching scripts")}: "${String($.query||"")}"`;case"read_script":return`📖 ${u.I18n.t("Reading script")}: ${String($.id||"")}`;case"list_scripts":return`📂 ${u.I18n.t("Loading script list")}`;default:return`⚙️ ${q.function.name}`}});c(q=>{const $=[...q],ce=$[$.length-1];return(ce==null?void 0:ce.role)==="assistant"&&($[$.length-1]={...ce,content:je.join(` +`)}),$}),j.push({role:"assistant",content:ee.content||"",tool_calls:ee.tool_calls});for(const q of ee.tool_calls){const $=await Qt(e,q,s,a,R);j.push({role:"tool",tool_call_id:q.id,content:$})}}}catch(j){x(String(j)),c(P=>P.slice(0,-1))}d(!1)},[w,_,m,y,e,n,se,z,s,v,ke,c,l,a]),ue=J(()=>{c([]),x(null),d(!1),b(null),Dt(),window.localStorage.removeItem("Editor.aiChatHistory")},[c]),it=J(async(f,O)=>{const N=_[w];if(!N)return`Error: ${u.I18n.t("Please select a valid model")}`;const R=A.current||await De(e,n);if(A.current=R,!R)return`Error: ${u.I18n.t("No API keys configured")}`;const W=Object.keys(n)[0];if(!W)return`Error: ${u.I18n.t("No running javascript instance found")}`;const ge=N==="custom"&&R.gptBaseUrl||"",D=i||"javascript",F=`You are an assistant for writing ioBroker ${D} scripts. The user will ask a question about a snippet of their code. Match your answer to the question: +- If they ask for an explanation, description, or "what does this do?", reply with clear prose (a few sentences). Do NOT repeat the code unchanged. +- If they explicitly ask for a change, refactor, fix, or rewrite, reply with a single fenced \`\`\`${D==="blockly"?"xml":D}\`\`\` code block containing the full replacement for the selection. You may add one short sentence before or after the block. +- If they ask something ambiguous or meta (e.g. "is this correct?"), reply in prose first and only include code if proposing a change. +ioBroker globals available in scripts: on, setState, getState, schedule, sendTo, log, createState, setStateDelayed, existsState, httpGet, httpPost.`,B=O?`Code from my editor: + +\`\`\`${D==="blockly"?"xml":D} +${O} +\`\`\` + +${f}`:f;try{const V=await Ne(e,W,{messages:[{role:"system",content:F},{role:"user",content:B}],model:w,provider:N,baseUrl:ge});return V.error?`Error: ${V.error}`:V.content||""}catch(V){return`Error: ${V.message||String(V)}`}},[w,_,n,e,i]),at=J(f=>{f.range&&f.code?X.current=l(f.kind||"codelens",f.range,f.code):X.current=null,Ze(async()=>{const{buildActionPrompt:O}=await Promise.resolve().then(()=>dn);return{buildActionPrompt:O}},void 0,import.meta.url).then(({buildActionPrompt:O})=>{const N=O({action:f.action,code:f.code,language:i||"javascript",diagnostic:f.diagnostic,question:f.question,rangeLabel:f.rangeLabel});N?U(N):X.current=null}).catch(()=>{X.current=null,x(u.I18n.t("Failed to build AI action prompt"))})},[U,i,l]);return{messages:m,isLoading:y,error:C,model:w,availableModels:re,modelProviderMap:_,modelsLoading:le,modelsError:de,lastContextInfo:S,mode:v,setMode:E,setModel:T,sendMessage:U,triggerAiAction:at,askInline:it,clearChat:ue,retryLoadModels:k}}const tn=({code:r,language:e,themeType:n,onInsertCode:t,onShowDiff:i,sourceRange:s})=>{const a=ne(null);xe(()=>{var g;const l=window.monaco;if(!a.current||!((g=l==null?void 0:l.editor)!=null&&g.colorize))return;const m=e==="ts"||e==="typescript"?"typescript":e||"javascript";l.editor.colorize(r,m,{theme:n==="dark"?"vs-dark":"vs"}).then(c=>{a.current&&(a.current.innerHTML=c)})},[r,e,n]);const p=J(()=>{navigator.clipboard.writeText(r)},[r]);return o.jsxs(L,{sx:{position:"relative",my:1,borderRadius:1,overflow:"hidden",border:"1px solid",borderColor:"divider"},children:[o.jsxs(L,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",px:1,py:.5,bgcolor:"action.hover",borderBottom:"1px solid",borderColor:"divider"},children:[o.jsx(L,{sx:{fontSize:"0.75rem",color:"text.secondary",textTransform:"uppercase"},children:e||"javascript"}),o.jsxs(L,{children:[o.jsx(ve,{title:u.I18n.t("Copy"),children:o.jsx(we,{size:"small",onClick:p,children:o.jsx(kt,{sx:{fontSize:16}})})}),t&&o.jsx(ve,{title:u.I18n.t("Insert into editor"),children:o.jsx(we,{size:"small",onClick:()=>t(r),children:o.jsx(et,{sx:{fontSize:16}})})}),i&&o.jsx(ve,{title:u.I18n.t("Show as diff"),children:o.jsx(we,{size:"small",onClick:()=>i(r,s),children:o.jsx(Ct,{sx:{fontSize:16}})})})]})]}),o.jsx("pre",{ref:a,style:{margin:0,padding:"8px 12px",overflow:"auto",maxHeight:400,fontSize:"13px",fontFamily:"'Cascadia Code', 'Fira Code', 'Consolas', monospace",backgroundColor:n==="dark"?"#1e1e1e":"#f8f8f8",color:n==="dark"?"#d4d4d4":"#333"},children:r})]})},nn=({xml:r,themeType:e})=>{const n=ne(null),t=ne(null),[i,s]=te(60),a=ne(!1);return xe(()=>{a.current&&(a.current=!1,requestAnimationFrame(()=>{const p=window.Blockly,l=t.current;p&&l&&(p.svgResize(l),l.scrollCenter())}))},[i]),xe(()=>{const p=window.Blockly;if(!(!p||!n.current)){t.current&&(t.current.dispose(),t.current=null);try{const l=p.inject(n.current,{readOnly:!0,toolbox:null,trashcan:!1,zoom:{controls:!1,wheel:!1,startScale:1},move:{scrollbars:!1,drag:!1,wheel:!1},sounds:!1,renderer:"thrasos",theme:e==="dark"?St:"classic",media:"google-blockly/media/"});t.current=l;let m=r.trim();m.startsWith("${m}`);const g=p.utils.xml.textToDom(m);let c=10;const y=Array.from(g.querySelectorAll(":scope > block"));for(const b of y)b.setAttribute("x","10"),b.setAttribute("y",String(c)),c+=200;p.Xml.domToWorkspace(g,l);const d=l.getTopBlocks(!1);if(d.length>1){let b=10;for(const v of d){const H=v.getRelativeToSurfaceXY();v.moveBy(10-H.x,b-H.y),b+=v.getHeightWidth().height+20}}const S=l.getBlocksBoundingBox();if(S){const b=S.bottom-S.top+20,v=Math.max(60,Math.ceil(b));a.current=!0,s(v)}}catch{}return()=>{t.current&&(t.current.dispose(),t.current=null)}}},[r,e]),o.jsx(L,{ref:n,sx:{width:"100%",height:i,minHeight:60,borderRadius:1,overflow:"hidden",border:"1px solid",borderColor:"divider"}})};function sn(r){const e=[],n=/```(\w*)\n?([\s\S]*?)```/g;let t=0,i;for(;(i=n.exec(r))!==null;){if(i.index>t){const s=r.substring(t,i.index).trim();s&&e.push({type:"text",content:s})}e.push({type:"code",content:i[2].trim(),language:i[1]||"javascript"}),t=i.index+i[0].length}if(tt&&e.push(r.substring(t,i.index)),i[2]?e.push(o.jsx("strong",{children:i[2]},s++)):i[3]?e.push(o.jsx("em",{children:i[3]},s++)):i[4]&&e.push(o.jsx("code",{className:"ai-chat-inline-code",style:{padding:"2px 6px",borderRadius:4,fontSize:"0.85em",fontFamily:"'Cascadia Code', 'Fira Code', 'Consolas', monospace"},children:i[4]},s++)),t=i.index+i[0].length;return tp.trim().replace(/^\||\|$/g,"").split("|").map(l=>l.trim()),s=i(r[0]),a=r.slice(2).map(i);return o.jsx(L,{sx:{overflowX:"auto",my:1},children:o.jsxs("table",{style:{borderCollapse:"collapse",width:"100%",fontSize:"0.8rem",color:e.palette.text.primary},children:[o.jsx("thead",{children:o.jsx("tr",{children:s.map((p,l)=>o.jsx("th",{style:{border:`1px solid ${e.palette.divider}`,padding:"6px 10px",backgroundColor:t?e.palette.grey[800]:e.palette.grey[100],color:e.palette.text.primary,fontWeight:600,textAlign:"left"},children:Ee(p)},l))})}),o.jsx("tbody",{children:a.map((p,l)=>o.jsx("tr",{style:{backgroundColor:l%2===1?t?e.palette.grey[900]:e.palette.grey[50]:void 0},children:p.map((m,g)=>o.jsx("td",{style:{border:`1px solid ${e.palette.divider}`,padding:"6px 10px",color:e.palette.text.primary},children:Ee(m)},g))},l))})]})},n)}function an(r,e){const n=r.split(` +`),t=[];let i=0,s=0;for(;so.jsx("li",{children:Ee(g)},c))},i++));continue}if(/^\d+[.)]\s/.test(p)){const m=[];for(;so.jsx("li",{children:Ee(g)},c))},i++));continue}t.push(o.jsx("div",{children:Ee(p)},i++)),s++}return t}const cn=({message:r,themeType:e,currentLanguage:n,onInsertCode:t,onShowDiff:i,onApplyCode:s})=>{const a=r.role==="user",p=ct(),l=a?e==="dark"?p.palette.primary.dark:p.palette.primary.main:e==="dark"?p.palette.secondary.dark:p.palette.secondary.main,m=p.palette.getContrastText(l),g=Ae(()=>sn(r.content),[r.content]),c=(b,v)=>!!(b==="xml"||b==="blockly"||n==="blockly"&&v&&/b.type==="code"?c(b.language,b.content)?o.jsxs(L,{sx:{my:1},children:[o.jsx(nn,{xml:b.content,themeType:e}),o.jsxs(L,{sx:{display:"flex",gap:.5,mt:.5},children:[s&&o.jsx(We,{size:"small",variant:"contained",color:"primary",startIcon:o.jsx(Ot,{sx:{fontSize:14}}),onClick:()=>s(b.content),sx:{textTransform:"none",fontSize:"0.75rem"},children:u.I18n.t("Apply blocks")}),t&&o.jsx(We,{size:"small",variant:"outlined",startIcon:o.jsx(et,{sx:{fontSize:14}}),onClick:()=>t(b.content),sx:{textTransform:"none",fontSize:"0.75rem"},children:u.I18n.t("Insert blocks")})]})]},v):o.jsx(tn,{code:b.content,language:b.language||"javascript",themeType:e,onInsertCode:t,onShowDiff:i,sourceRange:r.sourceRange||null},v):o.jsx(L,{sx:{wordBreak:"break-word",color:p.palette.text.primary},children:an(b.content,p)},v))})]})};function ln(r){const e=(r||"").toLowerCase();return e.includes("blockly")||e.includes("rules")?"blockly":e.includes("typescript")?"typescript":"javascript"}function Ie(r,e){return`\`\`\`${e==="blockly"?"xml":e} +${r} +\`\`\``}function rt(r){const e=(r.code||"").trim(),n=ln(r.language),t=r.rangeLabel?` (${r.rangeLabel})`:"";switch(r.action){case"explain":return e?[`Please explain what this ioBroker ${n} code does${t}.`,"Focus on: which datapoints it reads/writes, which triggers fire it, and any side-effects.","",Ie(e,n)].join(` +`):null;case"refactor":return e?[`Refactor this ioBroker ${n} code${t} to be cleaner and more idiomatic.`,"Preserve behavior exactly. Keep ioBroker APIs (on, setState, getState, schedule, sendTo, log).",`Return the full refactored block inside a \`\`\`${n==="blockly"?"xml":n}\`\`\` code block so it can be smart-applied.`,"",Ie(e,n)].join(` +`):null;case"comment":return e?[`Add clear, concise inline comments to this ioBroker ${n} code${t}.`,"Only add comments where they add real value (non-obvious logic, tricky edge cases, business rules).","Do not over-comment trivial lines. Return the commented version in a code block.","",Ie(e,n)].join(` +`):null;case"fix":{if(!e)return null;const i=(r.diagnostic||"").trim(),s=i?` +Reported problem: ${i}`:"";return[`This ioBroker ${n} code has an issue${t}. Please fix it and return the corrected code.${s}`,"Keep the fix minimal — do not rewrite unrelated parts.","",Ie(e,n)].join(` +`)}case"tests":return e?[`Suggest how to test this ioBroker ${n} script manually inside the ioBroker admin UI${t}.`,"","ioBroker scripts run inside the adapter sandbox and CANNOT be unit-tested with Jest, Mocha, or any external test framework. Do NOT propose Jest/Mocha tests, do NOT propose extracting the code into a separate Node.js project, do NOT write `describe` / `test` blocks.","","Instead, propose a short list of manual test cases. For each case describe:",' • Setup — which ioBroker datapoints to prepare and to which values (via the objects tree "Values" tab)'," • Action — what to trigger: set a state with setState, wait for a schedule, change a sensor value, etc."," • Expected — what should happen afterwards: which states should change, what should appear in the adapter log (javascript.0), which side effects are visible","","Keep it concise: 3-6 cases covering the happy path, typical edge cases, and any guard conditions the script has.","",Ie(e,n)].join(` +`):null;case"ask":{const i=(r.question||"").trim();return i?e?[`Regarding this ioBroker ${n} code${t}:`,"",Ie(e,n),"",i].join(` +`):i:null}default:return null}}function ot(r){const e=(r||"").trimStart();if(!e.startsWith("/"))return null;const n=e.match(/^\/(\w+)(?:\s+([\s\S]*))?$/);if(!n)return null;const t=n[1].toLowerCase(),i=(n[2]||"").trim(),a={explain:"explain",erklaere:"explain",erklaeren:"explain",refactor:"refactor",refaktor:"refactor",refaktoriere:"refactor",comment:"comment",comments:"comment",kommentar:"comment",kommentiere:"comment",fix:"fix",fixme:"fix",tests:"tests",test:"tests",ask:"ask",frag:"ask",frage:"ask"}[t];return a?{action:a,rest:i}:null}const dn=Object.freeze(Object.defineProperty({__proto__:null,buildActionPrompt:rt,parseSlashCommand:ot},Symbol.toStringTag,{value:"Module"}));function un(){return[{id:"@all",label:u.I18n.t("mention @all"),descriptionKey:"All scripts"},{id:"@devices",label:u.I18n.t("mention @devices"),descriptionKey:"Smart home devices"}]}function pn({provider:r,isDark:e}){return $t[r]?o.jsx("img",{src:`./img/${r}.svg`,alt:r,style:{...Lt,...e?{filter:"invert(0.85)"}:{}},onError:t=>{t.target.style.display="none"}}):null}function mn(){try{const r=window.localStorage.getItem("Editor.aiChatHistory");return r?JSON.parse(r):[]}catch{return[]}}const fn=({onSend:r,disabled:e,themeType:n,hasSelection:t,selectionText:i,allScripts:s,model:a,availableModels:p,modelProviderMap:l,modelsLoading:m,onModelChange:g,mode:c,onModeChange:y,currentLanguage:d})=>{const[S,b]=te(""),[v,H]=te(!1),[E,C]=te(""),[x,w]=te(0),M=ne(null),re=ne(-1),G=ne(mn()),_=ne(-1),Y=ne(""),le=Ae(()=>{const T=un().map(k=>({...k,description:u.I18n.t(k.descriptionKey)}));if(s)for(const k of s){const z=k.id.replace(/^script\.js\./,"").replace(/\./g,"/");T.push({id:`@${z}`,label:`@${z}`,description:`${k.name} [${k.enabled?"active":"inactive"}]`})}return T},[s]),K=Ae(()=>{if(!E)return le;const h=E.toLowerCase();return le.filter(T=>T.id.toLowerCase().includes(h)||T.description.toLowerCase().includes(h))},[le,E]);xe(()=>{w(0)},[E]);const de=J(()=>{const h=S.trim();if(!h||e)return;let T=h;const k=ot(h);if(k){const z=t&&i?i:"",se=rt({action:k.action,code:z,language:d||"javascript",question:k.action==="ask"?k.rest:void 0,diagnostic:k.action==="fix"&&k.rest||void 0});se&&(T=se)}else t&&i&&(T=`[Selected code in editor] +\`\`\` +${i} +\`\`\` + +${h}`);G.current.push(h),_.current=-1,Y.current="";try{const z=G.current.slice(-50);window.localStorage.setItem("Editor.aiChatHistory",JSON.stringify(z))}catch{}r(T),b(""),H(!1),requestAnimationFrame(()=>{var z;return(z=M.current)==null?void 0:z.focus()})},[S,e,r,t,i,d]),I=J(h=>{const T=re.current,k=M.current;if(T<0){const ue=S?`${S}${h} `:`${h} `;b(ue),H(!1),C(""),setTimeout(()=>{k&&(k.focus(),k.setSelectionRange(ue.length,ue.length))},0);return}const z=S.substring(0,T),se=(k==null?void 0:k.selectionStart)??S.length,ke=S.substring(se),U=`${z}${h} ${ke}`;b(U),H(!1),C(""),re.current=-1,setTimeout(()=>{if(k){const ue=z.length+h.length+1;k.focus(),k.setSelectionRange(ue,ue)}},0)},[S]),A=J(()=>{re.current=-1,C(""),H(h=>!h)},[]),X=J(h=>{const T=h.target.value;b(T);const k=h.target.selectionStart??T.length,se=T.substring(0,k).match(/@([\w/äöüÄÖÜß]*)$/);se?(re.current=k-se[0].length,C(se[1]),H(!0)):(H(!1),C(""))},[]),Q=J(h=>{if(v&&K.length>0){if(h.key==="ArrowDown"){h.preventDefault(),w(T=>(T+1)%K.length);return}if(h.key==="ArrowUp"){h.preventDefault(),w(T=>(T-1+K.length)%K.length);return}if(h.key==="Enter"||h.key==="Tab"){h.preventDefault(),I(K[x].id);return}if(h.key==="Escape"){h.preventDefault(),H(!1);return}}if(h.key==="ArrowUp"&&!v&&G.current.length>0){const T=M.current,k=!T||T.selectionStart===0,z=!S.includes(` +`);if(k&&z){h.preventDefault(),_.current===-1?(Y.current=S,_.current=G.current.length-1):_.current>0&&_.current--,b(G.current[_.current]);return}}if(h.key==="ArrowDown"&&!v&&_.current>=0){const T=M.current,k=!T||T.selectionStart===S.length,z=!S.includes(` +`);if(k&&z){h.preventDefault(),_.current0&&o.jsx(dt,{elevation:4,sx:{position:"absolute",bottom:"100%",left:8,right:8,maxHeight:200,overflow:"auto",zIndex:10,mb:.5},children:o.jsx(ut,{dense:!0,disablePadding:!0,children:K.slice(0,15).map((h,T)=>o.jsx(pt,{selected:T===x,onClick:()=>I(h.id),sx:{py:.25,minHeight:32},children:o.jsx(mt,{primary:h.label,secondary:h.description,primaryTypographyProps:{fontSize:"0.8rem",fontWeight:500},secondaryTypographyProps:{fontSize:"0.7rem"}})},h.id))})}),c==="code"&&o.jsx(Fe,{label:`${u.I18n.t("mention @devices")} — ${u.I18n.t("Smart home devices")}`,size:"small",variant:"outlined",sx:{mx:1,mt:.5,maxWidth:"calc(100% - 16px)"}}),t&&i&&o.jsx(Fe,{icon:o.jsx(bt,{sx:{fontSize:14}}),label:u.I18n.t("Selected code as context"),size:"small",variant:"outlined",sx:{mx:1,mt:.5,maxWidth:"calc(100% - 16px)"}}),o.jsxs(L,{sx:{mx:1,mt:.5,mb:.5,border:"1px solid",borderColor:"divider",borderRadius:1.5,overflow:"hidden","&:focus-within":{borderColor:"primary.main"}},children:[o.jsx(ft,{inputRef:M,fullWidth:!0,multiline:!0,maxRows:6,placeholder:u.I18n.t("Ask about your script..."),value:S,onChange:X,onKeyDown:Q,disabled:e,onBlur:()=>{setTimeout(()=>H(!1),200)},variant:"standard",slotProps:{input:{disableUnderline:!0}},sx:{px:1.5,pt:1,pb:.5,"& .MuiInputBase-root":{fontSize:"0.875rem"}}}),o.jsxs(L,{sx:{display:"flex",alignItems:"center",gap:.75,px:1,pb:.5},children:[o.jsx(ve,{title:o.jsxs(L,{sx:{fontSize:"0.8rem",lineHeight:1.5,maxWidth:360},children:[o.jsx(L,{sx:{fontWeight:600,mb:.75},children:u.I18n.t("AI chat mode")}),o.jsxs(L,{sx:{mb:.75},children:[o.jsxs("strong",{children:["💬 ",u.I18n.t("Chat")]})," —"," ",u.I18n.t("Plain conversation. Use for questions, explanations, syntax help. Does not read or modify your scripts.")]}),o.jsxs(L,{sx:{mb:.75},children:[o.jsxs("strong",{children:["🤖 ",u.I18n.t("Agent")]})," —"," ",u.I18n.t('For larger models with tool support. The AI can read, create, and edit scripts, look up datapoints, and browse the object tree — useful for "create a script that...", "which scripts use this state?" or "analyze my light script".')]}),o.jsxs(L,{children:[o.jsxs("strong",{children:["💻 ",u.I18n.t("Code")]})," —"," ",u.I18n.t('For smaller models without tool support. Two-step script generator (plan then code) — useful for "create a script that..." or "write a Blockly rule for...". Output goes into the editor for smart-apply.')]})]}),enterDelay:400,placement:"left",children:o.jsxs(He,{value:c,onChange:h=>y(h.target.value),size:"small",variant:"standard",disableUnderline:!0,sx:{fontSize:"0.7rem",color:"text.secondary",border:"1px solid",borderColor:"text.secondary",borderRadius:3,bgcolor:"action.hover",px:.75,"&:hover":{borderColor:"text.disabled",bgcolor:"action.hover"},"& .MuiSelect-select":{py:"2px",pr:"18px !important",display:"flex",alignItems:"center",gap:.5}},children:[o.jsx(ze,{value:"chat",sx:{fontSize:"0.75rem"},title:u.I18n.t("Plain conversation. Best for: general questions, syntax help, concept explanations."),children:"💬 Chat"}),o.jsx(ze,{value:"agent",sx:{fontSize:"0.75rem"},title:u.I18n.t("For larger models with tool support. Best for: creating, editing, or analyzing scripts; finding datapoint usages; inspecting the object tree."),children:"🤖 Agent"}),o.jsx(ze,{value:"code",sx:{fontSize:"0.75rem"},title:u.I18n.t("For smaller models without tool support. Best for: creating new JavaScript/TypeScript or Blockly scripts from a description."),children:"💻 Code"})]})}),o.jsx(He,{value:a,onChange:h=>g(h.target.value),size:"small",disabled:m||p.length===0,variant:"standard",disableUnderline:!0,sx:{fontSize:"0.7rem",color:"text.secondary",border:"1px solid",borderColor:"text.secondary",borderRadius:3,bgcolor:"action.hover",px:.75,"&:hover":{borderColor:"text.disabled",bgcolor:"action.hover"},"& .MuiSelect-select":{py:"2px",pr:"18px !important",display:"flex",alignItems:"center",gap:.5}},children:p.map(h=>o.jsxs(ze,{value:h,sx:{fontSize:"0.75rem",display:"flex",gap:.5},children:[o.jsx(pn,{provider:l[h],isDark:n==="dark"}),h]},h))}),o.jsx(ve,{title:u.I18n.t("Mention scripts as context for the AI. Use @all for all scripts or @scriptName for a specific one."),enterDelay:500,children:o.jsx(we,{size:"small",onClick:A,sx:{p:"3px",color:v?"primary.main":"text.secondary",border:"1px solid",borderColor:v?"primary.main":"text.secondary",bgcolor:v?void 0:"action.hover",borderRadius:3,"&:hover":{borderColor:"text.disabled",bgcolor:"action.hover"}},children:o.jsx(Tt,{sx:{fontSize:16}})})}),o.jsx(L,{sx:{flex:1}}),o.jsxs(Oe,{variant:"caption",sx:{color:"text.disabled",fontSize:"0.65rem",mr:.5,whiteSpace:"nowrap"},children:["Enter ",u.I18n.t("to send")]}),o.jsx(ve,{title:`${u.I18n.t("Send")} (Enter)`,children:o.jsx("span",{children:o.jsx(we,{color:"primary",onClick:de,disabled:e||!S.trim(),size:"small",sx:{p:.25},children:o.jsx(Et,{sx:{fontSize:18}})})})})]})]})]})},On=({socket:r,runningInstances:e,themeType:n,currentCode:t,currentLanguage:i,selectedCode:s,allScripts:a,editorApi:p,aiActionRequest:l,onAiActionConsumed:m,onRegisterInlineAsk:g,onInsertCode:c,onShowDiff:y,onApplyCode:d,currentScriptId:S,onClose:b})=>{var ke;const v=ne(null),H=Ae(()=>({socket:r,runningInstances:e,currentCode:t,currentLanguage:i,allScripts:a,editorApi:p,currentScriptId:S}),[r,e,t,i,a,p,S]),{messages:E,isLoading:C,error:x,model:w,availableModels:M,modelProviderMap:re,modelsLoading:G,modelsError:_,lastContextInfo:Y,mode:le,setMode:K,setModel:de,sendMessage:I,triggerAiAction:A,askInline:X,clearChat:Q,retryLoadModels:h}=en(H);xe(()=>(g==null||g(X),()=>g==null?void 0:g(null)),[X,g]);const T=ne(null);xe(()=>{!l||T.current===l||(T.current=l,A(l),m==null||m())},[l,A,m]),xe(()=>{var U;(U=v.current)==null||U.scrollIntoView({behavior:"smooth"})},[E]);const k=J(U=>{c==null||c(U)},[c]),z=J((U,ue)=>{y==null||y(U,ue)},[y]),se=J(U=>{d==null||d(U)},[d]);return o.jsxs(L,{sx:{display:"flex",flexDirection:"column",height:"100%",bgcolor:"background.default","& .ai-chat-inline-code":{backgroundColor:"action.selected",color:"text.primary",border:"1px solid",borderColor:"divider"}},children:[o.jsxs(L,{sx:{display:"flex",alignItems:"center",gap:1,px:1,py:.5,borderBottom:"1px solid",borderColor:"divider",bgcolor:n==="dark"?"grey.900":"grey.100",flexShrink:0},children:[o.jsx(Oe,{variant:"subtitle2",sx:{fontWeight:600,flex:1,color:"text.primary"},children:u.I18n.t("AI Chat")}),G&&o.jsx(Ve,{size:16}),o.jsx(ve,{title:u.I18n.t("New chat"),children:o.jsx(we,{size:"small",onClick:Q,children:o.jsx(_t,{sx:{fontSize:18}})})}),o.jsx(ve,{title:u.I18n.t("Close"),children:o.jsx(we,{size:"small",onClick:b,children:o.jsx(jt,{sx:{fontSize:18}})})})]}),(x||_)&&o.jsx(ht,{severity:"error",sx:{m:1,py:0},action:_?o.jsx(we,{size:"small",onClick:h,children:o.jsx(xt,{sx:{fontSize:16}})}):void 0,children:x||_}),Y&&o.jsx(Oe,{variant:"caption",sx:{px:1.5,py:.25,color:"text.secondary",fontSize:"0.7rem",bgcolor:"action.hover",borderBottom:"1px solid",borderColor:"divider",flexShrink:0},children:Y}),o.jsxs(L,{sx:{flex:1,overflow:"auto",py:1},children:[E.length===0&&!C&&o.jsxs(L,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",color:"text.secondary",px:3,textAlign:"center"},children:[o.jsx(Oe,{variant:"body2",sx:{mb:1},children:u.I18n.t("Ask questions about your script, request changes, or generate new code.")}),o.jsxs(Oe,{variant:"caption",color:"text.disabled",children:["Enter ",u.I18n.t("to send"),", Shift+Enter ",u.I18n.t("for new line")]})]}),E.filter(U=>U.role!=="system").map(U=>o.jsx(cn,{message:U,themeType:n,currentLanguage:i,onInsertCode:k,onShowDiff:z,onApplyCode:se},U.id)),C&&((ke=E[E.length-1])==null?void 0:ke.content)===""&&o.jsxs(L,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1},children:[o.jsx(Ve,{size:16}),o.jsx(Oe,{variant:"caption",color:"text.secondary",children:u.I18n.t("Thinking...")})]}),o.jsx("div",{ref:v})]}),o.jsx(fn,{onSend:I,disabled:C||M.length===0,themeType:n,hasSelection:!!s,selectionText:s,allScripts:a,model:w,availableModels:M,modelProviderMap:re,modelsLoading:G,onModelChange:de,mode:le,onModeChange:K,currentLanguage:i})]})};export{On as default}; diff --git a/admin/assets/AiChatPanel-gzZ2JXbv.js b/admin/assets/AiChatPanel-gzZ2JXbv.js deleted file mode 100644 index 11e3bbb98..000000000 --- a/admin/assets/AiChatPanel-gzZ2JXbv.js +++ /dev/null @@ -1,315 +0,0 @@ -import{c as Se,j as i}from"./createSvgIcon-DYs_tNrE.js";import{k as A,j as te,b as ne,c as xe,l as Ue}from"./iobroker_javascript__loadShare__react__loadShare__.mjs-CTZOFJS2.js";import{z as $,P as ve,o as we,a0 as ct,a1 as lt,i as We,J as dt,r as ut,s as mt,u as pt,a2 as Fe,c as ft,f as He,g as ze,a3 as Oe,a4 as Ve,a5 as ht}from"./iobroker_javascript__loadShare___mf_0_mui_mf_1_material__loadShare__.mjs-CV1_X-Lf.js";import{_ as u}from"./iobroker_javascript__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.mjs-DkBjPSMw.js";import{_ as Ze}from"./preload-helper-BDBacUwf.js";import{C as gt,b as yt,I as bt,R as xt}from"./index-45IwpC7_.js";import{i as vt,k as qe,l as wt,n as St}from"./index-CyhJmDLi.js";import{g as kt,c as jt}from"./index-wHNMOf-c.js";import"./iobroker_javascript__loadShare__react__loadShare__.mjs_commonjs-proxy-CE9lvhW8.js";import"./iobroker_javascript__loadShare__prop_mf_2_types__loadShare__.mjs-BCtSFofY.js";import"./virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-DiXVqr03.js";import"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-RQRRZMX5.js";import"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs-DeVAS-oa.js";import"./inheritsLoose-CIXm_zPk.js";const et=Se(i.jsx("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"AddCircleOutline"),_t=Se(i.jsx("path",{d:"M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4zM17 11h-4v4h-2v-4H7V9h4V5h2v4h4z"}),"AddComment"),Ct=Se(i.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10h5v-2h-5c-4.34 0-8-3.66-8-8s3.66-8 8-8 8 3.66 8 8v1.43c0 .79-.71 1.57-1.5 1.57s-1.5-.78-1.5-1.57V12c0-2.76-2.24-5-5-5s-5 2.24-5 5 2.24 5 5 5c1.38 0 2.64-.56 3.54-1.47.65.89 1.77 1.47 2.96 1.47 1.97 0 3.5-1.6 3.5-3.57V12c0-5.52-4.48-10-10-10m0 13c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3"}),"AlternateEmail"),It=Se(i.jsx("path",{d:"M9.01 14H2v2h7.01v3L13 15l-3.99-4zm5.98-1v-3H22V8h-7.01V5L11 9z"}),"CompareArrows"),Tt=Se(i.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"Person"),Ot=Se(i.jsx("path",{d:"M3 10h11v2H3zm0-4h11v2H3zm0 8h7v2H3zm17.59-2.07-4.25 4.24-2.12-2.12-1.41 1.41L16.34 19 22 13.34z"}),"PlaylistAddCheck"),Et=Se(i.jsx("path",{d:"M2.01 21 23 12 2.01 3 2 10l15 2-15 2z"}),"Send"),Rt=Se(i.jsx("path",{d:"M20 9V7c0-1.1-.9-2-2-2h-3c0-1.66-1.34-3-3-3S9 3.34 9 5H6c-1.1 0-2 .9-2 2v2c-1.66 0-3 1.34-3 3s1.34 3 3 3v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c1.66 0 3-1.34 3-3s-1.34-3-3-3M7.5 11.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5S9.83 13 9 13s-1.5-.67-1.5-1.5M16 17H8v-2h8zm-1-4c-.83 0-1.5-.67-1.5-1.5S14.17 10 15 10s1.5.67 1.5 1.5S15.83 13 15 13"}),"SmartToy"),Nt=Ze(()=>import("./docs-compact-CKNGiYh2.js"),[],import.meta.url),$t={openai:"img/openai.svg",anthropic:"img/anthropic.svg",gemini:"img/gemini.svg",deepseek:"img/deepseek.svg",custom:"img/custom.svg"},Lt={width:16,height:16,flexShrink:0,opacity:.7},Mt={ru:"Russian",en:"English",de:"German",es:"Spanish",fr:"French",it:"Italian",pl:"Polish",nl:"Dutch",pt:"Portuguese",uk:"Ukrainian","zh-cn":"Chinese"};let $e=null,Ae=null,Le=null,Me=null;function Dt(){$e=null,Ae=null,Le=null,Me=null}async function De(r,e){if($e)return $e;const n=Object.keys(e)[0];if(!n)return null;const t=await r.sendTo(n,"getAvailableAiProviders",{}),o=((t==null?void 0:t.providers)||[]).map(d=>d.provider),s=((t==null?void 0:t.providers)||[]).find(d=>d.provider==="custom");return o.length?($e={providers:o,gptBaseUrl:s==null?void 0:s.baseUrl},$e):null}const Bt=["embedding","text-embedding","textembedding","embeddinggemma","embed-","-embed","bge-","mxbai-embed","nomic-embed","arctic-embed","snowflake-arctic-embed","all-minilm","multilingual-e5","jina-embed","voyage-","gecko","paraphrase-multilingual","dall-e","gpt-image","image-edit","-image-preview","-image-latest","flash-image","nano-banana","stable-diffusion","sdxl","midjourney","flux-","imagen","sora","veo-","cogvideo","runway-","lumiere","lyria","whisper","tts-","-tts","speech-","audio-preview","mini-tts","mini-transcribe","-transcribe","native-audio","flash-live","gpt-audio","realtime","bark-","xtts","voicebox","moderation","omni-moderation","llama-guard","shieldgemma","prompt-guard","-guardian","safeguard","rerank","reranker","babbage-","davinci-","curie-","text-ada-","text-davinci","text-curie","text-babbage","instructgpt","code-davinci","code-cushman","-turbo-instruct","-search-preview","-search-api","code-search","text-search","similarity-","computer-use-preview","deep-research","robotics","aqa","reader-lm","-nsql","minicheck"];function zt(r){const e=r.toLowerCase();return!(Bt.some(n=>e.includes(n))||e.startsWith("claude-1")||e.startsWith("claude-instant"))}async function Pt(r,e){const n=await De(r,e);if(!n)return{models:[],providerMap:{},errors:["No API keys configured"]};const t=Object.keys(e)[0];if(!t)return{models:[],providerMap:{},errors:[u.I18n.t("No running javascript instance found")]};const o=[],s={},d=[],m=(a,y)=>{for(const l of a)zt(l)&&(s[l]||(o.push(l),s[l]=y))},c=[],p=(a,y)=>{c.push(r.sendTo(t,"testApiConnection",{provider:a==="custom"?"openai":a}).then(l=>{l.models?m(l.models,a):l.error&&d.push(`${y||a}: ${l.error}`)}).catch(l=>{d.push(`${y||a}: ${String(l)}`)}))},g={openai:"OpenAI",anthropic:"Anthropic",gemini:"Gemini",deepseek:"DeepSeek",custom:"Custom"};for(const a of n.providers)p(a,g[a]);return await Promise.all(c),o.sort(),{models:o,providerMap:s,errors:d}}async function Re(r,e,n){var o;return await r.sendTo(e,"chatCompletion",{timeout:n.timeout||6e5,model:n.model,provider:n.provider,messages:n.messages,...n.baseUrl?{baseUrl:n.baseUrl}:{},...(o=n.tools)!=null&&o.length?{tools:n.tools}:{}})}async function tt(r){if(Me)return Me;const e=await r.getObjectViewSystem("state","","香"),n=await r.getObjectViewSystem("channel","","香"),t=await r.getObjectViewSystem("device","","香"),o=await r.getObjectViewSystem("folder","","香"),s=await r.getObjectViewSystem("enum","","香");return Me=Object.assign(e,n,t,o,s),Me}async function nt(r){return tt(r)}function Ie(r,e){return r&&typeof r=="object"?r[e]||r.en:r||""}async function Ye(r){var S,b,v,H;if(Ae)return Ae;const e=u.I18n.getLanguage(),n=await tt(r),t=Object.keys(n).sort(),o=new gt,s=[],d=["UNREACH_STICKY"],m=[yt.Types.info],c=[],p=[],g=[],a=[];t.forEach(E=>{var I,x,w;((I=n[E])==null?void 0:I.type)==="enum"?c.push(E):(w=(x=n[E])==null?void 0:x.common)!=null&&w.smartName&&a.push(E)}),c.forEach(E=>{E.startsWith("enum.rooms.")?p.push(E):E.startsWith("enum.functions.")&&g.push(E);const I=n[E].common.members;I!=null&&I.length&&I.forEach(x=>{n[x]&&!a.includes(x)&&a.push(x)})});const y={id:"",objects:n,_keysOptional:t,_usedIdsOptional:s,ignoreIndicators:d,excludedTypes:m},l=[];a.forEach(E=>{y.id=E;const I=o.detect(y);I&&I.forEach(x=>{var de;const w=(de=x.states.find(T=>T.id))==null?void 0:de.id;if(!w||l.find(T=>T.id===w))return;const M=n[w],re={id:w,name:Ie(M.common.name,e),type:M.type,deviceType:x.type,states:x.states.filter(T=>T.id).map(T=>({id:T.id,name:T.name,role:T.defaultRole,type:n[T.id].common.type,unit:n[T.id].common.unit,read:n[T.id].common.read??!0,write:n[T.id].common.write??!0}))},Y=w.split(".");let _,G;(M.type==="channel"||M.type==="state")&&(Y.pop(),_=Y.join("."),n[_]&&(n[_].type==="channel"||n[_].type==="folder")?(Y.pop(),G=Y.join("."),(!n[G]||n[G].type!=="device"&&n[_].type!=="folder")&&(G=void 0)):_=void 0);const le=p.find(T=>{var U,X,Q;return(U=n[T].common.members)!=null&&U.includes(w)||_&&((X=n[T].common.members)!=null&&X.includes(_))?!0:G&&((Q=n[T].common.members)==null?void 0:Q.includes(G))});le&&(re.room=Ie(n[le].common.name,e));const K=g.find(T=>{var U,X,Q;return(U=n[T].common.members)!=null&&U.includes(w)||_&&((X=n[T].common.members)!=null&&X.includes(_))?!0:G&&((Q=n[T].common.members)==null?void 0:Q.includes(G))});K&&(re.function=Ie(n[K].common.name,e)),l.push(re)})});for(let E=0;E { - // obj.state.val = the new value (boolean or number) - // obj.id = the state ID that changed - setState('zigbee.0.lamp.state', obj.state.val); - log('Changed to ' + obj.state.val); -}); - -// CORRECT: on() with filter -on({id: /zigbee\\.0\\..*\\.state$/, change: 'ne'}, (obj) => { - if (obj.state.val === true) { - setState('zigbee.0.other.state', true); - } -}); - -// Other correct examples: -setState('id', true); -setState('id', 50); -const val = getState('id').val; -schedule('0 7 * * *', () => { log('runs daily at 07:00'); }); -schedule('0 22 * * *', () => { setState('id', false); }); - -// CORRECT Telegram: always use sendTo, NEVER setState on telegram -sendTo('telegram.0', 'send', {text: 'Alert: ' + someValue}); - -// CORRECT httpGet: res.data is a STRING, parse JSON with JSON.parse -httpGet('https://api.example.com/data', (err, res) => { - const data = JSON.parse(res.data); - log('Temperature: ' + data.main.temp); -}); - -$('state[state.id=*.state](rooms=Room)').each((id) => { setState(id, false); }); -createState('name', 0, {type: 'number', name: 'Name'}); -// CORRECT: one-time delayed action (turn off after 5 minutes = 300000ms) -setStateDelayed('zigbee.0.lamp.state', false, false, 5 * 60 * 1000); -log(formatDate(new Date(), 'DD.MM.YYYY hh:mm')); - -WRONG: on('id', (id, state) => {}) CORRECT: on('id', (obj) => {}) -WRONG: set('id', true) CORRECT: setState('id', true) -WRONG: adapter.setState('id', true) CORRECT: setState('id', true) -WRONG: obj.val or newState.val CORRECT: obj.state.val -WRONG: on('change', {id: 'x'}, cb) CORRECT: on({id: 'x', change: 'ne'}, cb) -WRONG: setState('telegram.0', text) CORRECT: sendTo('telegram.0', 'send', {text: text}) -WRONG: res.body.main.temp CORRECT: JSON.parse(res.data).main.temp -WRONG: function myFunc() {} CORRECT: write code directly, no function definitions -WRONG: setTimeout(fn, ms) CORRECT: setStateDelayed(id, val, false, ms) for one-time delay -WRONG: schedule('*/5 * * * *', fn) for one-time delay. schedule() is ONLY for recurring tasks -Values are boolean (true/false) or numbers, NEVER strings like 'ON'/'OFF'. -NEVER use: function keyword, require, import, setInterval, setTimeout, console.log, debug(). - -All available functions (use syntax from examples above): -on(pattern, (obj)=>{}) | once(pattern, (obj)=>{}) | unsubscribe(handler) -setState(id, val) | getState(id).val | setStateChanged(id, val) | setStateDelayed(id, val, ack, ms) | clearStateDelayed(id) -existsState(id) | existsObject(id) | getObject(id) | setObject(id, obj) | extendObject(id, obj) | deleteObject(id) -createState(name, initVal, {type,name,role}) | deleteState(name) | createAlias(name, alias) -schedule(cron, ()=>{}) | clearSchedule(obj) | scheduleById(id, (obj)=>{}) | getSchedules() -sendTo(adapter, cmd, msg) | sendToHost(host, cmd, msg) -$('selector').each((id)=>{}) | $('selector').setState(val) | $('selector').getState() -log(text) | formatDate(date, 'DD.MM.YYYY hh:mm') | formatTimeDiff(ms) | formatValue(val, decimals) -getDateObject(str) | getAstroDate(pattern) | isAstroDay() | compareTime(start, end, op) -exec(cmd, (err,stdout,stderr)=>{}) | httpGet(url, (err,res)=>{}) | httpPost(url, data, (err,res)=>{}) -readFile(adapter, name, (err,data)=>{}) | writeFile(adapter, name, data, cb) | delFile(adapter, name, cb) -onFile(id, name, withFile, cb) | offFile(id, name) | onStop(cb, timeout) -getHistory(inst, {id,start,end,aggregate,count}, cb) | getEnums(name) | getIdByName(name) -wait(ms) | toInt(val) | toFloat(val) | toBoolean(val) -messageTo(target, data) | onMessage(name, cb) | onLog(severity, cb) -runScript(name) | startScript(name) | stopScript(name) | isScriptActive(name) - -Write comments in ${r}. Put code in a \`\`\`javascript code block.`}function Xe(r){return`You generate ioBroker Blockly XML blocks. Return Blockly XML in a \`\`\`xml code block. -Use EXACT state IDs from the plan. Write text/comments in ${r}. - -IMPORTANT RULES: -- Return ONLY the inner blocks (no wrapper needed) -- Use the exact block types shown below -- State IDs must be full paths like "zigbee2mqtt.0.0x1234.state" -- Values are boolean (true/false) or numbers, NEVER strings like "ON"/"OFF" -- For Telegram use sendto_custom block, NEVER setState on telegram - -## Block Templates - -### Trigger: on_ext (react to state changes) - - - ne - - - STATE_ID_HERE - - - - - - -### Schedule: schedule (cron-based) - - 0 7 * * * - - - - - -### Set State: control - - - STATE_ID_HERE - FALSE - - TRUE - - - -### Get State Value: get_value - - val - STATE_ID_HERE - - -### Log: debug - - log - - Message here - - - -### SendTo (Telegram): sendto_custom - - - telegram.0 - send - - - Message text - - - text - - - -### Timeout: timeouts_settimeout - - timeout1 - 5000 - ms - - - - - -### If/Else: controls_if - - - - - EQ - valSTATE_ID - TRUE - - - - - - -### Number value -0 - -### Text value -hello - -### Boolean value -TRUE - -### Comparison: logic_compare - - EQ - - - - - -## Common Patterns - -### Turn on light when sensor triggers: - - - ne - - - zigbee2mqtt.0.0xSENSOR.occupancy - - - - - - EQ - valzigbee2mqtt.0.0xSENSOR.occupancy - TRUE - - - - - - zigbee2mqtt.0.0xLAMP.state - FALSE - TRUE - - - - - - -Write comments in ${r}. Put blocks in a \`\`\`xml code block.`}function Pe(r){let e=r;return e=e.replace(/[\s\S]*?<\/think>/gi,""),e=e.replace(/<\|endoftext\|>/g,""),e=e.replace(/<\|im_start\|>[\s\S]*?<\|im_end\|>/g,""),e=e.replace(/<\|im_start\|>[\s\S]*/g,""),e.trim()}const Jt=[{type:"function",function:{name:"search_datapoints",description:'Search ALL ioBroker objects by ID, name, or role — includes states, channels, devices, folders, enums (rooms/functions), adapters, instances, scripts, meta, etc. Returns matching IDs with object type, name, role, unit, and a hasChildren hint for containers. IMPORTANT: Aliases and physical device groupings are usually CHANNELS containing multiple state children (e.g. a motion sensor is often a channel alias.0.Floor.Room.MotionSensor with states ACTUAL, BATTERY, STATE under it). If a channel/device/folder matches your query, call get_object_info on its ID to list its state children. Role-based queries work too: "sensor.motion", "switch.light", "value.temperature".',parameters:{type:"object",properties:{query:{type:"string",description:'Search pattern (case-insensitive substring) - matches against object ID, name, and role. Examples: "bewegungsmelder", "temperature", "sensor.motion", "alias.0", "küche", "zigbee2mqtt.0.lamp".'},max_results:{type:"number",description:"Maximum number of results to return (default: 20)."},object_type:{type:"string",description:'Optional filter by object type: "state", "channel", "device", "folder", "enum", "adapter", "instance", "script", "meta", etc. Omit to search every type.'}},required:["query"]}}},{type:"function",function:{name:"get_state_value",description:"Get the current value of an ioBroker state/datapoint. Returns value, timestamp, and acknowledgment flag.",parameters:{type:"object",properties:{id:{type:"string",description:'The full state ID, e.g. "zigbee2mqtt.0.sensor.temperature"'}},required:["id"]}}},{type:"function",function:{name:"get_object_info",description:"Get detailed info about ANY ioBroker object + its full parent hierarchy + direct children. Works for every object type: state, channel, device, folder, adapter, instance, enum, meta, script. Returns: the object itself, parent chain (all non-state ancestors up to the adapter), and — if the object is a container (channel/device/folder/enum/instance/adapter/meta) — the list of direct children with their types, names, roles and units. Use this to navigate the object tree: start from a channel found by search_datapoints, read its children to see the actual state IDs underneath.",parameters:{type:"object",properties:{id:{type:"string",description:'The full object ID, e.g. "zigbee2mqtt.0.0x1234.state", "alias.0.Room.MotionSensor", or "enum.rooms.kitchen".'}},required:["id"]}}},{type:"function",function:{name:"search_scripts",description:"Search through all ioBroker JavaScript/Blockly/Rules scripts. Can search by script name/path OR by content (e.g. find all scripts that use a specific datapoint ID). Returns matching script names, paths, and matching lines.",parameters:{type:"object",properties:{query:{type:"string",description:'Search term - matches against script name, path, AND source code content. Examples: "carport", "zigbee2mqtt.0.lamp.state", "telegram"'},max_results:{type:"number",description:"Maximum number of scripts to return (default: 10)"}},required:["query"]}}},{type:"function",function:{name:"read_script",description:"Read the full source code of a specific ioBroker script by its ID or path. Use search_scripts first to find the script ID, then read_script to see its complete code.",parameters:{type:"object",properties:{id:{type:"string",description:'The script ID (e.g. "script.js.common.Licht.Carport") or path (e.g. "common/Licht/Carport")'}},required:["id"]}}},{type:"function",function:{name:"list_scripts",description:"List ALL available ioBroker scripts with their names, paths, types (JavaScript/Blockly/TypeScript), and enabled status. Use this to get an overview of all scripts before searching or reading specific ones.",parameters:{type:"object",properties:{}}}},{type:"function",function:{name:"get_editor_selection",description:'Read what the user has currently selected in the script editor. Returns the selected text and its line/column range, or a message if nothing is selected. Use this when the user refers to "this", "das hier", "the selection", or asks about a specific piece of code they highlighted.',parameters:{type:"object",properties:{}}}},{type:"function",function:{name:"get_editor_content",description:"Read the full current content of the script editor (may differ from the initial script version if the user has made edits). Use this when you need the live editor state rather than the saved script.",parameters:{type:"object",properties:{}}}},{type:"function",function:{name:"get_cursor_position",description:"Read the current cursor position (line and column, 1-based) in the script editor.",parameters:{type:"object",properties:{}}}},{type:"function",function:{name:"highlight_text_in_editor",description:"Search for a literal text in the script editor and select + scroll to it. Returns how many occurrences were found. Use this to draw the user's attention to a specific snippet you are discussing.",parameters:{type:"object",properties:{text:{type:"string",description:"Exact substring to search for (case-sensitive)."}},required:["text"]}}},{type:"function",function:{name:"highlight_line_range",description:"Select and scroll to a range of lines in the editor. Both line numbers are 1-based and inclusive. Use this to show the user which block of code you are referring to.",parameters:{type:"object",properties:{start_line:{type:"number",description:"First line (1-based, inclusive)."},end_line:{type:"number",description:"Last line (1-based, inclusive)."}},required:["start_line","end_line"]}}},{type:"function",function:{name:"go_to_line",description:"Move the cursor to a specific line (and optional column) and scroll that line into view. Use this to navigate the user to a relevant spot.",parameters:{type:"object",properties:{line:{type:"number",description:"1-based line number."},column:{type:"number",description:"1-based column (optional, default 1)."}},required:["line"]}}},{type:"function",function:{name:"insert_text_at_cursor",description:"Insert text at the current cursor position in the editor (or replace the current selection if one exists). Use sparingly — prefer returning code in a fenced markdown block so the user can review and smart-apply it. Only use direct insertion when the user explicitly asked you to write something into the editor.",parameters:{type:"object",properties:{text:{type:"string",description:"Text to insert."}},required:["text"]}}},{type:"function",function:{name:"replace_selection",description:"Replace the currently selected text in the editor with new text. Fails if nothing is selected. Use this to refactor or rewrite a specific highlighted snippet.",parameters:{type:"object",properties:{text:{type:"string",description:"Replacement text."}},required:["text"]}}},{type:"function",function:{name:"get_diagnostics",description:"Read all active Monaco diagnostics (errors, warnings, info, hints) from the current editor model — this is what shows up as red/yellow squiggles. Use this to find syntax errors, unused variables, missing types, or other editor-reported issues the user might be asking about.",parameters:{type:"object",properties:{}}}},{type:"function",function:{name:"get_document_symbols",description:"Get the document outline of the current script: all top-level functions, classes, constants, and variables with their line numbers. Use this to understand the structure of a long script or to find where a specific function is defined.",parameters:{type:"object",properties:{}}}}];function Je(r){return r&&typeof r=="object"?r.en||r.de||"":r||""}function Wt(r,e,n){const t=(n||"").toLowerCase();if(!t)return!1;if(r.toLowerCase().includes(t))return!0;const o=e==null?void 0:e.common;if(!o)return!1;const s=Je(o.name).toLowerCase();if(s&&s.includes(t))return!0;const d=(o.role||"").toLowerCase();return!!(d&&d.includes(t))}async function Ft(r,e,n=20,t){const o=await nt(r),s=t==null?void 0:t.toLowerCase(),d=[],m=Object.keys(o),c=new Set;for(const p of m){const g=p.lastIndexOf(".");g>0&&c.add(p.substring(0,g))}for(const p of m){const g=o[p],a=g==null?void 0:g.type;if(!a||s&&a!==s||!Wt(p,g,e))continue;const y=g.common,l={id:p,type:a,name:Je(y==null?void 0:y.name)};if(y!=null&&y.role&&(l.role=y.role),a==="state"?(l.stateType=(y==null?void 0:y.type)||"",y!=null&&y.unit&&(l.unit=y.unit)):c.has(p)&&(l.hasChildren=!0),d.push(l),d.length>=n)break}return d.length===0?JSON.stringify({message:`No objects found matching "${e}". Hint: try a role like "sensor.motion" or a partial path.`}):JSON.stringify(d)}async function Ht(r,e){try{const n=await r.getState(e);return JSON.stringify(n?{val:n.val,ts:n.ts?new Date(n.ts).toISOString():null,ack:n.ack,from:n.from}:{error:`State '${e}' not found`})}catch{return JSON.stringify({error:`Failed to read state '${e}'`})}}const Vt=new Set(["channel","device","folder","adapter","instance","enum","meta"]),Ke=50;async function qt(r,e){var n;try{const t=await r.getObject(e);if(!t)return JSON.stringify({error:`Object '${e}' not found`});const o={id:t._id,type:t.type,common:t.common},s=e.split("."),d=[];for(let m=s.length-1;m>=2;m--){const c=s.slice(0,m).join(".");try{const p=await r.getObject(c);p&&p.type!=="state"&&d.push({id:p._id,type:p.type,name:Je((n=p.common)==null?void 0:n.name),common:p.common})}catch{}}if(d.length>0&&(o.parents=d),Vt.has(t.type)){const m=await nt(r),c=[],p=`${e}.`;let g=!1;for(const a of Object.keys(m))if(a.startsWith(p)&&!a.substring(p.length).includes(".")){const y=m[a],l=y==null?void 0:y.common,S={id:a,name:Je(l==null?void 0:l.name),type:(y==null?void 0:y.type)||""};if(l!=null&&l.role&&(S.role=l.role),(y==null?void 0:y.type)==="state"&&(l!=null&&l.unit)&&(S.unit=l.unit),c.push(S),c.length>=Ke){g=!0;break}}c.length>0&&(o.children=c,g&&(o.childrenTruncated=!0,o.childrenHint=`Only the first ${Ke} children are shown. Use search_datapoints with a more specific query or the object_type filter to narrow down.`))}return JSON.stringify(o)}catch{return JSON.stringify({error:`Failed to read object '${e}'`})}}function st(r){return vt(r)||r}function Yt(r,e,n=10){const t=e.toLowerCase(),o=[];for(const s of r){const d=s.id.toLowerCase(),m=s.name.toLowerCase(),c=s.id.replace(/^script\.js\./,"").replace(/\./g,"/"),p=s.engineType==="Blockly"||s.engineType==="Rules",g=d.includes(t)||m.includes(t),a=p?st(s.source):s.source,y=a.toLowerCase().includes(t);if(g||y){const l={id:s.id,path:c,name:s.name,type:p?"Blockly":s.engineType.includes("TypeScript")?"TypeScript":"JavaScript",enabled:s.enabled};if(y){const S=a.split(` -`),b=[];for(let v=0;v=5));v++);b.length>0&&(l.matchingLines=b)}if(o.push(l),o.length>=n)break}}return o.length===0?JSON.stringify({message:`No scripts found matching "${e}"`}):JSON.stringify(o)}function Gt(r,e){const n=e.replace(/\//g,".").toLowerCase(),t=r.find(m=>{const c=m.id.toLowerCase();return c===n||c===`script.js.${n}`||c.endsWith(`.${n}`)});if(!t)return JSON.stringify({error:`Script '${e}' not found. Use search_scripts to find available scripts.`});const o=t.engineType==="Blockly"||t.engineType==="Rules",s=o?st(t.source):t.source,d=t.id.replace(/^script\.js\./,"").replace(/\./g,"/");return JSON.stringify({id:t.id,path:d,name:t.name,type:o?"Blockly":t.engineType.includes("TypeScript")?"TypeScript":"JavaScript",enabled:t.enabled,source:s})}function Xt(r){const e=r.map(n=>({id:n.id,path:n.id.replace(/^script\.js\./,"").replace(/\./g,"/"),name:n.name,type:n.engineType==="Blockly"||n.engineType==="Rules"?"Blockly":n.engineType.includes("TypeScript")?"TypeScript":"JavaScript",enabled:n.enabled}));return JSON.stringify(e)}function he(){return JSON.stringify({error:"Editor is not available. This tool requires the script editor to be open."})}async function Kt(r,e,n,t){let o;try{o=JSON.parse(e.function.arguments)}catch{return JSON.stringify({error:`Invalid arguments: ${e.function.arguments}`})}switch(e.function.name){case"search_datapoints":return Ft(r,o.query,o.max_results||20,o.object_type);case"get_state_value":return Ht(r,o.id);case"get_object_info":return qt(r,o.id);case"search_scripts":return Yt(n||[],o.query,o.max_results||10);case"read_script":return Gt(n||[],o.id);case"list_scripts":return Xt(n||[]);case"get_editor_selection":{if(!(t!=null&&t.getSelection))return he();const s=t.getSelection();return JSON.stringify(s||{message:"No text is currently selected in the editor."})}case"get_editor_content":return t!=null&&t.getContent?JSON.stringify({content:t.getContent()}):he();case"get_cursor_position":{if(!(t!=null&&t.getCursorPosition))return he();const s=t.getCursorPosition();return JSON.stringify(s||{message:"Editor has no cursor position (not focused)."})}case"highlight_text_in_editor":{if(!(t!=null&&t.highlightText))return he();const s=t.highlightText(o.text);return JSON.stringify({matches:s,message:s===0?`Text "${o.text}" was not found in the editor.`:`Highlighted ${s} occurrence(s) of "${o.text}".`})}case"highlight_line_range":{if(!(t!=null&&t.highlightLineRange))return he();const s=t.highlightLineRange(o.start_line,o.end_line);return JSON.stringify({success:s,message:s?`Selected lines ${o.start_line}-${o.end_line}.`:"Could not select the requested line range."})}case"go_to_line":{if(!(t!=null&&t.goToLine))return he();const s=t.goToLine(o.line,o.column);return JSON.stringify({success:s,message:s?`Cursor moved to line ${o.line}.`:"Could not move the cursor."})}case"insert_text_at_cursor":{if(!(t!=null&&t.insertTextAtCursor))return he();const s=t.insertTextAtCursor(o.text);return JSON.stringify({success:s,message:s?"Text inserted at cursor.":"Editor rejected the insertion."})}case"replace_selection":{if(!(t!=null&&t.replaceSelection))return he();const s=t.replaceSelection(o.text);return JSON.stringify({success:s,message:s?"Selection replaced.":"No text was selected to replace."})}case"get_diagnostics":{if(!(t!=null&&t.getDiagnostics))return he();const s=t.getDiagnostics();return JSON.stringify({count:s.length,diagnostics:s})}case"get_document_symbols":{if(!(t!=null&&t.getSymbols))return he();const s=await t.getSymbols();return JSON.stringify({count:s.length,symbols:s})}default:return JSON.stringify({error:`Unknown tool: ${e.function.name}`})}}let Qt=0;function Ne(){return`msg_${Date.now()}_${++Qt}`}function Zt(r){const{socket:e,runningInstances:n,currentCode:t,currentLanguage:o,allScripts:s,editorApi:d,currentScriptId:m}=r,c=A((f,O,R)=>f==="none"||!R?null:{range:O,scriptId:m||"",scriptVersion:(t||"").length,kind:f,originalText:R},[m,t]),[p,g]=te(()=>{try{const f=window.localStorage.getItem("Editor.aiChatMessages");return f?JSON.parse(f):[]}catch{return[]}}),a=A(f=>{g(O=>{const R=typeof f=="function"?f(O):f,L=R.length>100?R.slice(-100):R;try{window.localStorage.setItem("Editor.aiChatMessages",JSON.stringify(L))}catch{try{const W=L.slice(-20);window.localStorage.setItem("Editor.aiChatMessages",JSON.stringify(W))}catch{}}return L})},[]),[y,l]=te(!1),[S,b]=te(null),[v,H]=te(window.localStorage.getItem("Editor.aiChatMode")||"agent"),E=A(f=>{H(f),window.localStorage.setItem("Editor.aiChatMode",f)},[]),[I,x]=te(null),[w,M]=te(window.localStorage.getItem("openai-model")||""),[re,Y]=te([]),[_,G]=te({}),[le,K]=te(!0),[de,T]=te(null),U=ne(null),X=ne(null),Q=ne(null),h=ne(null),C=A(f=>{M(f),window.localStorage.setItem("openai-model",f)},[]),k=A(async()=>{K(!0),T(null);try{const f=await Pt(e,n);if(Y(f.models),G(f.providerMap),f.models.length>0){const O=window.localStorage.getItem("openai-model");O&&f.models.includes(O)?M(O):M(f.models[0])}f.errors.length>0&&T(f.errors.join("; "))}catch(f){T(String(f))}K(!1)},[e,n]);xe(()=>{k()},[k]);const z=A(f=>{let O=!1,R=!1;const L=[];let W=!1;const ge=/@([\w/äöüÄÖÜß-]+)/g;let D;for(;(D=ge.exec(f))!==null;){const B=D[1].toLowerCase();if(B==="alle"||B==="all")O=!0;else if(B==="geräte"||B==="devices"||B==="geraete")R=!0;else if(W=!0,s&&s.length>0){const V=D[1].replace(/\//g,".").toLowerCase(),oe=V.split("."),ie=s.find(ye=>{const me=ye.id.toLowerCase(),Z=me.replace(/^script\.js\./,"");if(Z===V||Z.endsWith(`.${V}`)||me===`script.js.${V}`)return!0;let _e=0;for(const pe of oe){const Ce=Z.indexOf(pe,_e);if(Ce===-1)return!1;_e=Ce+pe.length}return!0});if(ie)L.push(ie.id);else for(const ye of oe){if(ye.length<3)continue;const me=s.filter(Z=>Z.id.toLowerCase().includes(`.${ye}`)||Z.name.toLowerCase().includes(ye));for(const Z of me)L.includes(Z.id)||L.push(Z.id)}}}return W&&L.length===0&&(O=!0),{cleanMessage:f.replace(/@[\w/äöüÄÖÜß]+\s*/g,"").trim(),mentionedScriptIds:L,includeAll:O,includeDevices:R}},[s]),se=A(async(f,O,R)=>{h.current||(h.current=await At()),U.current||(U.current=await De(e,n));const L=Ge(),W=o==="blockly",ge=f||R.length>0;let D=`You are an AI assistant for ioBroker JavaScript adapter scripting. Help the user write, debug, and understand ioBroker scripts. Write comments in ${L}. Use the ioBroker JavaScript API correctly. - -ioBroker object hierarchy: adapter.instance.device.channel.state -- A "state" is a single datapoint (e.g. zigbee2mqtt.0.0x1234.temperature) -- A "channel" groups related states (e.g. zigbee2mqtt.0.0x1234 contains temperature, humidity, battery) -- A "device" groups channels (e.g. zigbee2mqtt.0.0x1234) -- The channel/device often has the human-readable name (e.g. "Living Room Sensor") -When looking up info about a datapoint, ALWAYS also check its parent channel/device for the device name and context. Use get_object_info which returns the full parent hierarchy automatically. - -Available API and syntax rules: -${h.current}`;if(W&&(D+="\n\nThe user is working in the Blockly visual editor. When asked to create or modify code, respond with Blockly XML in a ```xml code block instead of JavaScript."),(O||f)&&(Q.current||(Q.current=await Ye(e)),D+=` - -Available smart home devices: -${JSON.stringify(Q.current,null,0)}`),!ge&&t)if(W){const F="%%BLOCKLY_XML%%",B=t.indexOf(F),V=B!==-1?t.substring(0,B).trim():t,oe=B!==-1?t.substring(B+F.length).trim():"";D+=` - -The user is working on this Blockly script (currently open in the editor). - -Generated JavaScript (shows the logic): -\`\`\`javascript -${V} -\`\`\``,oe&&(D+=` - -Blockly XML (use for modifications): -\`\`\`xml -${oe} -\`\`\``)}else D+=` - -The user's question is about this script (currently open in the editor, ${o||"javascript"}): -\`\`\`${o||"javascript"} -${t} -\`\`\``;if(f&&s&&s.length>0)D+=` - -The user requested ALL scripts. Search through all of them to answer the question. Always identify WHICH script you describe by its full ID. Scripts may reference datapoint IDs via variables. - -${qe(s,!0)}`;else if(R.length>0&&s){const F=s.filter(B=>R.includes(B.id));F.length>0&&(D+=` - -IMPORTANT: The user is asking about the following script(s). Answer ONLY about these scripts, NOT about the currently open editor tab. Analyze the source code below carefully: - -${qe(F,!0)}`)}return W&&(D+=` - -${Xe(L)}`),[{role:"system",content:D}]},[e,n,t,o,s]),ke=A(async f=>{if(!f.trim()||y)return;const O=_[w];if(!O){x(u.I18n.t("Please select a valid model"));return}const R=U.current||await De(e,n);if(U.current=R,!R){x(u.I18n.t("No API keys configured"));return}const L=Object.keys(n)[0];if(!L){x(u.I18n.t("No running javascript instance found"));return}const W=O==="custom"&&R.gptBaseUrl||"",ge={id:Ne(),role:"user",content:f,timestamp:Date.now()},D={id:Ne(),role:"assistant",content:`⏳ ${u.I18n.t("Generating plan...")}`,timestamp:Date.now()};a(F=>[...F,ge,D]),l(!0),x(null);try{const F=Ge();Q.current||(Q.current=await Ye(e));const B=Q.current||[],V=`Devices in my smart home: -${JSON.stringify(B)} - -I need a plan for this task: ${f} - -Answer with max 6 lines. Use FULL device IDs from the list above (e.g. zigbee2mqtt.0.0xa4c1383f5ef5fb07.state). No explanation. No reasoning. -1. IDs: -2. Trigger: -3. Condition: -4. Actions: -5. Else: -6. Extra: -Values are boolean (true/false) or numbers, not strings. Use .state not .state_toggle.`,oe=await Re(e,L,{messages:[{role:"user",content:V}],model:w,provider:O,baseUrl:W});if(oe.error){x(oe.error),a(ae=>ae.slice(0,-2)),l(!1);return}const ie=Pe(oe.content||"");a(ae=>{const j=[...ae],P=j[j.length-1];return(P==null?void 0:P.role)==="assistant"&&(j[j.length-1]={...P,content:`📋 **${u.I18n.t("Plan")}:** -${ie}`}),j});const ye={id:Ne(),role:"assistant",content:`⏳ ${u.I18n.t("Generating code...")}`,timestamp:Date.now()};a(ae=>[...ae,ye]);const me=o==="blockly",Z=me?`TASK: ${f} - -PLAN: -${ie} - -Generate Blockly XML blocks for this ioBroker automation. Use the exact state IDs from the plan. If the plan contains TODO_DEVICE_ID, keep it as a placeholder. Write comments in ${F}. Put the blocks in a \`\`\`xml code block. You may add a short explanation before or after the XML.`:`TASK: ${f} - -PLAN: -${ie} - -Write the ioBroker script. Use the exact state IDs from the plan. If the plan contains TODO_DEVICE_ID, keep it as a placeholder with a comment so the user can fill in the correct ID. Write comments in ${F}. Put the code in a \`\`\`javascript code block. You may add a short explanation before or after the code.`,_e=me?Xe(F):Ut(F),pe=await Re(e,L,{messages:[{role:"system",content:_e},{role:"user",content:Z}],model:w,provider:O,baseUrl:W});if(pe.error){x(pe.error),a(ae=>ae.slice(0,-1)),l(!1);return}const Ce=Pe(pe.content||"");a(ae=>{const j=[...ae],P=j[j.length-1];return(P==null?void 0:P.role)==="assistant"&&(j[j.length-1]={...P,content:Ce}),j}),b(`${u.I18n.t("devices")}: ${B.length}`)}catch(F){x(String(F)),a(B=>B.slice(0,-1))}l(!1)},[w,_,y,e,n,o,a]),J=A(async f=>{var ae;if(v==="code")return ke(f);if(!f.trim()||y)return;const O=_[w];if(!O){x(u.I18n.t("Please select a valid model"));return}const R=U.current||await De(e,n);if(U.current=R,!R){x(u.I18n.t("No API keys configured"));return}const L=Object.keys(n)[0];if(!L){x(u.I18n.t("No running javascript instance found"));return}let W=X.current;if(X.current=null,!W)try{const j=(ae=d==null?void 0:d.getSelection)==null?void 0:ae.call(d);j&&j.text&&(W=c("selection",j.range,j.text))}catch{}const ge={id:Ne(),role:"user",content:f,timestamp:Date.now(),sourceRange:W},D={id:Ne(),role:"assistant",content:"",timestamp:Date.now(),sourceRange:W};a(j=>[...j,ge,D]),l(!0),x(null);const{cleanMessage:F,mentionedScriptIds:B,includeAll:V,includeDevices:oe}=z(f),ie=[];if(V)ie.push(`${u.I18n.t("all scripts")} (${(s==null?void 0:s.length)||0})`);else if(B.length>0){const j=B.map(P=>P.replace(/^script\.js\./,""));ie.push(j.join(", "))}else ie.push(u.I18n.t("current script"));oe&&ie.push(u.I18n.t("devices")),b(`${u.I18n.t("Context")}: ${ie.join(" + ")}`);const ye=await se(V,oe,B),me=O==="custom"&&R.gptBaseUrl||"";let Z=F||f;if(s&&s.length>0){const j=Z.match(/\b[\w-]+\.\d+\.[\w.-]+/g);if(j){const P=[];for(const ee of new Set(j)){const be=wt(s,ee);be.length>0&&P.push(`Datapoint "${ee}" is used in: -${be.map(je=>` - ${je.scriptName} (${je.scriptId}) line ${je.lineNumber}: ${je.usageType} → ${je.line}`).join(` -`)}`)}P.length>0&&(Z+=` - -[Automatic analysis results] -${P.join(` - -`)}`)}}const _e=[...ye,...p.filter(j=>j.role!=="system").map(j=>({role:j.role,content:j.content})),{role:"user",content:Z}],pe=v==="agent",Ce=5;try{const j=[..._e];for(let P=0;PN.slice(0,-1));else{const N=Pe(q.content||"");a(ce=>{const fe=[...ce],Be=fe[fe.length-1];return(Be==null?void 0:Be.role)==="assistant"&&(fe[fe.length-1]={...Be,content:N}),fe})}break}x(ee.error),a(q=>q.slice(0,-1));break}let be=ee.tool_calls;if((!be||be.length===0)&&pe&&ee.content){const q=ee.content.trim();try{const N=JSON.parse(q);N.name&&N.arguments&&(be=[{id:`text_tool_${Date.now()}`,type:"function",function:{name:N.name,arguments:JSON.stringify(N.arguments)}}])}catch{}}if(!be||be.length===0){const q=Pe(ee.content||"");a(N=>{const ce=[...N],fe=ce[ce.length-1];return(fe==null?void 0:fe.role)==="assistant"&&(ce[ce.length-1]={...fe,content:q}),ce});break}ee.tool_calls=be;const je=ee.tool_calls.map(q=>{let N={};try{N=JSON.parse(q.function.arguments)}catch{}switch(q.function.name){case"search_datapoints":return`🔍 ${u.I18n.t("Searching datapoints")}: "${String(N.query||"")}"`;case"get_state_value":return`📊 ${u.I18n.t("Reading value")}: ${String(N.id||"")}`;case"get_object_info":return`📋 ${u.I18n.t("Loading object info")}: ${String(N.id||"")}`;case"search_scripts":return`🔍 ${u.I18n.t("Searching scripts")}: "${String(N.query||"")}"`;case"read_script":return`📖 ${u.I18n.t("Reading script")}: ${String(N.id||"")}`;case"list_scripts":return`📂 ${u.I18n.t("Loading script list")}`;default:return`⚙️ ${q.function.name}`}});a(q=>{const N=[...q],ce=N[N.length-1];return(ce==null?void 0:ce.role)==="assistant"&&(N[N.length-1]={...ce,content:je.join(` -`)}),N}),j.push({role:"assistant",content:ee.content||"",tool_calls:ee.tool_calls});for(const q of ee.tool_calls){const N=await Kt(e,q,s,d);j.push({role:"tool",tool_call_id:q.id,content:N})}}}catch(j){x(String(j)),a(P=>P.slice(0,-1))}l(!1)},[w,_,p,y,e,n,se,z,s,v,ke,a,c,d]),ue=A(()=>{a([]),x(null),l(!1),b(null),Dt(),window.localStorage.removeItem("Editor.aiChatHistory")},[a]),it=A(async(f,O)=>{const R=_[w];if(!R)return`Error: ${u.I18n.t("Please select a valid model")}`;const L=U.current||await De(e,n);if(U.current=L,!L)return`Error: ${u.I18n.t("No API keys configured")}`;const W=Object.keys(n)[0];if(!W)return`Error: ${u.I18n.t("No running javascript instance found")}`;const ge=R==="custom"&&L.gptBaseUrl||"",D=o||"javascript",F=`You are an assistant for writing ioBroker ${D} scripts. The user will ask a question about a snippet of their code. Match your answer to the question: -- If they ask for an explanation, description, or "what does this do?", reply with clear prose (a few sentences). Do NOT repeat the code unchanged. -- If they explicitly ask for a change, refactor, fix, or rewrite, reply with a single fenced \`\`\`${D==="blockly"?"xml":D}\`\`\` code block containing the full replacement for the selection. You may add one short sentence before or after the block. -- If they ask something ambiguous or meta (e.g. "is this correct?"), reply in prose first and only include code if proposing a change. -ioBroker globals available in scripts: on, setState, getState, schedule, sendTo, log, createState, setStateDelayed, existsState, httpGet, httpPost.`,B=O?`Code from my editor: - -\`\`\`${D==="blockly"?"xml":D} -${O} -\`\`\` - -${f}`:f;try{const V=await Re(e,W,{messages:[{role:"system",content:F},{role:"user",content:B}],model:w,provider:R,baseUrl:ge});return V.error?`Error: ${V.error}`:V.content||""}catch(V){return`Error: ${V.message||String(V)}`}},[w,_,n,e,o]),at=A(f=>{f.range&&f.code?X.current=c(f.kind||"codelens",f.range,f.code):X.current=null,Ze(async()=>{const{buildActionPrompt:O}=await Promise.resolve().then(()=>ln);return{buildActionPrompt:O}},void 0,import.meta.url).then(({buildActionPrompt:O})=>{const R=O({action:f.action,code:f.code,language:o||"javascript",diagnostic:f.diagnostic,question:f.question,rangeLabel:f.rangeLabel});R?J(R):X.current=null}).catch(()=>{X.current=null,x(u.I18n.t("Failed to build AI action prompt"))})},[J,o,c]);return{messages:p,isLoading:y,error:I,model:w,availableModels:re,modelProviderMap:_,modelsLoading:le,modelsError:de,lastContextInfo:S,mode:v,setMode:E,setModel:C,sendMessage:J,triggerAiAction:at,askInline:it,clearChat:ue,retryLoadModels:k}}const en=({code:r,language:e,themeType:n,onInsertCode:t,onShowDiff:o,sourceRange:s})=>{const d=ne(null);xe(()=>{var g;const c=window.monaco;if(!d.current||!((g=c==null?void 0:c.editor)!=null&&g.colorize))return;const p=e==="ts"||e==="typescript"?"typescript":e||"javascript";c.editor.colorize(r,p,{theme:n==="dark"?"vs-dark":"vs"}).then(a=>{d.current&&(d.current.innerHTML=a)})},[r,e,n]);const m=A(()=>{navigator.clipboard.writeText(r)},[r]);return i.jsxs($,{sx:{position:"relative",my:1,borderRadius:1,overflow:"hidden",border:"1px solid",borderColor:"divider"},children:[i.jsxs($,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",px:1,py:.5,bgcolor:"action.hover",borderBottom:"1px solid",borderColor:"divider"},children:[i.jsx($,{sx:{fontSize:"0.75rem",color:"text.secondary",textTransform:"uppercase"},children:e||"javascript"}),i.jsxs($,{children:[i.jsx(ve,{title:u.I18n.t("Copy"),children:i.jsx(we,{size:"small",onClick:m,children:i.jsx(kt,{sx:{fontSize:16}})})}),t&&i.jsx(ve,{title:u.I18n.t("Insert into editor"),children:i.jsx(we,{size:"small",onClick:()=>t(r),children:i.jsx(et,{sx:{fontSize:16}})})}),o&&i.jsx(ve,{title:u.I18n.t("Show as diff"),children:i.jsx(we,{size:"small",onClick:()=>o(r,s),children:i.jsx(It,{sx:{fontSize:16}})})})]})]}),i.jsx("pre",{ref:d,style:{margin:0,padding:"8px 12px",overflow:"auto",maxHeight:400,fontSize:"13px",fontFamily:"'Cascadia Code', 'Fira Code', 'Consolas', monospace",backgroundColor:n==="dark"?"#1e1e1e":"#f8f8f8",color:n==="dark"?"#d4d4d4":"#333"},children:r})]})},tn=({xml:r,themeType:e})=>{const n=ne(null),t=ne(null),[o,s]=te(60),d=ne(!1);return xe(()=>{d.current&&(d.current=!1,requestAnimationFrame(()=>{const m=window.Blockly,c=t.current;m&&c&&(m.svgResize(c),c.scrollCenter())}))},[o]),xe(()=>{const m=window.Blockly;if(!(!m||!n.current)){t.current&&(t.current.dispose(),t.current=null);try{const c=m.inject(n.current,{readOnly:!0,toolbox:null,trashcan:!1,zoom:{controls:!1,wheel:!1,startScale:1},move:{scrollbars:!1,drag:!1,wheel:!1},sounds:!1,renderer:"thrasos",theme:e==="dark"?St:"classic",media:"google-blockly/media/"});t.current=c;let p=r.trim();p.startsWith("${p}`);const g=m.utils.xml.textToDom(p);let a=10;const y=Array.from(g.querySelectorAll(":scope > block"));for(const b of y)b.setAttribute("x","10"),b.setAttribute("y",String(a)),a+=200;m.Xml.domToWorkspace(g,c);const l=c.getTopBlocks(!1);if(l.length>1){let b=10;for(const v of l){const H=v.getRelativeToSurfaceXY();v.moveBy(10-H.x,b-H.y),b+=v.getHeightWidth().height+20}}const S=c.getBlocksBoundingBox();if(S){const b=S.bottom-S.top+20,v=Math.max(60,Math.ceil(b));d.current=!0,s(v)}}catch{}return()=>{t.current&&(t.current.dispose(),t.current=null)}}},[r,e]),i.jsx($,{ref:n,sx:{width:"100%",height:o,minHeight:60,borderRadius:1,overflow:"hidden",border:"1px solid",borderColor:"divider"}})};function nn(r){const e=[],n=/```(\w*)\n?([\s\S]*?)```/g;let t=0,o;for(;(o=n.exec(r))!==null;){if(o.index>t){const s=r.substring(t,o.index).trim();s&&e.push({type:"text",content:s})}e.push({type:"code",content:o[2].trim(),language:o[1]||"javascript"}),t=o.index+o[0].length}if(tt&&e.push(r.substring(t,o.index)),o[2]?e.push(i.jsx("strong",{children:o[2]},s++)):o[3]?e.push(i.jsx("em",{children:o[3]},s++)):o[4]&&e.push(i.jsx("code",{className:"ai-chat-inline-code",style:{padding:"2px 6px",borderRadius:4,fontSize:"0.85em",fontFamily:"'Cascadia Code', 'Fira Code', 'Consolas', monospace"},children:o[4]},s++)),t=o.index+o[0].length;return tm.trim().replace(/^\||\|$/g,"").split("|").map(c=>c.trim()),s=o(r[0]),d=r.slice(2).map(o);return i.jsx($,{sx:{overflowX:"auto",my:1},children:i.jsxs("table",{style:{borderCollapse:"collapse",width:"100%",fontSize:"0.8rem",color:e.palette.text.primary},children:[i.jsx("thead",{children:i.jsx("tr",{children:s.map((m,c)=>i.jsx("th",{style:{border:`1px solid ${e.palette.divider}`,padding:"6px 10px",backgroundColor:t?e.palette.grey[800]:e.palette.grey[100],color:e.palette.text.primary,fontWeight:600,textAlign:"left"},children:Ee(m)},c))})}),i.jsx("tbody",{children:d.map((m,c)=>i.jsx("tr",{style:{backgroundColor:c%2===1?t?e.palette.grey[900]:e.palette.grey[50]:void 0},children:m.map((p,g)=>i.jsx("td",{style:{border:`1px solid ${e.palette.divider}`,padding:"6px 10px",color:e.palette.text.primary},children:Ee(p)},g))},c))})]})},n)}function on(r,e){const n=r.split(` -`),t=[];let o=0,s=0;for(;si.jsx("li",{children:Ee(g)},a))},o++));continue}if(/^\d+[.)]\s/.test(m)){const p=[];for(;si.jsx("li",{children:Ee(g)},a))},o++));continue}t.push(i.jsx("div",{children:Ee(m)},o++)),s++}return t}const an=({message:r,themeType:e,currentLanguage:n,onInsertCode:t,onShowDiff:o,onApplyCode:s})=>{const d=r.role==="user",m=ct(),c=d?e==="dark"?m.palette.primary.dark:m.palette.primary.main:e==="dark"?m.palette.secondary.dark:m.palette.secondary.main,p=m.palette.getContrastText(c),g=Ue(()=>nn(r.content),[r.content]),a=(b,v)=>!!(b==="xml"||b==="blockly"||n==="blockly"&&v&&/b.type==="code"?a(b.language,b.content)?i.jsxs($,{sx:{my:1},children:[i.jsx(tn,{xml:b.content,themeType:e}),i.jsxs($,{sx:{display:"flex",gap:.5,mt:.5},children:[s&&i.jsx(We,{size:"small",variant:"contained",color:"primary",startIcon:i.jsx(Ot,{sx:{fontSize:14}}),onClick:()=>s(b.content),sx:{textTransform:"none",fontSize:"0.75rem"},children:u.I18n.t("Apply blocks")}),t&&i.jsx(We,{size:"small",variant:"outlined",startIcon:i.jsx(et,{sx:{fontSize:14}}),onClick:()=>t(b.content),sx:{textTransform:"none",fontSize:"0.75rem"},children:u.I18n.t("Insert blocks")})]})]},v):i.jsx(en,{code:b.content,language:b.language||"javascript",themeType:e,onInsertCode:t,onShowDiff:o,sourceRange:r.sourceRange||null},v):i.jsx($,{sx:{wordBreak:"break-word",color:m.palette.text.primary},children:on(b.content,m)},v))})]})};function cn(r){const e=(r||"").toLowerCase();return e.includes("blockly")||e.includes("rules")?"blockly":e.includes("typescript")?"typescript":"javascript"}function Te(r,e){return`\`\`\`${e==="blockly"?"xml":e} -${r} -\`\`\``}function rt(r){const e=(r.code||"").trim(),n=cn(r.language),t=r.rangeLabel?` (${r.rangeLabel})`:"";switch(r.action){case"explain":return e?[`Please explain what this ioBroker ${n} code does${t}.`,"Focus on: which datapoints it reads/writes, which triggers fire it, and any side-effects.","",Te(e,n)].join(` -`):null;case"refactor":return e?[`Refactor this ioBroker ${n} code${t} to be cleaner and more idiomatic.`,"Preserve behavior exactly. Keep ioBroker APIs (on, setState, getState, schedule, sendTo, log).",`Return the full refactored block inside a \`\`\`${n==="blockly"?"xml":n}\`\`\` code block so it can be smart-applied.`,"",Te(e,n)].join(` -`):null;case"comment":return e?[`Add clear, concise inline comments to this ioBroker ${n} code${t}.`,"Only add comments where they add real value (non-obvious logic, tricky edge cases, business rules).","Do not over-comment trivial lines. Return the commented version in a code block.","",Te(e,n)].join(` -`):null;case"fix":{if(!e)return null;const o=(r.diagnostic||"").trim(),s=o?` -Reported problem: ${o}`:"";return[`This ioBroker ${n} code has an issue${t}. Please fix it and return the corrected code.${s}`,"Keep the fix minimal — do not rewrite unrelated parts.","",Te(e,n)].join(` -`)}case"tests":return e?[`Suggest how to test this ioBroker ${n} script manually inside the ioBroker admin UI${t}.`,"","ioBroker scripts run inside the adapter sandbox and CANNOT be unit-tested with Jest, Mocha, or any external test framework. Do NOT propose Jest/Mocha tests, do NOT propose extracting the code into a separate Node.js project, do NOT write `describe` / `test` blocks.","","Instead, propose a short list of manual test cases. For each case describe:",' • Setup — which ioBroker datapoints to prepare and to which values (via the objects tree "Values" tab)'," • Action — what to trigger: set a state with setState, wait for a schedule, change a sensor value, etc."," • Expected — what should happen afterwards: which states should change, what should appear in the adapter log (javascript.0), which side effects are visible","","Keep it concise: 3-6 cases covering the happy path, typical edge cases, and any guard conditions the script has.","",Te(e,n)].join(` -`):null;case"ask":{const o=(r.question||"").trim();return o?e?[`Regarding this ioBroker ${n} code${t}:`,"",Te(e,n),"",o].join(` -`):o:null}default:return null}}function ot(r){const e=(r||"").trimStart();if(!e.startsWith("/"))return null;const n=e.match(/^\/(\w+)(?:\s+([\s\S]*))?$/);if(!n)return null;const t=n[1].toLowerCase(),o=(n[2]||"").trim(),d={explain:"explain",erklaere:"explain",erklaeren:"explain",refactor:"refactor",refaktor:"refactor",refaktoriere:"refactor",comment:"comment",comments:"comment",kommentar:"comment",kommentiere:"comment",fix:"fix",fixme:"fix",tests:"tests",test:"tests",ask:"ask",frag:"ask",frage:"ask"}[t];return d?{action:d,rest:o}:null}const ln=Object.freeze(Object.defineProperty({__proto__:null,buildActionPrompt:rt,parseSlashCommand:ot},Symbol.toStringTag,{value:"Module"}));function dn(){return[{id:"@all",label:u.I18n.t("mention @all"),descriptionKey:"All scripts"},{id:"@devices",label:u.I18n.t("mention @devices"),descriptionKey:"Smart home devices"}]}function un({provider:r,isDark:e}){return $t[r]?i.jsx("img",{src:`./img/${r}.svg`,alt:r,style:{...Lt,...e?{filter:"invert(0.85)"}:{}},onError:t=>{t.target.style.display="none"}}):null}function mn(){try{const r=window.localStorage.getItem("Editor.aiChatHistory");return r?JSON.parse(r):[]}catch{return[]}}const pn=({onSend:r,disabled:e,themeType:n,hasSelection:t,selectionText:o,allScripts:s,model:d,availableModels:m,modelProviderMap:c,modelsLoading:p,onModelChange:g,mode:a,onModeChange:y,currentLanguage:l})=>{const[S,b]=te(""),[v,H]=te(!1),[E,I]=te(""),[x,w]=te(0),M=ne(null),re=ne(-1),Y=ne(mn()),_=ne(-1),G=ne(""),le=Ue(()=>{const C=dn().map(k=>({...k,description:u.I18n.t(k.descriptionKey)}));if(s)for(const k of s){const z=k.id.replace(/^script\.js\./,"").replace(/\./g,"/");C.push({id:`@${z}`,label:`@${z}`,description:`${k.name} [${k.enabled?"active":"inactive"}]`})}return C},[s]),K=Ue(()=>{if(!E)return le;const h=E.toLowerCase();return le.filter(C=>C.id.toLowerCase().includes(h)||C.description.toLowerCase().includes(h))},[le,E]);xe(()=>{w(0)},[E]);const de=A(()=>{const h=S.trim();if(!h||e)return;let C=h;const k=ot(h);if(k){const z=t&&o?o:"",se=rt({action:k.action,code:z,language:l||"javascript",question:k.action==="ask"?k.rest:void 0,diagnostic:k.action==="fix"&&k.rest||void 0});se&&(C=se)}else t&&o&&(C=`[Selected code in editor] -\`\`\` -${o} -\`\`\` - -${h}`);Y.current.push(h),_.current=-1,G.current="";try{const z=Y.current.slice(-50);window.localStorage.setItem("Editor.aiChatHistory",JSON.stringify(z))}catch{}r(C),b(""),H(!1),requestAnimationFrame(()=>{var z;return(z=M.current)==null?void 0:z.focus()})},[S,e,r,t,o,l]),T=A(h=>{const C=re.current,k=M.current;if(C<0){const ue=S?`${S}${h} `:`${h} `;b(ue),H(!1),I(""),setTimeout(()=>{k&&(k.focus(),k.setSelectionRange(ue.length,ue.length))},0);return}const z=S.substring(0,C),se=(k==null?void 0:k.selectionStart)??S.length,ke=S.substring(se),J=`${z}${h} ${ke}`;b(J),H(!1),I(""),re.current=-1,setTimeout(()=>{if(k){const ue=z.length+h.length+1;k.focus(),k.setSelectionRange(ue,ue)}},0)},[S]),U=A(()=>{re.current=-1,I(""),H(h=>!h)},[]),X=A(h=>{const C=h.target.value;b(C);const k=h.target.selectionStart??C.length,se=C.substring(0,k).match(/@([\w/äöüÄÖÜß]*)$/);se?(re.current=k-se[0].length,I(se[1]),H(!0)):(H(!1),I(""))},[]),Q=A(h=>{if(v&&K.length>0){if(h.key==="ArrowDown"){h.preventDefault(),w(C=>(C+1)%K.length);return}if(h.key==="ArrowUp"){h.preventDefault(),w(C=>(C-1+K.length)%K.length);return}if(h.key==="Enter"||h.key==="Tab"){h.preventDefault(),T(K[x].id);return}if(h.key==="Escape"){h.preventDefault(),H(!1);return}}if(h.key==="ArrowUp"&&!v&&Y.current.length>0){const C=M.current,k=!C||C.selectionStart===0,z=!S.includes(` -`);if(k&&z){h.preventDefault(),_.current===-1?(G.current=S,_.current=Y.current.length-1):_.current>0&&_.current--,b(Y.current[_.current]);return}}if(h.key==="ArrowDown"&&!v&&_.current>=0){const C=M.current,k=!C||C.selectionStart===S.length,z=!S.includes(` -`);if(k&&z){h.preventDefault(),_.current0&&i.jsx(dt,{elevation:4,sx:{position:"absolute",bottom:"100%",left:8,right:8,maxHeight:200,overflow:"auto",zIndex:10,mb:.5},children:i.jsx(ut,{dense:!0,disablePadding:!0,children:K.slice(0,15).map((h,C)=>i.jsx(mt,{selected:C===x,onClick:()=>T(h.id),sx:{py:.25,minHeight:32},children:i.jsx(pt,{primary:h.label,secondary:h.description,primaryTypographyProps:{fontSize:"0.8rem",fontWeight:500},secondaryTypographyProps:{fontSize:"0.7rem"}})},h.id))})}),a==="code"&&i.jsx(Fe,{label:`${u.I18n.t("mention @devices")} — ${u.I18n.t("Smart home devices")}`,size:"small",variant:"outlined",sx:{mx:1,mt:.5,maxWidth:"calc(100% - 16px)"}}),t&&o&&i.jsx(Fe,{icon:i.jsx(bt,{sx:{fontSize:14}}),label:u.I18n.t("Selected code as context"),size:"small",variant:"outlined",sx:{mx:1,mt:.5,maxWidth:"calc(100% - 16px)"}}),i.jsxs($,{sx:{mx:1,mt:.5,mb:.5,border:"1px solid",borderColor:"divider",borderRadius:1.5,overflow:"hidden","&:focus-within":{borderColor:"primary.main"}},children:[i.jsx(ft,{inputRef:M,fullWidth:!0,multiline:!0,maxRows:6,placeholder:u.I18n.t("Ask about your script..."),value:S,onChange:X,onKeyDown:Q,disabled:e,onBlur:()=>{setTimeout(()=>H(!1),200)},variant:"standard",slotProps:{input:{disableUnderline:!0}},sx:{px:1.5,pt:1,pb:.5,"& .MuiInputBase-root":{fontSize:"0.875rem"}}}),i.jsxs($,{sx:{display:"flex",alignItems:"center",gap:.75,px:1,pb:.5},children:[i.jsx(ve,{title:i.jsxs($,{sx:{fontSize:"0.8rem",lineHeight:1.5,maxWidth:360},children:[i.jsx($,{sx:{fontWeight:600,mb:.75},children:u.I18n.t("AI chat mode")}),i.jsxs($,{sx:{mb:.75},children:[i.jsxs("strong",{children:["💬 ",u.I18n.t("Chat")]})," —"," ",u.I18n.t("Plain conversation. Use for questions, explanations, syntax help. Does not read or modify your scripts.")]}),i.jsxs($,{sx:{mb:.75},children:[i.jsxs("strong",{children:["🤖 ",u.I18n.t("Agent")]})," —"," ",u.I18n.t('For larger models with tool support. The AI can read, create, and edit scripts, look up datapoints, and browse the object tree — useful for "create a script that...", "which scripts use this state?" or "analyze my light script".')]}),i.jsxs($,{children:[i.jsxs("strong",{children:["💻 ",u.I18n.t("Code")]})," —"," ",u.I18n.t('For smaller models without tool support. Two-step script generator (plan then code) — useful for "create a script that..." or "write a Blockly rule for...". Output goes into the editor for smart-apply.')]})]}),enterDelay:400,placement:"left",children:i.jsxs(He,{value:a,onChange:h=>y(h.target.value),size:"small",variant:"standard",disableUnderline:!0,sx:{fontSize:"0.7rem",color:"text.secondary",border:"1px solid",borderColor:"text.secondary",borderRadius:3,bgcolor:"action.hover",px:.75,"&:hover":{borderColor:"text.disabled",bgcolor:"action.hover"},"& .MuiSelect-select":{py:"2px",pr:"18px !important",display:"flex",alignItems:"center",gap:.5}},children:[i.jsx(ze,{value:"chat",sx:{fontSize:"0.75rem"},title:u.I18n.t("Plain conversation. Best for: general questions, syntax help, concept explanations."),children:"💬 Chat"}),i.jsx(ze,{value:"agent",sx:{fontSize:"0.75rem"},title:u.I18n.t("For larger models with tool support. Best for: creating, editing, or analyzing scripts; finding datapoint usages; inspecting the object tree."),children:"🤖 Agent"}),i.jsx(ze,{value:"code",sx:{fontSize:"0.75rem"},title:u.I18n.t("For smaller models without tool support. Best for: creating new JavaScript/TypeScript or Blockly scripts from a description."),children:"💻 Code"})]})}),i.jsx(He,{value:d,onChange:h=>g(h.target.value),size:"small",disabled:p||m.length===0,variant:"standard",disableUnderline:!0,sx:{fontSize:"0.7rem",color:"text.secondary",border:"1px solid",borderColor:"text.secondary",borderRadius:3,bgcolor:"action.hover",px:.75,"&:hover":{borderColor:"text.disabled",bgcolor:"action.hover"},"& .MuiSelect-select":{py:"2px",pr:"18px !important",display:"flex",alignItems:"center",gap:.5}},children:m.map(h=>i.jsxs(ze,{value:h,sx:{fontSize:"0.75rem",display:"flex",gap:.5},children:[i.jsx(un,{provider:c[h],isDark:n==="dark"}),h]},h))}),i.jsx(ve,{title:u.I18n.t("Mention scripts as context for the AI. Use @all for all scripts or @scriptName for a specific one."),enterDelay:500,children:i.jsx(we,{size:"small",onClick:U,sx:{p:"3px",color:v?"primary.main":"text.secondary",border:"1px solid",borderColor:v?"primary.main":"text.secondary",bgcolor:v?void 0:"action.hover",borderRadius:3,"&:hover":{borderColor:"text.disabled",bgcolor:"action.hover"}},children:i.jsx(Ct,{sx:{fontSize:16}})})}),i.jsx($,{sx:{flex:1}}),i.jsxs(Oe,{variant:"caption",sx:{color:"text.disabled",fontSize:"0.65rem",mr:.5,whiteSpace:"nowrap"},children:["Enter ",u.I18n.t("to send")]}),i.jsx(ve,{title:`${u.I18n.t("Send")} (Enter)`,children:i.jsx("span",{children:i.jsx(we,{color:"primary",onClick:de,disabled:e||!S.trim(),size:"small",sx:{p:.25},children:i.jsx(Et,{sx:{fontSize:18}})})})})]})]})]})},Tn=({socket:r,runningInstances:e,themeType:n,currentCode:t,currentLanguage:o,selectedCode:s,allScripts:d,editorApi:m,aiActionRequest:c,onAiActionConsumed:p,onRegisterInlineAsk:g,onInsertCode:a,onShowDiff:y,onApplyCode:l,currentScriptId:S,onClose:b})=>{var ke;const v=ne(null),H=Ue(()=>({socket:r,runningInstances:e,currentCode:t,currentLanguage:o,allScripts:d,editorApi:m,currentScriptId:S}),[r,e,t,o,d,m,S]),{messages:E,isLoading:I,error:x,model:w,availableModels:M,modelProviderMap:re,modelsLoading:Y,modelsError:_,lastContextInfo:G,mode:le,setMode:K,setModel:de,sendMessage:T,triggerAiAction:U,askInline:X,clearChat:Q,retryLoadModels:h}=Zt(H);xe(()=>(g==null||g(X),()=>g==null?void 0:g(null)),[X,g]);const C=ne(null);xe(()=>{!c||C.current===c||(C.current=c,U(c),p==null||p())},[c,U,p]),xe(()=>{var J;(J=v.current)==null||J.scrollIntoView({behavior:"smooth"})},[E]);const k=A(J=>{a==null||a(J)},[a]),z=A((J,ue)=>{y==null||y(J,ue)},[y]),se=A(J=>{l==null||l(J)},[l]);return i.jsxs($,{sx:{display:"flex",flexDirection:"column",height:"100%",bgcolor:"background.default","& .ai-chat-inline-code":{backgroundColor:"action.selected",color:"text.primary",border:"1px solid",borderColor:"divider"}},children:[i.jsxs($,{sx:{display:"flex",alignItems:"center",gap:1,px:1,py:.5,borderBottom:"1px solid",borderColor:"divider",bgcolor:n==="dark"?"grey.900":"grey.100",flexShrink:0},children:[i.jsx(Oe,{variant:"subtitle2",sx:{fontWeight:600,flex:1,color:"text.primary"},children:u.I18n.t("AI Chat")}),Y&&i.jsx(Ve,{size:16}),i.jsx(ve,{title:u.I18n.t("New chat"),children:i.jsx(we,{size:"small",onClick:Q,children:i.jsx(_t,{sx:{fontSize:18}})})}),i.jsx(ve,{title:u.I18n.t("Close"),children:i.jsx(we,{size:"small",onClick:b,children:i.jsx(jt,{sx:{fontSize:18}})})})]}),(x||_)&&i.jsx(ht,{severity:"error",sx:{m:1,py:0},action:_?i.jsx(we,{size:"small",onClick:h,children:i.jsx(xt,{sx:{fontSize:16}})}):void 0,children:x||_}),G&&i.jsx(Oe,{variant:"caption",sx:{px:1.5,py:.25,color:"text.secondary",fontSize:"0.7rem",bgcolor:"action.hover",borderBottom:"1px solid",borderColor:"divider",flexShrink:0},children:G}),i.jsxs($,{sx:{flex:1,overflow:"auto",py:1},children:[E.length===0&&!I&&i.jsxs($,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",color:"text.secondary",px:3,textAlign:"center"},children:[i.jsx(Oe,{variant:"body2",sx:{mb:1},children:u.I18n.t("Ask questions about your script, request changes, or generate new code.")}),i.jsxs(Oe,{variant:"caption",color:"text.disabled",children:["Enter ",u.I18n.t("to send"),", Shift+Enter ",u.I18n.t("for new line")]})]}),E.filter(J=>J.role!=="system").map(J=>i.jsx(an,{message:J,themeType:n,currentLanguage:o,onInsertCode:k,onShowDiff:z,onApplyCode:se},J.id)),I&&((ke=E[E.length-1])==null?void 0:ke.content)===""&&i.jsxs($,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1},children:[i.jsx(Ve,{size:16}),i.jsx(Oe,{variant:"caption",color:"text.secondary",children:u.I18n.t("Thinking...")})]}),i.jsx("div",{ref:v})]}),i.jsx(pn,{onSend:T,disabled:I||M.length===0,themeType:n,hasSelection:!!s,selectionText:s,allScripts:d,model:w,availableModels:M,modelProviderMap:re,modelsLoading:Y,onModelChange:de,mode:le,onModeChange:K,currentLanguage:o})]})};export{Tn as default}; diff --git a/admin/assets/ScriptEditor--krhY3GB.js b/admin/assets/ScriptEditor-B5mD7l8c.js similarity index 91% rename from admin/assets/ScriptEditor--krhY3GB.js rename to admin/assets/ScriptEditor-B5mD7l8c.js index 6362cbb8b..820c4ae7e 100644 --- a/admin/assets/ScriptEditor--krhY3GB.js +++ b/admin/assets/ScriptEditor-B5mD7l8c.js @@ -1,2 +1,2 @@ -import{j as t}from"./createSvgIcon-DYs_tNrE.js";import{a as n}from"./iobroker_javascript__loadShare__react__loadShare__.mjs-CTZOFJS2.js";import{_ as l,a as c,b as h,z as a,h as d,i}from"./iobroker_javascript__loadShare___mf_0_mui_mf_1_material__loadShare__.mjs-CV1_X-Lf.js";import{_ as o}from"./iobroker_javascript__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.mjs-DkBjPSMw.js";import p from"./ScriptEditorVanillaMonaco-ColXheQH.js";import{S as m}from"./Save-CkuNSiWL.js";import{a as g}from"./index-wHNMOf-c.js";import"./iobroker_javascript__loadShare__react__loadShare__.mjs_commonjs-proxy-CE9lvhW8.js";import"./iobroker_javascript__loadShare__prop_mf_2_types__loadShare__.mjs-BCtSFofY.js";import"./preload-helper-BDBacUwf.js";import"./index-CyhJmDLi.js";import"./virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-DiXVqr03.js";import"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-RQRRZMX5.js";import"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs-DeVAS-oa.js";import"./inheritsLoose-CIXm_zPk.js";const s={textArea:{width:"calc(100% - 10px)",resize:"none"},dialog:{height:"95%"},fullHeight:{height:"100%",overflow:"hidden"},args:r=>({color:r.palette.mode==="dark"?"white":"black",height:30,width:"100%",fontSize:16}),argsTitle:r=>({color:r.palette.mode==="dark"?"white":"black",fontWeight:"bold"})};class D extends n.Component{constructor(e){super(e),this.state={changed:!1,source:!e.source&&e.isReturn?` +import{j as t}from"./createSvgIcon-DYs_tNrE.js";import{a as n}from"./iobroker_javascript__loadShare__react__loadShare__.mjs-CTZOFJS2.js";import{_ as l,a as c,b as h,z as a,h as d,i}from"./iobroker_javascript__loadShare___mf_0_mui_mf_1_material__loadShare__.mjs-CV1_X-Lf.js";import{_ as o}from"./iobroker_javascript__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.mjs-DkBjPSMw.js";import p from"./ScriptEditorVanillaMonaco-CKnJEdpA.js";import{S as m}from"./Save-CkuNSiWL.js";import{a as g}from"./index-wHNMOf-c.js";import"./iobroker_javascript__loadShare__react__loadShare__.mjs_commonjs-proxy-CE9lvhW8.js";import"./iobroker_javascript__loadShare__prop_mf_2_types__loadShare__.mjs-BCtSFofY.js";import"./preload-helper-BDBacUwf.js";import"./index-Blu2oA9H.js";import"./virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-Dus28I2g.js";import"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-RQRRZMX5.js";import"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs-DeVAS-oa.js";import"./inheritsLoose-CIXm_zPk.js";const s={textArea:{width:"calc(100% - 10px)",resize:"none"},dialog:{height:"95%"},fullHeight:{height:"100%",overflow:"hidden"},args:r=>({color:r.palette.mode==="dark"?"white":"black",height:30,width:"100%",fontSize:16}),argsTitle:r=>({color:r.palette.mode==="dark"?"white":"black",fontWeight:"bold"})};class D extends n.Component{constructor(e){super(e),this.state={changed:!1,source:!e.source&&e.isReturn?` return false`:e.source}}componentDidMount(){setTimeout(()=>{var e;try{(e=window.document.getElementById("source-text-area"))==null||e.focus()}catch{}},100)}handleCancel(){this.props.onClose(!1)}handleOk(){(!this.props.isReturn||this.state.source.includes("return "))&&this.props.onClose(this.state.source)}onChange(e){this.setState({changed:!0,source:e})}render(){return t.jsxs(l,{onClose:()=>!1,maxWidth:"lg",sx:{"& .MuiDialog-paper":s.dialog},fullWidth:!0,open:!0,"aria-labelledby":"source-dialog-title",children:[t.jsx(c,{id:"source-dialog-title",children:o.I18n.t("Function editor")}),t.jsxs(h,{style:s.fullHeight,children:[this.props.args&&t.jsxs(a,{sx:s.args,children:[t.jsx(a,{component:"span",sx:s.argsTitle,children:o.I18n.t("function (")}),this.props.args,t.jsx(a,{component:"span",sx:s.argsTitle,children:")"})]},"arguments"),t.jsx(p,{triggerPrettier:1,adapterName:this.props.adapterName,runningInstances:this.props.runningInstances,style:{...s.textArea,height:this.props.args?"calc(100% - 30px)":"100%"},name:"blockly",socket:this.props.socket,readOnly:!1,checkJs:!1,changed:this.state.changed,code:this.state.source,isDark:this.props.themeType==="dark",onChange:e=>this.onChange(e),language:"javascript"},"scriptEditor")]}),t.jsxs(d,{children:[t.jsx(i,{variant:"contained",onClick:()=>this.handleOk(),color:"primary",startIcon:t.jsx(m,{}),children:o.I18n.t("Save")}),t.jsx(i,{color:"grey",variant:"contained",onClick:()=>this.handleCancel(),startIcon:t.jsx(g,{}),children:o.I18n.t("Cancel")})]})]})}}export{D as default}; diff --git a/admin/assets/ScriptEditorVanillaMonaco-ColXheQH.js b/admin/assets/ScriptEditorVanillaMonaco-CKnJEdpA.js similarity index 97% rename from admin/assets/ScriptEditorVanillaMonaco-ColXheQH.js rename to admin/assets/ScriptEditorVanillaMonaco-CKnJEdpA.js index c5c1ee4c9..7449c2880 100644 --- a/admin/assets/ScriptEditorVanillaMonaco-ColXheQH.js +++ b/admin/assets/ScriptEditorVanillaMonaco-CKnJEdpA.js @@ -1,3 +1,3 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./stateHoverProvider-CSzc8h_d.js","./iobroker_javascript__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.mjs-DkBjPSMw.js","./index-CyhJmDLi.js","./virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-DiXVqr03.js","./preload-helper-BDBacUwf.js","./createSvgIcon-DYs_tNrE.js","./iobroker_javascript__loadShare__react__loadShare__.mjs-CTZOFJS2.js","./iobroker_javascript__loadShare__react__loadShare__.mjs_commonjs-proxy-CE9lvhW8.js","./iobroker_javascript__loadShare__prop_mf_2_types__loadShare__.mjs-BCtSFofY.js","./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-RQRRZMX5.js","./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs-DeVAS-oa.js","./iobroker_javascript__loadShare___mf_0_mui_mf_1_material__loadShare__.mjs-CV1_X-Lf.js","./index-wHNMOf-c.js","./inheritsLoose-CIXm_zPk.js","./index-BTsjunTt.css","./cronHoverProvider-Bg0Vz-1E.js","./inlineDiffController-DBLpPOe2.js","./applyCodeEdit-BdRnbz2g.js","./inlineChatWidget-Cu6rb4Ar.js"])))=>i.map(i=>d[i]); -import{_ as g}from"./preload-helper-BDBacUwf.js";import{j as m}from"./createSvgIcon-DYs_tNrE.js";import{a as k}from"./iobroker_javascript__loadShare__react__loadShare__.mjs-CTZOFJS2.js";import{_ as T,a as N,b as M,h as A,i as S,Q as O,o as x,$ as j}from"./iobroker_javascript__loadShare___mf_0_mui_mf_1_material__loadShare__.mjs-CV1_X-Lf.js";import{n as _,Z as R}from"./index-wHNMOf-c.js";import{_ as p}from"./iobroker_javascript__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.mjs-DkBjPSMw.js";import{h as V}from"./index-CyhJmDLi.js";import"./iobroker_javascript__loadShare__react__loadShare__.mjs_commonjs-proxy-CE9lvhW8.js";import"./iobroker_javascript__loadShare__prop_mf_2_types__loadShare__.mjs-BCtSFofY.js";import"./virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-DiXVqr03.js";import"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-RQRRZMX5.js";import"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs-DeVAS-oa.js";import"./inheritsLoose-CIXm_zPk.js";function K(v){return/^script\.js\.global\./.test(v)}let P=0;function W(v){const t=/\x1b\[[0-9;]*m/g;return v.replace(t,"")}class tt extends k.Component{monacoDiv=null;editor=null;monaco=window.monaco;get monacoTS(){var t,e;return(e=(t=this.monaco)==null?void 0:t.languages)==null?void 0:e.typescript}insert="";originalCode;runningInstancesStr;monacoCounter=0;location;breakpoints;lastSearch="";typings={};decorations=[];datapointProviderDisposable=null;inlineProviderDisposable=null;stateHoverDisposable=null;showStateValueDisposable=null;cronHoverDisposable=null;codeLensDisposable=null;inlineChatWidgetInstance=null;inlineDiffInstance=null;inlineDiffCssInjected=!1;triggerPrettier;contentChangeDisposable=null;mouseDownDisposable=null;constructor(t){super(t),this.state={name:"current",isDark:t.isDark||!1,language:t.language||"javascript",readOnly:t.readOnly||!1,alive:!0,check:!1,searchText:this.props.searchText||"",typingsLoaded:!1,showError:null},this.triggerPrettier=t.triggerPrettier,this.runningInstancesStr=JSON.stringify(this.props.runningInstances),this.originalCode=t.code||"",this.monacoDiv=k.createRef()}waitForMonaco(t){var i,o,n,r;let e=!!((o=(i=this.monacoTS)==null?void 0:i.typescriptDefaults)!=null&&o.getCompilerOptions);if(!e||!this.props.runningInstances){if(this.monaco=window.monaco,e=!!((r=(n=this.monacoTS)==null?void 0:n.typescriptDefaults)!=null&&r.getCompilerOptions),this.monacoCounter++,!e&&this.monacoCounter<20){console.log("wait for monaco loaded"),setTimeout(()=>this.waitForMonaco(t),200);return}this.monacoCounter>=20&&console.error("Cannot load monaco!")}else t&&t()}loadTypings(t){if(!this.editor)return;t||=this.props.runningInstances;const e=t&&Object.keys(t).find(i=>t==null?void 0:t[i]);e&&this.props.socket.sendTo(e.replace("system.adapter.",""),"loadTypings",null).then(i=>{this.setState({alive:!0,check:!0,typingsLoaded:!0}),this.setTypeCheck(!0),i.typings?(this.typings=i.typings,this.setEditorTypings(this.state.name)):console.error(`failed to load typings: ${i.error}`)})}componentDidMount(){var i,o,n,r,s,u,c,d;this.undo,this.redo,this.showInlineDiff,this.getEditorSelection,this.getEditorContent,this.getCursorPosition,this.highlightLineRange,this.goToLine,this.replaceSelection,this.getDiagnostics,this.getDocumentSymbols;let t=!!((o=(i=this.monacoTS)==null?void 0:i.typescriptDefaults)!=null&&o.getCompilerOptions);if((!t||!this.props.runningInstances)&&(this.monaco=window.monaco,t=!!((r=(n=this.monacoTS)==null?void 0:n.typescriptDefaults)!=null&&r.getCompilerOptions),!t)){console.log("wait for monaco loaded..."),this.waitForMonaco(()=>this.componentDidMount());return}if(!this.editor&&t&&this.monaco){console.log("Init editor"),(u=(s=this.props).onRegisterSelect)==null||u.call(s,()=>{var a;if(this.editor){const h=this.editor.getSelection();if(h)return(a=this.editor.getModel())==null?void 0:a.getValueInRange(h)}});const l=this.monacoTS.typescriptDefaults.getCompilerOptions();l.allowJs=!0,l.checkJs=this.props.checkJs!==!1,l.noLib=!0,l.lib=[],l.useUnknownInCatchVariables=!1,l.moduleResolution=this.monacoTS.ModuleResolutionKind.NodeJs,l.target=this.monacoTS.ScriptTarget.ESNext,l.module=this.monacoTS.ModuleKind.ESNext,l.allowNonTsExtensions=!0,this.monacoTS.typescriptDefaults.setCompilerOptions(l),this.setTypeCheck(!1),(c=this.monacoDiv)!=null&&c.current&&(this.editor=this.monaco.editor.create((d=this.monacoDiv)==null?void 0:d.current,{lineNumbers:"on",scrollBeyondLastLine:!1,automaticLayout:!0,glyphMargin:!!this.props.breakpoints,colorDecorators:!0,hover:{enabled:!0,delay:200,sticky:!0},fixedOverflowWidgets:!0}),this.contentChangeDisposable=this.editor.onDidChangeModelContent(()=>this.onChange()),this.monaco&&!this.datapointProviderDisposable&&g(async()=>{const{registerDatapointProvider:a}=await import("./AiDatapointProvider-B0i3I5Fm.js");return{registerDatapointProvider:a}},[],import.meta.url).then(({registerDatapointProvider:a})=>{this.monaco&&(this.datapointProviderDisposable=a(this.monaco,this.props.socket))}).catch(()=>{}),this.monaco&&!this.stateHoverDisposable&&g(async()=>{const{registerStateHoverProvider:a,registerShowStateValueAction:h}=await import("./stateHoverProvider-CSzc8h_d.js");return{registerStateHoverProvider:a,registerShowStateValueAction:h}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url).then(({registerStateHoverProvider:a,registerShowStateValueAction:h})=>{this.monaco&&(this.stateHoverDisposable=a(this.monaco,this.props.socket)),this.monaco&&this.editor&&!this.showStateValueDisposable&&(this.showStateValueDisposable=h(this.editor,this.monaco,p.I18n.t("Show ioBroker state value")))}).catch(()=>{}),this.monaco&&!this.cronHoverDisposable&&g(async()=>{const{registerCronHoverProvider:a}=await import("./cronHoverProvider-Bg0Vz-1E.js");return{registerCronHoverProvider:a}},__vite__mapDeps([15,1]),import.meta.url).then(({registerCronHoverProvider:a})=>{this.monaco&&(this.cronHoverDisposable=a(this.monaco))}).catch(()=>{}),this.props.aiCompletionsEnabled&&this.monaco&&!this.inlineProviderDisposable&&g(async()=>{const{registerAiInlineProvider:a}=await import("./AiInlineProvider-DkgjVSFQ.js");return{registerAiInlineProvider:a}},[],import.meta.url).then(({registerAiInlineProvider:a})=>{this.monaco&&(this.inlineProviderDisposable=a(this.monaco,this.props.socket,this.props.runningInstances))}).catch(()=>{}),this.loadTypings(),this.props.onForceSave&&this.editor.addCommand(this.monaco.KeyMod.CtrlCmd|this.monaco.KeyCode.KeyS,()=>this.props.onForceSave&&this.props.onForceSave()),this.registerAiActions(),this.monaco&&this.editor&&this.props.onAiAction&&!this.codeLensDisposable&&g(async()=>{const{registerAiCodeLensProvider:a}=await import("./index-CyhJmDLi.js").then(h=>h.p);return{registerAiCodeLensProvider:a}},__vite__mapDeps([2,3,4,5,6,7,8,9,10,11,1,12,13,14]),import.meta.url).then(({registerAiCodeLensProvider:a})=>{this.monaco&&this.editor&&this.props.onAiAction&&(this.codeLensDisposable=a(this.monaco,this.editor,(h,y,f,b,D)=>{var L,w,I;const C=(L=this.editor)==null?void 0:L.getModel(),E=C?C.getLineMaxColumn(Math.min(D,C.getLineCount())):1;(I=(w=this.props).onAiAction)==null||I.call(w,{action:h,code:y,rangeLabel:f,range:{startLine:b,startColumn:1,endLine:D,endColumn:E},kind:"codelens"})}))}).catch(()=>{}),setTimeout(()=>{this.highlightText(this.state.searchText),this.location=this.props.location||void 0,this.breakpoints=this.props.breakpoints,this.showDecorators()}))}const e={selectOnLineNumbers:!0,scrollBeyondLastLine:!1,automaticLayout:!0,readOnly:this.state.readOnly,language:this.state.language,isDark:this.state.isDark};this.setEditorOptions(e),this.editor&&(this.editor.focus(),this.editor.setValue(this.originalCode),this.props.onToggleBreakpoint&&(this.mouseDownDisposable=this.editor.onMouseDown(l=>{var h;const a=l.target;this.props.onToggleBreakpoint&&((h=a.detail)==null?void 0:h.glyphMarginLeft)!==void 0&&a.position&&this.props.onToggleBreakpoint(a.position.lineNumber-1)})))}setEditorOptions(t){var e;t&&(t.language&&this.setEditorLanguage(t.language),this.editor&&(t.readOnly!==void 0&&this.editor.updateOptions({readOnly:t.readOnly}),t.lineWrap!==void 0&&this.editor.updateOptions({wordWrap:t.lineWrap?"on":"off"})),t.typeCheck!==void 0&&this.setTypeCheck(t.typeCheck),t.isDark!==void 0&&((e=this.monaco)==null||e.editor.setTheme(t.isDark?"vs-dark":"vs")))}componentWillUnmount(){var t,e,i,o,n,r,s,u,c,d,l;(t=this.contentChangeDisposable)==null||t.dispose(),this.contentChangeDisposable=null,(e=this.mouseDownDisposable)==null||e.dispose(),this.mouseDownDisposable=null,(i=this.datapointProviderDisposable)==null||i.dispose(),this.datapointProviderDisposable=null,g(async()=>{const{clearDatapointCache:a}=await import("./AiDatapointProvider-B0i3I5Fm.js");return{clearDatapointCache:a}},[],import.meta.url).then(({clearDatapointCache:a})=>a()).catch(()=>{}),(o=this.inlineProviderDisposable)==null||o.dispose(),this.inlineProviderDisposable=null,(n=this.stateHoverDisposable)==null||n.dispose(),this.stateHoverDisposable=null,(r=this.showStateValueDisposable)==null||r.dispose(),this.showStateValueDisposable=null,g(async()=>{const{clearStateHoverCache:a}=await import("./stateHoverProvider-CSzc8h_d.js");return{clearStateHoverCache:a}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url).then(({clearStateHoverCache:a})=>a()).catch(()=>{}),(s=this.cronHoverDisposable)==null||s.dispose(),this.cronHoverDisposable=null,(u=this.codeLensDisposable)==null||u.dispose(),this.codeLensDisposable=null,(c=this.inlineChatWidgetInstance)==null||c.dispose(),this.inlineChatWidgetInstance=null,this.hideInlineDiff(),this.editor&&((l=(d=this.props).onRegisterSelect)==null||l.call(d,null),this.editor.dispose(),this.editor=null)}async doPrettier(){var i,o,n,r;const t=this.props.runningInstances&&Object.keys(this.props.runningInstances).find(s=>{var u;return(u=this.props.runningInstances)==null?void 0:u[s]});if(!t){window.alert(p.I18n.t("No script adapter instance found to format the code"));return}const e=await this.props.socket.sendTo(t.replace("system.adapter.",""),"prettier",{code:(i=this.editor)==null?void 0:i.getValue(),type:this.state.language});e.error?this.setState({showError:{title:p.I18n.t("Error formatting code"),message:W(e.error)}}):e.code&&((o=this.editor)==null||o.setValue(e.code),(r=(n=this.props).onChange)==null||r.call(n,e.code),this.showDecorators())}setEditorLanguage(t){var i,o;if(!this.editor)return;const e=this.editor.getModel();if(e){const n=e.getValue(),r=e.uri.path,s=typeof r=="string"&&r.includes(".")?r.substring(0,r.lastIndexOf(".")):"index",u=t==="javascript"?"js":t==="typescript"?"ts":t;e.dispose();const c=t==="javascript"||t==="typescript"?"typescript":t,d=(i=this.monaco)==null?void 0:i.editor.createModel(n,c,this.monaco.Uri.from({scheme:window.location.protocol.replace(":",""),path:`${s}${P++}.${u}`}));d&&(this.editor.setModel(d),(o=this.contentChangeDisposable)==null||o.dispose(),this.contentChangeDisposable=this.editor.onDidChangeModelContent(()=>this.onChange()))}}setTypeCheck(t){var i,o;const e={noSemanticValidation:!this.state.alive||!t,noSyntaxValidation:!this.state.alive};(i=this.monacoTS)==null||i.typescriptDefaults.setDiagnosticsOptions(e),(o=this.monacoTS)==null||o.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!this.state.alive||!t,noSyntaxValidation:!this.state.alive})}setEditorTypings(t=""){var n,r,s,u;const e=K(t),i=`${t}.d.ts`,o=[];for(const c of Object.keys(this.typings))e&&(c==="global.d.ts"||c.startsWith("script.js.global")&&c!==i)||o.push({filePath:c,content:this.typings[c]});if((r=(n=this.monacoTS)==null?void 0:n.typescriptDefaults)!=null&&r.setExtraLibs)this.monacoTS.typescriptDefaults.setExtraLibs(o);else if((u=(s=this.monacoTS)==null?void 0:s.typescriptDefaults)!=null&&u.addExtraLib){const c=this.monacoTS.typescriptDefaults.getExtraLibs();o.forEach(d=>{!c[d.filePath]&&this.monaco&&this.monacoTS.typescriptDefaults.addExtraLib(d.content,d.filePath)})}}undo(){var t;(t=this.editor)==null||t.trigger("toolbar","undo",null)}redo(){var t;(t=this.editor)==null||t.trigger("toolbar","redo",null)}insertTextIntoEditor(t){if(!this.editor||!this.monaco)return;const e=this.editor.getSelection();if(e){const i=new this.monaco.Range(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn);this.editor.executeEdits("",[{range:i,text:t,forceMoveMarkers:!0}])}this.editor.focus()}highlightText(t){var o;if(!this.editor||!this.monaco)return 0;const e=t?(o=this.editor.getModel())==null?void 0:o.findMatches(t,!0,!1,!1,null,!0):void 0;if(e!=null&&e.length)return e.forEach(n=>{var r;return(r=this.editor)==null?void 0:r.setSelection(n.range)}),this.editor.revealLine(e[0].range.startLineNumber),e.length;const i=this.editor.getPosition();if(i){const n=i.lineNumber,r=i.column;this.editor.setSelection(new this.monaco.Range(n,r,n,r))}return 0}showInlineDiff(t){if(!this.editor||!this.monaco)return;const e=this.editor,i=this.monaco;this.hideInlineDiff(),g(async()=>{const{InlineDiffController:o,INLINE_DIFF_CSS:n}=await import("./inlineDiffController-DBLpPOe2.js");return{InlineDiffController:o,INLINE_DIFF_CSS:n}},__vite__mapDeps([16,1,17]),import.meta.url).then(({InlineDiffController:o,INLINE_DIFF_CSS:n})=>{if(!this.inlineDiffCssInjected){const s=document.createElement("style");s.textContent=n,s.setAttribute("data-iob-aichat","inline-diff"),document.head.appendChild(s),this.inlineDiffCssInjected=!0}const r=new o(e,i,{range:t.range,originalText:t.originalText,modifiedText:t.modifiedText,onAccepted:()=>{var s;this.inlineDiffInstance=null,(s=t.onAccepted)==null||s.call(t)},onRejected:()=>{var s;this.inlineDiffInstance=null,(s=t.onRejected)==null||s.call(t)}});this.inlineDiffInstance=r,r.show()}).catch(()=>{})}hideInlineDiff(){if(this.inlineDiffInstance){try{this.inlineDiffInstance.dispose()}catch{}this.inlineDiffInstance=null}}showInlineChatWidget(){if(!this.editor||!this.monaco||!this.props.onInlineAsk)return;if(this.inlineChatWidgetInstance){this.inlineChatWidgetInstance.show();return}const t=this.editor,e=this.monaco,i=this.props.onInlineAsk,o=this.props.onAiAction;g(async()=>{const{InlineChatWidget:n}=await import("./inlineChatWidget-Cu6rb4Ar.js");return{InlineChatWidget:n}},__vite__mapDeps([18,1,17]),import.meta.url).then(({InlineChatWidget:n})=>{const r=new n(t,e,{onSubmit:async s=>i({question:s.question,selectedCode:s.selectedCode}),onEscalateToChat:s=>{o&&o({action:"ask",code:s.selectedCode,question:s.question,rangeLabel:s.range?`lines ${s.range.startLineNumber}-${s.range.endLineNumber}`:"whole file"})}});this.inlineChatWidgetInstance=r,r.show()}).catch(()=>{})}registerAiActions(){if(!this.editor||!this.monaco||!this.props.onAiAction)return;const t=this.monaco,e=(o,n={})=>{if(!this.editor||!this.props.onAiAction)return;const r=this.editor.getModel();if(!r)return;const s=this.editor.getSelection(),u=s&&!s.isEmpty();let c,d,l,a="selection";if(u)c=r.getValueInRange(s),d=s.startLineNumber===s.endLineNumber?`line ${s.startLineNumber}`:`lines ${s.startLineNumber}-${s.endLineNumber}`,l={startLine:s.startLineNumber,startColumn:s.startColumn,endLine:s.endLineNumber,endColumn:s.endColumn},a="selection";else{const h=this.editor.getPosition();let y=null;if(h)try{y=V(r.getValue(),h.lineNumber)}catch{}if(y){const f=y.startLine,b=y.endLine,D=r.getLineMaxColumn(b),C=new t.Range(f,1,b,D);c=r.getValueInRange(C),d=f===b?`line ${f}`:`lines ${f}-${b}`,l={startLine:f,startColumn:1,endLine:b,endColumn:D},a="codelens"}else c=r.getValue(),d="whole file",a="none"}this.props.onAiAction({action:o,code:c,rangeLabel:d,range:l,kind:a,...n})},i=[{id:"iobroker.ai.inline",label:`🤖 ${p.I18n.t("AI: Inline chat…")}`,keybindings:[t.KeyMod.CtrlCmd|t.KeyMod.Alt|t.KeyCode.KeyI],order:1,run:()=>{if(this.props.onInlineAsk)this.showInlineChatWidget();else{const o=window.prompt(p.I18n.t("Ask the AI about the selected code:"));o&&o.trim()&&e("ask",{question:o.trim()})}}},{id:"iobroker.ai.explain",label:`💡 ${p.I18n.t("AI: Explain")}`,keybindings:[t.KeyMod.CtrlCmd|t.KeyMod.Alt|t.KeyCode.KeyE],order:2,run:()=>e("explain")},{id:"iobroker.ai.refactor",label:`🔧 ${p.I18n.t("AI: Refactor")}`,keybindings:[t.KeyMod.CtrlCmd|t.KeyMod.Alt|t.KeyCode.KeyR],order:3,run:()=>e("refactor")},{id:"iobroker.ai.comment",label:`💬 ${p.I18n.t("AI: Add comments")}`,keybindings:[t.KeyMod.CtrlCmd|t.KeyMod.Alt|t.KeyCode.KeyC],order:4,run:()=>e("comment")},{id:"iobroker.ai.fix",label:`🛠️ ${p.I18n.t("AI: Fix problem")}`,keybindings:[t.KeyMod.CtrlCmd|t.KeyMod.Alt|t.KeyCode.KeyF],order:5,run:()=>{var n,r;let o;try{const s=(n=this.editor)==null?void 0:n.getModel(),u=(r=this.editor)==null?void 0:r.getPosition();if(s&&u){const d=t.editor.getModelMarkers({resource:s.uri}).find(l=>u.lineNumber>=l.startLineNumber&&u.lineNumber<=l.endLineNumber);d&&(o=d.message)}}catch{}e("fix",{diagnostic:o})}},{id:"iobroker.ai.tests",label:`✅ ${p.I18n.t("AI: Suggest tests")}`,order:6,run:()=>e("tests")}];for(const o of i)try{this.editor.addAction({id:o.id,label:o.label,contextMenuGroupId:"aichat",contextMenuOrder:o.order,keybindings:o.keybindings,run:()=>o.run()})}catch{}}getEditorSelection(){if(!this.editor)return null;const t=this.editor.getSelection();if(!t||t.isEmpty())return null;const e=this.editor.getModel();return e?{text:e.getValueInRange(t),range:{startLine:t.startLineNumber,startColumn:t.startColumn,endLine:t.endLineNumber,endColumn:t.endColumn}}:null}getEditorContent(){var t,e;return((e=(t=this.editor)==null?void 0:t.getModel())==null?void 0:e.getValue())??""}getCursorPosition(){var e;const t=(e=this.editor)==null?void 0:e.getPosition();return t?{line:t.lineNumber,column:t.column}:null}highlightLineRange(t,e){if(!this.editor||!this.monaco)return!1;const i=this.editor.getModel();if(!i)return!1;const o=i.getLineCount(),n=Math.max(1,Math.min(t,o)),r=Math.max(n,Math.min(e,o)),s=i.getLineMaxColumn(r);return this.editor.setSelection(new this.monaco.Range(n,1,r,s)),this.editor.revealLineInCenter(n),!0}goToLine(t,e=1){if(!this.editor||!this.monaco)return!1;const i=this.editor.getModel();if(!i)return!1;const o=i.getLineCount(),n=Math.max(1,Math.min(t,o));return this.editor.setPosition({lineNumber:n,column:e}),this.editor.revealLineInCenter(n),this.editor.focus(),!0}replaceSelection(t){if(!this.editor||!this.monaco)return!1;const e=this.editor.getSelection();if(!e)return!1;const i=new this.monaco.Range(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn);return this.editor.executeEdits("",[{range:i,text:t,forceMoveMarkers:!0}]),this.editor.focus(),!0}getDiagnostics(){if(!this.editor||!this.monaco)return[];const t=this.editor.getModel();if(!t)return[];const e=this.monaco.editor.getModelMarkers({resource:t.uri}),i={8:"error",4:"warning",2:"info",1:"hint"};return e.map(o=>({line:o.startLineNumber,column:o.startColumn,endLine:o.endLineNumber,endColumn:o.endColumn,severity:i[o.severity]||"info",message:o.message,...o.source?{source:o.source}:{}}))}async getDocumentSymbols(){var i;if(!this.editor||!this.monaco)return[];const t=this.editor.getModel();if(!t)return[];const e=[];try{const o=this.monaco.languages,n=(i=o.getDocumentSymbolProviders)==null?void 0:i.call(o,t);if(n!=null&&n.length){const r={0:"file",1:"module",2:"namespace",3:"package",4:"class",5:"method",6:"property",7:"field",8:"constructor",9:"enum",10:"interface",11:"function",12:"variable",13:"constant",14:"string",15:"number",16:"boolean",17:"array",18:"object",19:"key",20:"null",21:"enum-member",22:"struct",23:"event",24:"operator",25:"type-parameter"};for(const s of n){const u={isCancellationRequested:!1},c=await s.provideDocumentSymbols(t,u);if(!c)continue;const d=l=>{var a;for(const h of l)e.push({name:h.name,kind:r[h.kind]||String(h.kind),line:h.range.startLineNumber,endLine:h.range.endLineNumber,...h.detail?{detail:h.detail}:{}}),(a=h.children)!=null&&a.length&&d(h.children)};if(d(c),e.length)break}}}catch{}if(e.length===0){const n=t.getValue().split(` +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./stateHoverProvider-wXU4aBfD.js","./iobroker_javascript__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.mjs-DkBjPSMw.js","./index-Blu2oA9H.js","./virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-Dus28I2g.js","./preload-helper-BDBacUwf.js","./createSvgIcon-DYs_tNrE.js","./iobroker_javascript__loadShare__react__loadShare__.mjs-CTZOFJS2.js","./iobroker_javascript__loadShare__react__loadShare__.mjs_commonjs-proxy-CE9lvhW8.js","./iobroker_javascript__loadShare__prop_mf_2_types__loadShare__.mjs-BCtSFofY.js","./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-RQRRZMX5.js","./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs-DeVAS-oa.js","./iobroker_javascript__loadShare___mf_0_mui_mf_1_material__loadShare__.mjs-CV1_X-Lf.js","./index-wHNMOf-c.js","./inheritsLoose-CIXm_zPk.js","./index-BTsjunTt.css","./cronHoverProvider-Bg0Vz-1E.js","./inlineDiffController-DBLpPOe2.js","./applyCodeEdit-BdRnbz2g.js","./inlineChatWidget-Cu6rb4Ar.js"])))=>i.map(i=>d[i]); +import{_ as g}from"./preload-helper-BDBacUwf.js";import{j as m}from"./createSvgIcon-DYs_tNrE.js";import{a as k}from"./iobroker_javascript__loadShare__react__loadShare__.mjs-CTZOFJS2.js";import{_ as T,a as N,b as M,h as A,i as S,Q as O,o as x,$ as j}from"./iobroker_javascript__loadShare___mf_0_mui_mf_1_material__loadShare__.mjs-CV1_X-Lf.js";import{n as _,Z as R}from"./index-wHNMOf-c.js";import{_ as p}from"./iobroker_javascript__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.mjs-DkBjPSMw.js";import{h as V}from"./index-Blu2oA9H.js";import"./iobroker_javascript__loadShare__react__loadShare__.mjs_commonjs-proxy-CE9lvhW8.js";import"./iobroker_javascript__loadShare__prop_mf_2_types__loadShare__.mjs-BCtSFofY.js";import"./virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-Dus28I2g.js";import"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-RQRRZMX5.js";import"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs-DeVAS-oa.js";import"./inheritsLoose-CIXm_zPk.js";function K(v){return/^script\.js\.global\./.test(v)}let P=0;function W(v){const t=/\x1b\[[0-9;]*m/g;return v.replace(t,"")}class tt extends k.Component{monacoDiv=null;editor=null;monaco=window.monaco;get monacoTS(){var t,e;return(e=(t=this.monaco)==null?void 0:t.languages)==null?void 0:e.typescript}insert="";originalCode;runningInstancesStr;monacoCounter=0;location;breakpoints;lastSearch="";typings={};decorations=[];datapointProviderDisposable=null;inlineProviderDisposable=null;stateHoverDisposable=null;showStateValueDisposable=null;cronHoverDisposable=null;codeLensDisposable=null;inlineChatWidgetInstance=null;inlineDiffInstance=null;inlineDiffCssInjected=!1;triggerPrettier;contentChangeDisposable=null;mouseDownDisposable=null;constructor(t){super(t),this.state={name:"current",isDark:t.isDark||!1,language:t.language||"javascript",readOnly:t.readOnly||!1,alive:!0,check:!1,searchText:this.props.searchText||"",typingsLoaded:!1,showError:null},this.triggerPrettier=t.triggerPrettier,this.runningInstancesStr=JSON.stringify(this.props.runningInstances),this.originalCode=t.code||"",this.monacoDiv=k.createRef()}waitForMonaco(t){var i,o,n,r;let e=!!((o=(i=this.monacoTS)==null?void 0:i.typescriptDefaults)!=null&&o.getCompilerOptions);if(!e||!this.props.runningInstances){if(this.monaco=window.monaco,e=!!((r=(n=this.monacoTS)==null?void 0:n.typescriptDefaults)!=null&&r.getCompilerOptions),this.monacoCounter++,!e&&this.monacoCounter<20){console.log("wait for monaco loaded"),setTimeout(()=>this.waitForMonaco(t),200);return}this.monacoCounter>=20&&console.error("Cannot load monaco!")}else t&&t()}loadTypings(t){if(!this.editor)return;t||=this.props.runningInstances;const e=t&&Object.keys(t).find(i=>t==null?void 0:t[i]);e&&this.props.socket.sendTo(e.replace("system.adapter.",""),"loadTypings",null).then(i=>{this.setState({alive:!0,check:!0,typingsLoaded:!0}),this.setTypeCheck(!0),i.typings?(this.typings=i.typings,this.setEditorTypings(this.state.name)):console.error(`failed to load typings: ${i.error}`)})}componentDidMount(){var i,o,n,r,s,u,c,d;this.undo,this.redo,this.showInlineDiff,this.getEditorSelection,this.getEditorContent,this.getCursorPosition,this.highlightLineRange,this.goToLine,this.replaceSelection,this.getDiagnostics,this.getDocumentSymbols;let t=!!((o=(i=this.monacoTS)==null?void 0:i.typescriptDefaults)!=null&&o.getCompilerOptions);if((!t||!this.props.runningInstances)&&(this.monaco=window.monaco,t=!!((r=(n=this.monacoTS)==null?void 0:n.typescriptDefaults)!=null&&r.getCompilerOptions),!t)){console.log("wait for monaco loaded..."),this.waitForMonaco(()=>this.componentDidMount());return}if(!this.editor&&t&&this.monaco){console.log("Init editor"),(u=(s=this.props).onRegisterSelect)==null||u.call(s,()=>{var a;if(this.editor){const h=this.editor.getSelection();if(h)return(a=this.editor.getModel())==null?void 0:a.getValueInRange(h)}});const l=this.monacoTS.typescriptDefaults.getCompilerOptions();l.allowJs=!0,l.checkJs=this.props.checkJs!==!1,l.noLib=!0,l.lib=[],l.useUnknownInCatchVariables=!1,l.moduleResolution=this.monacoTS.ModuleResolutionKind.NodeJs,l.target=this.monacoTS.ScriptTarget.ESNext,l.module=this.monacoTS.ModuleKind.ESNext,l.allowNonTsExtensions=!0,this.monacoTS.typescriptDefaults.setCompilerOptions(l),this.setTypeCheck(!1),(c=this.monacoDiv)!=null&&c.current&&(this.editor=this.monaco.editor.create((d=this.monacoDiv)==null?void 0:d.current,{lineNumbers:"on",scrollBeyondLastLine:!1,automaticLayout:!0,glyphMargin:!!this.props.breakpoints,colorDecorators:!0,hover:{enabled:!0,delay:200,sticky:!0},fixedOverflowWidgets:!0}),this.contentChangeDisposable=this.editor.onDidChangeModelContent(()=>this.onChange()),this.monaco&&!this.datapointProviderDisposable&&g(async()=>{const{registerDatapointProvider:a}=await import("./AiDatapointProvider-B0i3I5Fm.js");return{registerDatapointProvider:a}},[],import.meta.url).then(({registerDatapointProvider:a})=>{this.monaco&&(this.datapointProviderDisposable=a(this.monaco,this.props.socket))}).catch(()=>{}),this.monaco&&!this.stateHoverDisposable&&g(async()=>{const{registerStateHoverProvider:a,registerShowStateValueAction:h}=await import("./stateHoverProvider-wXU4aBfD.js");return{registerStateHoverProvider:a,registerShowStateValueAction:h}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url).then(({registerStateHoverProvider:a,registerShowStateValueAction:h})=>{this.monaco&&(this.stateHoverDisposable=a(this.monaco,this.props.socket)),this.monaco&&this.editor&&!this.showStateValueDisposable&&(this.showStateValueDisposable=h(this.editor,this.monaco,p.I18n.t("Show ioBroker state value")))}).catch(()=>{}),this.monaco&&!this.cronHoverDisposable&&g(async()=>{const{registerCronHoverProvider:a}=await import("./cronHoverProvider-Bg0Vz-1E.js");return{registerCronHoverProvider:a}},__vite__mapDeps([15,1]),import.meta.url).then(({registerCronHoverProvider:a})=>{this.monaco&&(this.cronHoverDisposable=a(this.monaco))}).catch(()=>{}),this.props.aiCompletionsEnabled&&this.monaco&&!this.inlineProviderDisposable&&g(async()=>{const{registerAiInlineProvider:a}=await import("./AiInlineProvider-DkgjVSFQ.js");return{registerAiInlineProvider:a}},[],import.meta.url).then(({registerAiInlineProvider:a})=>{this.monaco&&(this.inlineProviderDisposable=a(this.monaco,this.props.socket,this.props.runningInstances))}).catch(()=>{}),this.loadTypings(),this.props.onForceSave&&this.editor.addCommand(this.monaco.KeyMod.CtrlCmd|this.monaco.KeyCode.KeyS,()=>this.props.onForceSave&&this.props.onForceSave()),this.registerAiActions(),this.monaco&&this.editor&&this.props.onAiAction&&!this.codeLensDisposable&&g(async()=>{const{registerAiCodeLensProvider:a}=await import("./index-Blu2oA9H.js").then(h=>h.p);return{registerAiCodeLensProvider:a}},__vite__mapDeps([2,3,4,5,6,7,8,9,10,11,1,12,13,14]),import.meta.url).then(({registerAiCodeLensProvider:a})=>{this.monaco&&this.editor&&this.props.onAiAction&&(this.codeLensDisposable=a(this.monaco,this.editor,(h,y,f,b,D)=>{var L,w,I;const C=(L=this.editor)==null?void 0:L.getModel(),E=C?C.getLineMaxColumn(Math.min(D,C.getLineCount())):1;(I=(w=this.props).onAiAction)==null||I.call(w,{action:h,code:y,rangeLabel:f,range:{startLine:b,startColumn:1,endLine:D,endColumn:E},kind:"codelens"})}))}).catch(()=>{}),setTimeout(()=>{this.highlightText(this.state.searchText),this.location=this.props.location||void 0,this.breakpoints=this.props.breakpoints,this.showDecorators()}))}const e={selectOnLineNumbers:!0,scrollBeyondLastLine:!1,automaticLayout:!0,readOnly:this.state.readOnly,language:this.state.language,isDark:this.state.isDark};this.setEditorOptions(e),this.editor&&(this.editor.focus(),this.editor.setValue(this.originalCode),this.props.onToggleBreakpoint&&(this.mouseDownDisposable=this.editor.onMouseDown(l=>{var h;const a=l.target;this.props.onToggleBreakpoint&&((h=a.detail)==null?void 0:h.glyphMarginLeft)!==void 0&&a.position&&this.props.onToggleBreakpoint(a.position.lineNumber-1)})))}setEditorOptions(t){var e;t&&(t.language&&this.setEditorLanguage(t.language),this.editor&&(t.readOnly!==void 0&&this.editor.updateOptions({readOnly:t.readOnly}),t.lineWrap!==void 0&&this.editor.updateOptions({wordWrap:t.lineWrap?"on":"off"})),t.typeCheck!==void 0&&this.setTypeCheck(t.typeCheck),t.isDark!==void 0&&((e=this.monaco)==null||e.editor.setTheme(t.isDark?"vs-dark":"vs")))}componentWillUnmount(){var t,e,i,o,n,r,s,u,c,d,l;(t=this.contentChangeDisposable)==null||t.dispose(),this.contentChangeDisposable=null,(e=this.mouseDownDisposable)==null||e.dispose(),this.mouseDownDisposable=null,(i=this.datapointProviderDisposable)==null||i.dispose(),this.datapointProviderDisposable=null,g(async()=>{const{clearDatapointCache:a}=await import("./AiDatapointProvider-B0i3I5Fm.js");return{clearDatapointCache:a}},[],import.meta.url).then(({clearDatapointCache:a})=>a()).catch(()=>{}),(o=this.inlineProviderDisposable)==null||o.dispose(),this.inlineProviderDisposable=null,(n=this.stateHoverDisposable)==null||n.dispose(),this.stateHoverDisposable=null,(r=this.showStateValueDisposable)==null||r.dispose(),this.showStateValueDisposable=null,g(async()=>{const{clearStateHoverCache:a}=await import("./stateHoverProvider-wXU4aBfD.js");return{clearStateHoverCache:a}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url).then(({clearStateHoverCache:a})=>a()).catch(()=>{}),(s=this.cronHoverDisposable)==null||s.dispose(),this.cronHoverDisposable=null,(u=this.codeLensDisposable)==null||u.dispose(),this.codeLensDisposable=null,(c=this.inlineChatWidgetInstance)==null||c.dispose(),this.inlineChatWidgetInstance=null,this.hideInlineDiff(),this.editor&&((l=(d=this.props).onRegisterSelect)==null||l.call(d,null),this.editor.dispose(),this.editor=null)}async doPrettier(){var i,o,n,r;const t=this.props.runningInstances&&Object.keys(this.props.runningInstances).find(s=>{var u;return(u=this.props.runningInstances)==null?void 0:u[s]});if(!t){window.alert(p.I18n.t("No script adapter instance found to format the code"));return}const e=await this.props.socket.sendTo(t.replace("system.adapter.",""),"prettier",{code:(i=this.editor)==null?void 0:i.getValue(),type:this.state.language});e.error?this.setState({showError:{title:p.I18n.t("Error formatting code"),message:W(e.error)}}):e.code&&((o=this.editor)==null||o.setValue(e.code),(r=(n=this.props).onChange)==null||r.call(n,e.code),this.showDecorators())}setEditorLanguage(t){var i,o;if(!this.editor)return;const e=this.editor.getModel();if(e){const n=e.getValue(),r=e.uri.path,s=typeof r=="string"&&r.includes(".")?r.substring(0,r.lastIndexOf(".")):"index",u=t==="javascript"?"js":t==="typescript"?"ts":t;e.dispose();const c=t==="javascript"||t==="typescript"?"typescript":t,d=(i=this.monaco)==null?void 0:i.editor.createModel(n,c,this.monaco.Uri.from({scheme:window.location.protocol.replace(":",""),path:`${s}${P++}.${u}`}));d&&(this.editor.setModel(d),(o=this.contentChangeDisposable)==null||o.dispose(),this.contentChangeDisposable=this.editor.onDidChangeModelContent(()=>this.onChange()))}}setTypeCheck(t){var i,o;const e={noSemanticValidation:!this.state.alive||!t,noSyntaxValidation:!this.state.alive};(i=this.monacoTS)==null||i.typescriptDefaults.setDiagnosticsOptions(e),(o=this.monacoTS)==null||o.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!this.state.alive||!t,noSyntaxValidation:!this.state.alive})}setEditorTypings(t=""){var n,r,s,u;const e=K(t),i=`${t}.d.ts`,o=[];for(const c of Object.keys(this.typings))e&&(c==="global.d.ts"||c.startsWith("script.js.global")&&c!==i)||o.push({filePath:c,content:this.typings[c]});if((r=(n=this.monacoTS)==null?void 0:n.typescriptDefaults)!=null&&r.setExtraLibs)this.monacoTS.typescriptDefaults.setExtraLibs(o);else if((u=(s=this.monacoTS)==null?void 0:s.typescriptDefaults)!=null&&u.addExtraLib){const c=this.monacoTS.typescriptDefaults.getExtraLibs();o.forEach(d=>{!c[d.filePath]&&this.monaco&&this.monacoTS.typescriptDefaults.addExtraLib(d.content,d.filePath)})}}undo(){var t;(t=this.editor)==null||t.trigger("toolbar","undo",null)}redo(){var t;(t=this.editor)==null||t.trigger("toolbar","redo",null)}insertTextIntoEditor(t){if(!this.editor||!this.monaco)return;const e=this.editor.getSelection();if(e){const i=new this.monaco.Range(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn);this.editor.executeEdits("",[{range:i,text:t,forceMoveMarkers:!0}])}this.editor.focus()}highlightText(t){var o;if(!this.editor||!this.monaco)return 0;const e=t?(o=this.editor.getModel())==null?void 0:o.findMatches(t,!0,!1,!1,null,!0):void 0;if(e!=null&&e.length)return e.forEach(n=>{var r;return(r=this.editor)==null?void 0:r.setSelection(n.range)}),this.editor.revealLine(e[0].range.startLineNumber),e.length;const i=this.editor.getPosition();if(i){const n=i.lineNumber,r=i.column;this.editor.setSelection(new this.monaco.Range(n,r,n,r))}return 0}showInlineDiff(t){if(!this.editor||!this.monaco)return;const e=this.editor,i=this.monaco;this.hideInlineDiff(),g(async()=>{const{InlineDiffController:o,INLINE_DIFF_CSS:n}=await import("./inlineDiffController-DBLpPOe2.js");return{InlineDiffController:o,INLINE_DIFF_CSS:n}},__vite__mapDeps([16,1,17]),import.meta.url).then(({InlineDiffController:o,INLINE_DIFF_CSS:n})=>{if(!this.inlineDiffCssInjected){const s=document.createElement("style");s.textContent=n,s.setAttribute("data-iob-aichat","inline-diff"),document.head.appendChild(s),this.inlineDiffCssInjected=!0}const r=new o(e,i,{range:t.range,originalText:t.originalText,modifiedText:t.modifiedText,onAccepted:()=>{var s;this.inlineDiffInstance=null,(s=t.onAccepted)==null||s.call(t)},onRejected:()=>{var s;this.inlineDiffInstance=null,(s=t.onRejected)==null||s.call(t)}});this.inlineDiffInstance=r,r.show()}).catch(()=>{})}hideInlineDiff(){if(this.inlineDiffInstance){try{this.inlineDiffInstance.dispose()}catch{}this.inlineDiffInstance=null}}showInlineChatWidget(){if(!this.editor||!this.monaco||!this.props.onInlineAsk)return;if(this.inlineChatWidgetInstance){this.inlineChatWidgetInstance.show();return}const t=this.editor,e=this.monaco,i=this.props.onInlineAsk,o=this.props.onAiAction;g(async()=>{const{InlineChatWidget:n}=await import("./inlineChatWidget-Cu6rb4Ar.js");return{InlineChatWidget:n}},__vite__mapDeps([18,1,17]),import.meta.url).then(({InlineChatWidget:n})=>{const r=new n(t,e,{onSubmit:async s=>i({question:s.question,selectedCode:s.selectedCode}),onEscalateToChat:s=>{o&&o({action:"ask",code:s.selectedCode,question:s.question,rangeLabel:s.range?`lines ${s.range.startLineNumber}-${s.range.endLineNumber}`:"whole file"})}});this.inlineChatWidgetInstance=r,r.show()}).catch(()=>{})}registerAiActions(){if(!this.editor||!this.monaco||!this.props.onAiAction)return;const t=this.monaco,e=(o,n={})=>{if(!this.editor||!this.props.onAiAction)return;const r=this.editor.getModel();if(!r)return;const s=this.editor.getSelection(),u=s&&!s.isEmpty();let c,d,l,a="selection";if(u)c=r.getValueInRange(s),d=s.startLineNumber===s.endLineNumber?`line ${s.startLineNumber}`:`lines ${s.startLineNumber}-${s.endLineNumber}`,l={startLine:s.startLineNumber,startColumn:s.startColumn,endLine:s.endLineNumber,endColumn:s.endColumn},a="selection";else{const h=this.editor.getPosition();let y=null;if(h)try{y=V(r.getValue(),h.lineNumber)}catch{}if(y){const f=y.startLine,b=y.endLine,D=r.getLineMaxColumn(b),C=new t.Range(f,1,b,D);c=r.getValueInRange(C),d=f===b?`line ${f}`:`lines ${f}-${b}`,l={startLine:f,startColumn:1,endLine:b,endColumn:D},a="codelens"}else c=r.getValue(),d="whole file",a="none"}this.props.onAiAction({action:o,code:c,rangeLabel:d,range:l,kind:a,...n})},i=[{id:"iobroker.ai.inline",label:`🤖 ${p.I18n.t("AI: Inline chat…")}`,keybindings:[t.KeyMod.CtrlCmd|t.KeyMod.Alt|t.KeyCode.KeyI],order:1,run:()=>{if(this.props.onInlineAsk)this.showInlineChatWidget();else{const o=window.prompt(p.I18n.t("Ask the AI about the selected code:"));o&&o.trim()&&e("ask",{question:o.trim()})}}},{id:"iobroker.ai.explain",label:`💡 ${p.I18n.t("AI: Explain")}`,keybindings:[t.KeyMod.CtrlCmd|t.KeyMod.Alt|t.KeyCode.KeyE],order:2,run:()=>e("explain")},{id:"iobroker.ai.refactor",label:`🔧 ${p.I18n.t("AI: Refactor")}`,keybindings:[t.KeyMod.CtrlCmd|t.KeyMod.Alt|t.KeyCode.KeyR],order:3,run:()=>e("refactor")},{id:"iobroker.ai.comment",label:`💬 ${p.I18n.t("AI: Add comments")}`,keybindings:[t.KeyMod.CtrlCmd|t.KeyMod.Alt|t.KeyCode.KeyC],order:4,run:()=>e("comment")},{id:"iobroker.ai.fix",label:`🛠️ ${p.I18n.t("AI: Fix problem")}`,keybindings:[t.KeyMod.CtrlCmd|t.KeyMod.Alt|t.KeyCode.KeyF],order:5,run:()=>{var n,r;let o;try{const s=(n=this.editor)==null?void 0:n.getModel(),u=(r=this.editor)==null?void 0:r.getPosition();if(s&&u){const d=t.editor.getModelMarkers({resource:s.uri}).find(l=>u.lineNumber>=l.startLineNumber&&u.lineNumber<=l.endLineNumber);d&&(o=d.message)}}catch{}e("fix",{diagnostic:o})}},{id:"iobroker.ai.tests",label:`✅ ${p.I18n.t("AI: Suggest tests")}`,order:6,run:()=>e("tests")}];for(const o of i)try{this.editor.addAction({id:o.id,label:o.label,contextMenuGroupId:"aichat",contextMenuOrder:o.order,keybindings:o.keybindings,run:()=>o.run()})}catch{}}getEditorSelection(){if(!this.editor)return null;const t=this.editor.getSelection();if(!t||t.isEmpty())return null;const e=this.editor.getModel();return e?{text:e.getValueInRange(t),range:{startLine:t.startLineNumber,startColumn:t.startColumn,endLine:t.endLineNumber,endColumn:t.endColumn}}:null}getEditorContent(){var t,e;return((e=(t=this.editor)==null?void 0:t.getModel())==null?void 0:e.getValue())??""}getCursorPosition(){var e;const t=(e=this.editor)==null?void 0:e.getPosition();return t?{line:t.lineNumber,column:t.column}:null}highlightLineRange(t,e){if(!this.editor||!this.monaco)return!1;const i=this.editor.getModel();if(!i)return!1;const o=i.getLineCount(),n=Math.max(1,Math.min(t,o)),r=Math.max(n,Math.min(e,o)),s=i.getLineMaxColumn(r);return this.editor.setSelection(new this.monaco.Range(n,1,r,s)),this.editor.revealLineInCenter(n),!0}goToLine(t,e=1){if(!this.editor||!this.monaco)return!1;const i=this.editor.getModel();if(!i)return!1;const o=i.getLineCount(),n=Math.max(1,Math.min(t,o));return this.editor.setPosition({lineNumber:n,column:e}),this.editor.revealLineInCenter(n),this.editor.focus(),!0}replaceSelection(t){if(!this.editor||!this.monaco)return!1;const e=this.editor.getSelection();if(!e)return!1;const i=new this.monaco.Range(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn);return this.editor.executeEdits("",[{range:i,text:t,forceMoveMarkers:!0}]),this.editor.focus(),!0}getDiagnostics(){if(!this.editor||!this.monaco)return[];const t=this.editor.getModel();if(!t)return[];const e=this.monaco.editor.getModelMarkers({resource:t.uri}),i={8:"error",4:"warning",2:"info",1:"hint"};return e.map(o=>({line:o.startLineNumber,column:o.startColumn,endLine:o.endLineNumber,endColumn:o.endColumn,severity:i[o.severity]||"info",message:o.message,...o.source?{source:o.source}:{}}))}async getDocumentSymbols(){var i;if(!this.editor||!this.monaco)return[];const t=this.editor.getModel();if(!t)return[];const e=[];try{const o=this.monaco.languages,n=(i=o.getDocumentSymbolProviders)==null?void 0:i.call(o,t);if(n!=null&&n.length){const r={0:"file",1:"module",2:"namespace",3:"package",4:"class",5:"method",6:"property",7:"field",8:"constructor",9:"enum",10:"interface",11:"function",12:"variable",13:"constant",14:"string",15:"number",16:"boolean",17:"array",18:"object",19:"key",20:"null",21:"enum-member",22:"struct",23:"event",24:"operator",25:"type-parameter"};for(const s of n){const u={isCancellationRequested:!1},c=await s.provideDocumentSymbols(t,u);if(!c)continue;const d=l=>{var a;for(const h of l)e.push({name:h.name,kind:r[h.kind]||String(h.kind),line:h.range.startLineNumber,endLine:h.range.endLineNumber,...h.detail?{detail:h.detail}:{}}),(a=h.children)!=null&&a.length&&d(h.children)};if(d(c),e.length)break}}}catch{}if(e.length===0){const n=t.getValue().split(` `),r=[{re:/^(?:export\s+)?(?:async\s+)?function\s+(\w+)/,kind:"function"},{re:/^(?:export\s+)?class\s+(\w+)/,kind:"class"},{re:/^(?:export\s+)?(?:const|let|var)\s+(\w+)/,kind:"variable"}];for(let s=0;s{this.monaco&&t.push({range:new this.monaco.Range(i.location.lineNumber+1,0,i.location.lineNumber+1,100),options:{isWholeLine:!0,glyphMarginClassName:this.props.isDark?"monacoBreakPointDark":"monacoBreakPoint"}})}),this.editor){const i=this.editor.getModel();i&&(this.decorations=i.deltaDecorations(this.decorations,t))}}initNewScript(t,e){var i;this.setState({name:t}),this.originalCode=e||"",(i=this.editor)==null||i.setValue(e||""),this.highlightText(this.lastSearch),this.showDecorators(),this.setEditorTypings(t)}scrollToLineIfNeeded(t){if(this.editor){const e=this.editor.getVisibleRanges();(!e||!e[0]||e[0].startLineNumber>t||t>e[0].endLineNumber)&&this.editor.revealLineInCenter(t)}}UNSAFE_componentWillReceiveProps(t){const e={};this.state.name!==t.name&&this.initNewScript(t.name,t.code),JSON.stringify(t.runningInstances)!==this.runningInstancesStr&&(this.runningInstancesStr=JSON.stringify(t.runningInstances),this.state.typingsLoaded||this.loadTypings(t.runningInstances)),this.editor&&!t.changed&&(t.code!==this.originalCode||t.code!==this.editor.getValue())&&(this.originalCode=t.code||"",this.editor.setValue(this.originalCode),this.showDecorators(),this.location&&this.scrollToLineIfNeeded(this.location.lineNumber+1)),t.searchText!==this.lastSearch&&(this.lastSearch=t.searchText||"",this.highlightText(this.lastSearch)),JSON.stringify(t.location)!==JSON.stringify(this.location)&&JSON.stringify(t.breakpoints)!==JSON.stringify(this.breakpoints)?(this.location=t.location||void 0,this.breakpoints=t.breakpoints,this.showDecorators(),this.editor&&this.location&&this.scrollToLineIfNeeded(this.location.lineNumber+1)):JSON.stringify(t.breakpoints)!==JSON.stringify(this.breakpoints)?(this.breakpoints=t.breakpoints,this.showDecorators()):JSON.stringify(t.location)!==JSON.stringify(this.location)&&(this.location=t.location||void 0,this.showDecorators(),this.editor&&this.location&&this.scrollToLineIfNeeded(this.location.lineNumber+1)),this.state.language!==(t.language||"javascript")?(this.setState({language:t.language||"javascript"}),e.language=t.language||"javascript"):this.state.readOnly!==(t.readOnly||!1)?(this.setState({readOnly:t.readOnly||!1}),e.readOnly=t.readOnly):this.state.isDark!==(t.isDark||!1)&&(this.setState({isDark:t.isDark||!1}),e.isDark=t.isDark),this.setEditorOptions(e),t.aiCompletionsEnabled!==this.props.aiCompletionsEnabled&&(t.aiCompletionsEnabled&&this.monaco&&!this.inlineProviderDisposable?g(async()=>{const{registerAiInlineProvider:i}=await import("./AiInlineProvider-DkgjVSFQ.js");return{registerAiInlineProvider:i}},[],import.meta.url).then(({registerAiInlineProvider:i})=>{this.monaco&&(this.inlineProviderDisposable=i(this.monaco,this.props.socket,this.props.runningInstances))}).catch(()=>{}):!t.aiCompletionsEnabled&&this.inlineProviderDisposable&&(this.inlineProviderDisposable.dispose(),this.inlineProviderDisposable=null)),this.insert!==t.insert&&(this.insert=t.insert||"",this.insert&&(console.log(`Insert text: ${this.insert}`),setTimeout(i=>{this.insertTextIntoEditor(i),setTimeout(()=>this.props.onInserted&&this.props.onInserted(),100)},100,this.insert)))}onChange(){var t,e;!this.props.readOnly&&this.editor&&((e=(t=this.props).onChange)==null||e.call(t,this.editor.getValue()))}renderErrorDialog(){return this.state.showError?this.state.showError.full?m.jsxs(T,{open:!0,maxWidth:"md",onClose:()=>this.setState({showError:null}),children:[m.jsx(N,{children:this.state.showError.title||p.I18n.t("Error")}),m.jsx(M,{children:m.jsx("pre",{children:m.jsx("code",{children:this.state.showError.message})})}),m.jsx(A,{children:m.jsxs(S,{variant:"contained",startIcon:m.jsx(_,{}),onClick:()=>this.setState({showError:null}),children:[p.I18n.t("Close")," "]})})]}):m.jsx(O,{open:!0,autoHideDuration:5e3,onClose:()=>this.setState({showError:null}),message:this.state.showError.title,action:m.jsxs(k.Fragment,{children:[m.jsx(S,{color:"secondary",size:"small",onClick:()=>this.setState({showError:{...this.state.showError,full:!0}}),children:p.I18n.t("More")}),m.jsx(x,{size:"small","aria-label":"close",color:"inherit",onClick:()=>this.setState({showError:null}),children:m.jsx(_,{fontSize:"small"})})]})}):null}render(){var t;return!((t=this.monacoTS)!=null&&t.typescriptDefaults)||!this.props.runningInstances?(setTimeout(()=>{this.monaco=window.monaco,this.forceUpdate()},200),null):(this.props.triggerPrettier!==this.triggerPrettier&&(this.triggerPrettier=this.props.triggerPrettier,setTimeout(()=>this.doPrettier().catch(e=>console.error("Error formatting code:",e)),50)),m.jsxs("div",{ref:this.monacoDiv,style:{...this.props.style,width:"100%",height:"100%",overflow:"hidden",position:"relative"},children:[this.renderErrorDialog(),!this.state.check&&m.jsx(j,{size:"small",title:p.I18n.t("Check is not active, because javascript adapter is disabled"),style:{bottom:10,right:10,opacity:.5,position:"absolute",zIndex:1,background:"red",color:"white"},color:"secondary",children:m.jsx(R,{})})]}))}}export{tt as default}; diff --git a/admin/assets/index-Ci9KPmcb.js b/admin/assets/index-B0Khg-uY.js similarity index 99% rename from admin/assets/index-Ci9KPmcb.js rename to admin/assets/index-B0Khg-uY.js index bb8fe52e4..c022facd0 100644 --- a/admin/assets/index-Ci9KPmcb.js +++ b/admin/assets/index-B0Khg-uY.js @@ -1,4 +1,4 @@ -import{j as M}from"./createSvgIcon-DYs_tNrE.js";import{a as ft}from"./iobroker_javascript__loadShare__react__loadShare__.mjs-CTZOFJS2.js";import{m as Rt,z as Bt,g as Ut}from"./index-CyhJmDLi.js";import{z as Xe,o as Te,v as Nt,w as Mt,s as Lt,u as Vt,r as zt,_ as Ht,a as Gt,C as Pt,D as _t,F as Yt,G as wt,H as Qt}from"./iobroker_javascript__loadShare___mf_0_mui_mf_1_material__loadShare__.mjs-CV1_X-Lf.js";import{M as Xt,k as Zt,l as ea,Q as Tt,U as ta,L as aa,n as ra,t as na,v as sa,u as oa,V as ia,W as la,X as ca,Y as ua}from"./index-wHNMOf-c.js";import{_ as we}from"./iobroker_javascript__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.mjs-DkBjPSMw.js";import pa from"./ScriptEditorVanillaMonaco-ColXheQH.js";import{r as fa}from"./iobroker_javascript__loadShare__react__loadShare__.mjs_commonjs-proxy-CE9lvhW8.js";function da(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}import"./iobroker_javascript__loadShare__prop_mf_2_types__loadShare__.mjs-BCtSFofY.js";import"./virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-DiXVqr03.js";import"./preload-helper-BDBacUwf.js";import"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-RQRRZMX5.js";import"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs-DeVAS-oa.js";import"./inheritsLoose-CIXm_zPk.js";const ba={editorDiv:{height:"100%",width:"100%",overflow:"hidden",position:"relative"}};class ha extends ft.Component{constructor(v){super(v),this.state={lines:(this.props.script||"").split(/\r\n|\n/)}}render(){return M.jsx("div",{style:ba.editorDiv,children:M.jsx(pa,{triggerPrettier:1,name:this.props.scriptName,adapterName:this.props.adapterName,readOnly:!0,code:this.props.script||"",isDark:this.props.themeType==="dark",socket:this.props.socket,runningInstances:this.props.runningInstances,language:"javascript",breakpoints:this.props.breakpoints,location:this.props.paused?this.props.location:null,onToggleBreakpoint:v=>this.props.onToggleBreakpoint(v)},"scriptEditor2")},"scriptEditorDiv2")}}const Dt=34,Ke={logBox:{width:"100%",height:"100%",position:"relative",overflow:"hidden"},logBoxInner:X=>({display:"inline-block",color:X.palette.mode==="dark"?"white":"black",width:`calc(100% - ${Dt}px)`,height:"100%",overflow:"auto",position:"relative",verticalAlign:"top"}),info:X=>({background:X.palette.mode==="dark"?"darkgrey":"lightgrey",color:(X.palette.mode==="dark","black")}),error:X=>({background:"#FF0000",color:X.palette.mode==="dark"?"black":"white"}),warn:X=>({background:"#FF8000",color:X.palette.mode==="dark"?"black":"white"}),debug:X=>({background:"gray",opacity:.8,color:X.palette.mode==="dark"?"black":"white"}),silly:X=>({background:"gray",opacity:.6,color:X.palette.mode==="dark"?"black":"white"}),table:{fontFamily:"monospace",width:"100%"},toolbox:{width:Dt,height:"100%",boxShadow:"2px 0px 4px -1px rgba(0, 0, 0, 0.2), 4px 0px 5px 0px rgba(0, 0, 0, 0.14), 1px 0px 10px 0px rgba(0, 0, 0, 0.12)",display:"inline-block",verticalAlign:"top",overflow:"hidden"},trTime:{width:90},trSeverity:{width:40,fontWeight:"bold"},iconButtons:{width:32,height:32,padding:4}};function ma(X){let v,g=X.getHours();return g<10&&(g=`0${g.toString()}`),v=`${g}:`,g=X.getMinutes(),g<10&&(g=`0${g.toString()}`),v+=`${g}:`,g=X.getSeconds(),g<10&&(g=`0${g.toString()}`),v+=`${g}.`,g=X.getMilliseconds(),g<10?g=`00${g.toString()}`:g<100&&(g=`0${g.toString()}`),v+=g,v}class Ct extends ft.Component{messagesEnd;constructor(v){super(v),this.state={goBottom:!0},this.messagesEnd=ft.createRef()}static generateLine(v){return M.jsxs(Xe,{component:"tr",sx:Ke[v.severity],children:[M.jsx("td",{style:Ke.trTime,children:ma(new Date(v.ts))}),M.jsx("td",{style:Ke.trSeverity,children:v.severity}),M.jsx("td",{children:v.text})]},`tr_${v.ts}_${v.text.substring(v.text.length-10,v.text.length)}`)}renderLogList(v){return v!=null&&v.length?M.jsxs(Xe,{sx:Ke.logBoxInner,children:[M.jsx("table",{style:Ke.table,children:M.jsx("tbody",{children:v.map(g=>Ct.generateLine(g))})},"logTable"),M.jsx("div",{ref:this.messagesEnd,style:{float:"left",clear:"both"}},"logScrollPoint")]},"logList"):M.jsx(Xe,{sx:Ke.logBoxInner,style:{paddingLeft:10},children:we.I18n.t("Log outputs")},"logList")}onCopy(){we.Utils.copyToClipboard(this.props.console.join(` +import{j as M}from"./createSvgIcon-DYs_tNrE.js";import{a as ft}from"./iobroker_javascript__loadShare__react__loadShare__.mjs-CTZOFJS2.js";import{m as Rt,z as Bt,g as Ut}from"./index-Blu2oA9H.js";import{z as Xe,o as Te,v as Nt,w as Mt,s as Lt,u as Vt,r as zt,_ as Ht,a as Gt,C as Pt,D as _t,F as Yt,G as wt,H as Qt}from"./iobroker_javascript__loadShare___mf_0_mui_mf_1_material__loadShare__.mjs-CV1_X-Lf.js";import{M as Xt,k as Zt,l as ea,Q as Tt,U as ta,L as aa,n as ra,t as na,v as sa,u as oa,V as ia,W as la,X as ca,Y as ua}from"./index-wHNMOf-c.js";import{_ as we}from"./iobroker_javascript__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.mjs-DkBjPSMw.js";import pa from"./ScriptEditorVanillaMonaco-CKnJEdpA.js";import{r as fa}from"./iobroker_javascript__loadShare__react__loadShare__.mjs_commonjs-proxy-CE9lvhW8.js";function da(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}import"./iobroker_javascript__loadShare__prop_mf_2_types__loadShare__.mjs-BCtSFofY.js";import"./virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-Dus28I2g.js";import"./preload-helper-BDBacUwf.js";import"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-RQRRZMX5.js";import"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs-DeVAS-oa.js";import"./inheritsLoose-CIXm_zPk.js";const ba={editorDiv:{height:"100%",width:"100%",overflow:"hidden",position:"relative"}};class ha extends ft.Component{constructor(v){super(v),this.state={lines:(this.props.script||"").split(/\r\n|\n/)}}render(){return M.jsx("div",{style:ba.editorDiv,children:M.jsx(pa,{triggerPrettier:1,name:this.props.scriptName,adapterName:this.props.adapterName,readOnly:!0,code:this.props.script||"",isDark:this.props.themeType==="dark",socket:this.props.socket,runningInstances:this.props.runningInstances,language:"javascript",breakpoints:this.props.breakpoints,location:this.props.paused?this.props.location:null,onToggleBreakpoint:v=>this.props.onToggleBreakpoint(v)},"scriptEditor2")},"scriptEditorDiv2")}}const Dt=34,Ke={logBox:{width:"100%",height:"100%",position:"relative",overflow:"hidden"},logBoxInner:X=>({display:"inline-block",color:X.palette.mode==="dark"?"white":"black",width:`calc(100% - ${Dt}px)`,height:"100%",overflow:"auto",position:"relative",verticalAlign:"top"}),info:X=>({background:X.palette.mode==="dark"?"darkgrey":"lightgrey",color:(X.palette.mode==="dark","black")}),error:X=>({background:"#FF0000",color:X.palette.mode==="dark"?"black":"white"}),warn:X=>({background:"#FF8000",color:X.palette.mode==="dark"?"black":"white"}),debug:X=>({background:"gray",opacity:.8,color:X.palette.mode==="dark"?"black":"white"}),silly:X=>({background:"gray",opacity:.6,color:X.palette.mode==="dark"?"black":"white"}),table:{fontFamily:"monospace",width:"100%"},toolbox:{width:Dt,height:"100%",boxShadow:"2px 0px 4px -1px rgba(0, 0, 0, 0.2), 4px 0px 5px 0px rgba(0, 0, 0, 0.14), 1px 0px 10px 0px rgba(0, 0, 0, 0.12)",display:"inline-block",verticalAlign:"top",overflow:"hidden"},trTime:{width:90},trSeverity:{width:40,fontWeight:"bold"},iconButtons:{width:32,height:32,padding:4}};function ma(X){let v,g=X.getHours();return g<10&&(g=`0${g.toString()}`),v=`${g}:`,g=X.getMinutes(),g<10&&(g=`0${g.toString()}`),v+=`${g}:`,g=X.getSeconds(),g<10&&(g=`0${g.toString()}`),v+=`${g}.`,g=X.getMilliseconds(),g<10?g=`00${g.toString()}`:g<100&&(g=`0${g.toString()}`),v+=g,v}class Ct extends ft.Component{messagesEnd;constructor(v){super(v),this.state={goBottom:!0},this.messagesEnd=ft.createRef()}static generateLine(v){return M.jsxs(Xe,{component:"tr",sx:Ke[v.severity],children:[M.jsx("td",{style:Ke.trTime,children:ma(new Date(v.ts))}),M.jsx("td",{style:Ke.trSeverity,children:v.severity}),M.jsx("td",{children:v.text})]},`tr_${v.ts}_${v.text.substring(v.text.length-10,v.text.length)}`)}renderLogList(v){return v!=null&&v.length?M.jsxs(Xe,{sx:Ke.logBoxInner,children:[M.jsx("table",{style:Ke.table,children:M.jsx("tbody",{children:v.map(g=>Ct.generateLine(g))})},"logTable"),M.jsx("div",{ref:this.messagesEnd,style:{float:"left",clear:"both"}},"logScrollPoint")]},"logList"):M.jsx(Xe,{sx:Ke.logBoxInner,style:{paddingLeft:10},children:we.I18n.t("Log outputs")},"logList")}onCopy(){we.Utils.copyToClipboard(this.props.console.join(` `))}scrollToBottom(){var v,g;(g=(v=this.messagesEnd)==null?void 0:v.current)==null||g.scrollIntoView({behavior:"smooth"})}componentDidUpdate(){this.state.goBottom&&this.scrollToBottom()}render(){const v=this.props.console;return M.jsxs("div",{style:Ke.logBox,children:[M.jsxs("div",{style:Ke.toolbox,children:[M.jsx(Te,{style:Ke.iconButtons,onClick:()=>this.setState({goBottom:!this.state.goBottom}),color:this.state.goBottom?"secondary":void 0,size:"medium",children:M.jsx(Xt,{})}),v!=null&&v.length?M.jsx(Te,{style:Ke.iconButtons,onClick:()=>this.props.onClearAllLogs(),size:"medium",children:M.jsx(Zt,{})}):null,v!=null&&v.length?M.jsx(Te,{style:Ke.iconButtons,onClick:()=>this.onCopy(),size:"medium",children:M.jsx(ea,{})}):null]},"toolbox"),this.renderLogList(v)]})}}var It={exports:{}},va=It.exports;(function(X,v){(function(g,a){X.exports=a(fa)})(va,(function(g){return(function(a){var t={};function e(s){if(t[s])return t[s].exports;var c=t[s]={i:s,l:!1,exports:{}};return a[s].call(c.exports,c,c.exports,e),c.l=!0,c.exports}return e.m=a,e.c=t,e.d=function(s,c,d){e.o(s,c)||Object.defineProperty(s,c,{enumerable:!0,get:d})},e.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},e.t=function(s,c){if(1&c&&(s=e(s)),8&c||4&c&&typeof s=="object"&&s&&s.__esModule)return s;var d=Object.create(null);if(e.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:s}),2&c&&typeof s!="string")for(var p in s)e.d(d,p,function(f){return s[f]}.bind(null,p));return d},e.n=function(s){var c=s&&s.__esModule?function(){return s.default}:function(){return s};return e.d(c,"a",c),c},e.o=function(s,c){return Object.prototype.hasOwnProperty.call(s,c)},e.p="",e(e.s=48)})([function(a,t){a.exports=g},function(a,t){var e=a.exports={version:"2.6.12"};typeof __e=="number"&&(__e=e)},function(a,t,e){var s=e(26)("wks"),c=e(17),d=e(3).Symbol,p=typeof d=="function";(a.exports=function(f){return s[f]||(s[f]=p&&d[f]||(p?d:c)("Symbol."+f))}).store=s},function(a,t){var e=a.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=e)},function(a,t,e){a.exports=!e(8)((function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7}))},function(a,t){var e={}.hasOwnProperty;a.exports=function(s,c){return e.call(s,c)}},function(a,t,e){var s=e(7),c=e(16);a.exports=e(4)?function(d,p,f){return s.f(d,p,c(1,f))}:function(d,p,f){return d[p]=f,d}},function(a,t,e){var s=e(10),c=e(35),d=e(23),p=Object.defineProperty;t.f=e(4)?Object.defineProperty:function(f,h,S){if(s(f),h=d(h,!0),s(S),c)try{return p(f,h,S)}catch{}if("get"in S||"set"in S)throw TypeError("Accessors not supported!");return"value"in S&&(f[h]=S.value),f}},function(a,t){a.exports=function(e){try{return!!e()}catch{return!0}}},function(a,t,e){var s=e(40),c=e(22);a.exports=function(d){return s(c(d))}},function(a,t,e){var s=e(11);a.exports=function(c){if(!s(c))throw TypeError(c+" is not an object!");return c}},function(a,t){a.exports=function(e){return typeof e=="object"?e!==null:typeof e=="function"}},function(a,t){a.exports={}},function(a,t,e){var s=e(39),c=e(27);a.exports=Object.keys||function(d){return s(d,c)}},function(a,t){a.exports=!0},function(a,t,e){var s=e(3),c=e(1),d=e(53),p=e(6),f=e(5),h=function(S,b,w){var I,R,H,L=S&h.F,Z=S&h.G,r=S&h.S,D=S&h.P,V=S&h.B,z=S&h.W,q=Z?c:c[b]||(c[b]={}),k=q.prototype,A=Z?s:r?s[b]:(s[b]||{}).prototype;for(I in Z&&(w=b),w)(R=!L&&A&&A[I]!==void 0)&&f(q,I)||(H=R?A[I]:w[I],q[I]=Z&&typeof A[I]!="function"?w[I]:V&&R?d(H,s):z&&A[I]==H?(function(T){var W=function(E,ee,J){if(this instanceof T){switch(arguments.length){case 0:return new T;case 1:return new T(E);case 2:return new T(E,ee)}return new T(E,ee,J)}return T.apply(this,arguments)};return W.prototype=T.prototype,W})(H):D&&typeof H=="function"?d(Function.call,H):H,D&&((q.virtual||(q.virtual={}))[I]=H,S&h.R&&k&&!k[I]&&p(k,I,H)))};h.F=1,h.G=2,h.S=4,h.P=8,h.B=16,h.W=32,h.U=64,h.R=128,a.exports=h},function(a,t){a.exports=function(e,s){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:s}}},function(a,t){var e=0,s=Math.random();a.exports=function(c){return"Symbol(".concat(c===void 0?"":c,")_",(++e+s).toString(36))}},function(a,t,e){var s=e(22);a.exports=function(c){return Object(s(c))}},function(a,t){t.f={}.propertyIsEnumerable},function(a,t,e){var s=e(52)(!0);e(34)(String,"String",(function(c){this._t=String(c),this._i=0}),(function(){var c,d=this._t,p=this._i;return p>=d.length?{value:void 0,done:!0}:(c=s(d,p),this._i+=c.length,{value:c,done:!1})}))},function(a,t){var e=Math.ceil,s=Math.floor;a.exports=function(c){return isNaN(c=+c)?0:(c>0?s:e)(c)}},function(a,t){a.exports=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e}},function(a,t,e){var s=e(11);a.exports=function(c,d){if(!s(c))return c;var p,f;if(d&&typeof(p=c.toString)=="function"&&!s(f=p.call(c))||typeof(p=c.valueOf)=="function"&&!s(f=p.call(c))||!d&&typeof(p=c.toString)=="function"&&!s(f=p.call(c)))return f;throw TypeError("Can't convert object to primitive value")}},function(a,t){var e={}.toString;a.exports=function(s){return e.call(s).slice(8,-1)}},function(a,t,e){var s=e(26)("keys"),c=e(17);a.exports=function(d){return s[d]||(s[d]=c(d))}},function(a,t,e){var s=e(1),c=e(3),d=c["__core-js_shared__"]||(c["__core-js_shared__"]={});(a.exports=function(p,f){return d[p]||(d[p]=f!==void 0?f:{})})("versions",[]).push({version:s.version,mode:e(14)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(a,t){a.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(a,t,e){var s=e(7).f,c=e(5),d=e(2)("toStringTag");a.exports=function(p,f,h){p&&!c(p=h?p:p.prototype,d)&&s(p,d,{configurable:!0,value:f})}},function(a,t,e){e(62);for(var s=e(3),c=e(6),d=e(12),p=e(2)("toStringTag"),f="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),h=0;hdocument.F=Object<\/script>"),S.close(),h=S.F;w--;)delete h.prototype[d[w]];return h()};a.exports=Object.create||function(S,b){var w;return S!==null?(f.prototype=s(S),w=new f,f.prototype=null,w[p]=S):w=h(),b===void 0?w:c(w,b)}},function(a,t,e){var s=e(5),c=e(9),d=e(57)(!1),p=e(25)("IE_PROTO");a.exports=function(f,h){var S,b=c(f),w=0,I=[];for(S in b)S!=p&&s(b,S)&&I.push(S);for(;h.length>w;)s(b,S=h[w++])&&(~d(I,S)||I.push(S));return I}},function(a,t,e){var s=e(24);a.exports=Object("z").propertyIsEnumerable(0)?Object:function(c){return s(c)=="String"?c.split(""):Object(c)}},function(a,t,e){var s=e(39),c=e(27).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(d){return s(d,c)}},function(a,t,e){var s=e(24),c=e(2)("toStringTag"),d=s((function(){return arguments})())=="Arguments";a.exports=function(p){var f,h,S;return p===void 0?"Undefined":p===null?"Null":typeof(h=(function(b,w){try{return b[w]}catch{}})(f=Object(p),c))=="string"?h:d?s(f):(S=s(f))=="Object"&&typeof f.callee=="function"?"Arguments":S}},function(a,t){var e;e=(function(){return this})();try{e=e||new Function("return this")()}catch{typeof window=="object"&&(e=window)}a.exports=e},function(a,t){var e=/-?\d+(\.\d+)?%?/g;a.exports=function(s){return s.match(e)}},function(a,t,e){Object.defineProperty(t,"__esModule",{value:!0}),t.getBase16Theme=t.createStyling=t.invertTheme=void 0;var s=R(e(49)),c=R(e(76)),d=R(e(81)),p=R(e(89)),f=R(e(93)),h=(function(k){if(k&&k.__esModule)return k;var A={};if(k!=null)for(var T in k)Object.prototype.hasOwnProperty.call(k,T)&&(A[T]=k[T]);return A.default=k,A})(e(94)),S=R(e(132)),b=R(e(133)),w=R(e(138)),I=e(139);function R(k){return k&&k.__esModule?k:{default:k}}var H=h.default,L=(0,p.default)(H),Z=(0,w.default)(b.default,I.rgb2yuv,(function(k){var A,T=(0,d.default)(k,3),W=T[0],E=T[1],ee=T[2];return[(A=W,A<.25?1:A<.5?.9-A:1.1-A),E,ee]}),I.yuv2rgb,S.default),r=function(k){return function(A){return{className:[A.className,k.className].filter(Boolean).join(" "),style:(0,c.default)({},A.style||{},k.style||{})}}},D=function(k,A){var T=(0,p.default)(A);for(var W in k)T.indexOf(W)===-1&&T.push(W);return T.reduce((function(E,ee){return E[ee]=(function(J,C){if(J===void 0)return C;if(C===void 0)return J;var Y=J===void 0?"undefined":(0,s.default)(J),be=C===void 0?"undefined":(0,s.default)(C);switch(Y){case"string":switch(be){case"string":return[C,J].filter(Boolean).join(" ");case"object":return r({className:J,style:C});case"function":return function(ce){for(var U=arguments.length,le=Array(U>1?U-1:0),Q=1;Q1?U-1:0),Q=1;Q1?U-1:0),Q=1;Q1?U-1:0),Q=1;Q1?U-1:0),Q=1;Q2?T-2:0),E=2;E3?A-3:0),W=3;W1&&arguments[1]!==void 0?arguments[1]:{},ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},J=E.defaultBase16,C=J===void 0?H:J,Y=E.base16Themes,be=Y===void 0?null:Y,ce=q(ee,be);ce&&(ee=(0,c.default)({},ce,ee));var U=L.reduce((function(ve,Ne){return ve[Ne]=ee[Ne]||C[Ne],ve}),{}),le=(0,p.default)(ee).reduce((function(ve,Ne){return L.indexOf(Ne)===-1&&(ve[Ne]=ee[Ne]),ve}),{}),Q=k(U),he=D(le,Q);return(0,f.default)(V,2).apply(void 0,[he].concat(T))}),3),t.getBase16Theme=function(k,A){if(k&&k.extend&&(k=k.extend),typeof k=="string"){var T=k.split(":"),W=(0,d.default)(T,2),E=W[0],ee=W[1];k=(A||{})[E]||h[E],ee==="inverted"&&(k=z(k))}return k&&k.hasOwnProperty("base00")?k:void 0})},function(a,t,e){var s,c=typeof Reflect=="object"?Reflect:null,d=c&&typeof c.apply=="function"?c.apply:function(r,D,V){return Function.prototype.apply.call(r,D,V)};s=c&&typeof c.ownKeys=="function"?c.ownKeys:Object.getOwnPropertySymbols?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:function(r){return Object.getOwnPropertyNames(r)};var p=Number.isNaN||function(r){return r!=r};function f(){f.init.call(this)}a.exports=f,a.exports.once=function(r,D){return new Promise((function(V,z){function q(){k!==void 0&&r.removeListener("error",k),V([].slice.call(arguments))}var k;D!=="error"&&(k=function(A){r.removeListener(D,q),z(A)},r.once("error",k)),r.once(D,q)}))},f.EventEmitter=f,f.prototype._events=void 0,f.prototype._eventsCount=0,f.prototype._maxListeners=void 0;var h=10;function S(r){if(typeof r!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r)}function b(r){return r._maxListeners===void 0?f.defaultMaxListeners:r._maxListeners}function w(r,D,V,z){var q,k,A,T;if(S(V),(k=r._events)===void 0?(k=r._events=Object.create(null),r._eventsCount=0):(k.newListener!==void 0&&(r.emit("newListener",D,V.listener?V.listener:V),k=r._events),A=k[D]),A===void 0)A=k[D]=V,++r._eventsCount;else if(typeof A=="function"?A=k[D]=z?[V,A]:[A,V]:z?A.unshift(V):A.push(V),(q=b(r))>0&&A.length>q&&!A.warned){A.warned=!0;var W=new Error("Possible EventEmitter memory leak detected. "+A.length+" "+String(D)+" listeners added. Use emitter.setMaxListeners() to increase limit");W.name="MaxListenersExceededWarning",W.emitter=r,W.type=D,W.count=A.length,T=W,console&&console.warn&&console.warn(T)}return r}function I(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function R(r,D,V){var z={fired:!1,wrapFn:void 0,target:r,type:D,listener:V},q=I.bind(z);return q.listener=V,z.wrapFn=q,q}function H(r,D,V){var z=r._events;if(z===void 0)return[];var q=z[D];return q===void 0?[]:typeof q=="function"?V?[q.listener||q]:[q]:V?(function(k){for(var A=new Array(k.length),T=0;T0&&(k=D[0]),k instanceof Error)throw k;var A=new Error("Unhandled error."+(k?" ("+k.message+")":""));throw A.context=k,A}var T=q[r];if(T===void 0)return!1;if(typeof T=="function")d(T,this,D);else{var W=T.length,E=Z(T,W);for(V=0;V=0;k--)if(V[k]===D||V[k].listener===D){A=V[k].listener,q=k;break}if(q<0)return this;q===0?V.shift():(function(T,W){for(;W+1=0;z--)this.removeListener(r,D[z]);return this},f.prototype.listeners=function(r){return H(this,r,!0)},f.prototype.rawListeners=function(r){return H(this,r,!1)},f.listenerCount=function(r,D){return typeof r.listenerCount=="function"?r.listenerCount(D):L.call(r,D)},f.prototype.listenerCount=L,f.prototype.eventNames=function(){return this._eventsCount>0?s(this._events):[]}},function(a,t,e){a.exports.Dispatcher=e(140)},function(a,t,e){a.exports=e(142)},function(a,t,e){t.__esModule=!0;var s=p(e(50)),c=p(e(65)),d=typeof c.default=="function"&&typeof s.default=="symbol"?function(f){return typeof f}:function(f){return f&&typeof c.default=="function"&&f.constructor===c.default&&f!==c.default.prototype?"symbol":typeof f};function p(f){return f&&f.__esModule?f:{default:f}}t.default=typeof c.default=="function"&&d(s.default)==="symbol"?function(f){return f===void 0?"undefined":d(f)}:function(f){return f&&typeof c.default=="function"&&f.constructor===c.default&&f!==c.default.prototype?"symbol":f===void 0?"undefined":d(f)}},function(a,t,e){a.exports={default:e(51),__esModule:!0}},function(a,t,e){e(20),e(29),a.exports=e(30).f("iterator")},function(a,t,e){var s=e(21),c=e(22);a.exports=function(d){return function(p,f){var h,S,b=String(c(p)),w=s(f),I=b.length;return w<0||w>=I?d?"":void 0:(h=b.charCodeAt(w))<55296||h>56319||w+1===I||(S=b.charCodeAt(w+1))<56320||S>57343?d?b.charAt(w):h:d?b.slice(w,w+2):S-56320+(h-55296<<10)+65536}}},function(a,t,e){var s=e(54);a.exports=function(c,d,p){if(s(c),d===void 0)return c;switch(p){case 1:return function(f){return c.call(d,f)};case 2:return function(f,h){return c.call(d,f,h)};case 3:return function(f,h,S){return c.call(d,f,h,S)}}return function(){return c.apply(d,arguments)}}},function(a,t){a.exports=function(e){if(typeof e!="function")throw TypeError(e+" is not a function!");return e}},function(a,t,e){var s=e(38),c=e(16),d=e(28),p={};e(6)(p,e(2)("iterator"),(function(){return this})),a.exports=function(f,h,S){f.prototype=s(p,{next:c(1,S)}),d(f,h+" Iterator")}},function(a,t,e){var s=e(7),c=e(10),d=e(13);a.exports=e(4)?Object.defineProperties:function(p,f){c(p);for(var h,S=d(f),b=S.length,w=0;b>w;)s.f(p,h=S[w++],f[h]);return p}},function(a,t,e){var s=e(9),c=e(58),d=e(59);a.exports=function(p){return function(f,h,S){var b,w=s(f),I=c(w.length),R=d(S,I);if(p&&h!=h){for(;I>R;)if((b=w[R++])!=b)return!0}else for(;I>R;R++)if((p||R in w)&&w[R]===h)return p||R||0;return!p&&-1}}},function(a,t,e){var s=e(21),c=Math.min;a.exports=function(d){return d>0?c(s(d),9007199254740991):0}},function(a,t,e){var s=e(21),c=Math.max,d=Math.min;a.exports=function(p,f){return(p=s(p))<0?c(p+f,0):d(p,f)}},function(a,t,e){var s=e(3).document;a.exports=s&&s.documentElement},function(a,t,e){var s=e(5),c=e(18),d=e(25)("IE_PROTO"),p=Object.prototype;a.exports=Object.getPrototypeOf||function(f){return f=c(f),s(f,d)?f[d]:typeof f.constructor=="function"&&f instanceof f.constructor?f.constructor.prototype:f instanceof Object?p:null}},function(a,t,e){var s=e(63),c=e(64),d=e(12),p=e(9);a.exports=e(34)(Array,"Array",(function(f,h){this._t=p(f),this._i=0,this._k=h}),(function(){var f=this._t,h=this._k,S=this._i++;return!f||S>=f.length?(this._t=void 0,c(1)):c(0,h=="keys"?S:h=="values"?f[S]:[S,f[S]])}),"values"),d.Arguments=d.Array,s("keys"),s("values"),s("entries")},function(a,t){a.exports=function(){}},function(a,t){a.exports=function(e,s){return{value:s,done:!!e}}},function(a,t,e){a.exports={default:e(66),__esModule:!0}},function(a,t,e){e(67),e(73),e(74),e(75),a.exports=e(1).Symbol},function(a,t,e){var s=e(3),c=e(5),d=e(4),p=e(15),f=e(37),h=e(68).KEY,S=e(8),b=e(26),w=e(28),I=e(17),R=e(2),H=e(30),L=e(31),Z=e(69),r=e(70),D=e(10),V=e(11),z=e(18),q=e(9),k=e(23),A=e(16),T=e(38),W=e(71),E=e(72),ee=e(32),J=e(7),C=e(13),Y=E.f,be=J.f,ce=W.f,U=s.Symbol,le=s.JSON,Q=le&&le.stringify,he=R("_hidden"),ve=R("toPrimitive"),Ne={}.propertyIsEnumerable,Ee=b("symbol-registry"),Oe=b("symbols"),fe=b("op-symbols"),ge=Object.prototype,De=typeof U=="function"&&!!ee.f,Ue=s.QObject,Ze=!Ue||!Ue.prototype||!Ue.prototype.findChild,et=d&&S((function(){return T(be({},"a",{get:function(){return be(this,"a",{value:7}).a}})).a!=7}))?function(j,N,B){var K=Y(ge,N);K&&delete ge[N],be(j,N,B),K&&j!==ge&&be(ge,N,K)}:be,tt=function(j){var N=Oe[j]=T(U.prototype);return N._k=j,N},at=De&&typeof U.iterator=="symbol"?function(j){return typeof j=="symbol"}:function(j){return j instanceof U},He=function(j,N,B){return j===ge&&He(fe,N,B),D(j),N=k(N,!0),D(B),c(Oe,N)?(B.enumerable?(c(j,he)&&j[he][N]&&(j[he][N]=!1),B=T(B,{enumerable:A(0,!1)})):(c(j,he)||be(j,he,A(1,{})),j[he][N]=!0),et(j,N,B)):be(j,N,B)},st=function(j,N){D(j);for(var B,K=Z(N=q(N)),re=0,te=K.length;te>re;)He(j,B=K[re++],N[B]);return j},ot=function(j){var N=Ne.call(this,j=k(j,!0));return!(this===ge&&c(Oe,j)&&!c(fe,j))&&(!(N||!c(this,j)||!c(Oe,j)||c(this,he)&&this[he][j])||N)},rt=function(j,N){if(j=q(j),N=k(N,!0),j!==ge||!c(Oe,N)||c(fe,N)){var B=Y(j,N);return!B||!c(Oe,N)||c(j,he)&&j[he][N]||(B.enumerable=!0),B}},it=function(j){for(var N,B=ce(q(j)),K=[],re=0;B.length>re;)c(Oe,N=B[re++])||N==he||N==h||K.push(N);return K},Ge=function(j){for(var N,B=j===ge,K=ce(B?fe:q(j)),re=[],te=0;K.length>te;)!c(Oe,N=K[te++])||B&&!c(ge,N)||re.push(Oe[N]);return re};De||(f((U=function(){if(this instanceof U)throw TypeError("Symbol is not a constructor!");var j=I(arguments.length>0?arguments[0]:void 0),N=function(B){this===ge&&N.call(fe,B),c(this,he)&&c(this[he],j)&&(this[he][j]=!1),et(this,j,A(1,B))};return d&&Ze&&et(ge,j,{configurable:!0,set:N}),tt(j)}).prototype,"toString",(function(){return this._k})),E.f=rt,J.f=He,e(41).f=W.f=it,e(19).f=ot,ee.f=Ge,d&&!e(14)&&f(ge,"propertyIsEnumerable",ot,!0),H.f=function(j){return tt(R(j))}),p(p.G+p.W+p.F*!De,{Symbol:U});for(var Ve="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Ce=0;Ve.length>Ce;)R(Ve[Ce++]);for(var nt=C(R.store),F=0;nt.length>F;)L(nt[F++]);p(p.S+p.F*!De,"Symbol",{for:function(j){return c(Ee,j+="")?Ee[j]:Ee[j]=U(j)},keyFor:function(j){if(!at(j))throw TypeError(j+" is not a symbol!");for(var N in Ee)if(Ee[N]===j)return N},useSetter:function(){Ze=!0},useSimple:function(){Ze=!1}}),p(p.S+p.F*!De,"Object",{create:function(j,N){return N===void 0?T(j):st(T(j),N)},defineProperty:He,defineProperties:st,getOwnPropertyDescriptor:rt,getOwnPropertyNames:it,getOwnPropertySymbols:Ge});var x=S((function(){ee.f(1)}));p(p.S+p.F*x,"Object",{getOwnPropertySymbols:function(j){return ee.f(z(j))}}),le&&p(p.S+p.F*(!De||S((function(){var j=U();return Q([j])!="[null]"||Q({a:j})!="{}"||Q(Object(j))!="{}"}))),"JSON",{stringify:function(j){for(var N,B,K=[j],re=1;arguments.length>re;)K.push(arguments[re++]);if(B=N=K[1],(V(N)||j!==void 0)&&!at(j))return r(N)||(N=function(te,ue){if(typeof B=="function"&&(ue=B.call(this,te,ue)),!at(ue))return ue}),K[1]=N,Q.apply(le,K)}}),U.prototype[ve]||e(6)(U.prototype,ve,U.prototype.valueOf),w(U,"Symbol"),w(Math,"Math",!0),w(s.JSON,"JSON",!0)},function(a,t,e){var s=e(17)("meta"),c=e(11),d=e(5),p=e(7).f,f=0,h=Object.isExtensible||function(){return!0},S=!e(8)((function(){return h(Object.preventExtensions({}))})),b=function(I){p(I,s,{value:{i:"O"+ ++f,w:{}}})},w=a.exports={KEY:s,NEED:!1,fastKey:function(I,R){if(!c(I))return typeof I=="symbol"?I:(typeof I=="string"?"S":"P")+I;if(!d(I,s)){if(!h(I))return"F";if(!R)return"E";b(I)}return I[s].i},getWeak:function(I,R){if(!d(I,s)){if(!h(I))return!0;if(!R)return!1;b(I)}return I[s].w},onFreeze:function(I){return S&&w.NEED&&h(I)&&!d(I,s)&&b(I),I}}},function(a,t,e){var s=e(13),c=e(32),d=e(19);a.exports=function(p){var f=s(p),h=c.f;if(h)for(var S,b=h(p),w=d.f,I=0;b.length>I;)w.call(p,S=b[I++])&&f.push(S);return f}},function(a,t,e){var s=e(24);a.exports=Array.isArray||function(c){return s(c)=="Array"}},function(a,t,e){var s=e(9),c=e(41).f,d={}.toString,p=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];a.exports.f=function(f){return p&&d.call(f)=="[object Window]"?(function(h){try{return c(h)}catch{return p.slice()}})(f):c(s(f))}},function(a,t,e){var s=e(19),c=e(16),d=e(9),p=e(23),f=e(5),h=e(35),S=Object.getOwnPropertyDescriptor;t.f=e(4)?S:function(b,w){if(b=d(b),w=p(w,!0),h)try{return S(b,w)}catch{}if(f(b,w))return c(!s.f.call(b,w),b[w])}},function(a,t){},function(a,t,e){e(31)("asyncIterator")},function(a,t,e){e(31)("observable")},function(a,t,e){t.__esModule=!0;var s,c=e(77),d=(s=c)&&s.__esModule?s:{default:s};t.default=d.default||function(p){for(var f=1;fH;)for(var r,D=h(arguments[H++]),V=L?c(D).concat(L(D)):c(D),z=V.length,q=0;z>q;)r=V[q++],s&&!Z.call(D,r)||(I[r]=D[r]);return I}:S},function(a,t,e){t.__esModule=!0;var s=d(e(82)),c=d(e(85));function d(p){return p&&p.__esModule?p:{default:p}}t.default=function(p,f){if(Array.isArray(p))return p;if((0,s.default)(Object(p)))return(function(h,S){var b=[],w=!0,I=!1,R=void 0;try{for(var H,L=(0,c.default)(h);!(w=(H=L.next()).done)&&(b.push(H.value),!S||b.length!==S);w=!0);}catch(Z){I=!0,R=Z}finally{try{!w&&L.return&&L.return()}finally{if(I)throw R}}return b})(p,f);throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(a,t,e){a.exports={default:e(83),__esModule:!0}},function(a,t,e){e(29),e(20),a.exports=e(84)},function(a,t,e){var s=e(42),c=e(2)("iterator"),d=e(12);a.exports=e(1).isIterable=function(p){var f=Object(p);return f[c]!==void 0||"@@iterator"in f||d.hasOwnProperty(s(f))}},function(a,t,e){a.exports={default:e(86),__esModule:!0}},function(a,t,e){e(29),e(20),a.exports=e(87)},function(a,t,e){var s=e(10),c=e(88);a.exports=e(1).getIterator=function(d){var p=c(d);if(typeof p!="function")throw TypeError(d+" is not iterable!");return s(p.call(d))}},function(a,t,e){var s=e(42),c=e(2)("iterator"),d=e(12);a.exports=e(1).getIteratorMethod=function(p){if(p!=null)return p[c]||p["@@iterator"]||d[s(p)]}},function(a,t,e){a.exports={default:e(90),__esModule:!0}},function(a,t,e){e(91),a.exports=e(1).Object.keys},function(a,t,e){var s=e(18),c=e(13);e(92)("keys",(function(){return function(d){return c(s(d))}}))},function(a,t,e){var s=e(15),c=e(1),d=e(8);a.exports=function(p,f){var h=(c.Object||{})[p]||Object[p],S={};S[p]=f(h),s(s.S+s.F*d((function(){h(1)})),"Object",S)}},function(a,t,e){(function(s){var c=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],d=/^\s+|\s+$/g,p=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,f=/\{\n\/\* \[wrapped with (.+)\] \*/,h=/,? & /,S=/^[-+]0x[0-9a-f]+$/i,b=/^0b[01]+$/i,w=/^\[object .+?Constructor\]$/,I=/^0o[0-7]+$/i,R=/^(?:0|[1-9]\d*)$/,H=parseInt,L=typeof s=="object"&&s&&s.Object===Object&&s,Z=typeof self=="object"&&self&&self.Object===Object&&self,r=L||Z||Function("return this")();function D(F,x,j){switch(j.length){case 0:return F.call(x);case 1:return F.call(x,j[0]);case 2:return F.call(x,j[0],j[1]);case 3:return F.call(x,j[0],j[1],j[2])}return F.apply(x,j)}function V(F,x){return!!(F&&F.length)&&(function(j,N,B){if(N!=N)return(function(te,ue,ye,xe){for(var Ie=te.length,me=ye+-1;++me-1}function z(F){return F!=F}function q(F,x){for(var j=F.length,N=0;j--;)F[j]===x&&N++;return N}function k(F,x){for(var j=-1,N=F.length,B=0,K=[];++j2?T:void 0);function Ne(F){return Ve(F)?le(F):{}}function Ee(F){return!(!Ve(F)||(function(x){return!!C&&C in x})(F))&&((function(x){var j=Ve(x)?ce.call(x):"";return j=="[object Function]"||j=="[object GeneratorFunction]"})(F)||(function(x){var j=!1;if(x!=null&&typeof x.toString!="function")try{j=!!(x+"")}catch{}return j})(F)?U:w).test((function(x){if(x!=null){try{return Y.call(x)}catch{}try{return x+""}catch{}}return""})(F))}function Oe(F,x,j,N){for(var B=-1,K=F.length,re=j.length,te=-1,ue=x.length,ye=Q(K-re,0),xe=Array(ue+ye),Ie=!N;++te1&&se.reverse(),xe&&ue1?"& ":"")+x[N],x=x.join(j>2?", ":" "),F.replace(p,`{ /* [wrapped with `+x+`] */ `)}function st(F,x){return!!(x=x??9007199254740991)&&(typeof F=="number"||R.test(F))&&F>-1&&F%1==0&&F1&&d--,f=6*d<1?s+6*(c-s)*d:2*d<1?c:3*d<2?s+(c-s)*(2/3-d)*6:s,p[w]=255*f;return p}},function(a,t,e){(function(s){var c=typeof s=="object"&&s&&s.Object===Object&&s,d=typeof self=="object"&&self&&self.Object===Object&&self,p=c||d||Function("return this")();function f(k,A,T){switch(T.length){case 0:return k.call(A);case 1:return k.call(A,T[0]);case 2:return k.call(A,T[0],T[1]);case 3:return k.call(A,T[0],T[1],T[2])}return k.apply(A,T)}function h(k,A){for(var T=-1,W=A.length,E=k.length;++T-1&&E%1==0&&E<=9007199254740991})(W.length)&&!(function(E){var ee=(function(J){var C=typeof J;return!!J&&(C=="object"||C=="function")})(E)?w.call(E):"";return ee=="[object Function]"||ee=="[object GeneratorFunction]"})(W)})(T)})(A)&&b.call(A,"callee")&&(!R.call(A,"callee")||w.call(A)=="[object Arguments]")})(k)||!!(H&&k&&k[H])}var r=Array.isArray,D,V,z,q=(V=function(k){var A=(k=(function(E,ee,J,C,Y){var be=-1,ce=E.length;for(J||(J=Z),Y||(Y=[]);++be2?d-2:0),f=2;f"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch{return!1}})();return function(){var n,o=w(l);if(u){var i=w(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return H(this,n)}}e.r(t);var Z=e(0),r=e.n(Z);function D(){var l=this.constructor.getDerivedStateFromProps(this.props,this.state);l!=null&&this.setState(l)}function V(l){this.setState(function(u){var n=this.constructor.getDerivedStateFromProps(l,u);return n??null}.bind(this))}function z(l,u){try{var n=this.props,o=this.state;this.props=l,this.state=u,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function q(l){var u=l.prototype;if(!u||!u.isReactComponent)throw new Error("Can only polyfill class components");if(typeof l.getDerivedStateFromProps!="function"&&typeof u.getSnapshotBeforeUpdate!="function")return l;var n=null,o=null,i=null;if(typeof u.componentWillMount=="function"?n="componentWillMount":typeof u.UNSAFE_componentWillMount=="function"&&(n="UNSAFE_componentWillMount"),typeof u.componentWillReceiveProps=="function"?o="componentWillReceiveProps":typeof u.UNSAFE_componentWillReceiveProps=="function"&&(o="UNSAFE_componentWillReceiveProps"),typeof u.componentWillUpdate=="function"?i="componentWillUpdate":typeof u.UNSAFE_componentWillUpdate=="function"&&(i="UNSAFE_componentWillUpdate"),n!==null||o!==null||i!==null){var y=l.displayName||l.name,O=typeof l.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs. diff --git a/admin/assets/index-AOxv_cZq.js b/admin/assets/index-Be9Zg6aF.js similarity index 94% rename from admin/assets/index-AOxv_cZq.js rename to admin/assets/index-Be9Zg6aF.js index b1dbe7a8e..f240cdd3b 100644 --- a/admin/assets/index-AOxv_cZq.js +++ b/admin/assets/index-Be9Zg6aF.js @@ -368,7 +368,7 @@ Url: ${Do(s)}`),!0}return!1}function Id(s,e){return e!=null&&e.length?j4(s).some @keyframes loaderHA-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } -}`;function Uh(s){const e=s.themeType||"dark",t=s.size||270,i=t*1.5,r=t*14/270,o=t*280/270;return a.useEffect(()=>{if(!window.document.getElementById(Wu)){const n=window.document.createElement("style");n.setAttribute("id",Wu),n.innerHTML=bh,window.document.head.appendChild(n)}},[]),a.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",top:0,left:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundImage:s.backgroundImage&&s.backgroundImage!=="@@loginBackgroundImage@@"?s.backgroundImage:window.loadingBackgroundImage&&window.loadingBackgroundImage!=="@@loginBackgroundImage@@"?`url(${window.loadingBackgroundImage})`:void 0,backgroundColor:s.backgroundColor&&s.backgroundColor!=="@@loginBackgroundColor@@"?s.backgroundColor:window.loadingBackgroundColor&&window.loadingBackgroundColor!=="@@loginBackgroundColor@@"?window.loadingBackgroundColor:e==="dark"?"#000":"#FFF",backgroundSize:"cover"}},a.createElement("div",{style:{position:"relative",width:i,height:i,display:"flex",justifyContent:"center",alignItems:"center"}},a.createElement("div",{style:{position:"absolute",top:-r,left:-r,right:-r,bottom:-r,border:`${r}px solid transparent`,borderTop:`${r}px solid rgba(219, 10, 51, 0.50)`,borderRadius:"50%",animation:"loaderHA-spin 3.6s linear infinite"}}),a.createElement("div",{style:{position:"absolute",width:"100%",height:"100%",border:`${r}px solid transparent`,borderTop:`${r}px solid rgba(219, 10, 51, 0.75)`,borderRadius:"50%",animation:"loaderHA-spin 2.2s linear infinite"}}),a.createElement("div",{style:{width:t,height:t,zIndex:1,display:"flex",justifyContent:"center",alignItems:"center"}},a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 69.6 148.1",style:{width:"100%",height:"100%"}},a.createElement("path",{fill:"#db0a33",d:"M69.5,100.6c0-.4,0-.8-.2-1.1v-.7c-.2-.4-.3-.8-.5-1.2,0-.2-.2-.5-.3-.7,0,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ate(-50%, -155%)"}},a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 7152 512",width:"100%",height:"auto"},a.createElement("path",{fill:"#fff",d:"M4566 0h1053v5h25c2 5 2 5 1 8h16q3 3 2 7l3 1 4 1 2 7h2l12 1q3 1 2 6v3h7q3 4 2 10v6h3l4 1 1 8 3-1 5 2 1 7 7 1 1 14v2h3q3 0 5 2l1 9v22l3 1 4 1 1 7v41q0 3-3 5l-5 1v26q1 3-2 5h-8l1 2v8l-1 8h-8v16q-3 3-7 2l-1 3-2 5h-6v6l-1 11h-7l-1 8-10 1h-6l-1 3-1 4-7 2v3l-2 4h-16l1 2-2 6h-15v3l-3 6-10 1h-11l-10 2q1 3-2 5l-8 1h-796l-4-1-2-7h-2q-7 0-14-2v-8h-8l-1-7h-3l-4-1q-2-5-2-10v-62l2-6 7-1v-3l2-4h7v-8l5-1h3v-3l1-5q3-2 8-1h57l140-1h602v-3l2-4h7l1-8 8-1v-31l-7-1q-2-2-2-5v-2l-3-1q-5 0-6-4v-5h-3l-11 1-2-2v-7h-917l-1 8-23 1h-14l-5-1v7l-9 3h-7l-1 3-1 4-9 1h-6l-1 3-2 5h-6v3q0 3-2 5l-6 1v3q0 3-4 5h-5v15l-2 2h-7v16h-8v110h8v24h6l3 3v5l3 1q4 0 6 4l-1 5 9 2v6h3q3 0 5 2l1 6h2l5 1q2 4 0 8h2q12-3 23 1l1 5v3l2-1h1069l9 1 1 8h18l7 2 1 6h3q3 0 5 4l1 5h3q3 0 5 4v12l3 1 5 2v21l1 17v3l-1 8-5 3-3 1v8l-2 7h-8l1 2-1 6h-16v5H4571v-5h-42v-8h-16q-2-3-2-7h-7l-4-1q-3 1-5-2v-7l-2 1h-8q-4 0-7-2l-1-8-3 1h-3q-2-1-2-6v-3h-3q-5 1-6-2l1-6h-3l-6-2-1-6h-3q-3 0-5-4v-6l-3 1h-3q-3-4-3-10v-7l-8-1 1-8h-9l-1-7v-2l1-8h-7q-2-3-2-8v-18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 7h-5v7l-1 3-1 6h-16l1 3-1 2h-79v-4h-7l-3-1-6-1-1-8v-7h-6q-2-4-2-10V338h-3q-3 1-5-2l-1-9v-6h-3l-5-2v-16h-16l-2-6 1-2h-16l-1-1v-7H126l1 2v188c0 11 0 11-3 14h-7v15l-4 1h-12v5H22l-1-3 1-2h-3q-5 1-6-2v-5h-3l-5-2v-7H0zM6537 0h606v5l8 1 1 16v82l-3 4-8 1h-6v3l-1 4q-5 2-10 1h-509v3l-1 5q-13 2-24 0v3q1 5-2 6l-6 1h-4l-5-1v3l-1 5-7 2v8q0 6-2 7l-7 1v210c0 7 0 7-2 10h-7v32q-3 3-8 2v15q-2 3-5 2h-3v2q1 8-2 15l-7 1v7l-1 3-1 6h-7v7l-6 2-2-1v3q1 5-2 6l-9 2h-6v5q-4 3-9 2v3q1 3-2 5h-15l1 3-2 5h-33l1 3-1 2h-589v-5h-8v-8h-7l-3-10v-6l-3-1-4-1-1-7v-48l2-5 7-1v-10q-1-3 2-5 2-2 6-2l1-3 2-5h32v-7q6-3 12-2h498l8 1v-3q0-3 2-5l7-2h8l2-7 7-1v-11q0-3 2-5h6V167l1-8q4-4 8-3v-44l1-5h8V84l1-3h7V66l8-4v-2l3-5 6-1v-9l1-6h8v-8q8-3 15-2l1-3 3-5h6v-3q-1-3 2-5h15v-3q-1-3 2-5h24z"})))))}function $h(s){const e=window.vendorPrefix;return e==="PT"?a.createElement(Qh,{themeType:s.themeType}):e==="MV"?a.createElement(Eh,{themeType:s.themeType}):e==="NW"?a.createElement(_h,{themeType:"dark"}):e==="HA"?a.createElement(Uh,{themeType:"dark"}):e&&e!=="@@vendorPrefix@@"?a.createElement(Sh,{themeType:s.themeType}):a.createElement(vh,{themeType:s.themeType})}class nr extends De{onHashChangedBound;constructor(e){super(e),this.onHashChangedBound=this.onHashChanged.bind(this)}componentDidMount(){window.addEventListener("hashchange",this.onHashChangedBound)}componentWillUnmount(){window.removeEventListener("hashchange",this.onHashChangedBound)}onHashChanged(){}static getLocation(){let e=window.location.hash;e=e.replace(/^#/,"");const t=e.split("/").map(i=>{try{return i?decodeURIComponent(i):""}catch{return console.error(`Router: Cannot decode ${i}`),i}});return{tab:t[0]||"",dialog:t[1]||"",id:t[2]||"",arg:t[3]||""}}static doNavigate(e,t,i,r){let o="";const n=nr.getLocation();r!==void 0&&!i&&(i=n.id),i&&!t&&(t=n.dialog),(t&&!e||e===null)&&(e=n.tab),e&&(o=`#${e}`,t&&(o+=`/${t}`,i&&(o+=`/${i}`,r!==void 0&&(o+=`/${r}`)))),window.location.hash!==o&&(window.location.hash=o)}}function Ph(){const s=document.getSelection();if(!(s!=null&&s.rangeCount))return()=>{};let e=document.activeElement;const t=[];for(let i=0;i{s.type==="Caret"&&s.removeAllRanges(),s.rangeCount||t.forEach(i=>s.addRange(i)),e&&e.focus()}}const Ju={"text/plain":"Text","text/html":"Url",default:"Text"},Wh="Copy to clipboard: #{key}, Enter";function Jh(s){const e=`${/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl"}+C`;return s.replace(/#{\s*key\s*}/g,e)}function E4(s,e){let t,i,r,o,n=!1;e=e||{};const M=e.debug||!1;try{if(t=Ph(),i=document.createRange(),r=document.getSelection(),o=document.createElement("span"),o.textContent=s,o.ariaHidden="true",o.style.all="unset",o.style.position="fixed",o.style.top="0px",o.style.clip="rect(0, 0, 0, 0)",o.style.whiteSpace="pre",o.style.userSelect="text",o.addEventListener("copy",l=>{var N,u,L,g;if(l.stopPropagation(),e!=null&&e.format)if(l.preventDefault(),typeof l.clipboardData>"u"){M&&console.warn("unable to use e.clipboardData"),M&&console.warn("trying IE specific stuff"),(N=window.clipboardData)==null||N.clearData();const j=Ju[e.format]||Ju.default;(u=window.clipboardData)==null||u.setData(j,s)}else(L=l.clipboardData)==null||L.clearData(),(g=l.clipboardData)==null||g.setData(e.format,s)}),document.body.appendChild(o),i.selectNodeContents(o),r==null||r.addRange(i),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");n=!0}catch(c){M&&console.error("unable to copy using execCommand: ",c),M&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",s),n=!0}catch(l){M&&console.error("unable to copy using clipboardData: ",l),M&&console.error("falling back to prompt");const N=Jh("message"in e?e.message||"":Wh);window.prompt(N,s)}}finally{r&&(i&&typeof r.removeRange=="function"?r.removeRange(i):r.removeAllRanges()),o&&document.body.removeChild(o),t&&t()}return n}class D{static translations={};static unknownTranslations=[];static lang=window.sysLang||"en";static _disableWarning=!1;static setLanguage(e){e&&(D.lang=e)}static extendTranslations(e,t){if(e.prefix){const i=e;if(typeof i.prefix=="string"){const r=i.prefix;delete i.prefix,Object.keys(i).forEach(o=>{const n=o,M={},c=i[n];Object.keys(c).forEach(l=>{l&&c&&(l.startsWith(r)?M[l]=c[l]:M[`${r}${l}`]=c[l])}),e[n]=M})}else console.warn("Found prefix in translations, but it is not a string")}try{if(!t)e.en&&e.de&&e.ru?Object.keys(e).forEach(i=>{const r=i;D.translations[r]||={},Object.assign(D.translations[r],e[r])}):Object.keys(e).forEach(i=>{const r=e[i];Object.keys(r).forEach(o=>{const n=o,M=D.translations[n];M?M[i]?M[i]!==r[n]&&console.warn(`Translation for word "${i}" in "${n}" was ignored: existing = "${M[i]}", new = ${r[n]}`):M[i]=r[n]:console.warn(`Used unknown language: ${n}`)})});else{D.translations[t]||console.warn(`Used unknown language: ${t}`),D.translations[t]||={};const i=D.translations[t];Object.keys(e).forEach(r=>{i[r]?i[r]!==e[r]&&console.warn(`Translation for word "${r}" in "${t}" was ignored: existing = "${i[r]}", new = ${e[r]}`):i[r]=e[r]})}}catch(i){console.error(`Cannot apply translations: ${i}`)}}static setTranslations(e){e&&(D.translations=e)}static getLanguage(){return D.lang}static t(e,...t){const i=D.translations[D.lang];if(i){const r=i[e];if(r)e=r;else if(D.unknownTranslations.includes(e)||(D.unknownTranslations.push(e),!D._disableWarning&&console.log(`Translate: ${e}`)),D.lang!=="en"&&D.translations.en){const o=D.translations.en[e];o&&(e=o)}}for(const r of t)e=e.replace("%s",r);return e}static i18nShow(e){const t={};e?typeof e=="string"?(D.unknownTranslations.forEach(i=>{i.startsWith(e)&&(t[i]=i.replace(e,""))}),console.log(JSON.stringify(t,null,2))):e&&typeof e=="object"&&(D.unknownTranslations.forEach(i=>{e.test(i)&&(t[i]=i)}),console.log(JSON.stringify(t,null,2))):(D.unknownTranslations.forEach(i=>t[i]=i),console.log(JSON.stringify(t,null,2)))}static disableWarning(e){D._disableWarning=!!e}}window.i18nShow=D.i18nShow;window.i18nDisableWarning=D.disableWarning;const Dt="material",Bh=["Su","Mo","Tu","We","Th","Fr","Sa"],Rh=["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Cn={0:"0x00 - good",1:"0x01 - general problem",2:"0x02 - no connection problem",16:"0x10 - substitute value from controller",32:"0x20 - substitute initial value",64:"0x40 - substitute value from device or instance",128:"0x80 - substitute value from sensor",17:"0x11 - general problem by instance",65:"0x41 - general problem by device",129:"0x81 - general problem by sensor",18:"0x12 - instance not connected",66:"0x42 - device not connected",130:"0x82 - sensor not connected",68:"0x44 - device reports error",132:"0x84 - sensor reports error"},Bu={JVBERi0:"pdf",R0lGODdh:"gif",R0lGODlh:"gif",iVBORw0KGgo:"png","/9j/":"jpg",PHN2Zw:"svg",Qk1:"bmp",AAABAA:"ico"};class m{static namespace=Dt;static INSTANCES="instances";static dateFormat=["DD","MM"];static FORBIDDEN_CHARS=/[^._\-/ :!#$%&()+=@^{}|~\p{Ll}\p{Lu}\p{Nd}]+/gu;static CapitalWords(e){return(e||"").split(/[\s_]/).filter(t=>t).map(t=>t?t[0].toUpperCase()+t.substring(1).toLowerCase():"").join(" ")}static formatSeconds(e){const t=Math.floor(e/86400);e%=3600*24;const i=Math.floor(e/3600).toString().padStart(2,"0");e%=3600;const r=Math.floor(e/60).toString().padStart(2,"0");e%=60;const o=Math.floor(e).toString().padStart(2,"0");let n="";return t&&(n+=`${t} ${D.t("ra_daysShortText")} `),n+=`${i}:${r}:${o}`,n}static getObjectName(e,t,i,r,o){var c;const n=e[t];let M;if(typeof i=="string"&&!r&&(r={language:i},i=null),r=r||{},r.language||(r.language=e["system.config"]&&e["system.config"].common&&e["system.config"].common.language||window.sysLang||"en"),i!=null&&i.name){const l=i.name;typeof l=="object"?M=r.language&&l[r.language]||l.en:M=l}else if(o&&((c=n==null?void 0:n.common)!=null&&c.desc)){const l=n.common.desc;typeof l=="object"?M=r.language&&l[r.language]||l.en||l.de||l.ru||"":M=l,M=(M||"").toString().replace(/[_.]/g," "),M===M.toUpperCase()&&(M=M[0]+M.substring(1).toLowerCase())}else if(!o&&(n!=null&&n.common)){const l=n.common.name||n.common.desc;l&&typeof l=="object"?M=r.language&&l[r.language]||l.en||l.de||l.ru||"":M=l,M=(M||"").toString().replace(/[_.]/g," "),M===M.toUpperCase()&&(M=M[0]+M.substring(1).toLowerCase())}else{const l=t.lastIndexOf(".");M=t.substring(l+1).replace(/[_.]/g," "),M=m.CapitalWords(M)}return(M==null?void 0:M.trim())||""}static getObjectNameFromObj(e,t,i,r,o){var c,l;const n=e;let M=(e==null?void 0:e._id)||"";if(typeof t=="string"&&!i&&(i={language:t},t=null),i=i||{},t!=null&&t.name){const N=t.name;typeof N=="object"?M=i.language&&N[i.language]||N.en:M=N}else if(r&&((c=n==null?void 0:n.common)!=null&&c.desc)){const N=n.common.desc;typeof N=="object"?M=i.language&&N[i.language]||N.en:M=N,M=(M||"").toString().replace(/[_.]/g," "),M===M.toUpperCase()&&(M=M[0]+M.substring(1).toLowerCase())}else if(!r&&((l=n==null?void 0:n.common)!=null&&l.name)){let N=n.common.name;!N&&n.common.desc&&(N=n.common.desc),typeof N=="object"?M=i.language&&N[i.language]||N.en:M=N,M=(M||"").toString().replace(/[_.]/g," "),M===M.toUpperCase()&&(M=M[0]+M.substring(1).toLowerCase())}return o?M:M.trim()}static getSettingsOrder(e,t,i){let r;e&&Object.prototype.hasOwnProperty.call(e,"common")?r=e.common:r=e;let o;if(r!=null&&r.custom){o=r.custom[Dt];const n=i.user||"admin";if(o&&o[n]){if(t){if(o[n].subOrder&&o[n].subOrder[t])return JSON.parse(JSON.stringify(o[n].subOrder[t]))}else if(o[n].order)return JSON.parse(JSON.stringify(o[n].order))}}return null}static getSettingsCustomURLs(e,t,i){let r;e&&Object.prototype.hasOwnProperty.call(e,"common")?r=e.common:r=e;let o;if(r!=null&&r.custom){o=r.custom[Dt];const n=i.user||"admin";if(o&&o[n]){if(t){if(o[n].subURLs&&o[n].subURLs[t])return JSON.parse(JSON.stringify(o[n].subURLs[t]))}else if(o[n].URLs)return JSON.parse(JSON.stringify(o[n].URLs))}}return null}static reorder(e,t,i){const r=Array.from(e),[o]=r.splice(t,1);return r.splice(i,0,o),r}static getSettings(e,t,i){let r;const o=(e==null?void 0:e._id)||(t==null?void 0:t.id);let n;if(e&&Object.prototype.hasOwnProperty.call(e,"common")?n=e.common:n=e,n!=null&&n.custom?(r=n.custom,r=r[Dt]&&r[Dt][t.user||"admin"]?JSON.parse(JSON.stringify(r[Dt][t.user||"admin"])):{enabled:!0}):r={enabled:i===void 0?!0:i,useCustom:!1},Object.prototype.hasOwnProperty.call(r,"enabled")||(r.enabled=i===void 0?!0:i),t&&(!r.name&&t.name&&(r.name=t.name),!r.icon&&t.icon&&(r.icon=t.icon),!r.color&&t.color&&(r.color=t.color)),n&&(!r.color&&n.color&&(r.color=n.color),!r.icon&&n.icon&&(r.icon=n.icon),!r.name&&n.name&&(r.name=n.name)),typeof r.name=="object"&&(r.name=t.language&&r.name[t.language]||r.name.en,r.name=(r.name||"").toString().replace(/_/g," "),r.name===r.name.toUpperCase()&&(r.name=r.name[0]+r.name.substring(1).toLowerCase())),!r.name&&o){const M=o.lastIndexOf(".");r.name=o.substring(M+1).replace(/[_.]/g," "),r.name=(r.name||"").toString().replace(/_/g," "),r.name=m.CapitalWords(r.name)}return r}static setSettings(e,t,i){if(e){e.common=e.common||{},e.common.custom=e.common.custom||{},e.common.custom[Dt]=e.common.custom[Dt]||{},e.common.custom[Dt][i.user||"admin"]=t;const r=e.common.custom[Dt][i.user||"admin"];return r.useCommon&&(r.color!==void 0&&(e.common.color=r.color,delete r.color),r.icon!==void 0&&(e.common.icon=r.icon,delete r.icon),r.name!==void 0&&(typeof e.common.name!="object"&&i.language?e.common.name={[i.language]:r.name}:typeof e.common.name=="object"&&i.language&&(e.common.name[i.language]=r.name),delete r.name)),!0}return!1}static getIcon(e,t){return e!=null&&e.icon?e.icon.length<=2?a.createElement("span",{style:t||{}},e.icon):e.icon.startsWith("data:image")?a.createElement("img",{alt:e.name,src:e.icon,style:t||{}}):a.createElement("img",{alt:e.name,src:(e.prefix||"")+e.icon,style:t}):null}static getObjectIcon(e,t){var i;if(typeof e=="object"&&(t=e,e=t==null?void 0:t._id),(i=t==null?void 0:t.common)!=null&&i.icon){let r=t.common.icon;if(typeof r=="string"&&r.length<=2||r.startsWith("data:image"))return r;const o=e.split(".");return o[0]==="system"?r=`adapter/${o[2]}${r.startsWith("/")?"":"/"}${r}`:r=`adapter/${o[0]}${r.startsWith("/")?"":"/"}${r}`,window.location.pathname.match(/adapter\/[^/]+\/[^/]+\.html/)?r=`../../${r}`:window.location.pathname.match(/material\/[.\d]+/)?r=`../../${r}`:window.location.pathname.match(/material\//)&&(r=`../${r}`),r}return null}static splitCamelCase(e){return e?m.CapitalWords(e):""}static isUseBright(e,t){if(!e)return t===void 0?!0:t;e=e.toString(),e.startsWith("#")&&(e=e.slice(1));let i,r,o;const n=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);if(n&&n.length===4)i=parseInt(n[1],10),r=parseInt(n[2],10),o=parseInt(n[3],10);else{if(e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),e.length===8)e=e.substring(0,6);else if(e.length!==6)return!1;i=parseInt(e.slice(0,2),16),r=parseInt(e.slice(2,4),16),o=parseInt(e.slice(4,6),16)}return i*.299+r*.587+o*.114<=186}static getTimeString(e){if(e=parseFloat(e),Number.isNaN(e))return"--:--";const t=Math.floor(e/3600),i=Math.floor(e%3600/60).toString().padStart(2,"0"),r=(e%60).toString().padStart(2,"0");return t?`${t}:${i}:${r}`:`${i}:${r}`}static getWindDirection(e){return e>=0&&e<11.25?"N":e>=11.25&&e<33.75?"NNE":e>=33.75&&e<56.25?"NE":e>=56.25&&e<78.75?"ENE":e>=78.75&&e<101.25?"E":e>=101.25&&e<123.75?"ESE":e>=123.75&&e<146.25?"SE":e>=146.25&&e<168.75?"SSE":e>=168.75&&e<191.25?"S":e>=191.25&&e<213.75?"SSW":e>=213.75&&e<236.25?"SW":e>=236.25&&e<258.75?"WSW":e>=258.75&&e<281.25?"W":e>=281.25&&e<303.75?"WNW":e>=303.75&&e<326.25?"NW":e>=326.25&&e<348.75?"NNW":"N"}static padding(e){return typeof e=="string"?e.length<2?`0${e}`:e:e<10?`0${e}`:e.toString()}static setDataFormat(e){e&&(m.dateFormat=e.toUpperCase().split(/[.-/]/),m.dateFormat.splice(m.dateFormat.indexOf("YYYY"),1))}static date2string(e){if(typeof e=="string"){if(e=e.trim(),!e)return"";if(e.match(/^[\w\s]+$/))return e;const i=e.match(/(\d{1,4})[-./](\d{1,2})[-./](\d{1,4})/);if(i){const r=[parseInt(i[1],10),parseInt(i[2],10),parseInt(i[3],10)],o=r.find(n=>n>31);if(o!==void 0){r.splice(r.indexOf(o),1);const n=r.find(M=>M>12);n?(r.splice(r.indexOf(n),1),e=new Date(o,r[0]-1,n)):m.dateFormat[0][0]==="M"&&m.dateFormat[1][0]==="D"?(e=new Date(o,r[0]-1,r[1]),Math.abs(e.getTime()-Date.now())>36e5*24*10&&(e=new Date(o,r[1]-1,r[0]))):m.dateFormat[0][0]==="D"&&m.dateFormat[1][0]==="M"?(e=new Date(o,r[1]-1,r[0]),Math.abs(e.getTime()-Date.now())>36e5*24*10&&(e=new Date(o,r[0]-1,r[1]))):e=new Date(e)}else e=new Date(e)}else e=new Date(e)}else e=new Date(e);let t=D.t(`ra_dow_${Bh[e.getDay()]}`).replace("ra_dow_","");return t+=`. ${e.getDate()} ${D.t(`ra_month_${Rh[e.getMonth()]}`).replace("ra_month_","")}`,t}static renderTextWithA(e){let t=e.match(/||[^<]+<\/b>|[^<]+<\/i>/);if(t){const i=[];let r=1;do{const o=e.substring(0,t.index);if(e=e.substring((t.index||0)+t[0].length),o&&i.push(a.createElement("span",{key:`a${r++}`},o)),t[0].startsWith(""))i.push(a.createElement("b",{key:`a${r++}`},t[0].substring(3,t[0].length-4)));else if(t[0].startsWith(""))i.push(a.createElement("i",{key:`a${r++}`},t[0].substring(3,t[0].length-4)));else if(t[0].startsWith("([^<]*)||[^<]+<\/b>|[^<]+<\/i>/):null,!t&&e&&i.push(a.createElement("span",{key:`a${r++}`},e))}while(t);return i}return e}static getSmartName(e,t,i,r){var n,M;if(!t){if(!r)return!e.common||e&&!e.common?e.smartName:e.common.smartName;if(e&&!e.common)return e.smartName;const c=e;return(n=c==null?void 0:c.common)!=null&&n.custom&&c.common.custom[i]?c.common.custom[i].smartName:void 0}if(!r)return e[t].common.smartName;const o=e[t];return(M=o==null?void 0:o.common)!=null&&M.custom&&o.common.custom[i]&&o.common.custom[i].smartName||null}static getSmartNameFromObj(e,t,i){var o,n;if(!i)return!e.common||e&&!e.common?e.smartName:e.common.smartName;if(e&&!e.common)return e.smartName;const r=(n=(o=e==null?void 0:e.common)==null?void 0:o.custom)==null?void 0:n[t];return r?r.smartName:void 0}static enableSmartName(e,t,i){const r=e;i?(r.common.custom||={},r.common.custom[t]||={},r.common.custom[t].smartName={}):r.common.smartName={}}static removeSmartName(e,t,i){var o,n;const r=e;i?(n=(o=r==null?void 0:r.common)==null?void 0:o.custom)!=null&&n[t]&&(r.common.custom[t]=null):r.common.smartName=null}static updateSmartName(e,t,i,r,o,n){var l,N;const M=D.getLanguage(),c=e;if(typeof c.common.smartName=="string"){const u=c.common.smartName;c.common.smartName={},c.common.smartName[M]=u}if((l=c.native)!=null&&l.byON){delete c.native.byON;let u=c.common.smartName;u&&typeof u!="object"&&(u={en:u,[M]:u}),c.common.smartName=u}if(r!==void 0&&(n?(c.common.custom||={},c.common.custom[o]||={},c.common.custom[o].smartName||={},r?c.common.custom[o].smartName.smartType=r:delete c.common.custom[o].smartName.smartType):(c.common.smartName||={},r?c.common.smartName.smartType=r:delete c.common.smartName.smartType)),i!==void 0&&(n?(c.common.custom||={},c.common.custom[o]||={},c.common.custom[o].smartName||={},c.common.custom[o].smartName.byON=i):(c.common.smartName||={},c.common.smartName.byON=i)),t!==void 0){let u;if(n?(c.common.custom||={},c.common.custom[o]||={},c.common.custom[o].smartName||={},u=c.common.custom[o].smartName):(c.common.smartName||={},u=c.common.smartName),u[M]=t,u&&(!u[M]||u[M]===c.common.name&&!c.common.role)){delete u[M];let L=!0;for(const g in u)if(Object.prototype.hasOwnProperty.call(u,g)){L=!1;break}if(L)if(n&&((N=c.common.custom)!=null&&N[o]))c.common.custom[o].smartName.byON===void 0?delete c.common.custom[o]:(delete c.common.custom[o].en,delete c.common.custom[o].de,delete c.common.custom[o].ru,delete c.common.custom[o].nl,delete c.common.custom[o].pl,delete c.common.custom[o].it,delete c.common.custom[o].fr,delete c.common.custom[o].pt,delete c.common.custom[o].es,delete c.common.custom[o].uk,delete c.common.custom[o]["zh-cn"]);else if(c.common.smartName&&c.common.smartName.byON!==void 0){const g=c.common.smartName;delete g.en,delete g.de,delete g.ru,delete g.nl,delete g.pl,delete g.it,delete g.fr,delete g.pt,delete g.es,delete g.uk,delete g["zh-cn"]}else c.common.smartName=null}}}static updateSmartNameEx(e,t){var o,n,M,c;const i=D.getLanguage(),r=e;if(typeof r.common.smartName=="string"){const l=r.common.smartName;r.common.smartName={},r.common.smartName[i]=l}if((o=r.native)!=null&&o.byON){delete r.native.byON;let l=r.common.smartName;l&&typeof l!="object"&&(l={en:l,[i]:l}),r.common.smartName=l}if(t.smartType!==void 0&&(t.noCommon?(r.common.custom||={},r.common.custom[t.instanceId]||={},r.common.custom[t.instanceId].smartName||={},t.smartType?r.common.custom[t.instanceId].smartName.smartType=t.smartType:delete r.common.custom[t.instanceId].smartName.smartType):(r.common.smartName||={},t.smartType?r.common.smartName.smartType=t.smartType:delete r.common.smartName.smartType)),t.byON!==void 0&&(t.noCommon?(r.common.custom||={},r.common.custom[t.instanceId]||={},r.common.custom[t.instanceId].smartName||={},r.common.custom[t.instanceId].smartName.byON=t.byON):(r.common.smartName||={},r.common.smartName.byON=t.byON)),t.noAutoDetect!==void 0&&(t.noCommon?t.noAutoDetect?(r.common.custom||={},r.common.custom[t.instanceId]||={},r.common.custom[t.instanceId].smartName||={},r.common.custom[t.instanceId].smartName.noAutoDetect=t.noAutoDetect):(M=(n=r.common.custom)==null?void 0:n[t.instanceId])!=null&&M.smartName&&delete r.common.custom[t.instanceId].smartName.noAutoDetect:!t.noAutoDetect&&r.common.smartName?delete r.common.smartName.noAutoDetect:(r.common.smartName||={},r.common.smartName.noAutoDetect=t.noAutoDetect)),t.smartName!==void 0){let l;if(t.noCommon?(r.common.custom||={},r.common.custom[t.instanceId]||={},r.common.custom[t.instanceId].smartName||={},l=r.common.custom[t.instanceId].smartName):(r.common.smartName||={},l=r.common.smartName),l[i]=t.smartName,l&&(!l[i]||l[i]===r.common.name&&!r.common.role)){delete l[i];let N=!0;for(const u in l)if(Object.prototype.hasOwnProperty.call(l,u)){N=!1;break}if(N)if(t.noCommon&&((c=r.common.custom)!=null&&c[t.instanceId]))r.common.custom[t.instanceId].smartName.byON===void 0?delete r.common.custom[t.instanceId]:(delete r.common.custom[t.instanceId].en,delete r.common.custom[t.instanceId].de,delete r.common.custom[t.instanceId].ru,delete r.common.custom[t.instanceId].nl,delete r.common.custom[t.instanceId].pl,delete r.common.custom[t.instanceId].it,delete r.common.custom[t.instanceId].fr,delete r.common.custom[t.instanceId].pt,delete r.common.custom[t.instanceId].es,delete r.common.custom[t.instanceId].uk,delete r.common.custom[t.instanceId]["zh-cn"]);else if(r.common.smartName&&r.common.smartName.byON!==void 0){const u=r.common.smartName;delete u.en,delete u.de,delete u.ru,delete u.nl,delete u.pl,delete u.it,delete u.fr,delete u.pt,delete u.es,delete u.uk,delete u["zh-cn"]}else r.common.smartName=null}}}static disableSmartName(e,t,i){const r=e;i?(r.common.custom||={},r.common.custom[t]||={},r.common.custom[t].smartName=!1):r.common.smartName=!1}static copyToClipboard(e,t){return t&&(t.stopPropagation(),t.preventDefault()),E4(e)}static getFileExtension(e){const t=(e||"").lastIndexOf(".");return t!==-1?e.substring(t+1).toLowerCase():null}static formatBytes(e){if(Math.abs(e)<1024)return`${e} B`;const t=["KB","MB","GB"];let i=-1;do e/=1024,++i;while(Math.abs(e)>=1024&&i186?`#000000${i||""}`:`#FFFFFF${i||""}`;const M=(255-r).toString(16),c=(255-o).toString(16),l=(255-n).toString(16);return`#${M.padStart(2,"0")}${c.padStart(2,"0")}${l.padStart(2,"0")}${i||""}`}static color2rgb(e){if(e==null||e===""||typeof e!="string")return!1;if(e.startsWith("rgba")){const t=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+),\s*([.\d]+)\)/);t&&(e=parseInt(t[1],10).toString(16).padStart(2,"0")+parseInt(t[2],10).toString(16).padStart(2,"0")+parseInt(t[2],10).toString(16).padStart(2,"0"))}else if(e.startsWith("rgb")){const t=e.match(/rgb?\((\d+),\s*(\d+),\s*(\d+)\)/);t&&(e=parseInt(t[1],10).toString(16).padStart(2,"0")+parseInt(t[2],10).toString(16).padStart(2,"0")+parseInt(t[2],10).toString(16).padStart(2,"0"))}else e.startsWith("#")&&(e=e.slice(1));return e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),e.length!==6&&e.length!==8?(console.warn(`Cannot invert color: ${e}`),!1):[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)]}static rgb2lab(e){let t=e[0]/255,i=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,i=i>.04045?((i+.055)/1.055)**2.4:i/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;let o=(t*.4124+i*.3576+r*.1805)/.95047,n=t*.2126+i*.7152+r*.0722,M=(t*.0193+i*.1192+r*.9505)/1.08883;return o=o>.008856?o**.33333333:7.787*o+.137931,n=n>.008856?n**.33333333:7.787*n+.137931,M=M>.008856?M**.33333333:7.787*M+.137931,[116*n-16,500*(o-n),200*(n-M)]}static colorDistance(e,t){const i=m.color2rgb(e),r=m.color2rgb(t);if(!i||!r)return 0;const o=m.rgb2lab(i),n=m.rgb2lab(r),M=o[0]-n[0],c=o[1]-n[1],l=o[2]-n[2],N=Math.sqrt(o[1]*o[1]+o[2]*o[2]),u=Math.sqrt(n[1]*n[1]+n[2]*n[2]),L=N-u;let g=c*c+l*l-L*L;g=g<0?0:Math.sqrt(g);const j=1+.045*N,y=1+.015*N,T=M,d=L/j,I=g/y,w=T*T+d*d+I*I;return w<0?0:w}static _toVal(e){let t,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e))for(let r=0;r{if(i=i.trim(),i){const r=i.split("="),o=decodeURIComponent(r[0]).trim();if(r.length>1){const n=decodeURIComponent(r[1]);if(n==="true")t[o]=!0;else if(n==="false")t[o]=!1;else{const M=parseFloat(n);M.toString()===n?t[o]=M:t[o]=n}}else t[o]=!0}}),t}static getParentId(e){const t=(e||"").toString().split(".");return t.length>1?(t.pop(),t.join(".")):null}static formatDate(e,t){if(!e)return"";let i;const r=(e.getMonth()+1).toString().padStart(2,"0"),o=e.getDate().toString().padStart(2,"0");return t==="MM/DD/YYYY"?i=`${r}/${o}/${e.getFullYear()}`:i=`${e.getFullYear()}-${r}-${o}`,i+=` ${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}:${e.getSeconds().toString().padStart(2,"0")}.${e.getMilliseconds().toString().padStart(3,"0")}`,i}static formatTime(e){if(e){e=Math.round(e);const t=Math.floor(e/(3600*24)),i=Math.floor(e%(3600*24)/3600),r=Math.floor(e%3600/60),o=e%60;return t?`${t}.${i.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`:i?`${i}:${r.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`:`0:${r.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`}return"0:00:00"}static MDtext2link(e){const t=e.match(/\d+\.\)\s/);return t&&(e=e.replace(t[0],t[0].replace(/\s/," "))),e.replace(/[^a-zA-Zа-яА-Я0-9]/g,"").trim().replace(/\s/g,"").toLowerCase()}static openLink(e,t){e=e.replace(/\/\/([0-9a-f]*:[0-9a-f]*:[0-9a-f]*:[0-9a-f]*:[0-9a-f]*:[0-9a-f]*)(:\d+)?\//i,"//[$1]$2/"),t==="this"?window.location.href=e:window.open(e,t||"_blank")}static MDgetTitle(e){var o;const t=m.MDextractHeader(e),i=t.header;let r=t.body;if(!i.title){r=r.replace(/{[^}]*}/g,""),r=r.trim();const n=r.replace(/\r/g,"").split(` +}`;function Uh(s){const e=s.themeType||"dark",t=s.size||270,i=t*1.5,r=t*14/270,o=t*280/270;return a.useEffect(()=>{if(!window.document.getElementById(Wu)){const n=window.document.createElement("style");n.setAttribute("id",Wu),n.innerHTML=bh,window.document.head.appendChild(n)}},[]),a.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",top:0,left:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundImage:s.backgroundImage&&s.backgroundImage!=="@@loginBackgroundImage@@"?s.backgroundImage:window.loadingBackgroundImage&&window.loadingBackgroundImage!=="@@loginBackgroundImage@@"?`url(${window.loadingBackgroundImage})`:void 0,backgroundColor:s.backgroundColor&&s.backgroundColor!=="@@loginBackgroundColor@@"?s.backgroundColor:window.loadingBackgroundColor&&window.loadingBackgroundColor!=="@@loginBackgroundColor@@"?window.loadingBackgroundColor:e==="dark"?"#000":"#FFF",backgroundSize:"cover"}},a.createElement("div",{style:{position:"relative",width:i,height:i,display:"flex",justifyContent:"center",alignItems:"center"}},a.createElement("div",{style:{position:"absolute",top:-r,left:-r,right:-r,bottom:-r,border:`${r}px solid transparent`,borderTop:`${r}px solid rgba(219, 10, 51, 0.50)`,borderRadius:"50%",animation:"loaderHA-spin 3.6s linear infinite"}}),a.createElement("div",{style:{position:"absolute",width:"100%",height:"100%",border:`${r}px solid transparent`,borderTop:`${r}px solid rgba(219, 10, 51, 0.75)`,borderRadius:"50%",animation:"loaderHA-spin 2.2s linear infinite"}}),a.createElement("div",{style:{width:t,height:t,zIndex:1,display:"flex",justifyContent:"center",alignItems:"center"}},a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 69.6 148.1",style:{width:"100%",height:"100%"}},a.createElement("path",{fill:"#db0a33",d:"M69.5,100.6c0-.4,0-.8-.2-1.1v-.7c-.2-.4-.3-.8-.5-1.2,0-.2-.2-.5-.3-.7,0,0,0-.2,0-.2,0-.2,0-.3-.2-.5l-.4-.7-.4-.6c-1-1.6-2.4-3-4.2-4.3-.3-.2-.6-.4-.9-.6,0,0-.2,0-.3-.2-.3-.2-.6-.3-.9-.5-.2,0-.3-.2-.5-.3-.3-.2-.6-.3-.9-.5,0,0-.2,0-.3-.2-1-2.7-2.4-4.9-3.8-6.7h0c2.5,0,6.6-.3,7.5-3,3.5-3,2.5-9.7,2.5-10,0-.6-.2-1.1-.4-1.7h0v-.3c.5-3-.4-7.1-.5-7.7h0l-.3-1.1c0-.3-.2-.7-.4-1,0-.4-.3-.7-.4-1,0-.3-.3-.7-.5-1s-.4-.7-.6-1c-.2-.3-.4-.6-.6-.9l-.4-.4-.4-.4-.4-.4c0,0-.3-.3-.5-.4-.3-.2-.6-.4-1-.6-.2,0-.4-.2-.5-.2-.2,0-.4,0-.6-.2-.2,0-.4,0-.6,0h-1.8c-.4,0-.8,0-1.1.2-.4,0-.7.2-1.1.4h0c-1.6-.2-2.6-1-3.1-1.7h0c2-.9,3.5-1.9,4.6-3,2.6-2.2,4-5.1,4.7-7.2,3.4-1.1,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2ZM52.6,131.9c-.3.4-.7.9-1.2,1.6-1-.6-2.7-2.2-3.3-4.3,0-.2,0-.3-.2-.5-1.1-6.9-2.6-9.7-3.2-10.6-1-3.7-1.7-7.4-1.3-9.6,0,0,3.6,8.2,6.4,10,0,0,3.7,8.5,4.5,9.9.6,1-.9,2.3-1.7,3.5ZM63.6,102.7h0v.2h0v.9c0,0-.3.4-.3.4,0,0,0,.2,0,.3v.2h0v.2h0l-.2.2c-.3.6-.8,1.1-1.3,1.5h0c-.3-2.4-.6-5.1-.8-8.2.2-.5.3-1.1.4-1.7l.2.2c.2.2.4.4.5.6.2.2.3.4.5.7,0,.2.3.4.4.7h0c0,.3.2.5.3.7,0,.2.2.5.2.7h0v.3c0,.2,0,.4,0,.6v.7h0v.7h0Z"}))),a.createElement("div",{style:{position:"absolute",width:o,zIndex:2,top:"57.5%",left:"50%",transform:"translate(-50%, -155%)"}},a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 7152 512",width:"100%",height:"auto"},a.createElement("path",{fill:"#fff",d:"M4566 0h1053v5h25c2 5 2 5 1 8h16q3 3 2 7l3 1 4 1 2 7h2l12 1q3 1 2 6v3h7q3 4 2 10v6h3l4 1 1 8 3-1 5 2 1 7 7 1 1 14v2h3q3 0 5 2l1 9v22l3 1 4 1 1 7v41q0 3-3 5l-5 1v26q1 3-2 5h-8l1 2v8l-1 8h-8v16q-3 3-7 2l-1 3-2 5h-6v6l-1 11h-7l-1 8-10 1h-6l-1 3-1 4-7 2v3l-2 4h-16l1 2-2 6h-15v3l-3 6-10 1h-11l-10 2q1 3-2 5l-8 1h-796l-4-1-2-7h-2q-7 0-14-2v-8h-8l-1-7h-3l-4-1q-2-5-2-10v-62l2-6 7-1v-3l2-4h7v-8l5-1h3v-3l1-5q3-2 8-1h57l140-1h602v-3l2-4h7l1-8 8-1v-31l-7-1q-2-2-2-5v-2l-3-1q-5 0-6-4v-5h-3l-11 1-2-2v-7h-917l-1 8-23 1h-14l-5-1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v-11q0-3 2-5h6V167l1-8q4-4 8-3v-44l1-5h8V84l1-3h7V66l8-4v-2l3-5 6-1v-9l1-6h8v-8q8-3 15-2l1-3 3-5h6v-3q-1-3 2-5h15v-3q-1-3 2-5h24z"})))))}function $h(s){const e=window.vendorPrefix;return e==="PT"?a.createElement(Qh,{themeType:s.themeType}):e==="MV"?a.createElement(Eh,{themeType:s.themeType}):e==="NW"?a.createElement(_h,{themeType:"dark"}):e==="HA"?a.createElement(Uh,{themeType:"dark"}):e&&e!=="@@vendorPrefix@@"?a.createElement(Sh,{themeType:s.themeType}):a.createElement(vh,{themeType:s.themeType})}class nr extends De{onHashChangedBound;constructor(e){super(e),this.onHashChangedBound=this.onHashChanged.bind(this)}componentDidMount(){window.addEventListener("hashchange",this.onHashChangedBound)}componentWillUnmount(){window.removeEventListener("hashchange",this.onHashChangedBound)}onHashChanged(){}static getLocation(){let e=window.location.hash;e=e.replace(/^#/,"");const t=e.split("/").map(i=>{try{return i?decodeURIComponent(i):""}catch{return console.error(`Router: Cannot decode ${i}`),i}});return{tab:t[0]||"",dialog:t[1]||"",id:t[2]||"",arg:t[3]||""}}static doNavigate(e,t,i,r){let o="";const n=nr.getLocation();r!==void 0&&!i&&(i=n.id),i&&!t&&(t=n.dialog),(t&&!e||e===null)&&(e=n.tab),e&&(o=`#${e}`,t&&(o+=`/${t}`,i&&(o+=`/${i}`,r!==void 0&&(o+=`/${r}`)))),window.location.hash!==o&&(window.location.hash=o)}}function Ph(){const s=document.getSelection();if(!(s!=null&&s.rangeCount))return()=>{};let e=document.activeElement;const t=[];for(let i=0;i{s.type==="Caret"&&s.removeAllRanges(),s.rangeCount||t.forEach(i=>s.addRange(i)),e&&e.focus()}}const Ju={"text/plain":"Text","text/html":"Url",default:"Text"},Wh="Copy to clipboard: #{key}, Enter";function Jh(s){const e=`${/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl"}+C`;return s.replace(/#{\s*key\s*}/g,e)}function E4(s,e){let t,i,r,o,n=!1;e=e||{};const M=e.debug||!1;try{if(t=Ph(),i=document.createRange(),r=document.getSelection(),o=document.createElement("span"),o.textContent=s,o.ariaHidden="true",o.style.all="unset",o.style.position="fixed",o.style.top="0px",o.style.clip="rect(0, 0, 0, 0)",o.style.whiteSpace="pre",o.style.userSelect="text",o.addEventListener("copy",l=>{var N,u,L,g;if(l.stopPropagation(),e!=null&&e.format)if(l.preventDefault(),typeof l.clipboardData>"u"){M&&console.warn("unable to use e.clipboardData"),M&&console.warn("trying IE specific stuff"),(N=window.clipboardData)==null||N.clearData();const j=Ju[e.format]||Ju.default;(u=window.clipboardData)==null||u.setData(j,s)}else(L=l.clipboardData)==null||L.clearData(),(g=l.clipboardData)==null||g.setData(e.format,s)}),document.body.appendChild(o),i.selectNodeContents(o),r==null||r.addRange(i),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");n=!0}catch(c){M&&console.error("unable to copy using execCommand: ",c),M&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",s),n=!0}catch(l){M&&console.error("unable to copy using clipboardData: ",l),M&&console.error("falling back to prompt");const N=Jh("message"in e?e.message||"":Wh);window.prompt(N,s)}}finally{r&&(i&&typeof r.removeRange=="function"?r.removeRange(i):r.removeAllRanges()),o&&document.body.removeChild(o),t&&t()}return n}class D{static translations={};static unknownTranslations=[];static lang=window.sysLang||"en";static _disableWarning=!1;static setLanguage(e){e&&(D.lang=e)}static extendTranslations(e,t){if(e.prefix){const i=e;if(typeof i.prefix=="string"){const r=i.prefix;delete i.prefix,Object.keys(i).forEach(o=>{const n=o,M={},c=i[n];Object.keys(c).forEach(l=>{l&&c&&(l.startsWith(r)?M[l]=c[l]:M[`${r}${l}`]=c[l])}),e[n]=M})}else console.warn("Found prefix in translations, but it is not a string")}try{if(!t)e.en&&e.de&&e.ru?Object.keys(e).forEach(i=>{const r=i;D.translations[r]||={},Object.assign(D.translations[r],e[r])}):Object.keys(e).forEach(i=>{const r=e[i];Object.keys(r).forEach(o=>{const n=o,M=D.translations[n];M?M[i]?M[i]!==r[n]&&console.warn(`Translation for word "${i}" in "${n}" was ignored: existing = "${M[i]}", new = ${r[n]}`):M[i]=r[n]:console.warn(`Used unknown language: ${n}`)})});else{D.translations[t]||console.warn(`Used unknown language: ${t}`),D.translations[t]||={};const i=D.translations[t];Object.keys(e).forEach(r=>{i[r]?i[r]!==e[r]&&console.warn(`Translation for word "${r}" in "${t}" was ignored: existing = "${i[r]}", new = ${e[r]}`):i[r]=e[r]})}}catch(i){console.error(`Cannot apply translations: ${i}`)}}static setTranslations(e){e&&(D.translations=e)}static getLanguage(){return D.lang}static t(e,...t){const i=D.translations[D.lang];if(i){const r=i[e];if(r)e=r;else if(D.unknownTranslations.includes(e)||(D.unknownTranslations.push(e),!D._disableWarning&&console.log(`Translate: ${e}`)),D.lang!=="en"&&D.translations.en){const o=D.translations.en[e];o&&(e=o)}}for(const r of t)e=e.replace("%s",r);return e}static i18nShow(e){const t={};e?typeof e=="string"?(D.unknownTranslations.forEach(i=>{i.startsWith(e)&&(t[i]=i.replace(e,""))}),console.log(JSON.stringify(t,null,2))):e&&typeof e=="object"&&(D.unknownTranslations.forEach(i=>{e.test(i)&&(t[i]=i)}),console.log(JSON.stringify(t,null,2))):(D.unknownTranslations.forEach(i=>t[i]=i),console.log(JSON.stringify(t,null,2)))}static disableWarning(e){D._disableWarning=!!e}}window.i18nShow=D.i18nShow;window.i18nDisableWarning=D.disableWarning;const Dt="material",Bh=["Su","Mo","Tu","We","Th","Fr","Sa"],Rh=["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Cn={0:"0x00 - good",1:"0x01 - general problem",2:"0x02 - no connection problem",16:"0x10 - substitute value from controller",32:"0x20 - substitute initial value",64:"0x40 - substitute value from device or instance",128:"0x80 - substitute value from sensor",17:"0x11 - general problem by instance",65:"0x41 - general problem by device",129:"0x81 - general problem by sensor",18:"0x12 - instance not connected",66:"0x42 - device not connected",130:"0x82 - sensor not connected",68:"0x44 - device reports error",132:"0x84 - sensor reports error"},Bu={JVBERi0:"pdf",R0lGODdh:"gif",R0lGODlh:"gif",iVBORw0KGgo:"png","/9j/":"jpg",PHN2Zw:"svg",Qk1:"bmp",AAABAA:"ico"};class m{static namespace=Dt;static INSTANCES="instances";static dateFormat=["DD","MM"];static FORBIDDEN_CHARS=/[^._\-/ :!#$%&()+=@^{}|~\p{Ll}\p{Lu}\p{Nd}]+/gu;static CapitalWords(e){return(e||"").split(/[\s_]/).filter(t=>t).map(t=>t?t[0].toUpperCase()+t.substring(1).toLowerCase():"").join(" ")}static formatSeconds(e){const t=Math.floor(e/86400);e%=3600*24;const i=Math.floor(e/3600).toString().padStart(2,"0");e%=3600;const r=Math.floor(e/60).toString().padStart(2,"0");e%=60;const o=Math.floor(e).toString().padStart(2,"0");let n="";return t&&(n+=`${t} ${D.t("ra_daysShortText")} `),n+=`${i}:${r}:${o}`,n}static getObjectName(e,t,i,r,o){var c;const n=e[t];let M;if(typeof i=="string"&&!r&&(r={language:i},i=null),r=r||{},r.language||(r.language=e["system.config"]&&e["system.config"].common&&e["system.config"].common.language||window.sysLang||"en"),i!=null&&i.name){const l=i.name;typeof l=="object"?M=r.language&&l[r.language]||l.en:M=l}else if(o&&((c=n==null?void 0:n.common)!=null&&c.desc)){const l=n.common.desc;typeof l=="object"?M=r.language&&l[r.language]||l.en||l.de||l.ru||"":M=l,M=(M||"").toString().replace(/[_.]/g," "),M===M.toUpperCase()&&(M=M[0]+M.substring(1).toLowerCase())}else if(!o&&(n!=null&&n.common)){const l=n.common.name||n.common.desc;l&&typeof l=="object"?M=r.language&&l[r.language]||l.en||l.de||l.ru||"":M=l,M=(M||"").toString().replace(/[_.]/g," "),M===M.toUpperCase()&&(M=M[0]+M.substring(1).toLowerCase())}else{const l=t.lastIndexOf(".");M=t.substring(l+1).replace(/[_.]/g," "),M=m.CapitalWords(M)}return(M==null?void 0:M.trim())||""}static getObjectNameFromObj(e,t,i,r,o){var c,l;const n=e;let M=(e==null?void 0:e._id)||"";if(typeof t=="string"&&!i&&(i={language:t},t=null),i=i||{},t!=null&&t.name){const N=t.name;typeof N=="object"?M=i.language&&N[i.language]||N.en:M=N}else if(r&&((c=n==null?void 0:n.common)!=null&&c.desc)){const N=n.common.desc;typeof N=="object"?M=i.language&&N[i.language]||N.en:M=N,M=(M||"").toString().replace(/[_.]/g," "),M===M.toUpperCase()&&(M=M[0]+M.substring(1).toLowerCase())}else if(!r&&((l=n==null?void 0:n.common)!=null&&l.name)){let N=n.common.name;!N&&n.common.desc&&(N=n.common.desc),typeof N=="object"?M=i.language&&N[i.language]||N.en:M=N,M=(M||"").toString().replace(/[_.]/g," "),M===M.toUpperCase()&&(M=M[0]+M.substring(1).toLowerCase())}return o?M:M.trim()}static getSettingsOrder(e,t,i){let r;e&&Object.prototype.hasOwnProperty.call(e,"common")?r=e.common:r=e;let o;if(r!=null&&r.custom){o=r.custom[Dt];const n=i.user||"admin";if(o&&o[n]){if(t){if(o[n].subOrder&&o[n].subOrder[t])return JSON.parse(JSON.stringify(o[n].subOrder[t]))}else if(o[n].order)return JSON.parse(JSON.stringify(o[n].order))}}return null}static getSettingsCustomURLs(e,t,i){let r;e&&Object.prototype.hasOwnProperty.call(e,"common")?r=e.common:r=e;let o;if(r!=null&&r.custom){o=r.custom[Dt];const n=i.user||"admin";if(o&&o[n]){if(t){if(o[n].subURLs&&o[n].subURLs[t])return JSON.parse(JSON.stringify(o[n].subURLs[t]))}else if(o[n].URLs)return JSON.parse(JSON.stringify(o[n].URLs))}}return null}static reorder(e,t,i){const r=Array.from(e),[o]=r.splice(t,1);return r.splice(i,0,o),r}static getSettings(e,t,i){let r;const o=(e==null?void 0:e._id)||(t==null?void 0:t.id);let n;if(e&&Object.prototype.hasOwnProperty.call(e,"common")?n=e.common:n=e,n!=null&&n.custom?(r=n.custom,r=r[Dt]&&r[Dt][t.user||"admin"]?JSON.parse(JSON.stringify(r[Dt][t.user||"admin"])):{enabled:!0}):r={enabled:i===void 0?!0:i,useCustom:!1},Object.prototype.hasOwnProperty.call(r,"enabled")||(r.enabled=i===void 0?!0:i),t&&(!r.name&&t.name&&(r.name=t.name),!r.icon&&t.icon&&(r.icon=t.icon),!r.color&&t.color&&(r.color=t.color)),n&&(!r.color&&n.color&&(r.color=n.color),!r.icon&&n.icon&&(r.icon=n.icon),!r.name&&n.name&&(r.name=n.name)),typeof r.name=="object"&&(r.name=t.language&&r.name[t.language]||r.name.en,r.name=(r.name||"").toString().replace(/_/g," "),r.name===r.name.toUpperCase()&&(r.name=r.name[0]+r.name.substring(1).toLowerCase())),!r.name&&o){const M=o.lastIndexOf(".");r.name=o.substring(M+1).replace(/[_.]/g," "),r.name=(r.name||"").toString().replace(/_/g," "),r.name=m.CapitalWords(r.name)}return r}static setSettings(e,t,i){if(e){e.common=e.common||{},e.common.custom=e.common.custom||{},e.common.custom[Dt]=e.common.custom[Dt]||{},e.common.custom[Dt][i.user||"admin"]=t;const r=e.common.custom[Dt][i.user||"admin"];return r.useCommon&&(r.color!==void 0&&(e.common.color=r.color,delete r.color),r.icon!==void 0&&(e.common.icon=r.icon,delete r.icon),r.name!==void 0&&(typeof e.common.name!="object"&&i.language?e.common.name={[i.language]:r.name}:typeof e.common.name=="object"&&i.language&&(e.common.name[i.language]=r.name),delete r.name)),!0}return!1}static getIcon(e,t){return e!=null&&e.icon?e.icon.length<=2?a.createElement("span",{style:t||{}},e.icon):e.icon.startsWith("data:image")?a.createElement("img",{alt:e.name,src:e.icon,style:t||{}}):a.createElement("img",{alt:e.name,src:(e.prefix||"")+e.icon,style:t}):null}static getObjectIcon(e,t){var i;if(typeof e=="object"&&(t=e,e=t==null?void 0:t._id),(i=t==null?void 0:t.common)!=null&&i.icon){let r=t.common.icon;if(typeof r=="string"&&r.length<=2||r.startsWith("data:image"))return r;const o=e.split(".");return o[0]==="system"?r=`adapter/${o[2]}${r.startsWith("/")?"":"/"}${r}`:r=`adapter/${o[0]}${r.startsWith("/")?"":"/"}${r}`,window.location.pathname.match(/adapter\/[^/]+\/[^/]+\.html/)?r=`../../${r}`:window.location.pathname.match(/material\/[.\d]+/)?r=`../../${r}`:window.location.pathname.match(/material\//)&&(r=`../${r}`),r}return null}static splitCamelCase(e){return e?m.CapitalWords(e):""}static isUseBright(e,t){if(!e)return t===void 0?!0:t;e=e.toString(),e.startsWith("#")&&(e=e.slice(1));let i,r,o;const n=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);if(n&&n.length===4)i=parseInt(n[1],10),r=parseInt(n[2],10),o=parseInt(n[3],10);else{if(e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),e.length===8)e=e.substring(0,6);else if(e.length!==6)return!1;i=parseInt(e.slice(0,2),16),r=parseInt(e.slice(2,4),16),o=parseInt(e.slice(4,6),16)}return i*.299+r*.587+o*.114<=186}static getTimeString(e){if(e=parseFloat(e),Number.isNaN(e))return"--:--";const t=Math.floor(e/3600),i=Math.floor(e%3600/60).toString().padStart(2,"0"),r=(e%60).toString().padStart(2,"0");return t?`${t}:${i}:${r}`:`${i}:${r}`}static getWindDirection(e){return e>=0&&e<11.25?"N":e>=11.25&&e<33.75?"NNE":e>=33.75&&e<56.25?"NE":e>=56.25&&e<78.75?"ENE":e>=78.75&&e<101.25?"E":e>=101.25&&e<123.75?"ESE":e>=123.75&&e<146.25?"SE":e>=146.25&&e<168.75?"SSE":e>=168.75&&e<191.25?"S":e>=191.25&&e<213.75?"SSW":e>=213.75&&e<236.25?"SW":e>=236.25&&e<258.75?"WSW":e>=258.75&&e<281.25?"W":e>=281.25&&e<303.75?"WNW":e>=303.75&&e<326.25?"NW":e>=326.25&&e<348.75?"NNW":"N"}static padding(e){return typeof e=="string"?e.length<2?`0${e}`:e:e<10?`0${e}`:e.toString()}static setDataFormat(e){e&&(m.dateFormat=e.toUpperCase().split(/[.-/]/),m.dateFormat.splice(m.dateFormat.indexOf("YYYY"),1))}static date2string(e){if(typeof e=="string"){if(e=e.trim(),!e)return"";if(e.match(/^[\w\s]+$/))return e;const i=e.match(/(\d{1,4})[-./](\d{1,2})[-./](\d{1,4})/);if(i){const r=[parseInt(i[1],10),parseInt(i[2],10),parseInt(i[3],10)],o=r.find(n=>n>31);if(o!==void 0){r.splice(r.indexOf(o),1);const n=r.find(M=>M>12);n?(r.splice(r.indexOf(n),1),e=new Date(o,r[0]-1,n)):m.dateFormat[0][0]==="M"&&m.dateFormat[1][0]==="D"?(e=new Date(o,r[0]-1,r[1]),Math.abs(e.getTime()-Date.now())>36e5*24*10&&(e=new Date(o,r[1]-1,r[0]))):m.dateFormat[0][0]==="D"&&m.dateFormat[1][0]==="M"?(e=new Date(o,r[1]-1,r[0]),Math.abs(e.getTime()-Date.now())>36e5*24*10&&(e=new Date(o,r[0]-1,r[1]))):e=new Date(e)}else e=new Date(e)}else e=new Date(e)}else e=new Date(e);let t=D.t(`ra_dow_${Bh[e.getDay()]}`).replace("ra_dow_","");return t+=`. ${e.getDate()} ${D.t(`ra_month_${Rh[e.getMonth()]}`).replace("ra_month_","")}`,t}static renderTextWithA(e){let t=e.match(/||[^<]+<\/b>|[^<]+<\/i>/);if(t){const i=[];let r=1;do{const o=e.substring(0,t.index);if(e=e.substring((t.index||0)+t[0].length),o&&i.push(a.createElement("span",{key:`a${r++}`},o)),t[0].startsWith(""))i.push(a.createElement("b",{key:`a${r++}`},t[0].substring(3,t[0].length-4)));else if(t[0].startsWith(""))i.push(a.createElement("i",{key:`a${r++}`},t[0].substring(3,t[0].length-4)));else if(t[0].startsWith("([^<]*)||[^<]+<\/b>|[^<]+<\/i>/):null,!t&&e&&i.push(a.createElement("span",{key:`a${r++}`},e))}while(t);return i}return e}static getSmartName(e,t,i,r){var n,M;if(!t){if(!r)return!e.common||e&&!e.common?e.smartName:e.common.smartName;if(e&&!e.common)return e.smartName;const c=e;return(n=c==null?void 0:c.common)!=null&&n.custom&&c.common.custom[i]?c.common.custom[i].smartName:void 0}if(!r)return e[t].common.smartName;const o=e[t];return(M=o==null?void 0:o.common)!=null&&M.custom&&o.common.custom[i]&&o.common.custom[i].smartName||null}static getSmartNameFromObj(e,t,i){var o,n;if(!i)return!e.common||e&&!e.common?e.smartName:e.common.smartName;if(e&&!e.common)return e.smartName;const r=(n=(o=e==null?void 0:e.common)==null?void 0:o.custom)==null?void 0:n[t];return r?r.smartName:void 0}static enableSmartName(e,t,i){const r=e;i?(r.common.custom||={},r.common.custom[t]||={},r.common.custom[t].smartName={}):r.common.smartName={}}static removeSmartName(e,t,i){var o,n;const r=e;i?(n=(o=r==null?void 0:r.common)==null?void 0:o.custom)!=null&&n[t]&&(r.common.custom[t]=null):r.common.smartName=null}static updateSmartName(e,t,i,r,o,n){var l,N;const M=D.getLanguage(),c=e;if(typeof c.common.smartName=="string"){const u=c.common.smartName;c.common.smartName={},c.common.smartName[M]=u}if((l=c.native)!=null&&l.byON){delete c.native.byON;let u=c.common.smartName;u&&typeof u!="object"&&(u={en:u,[M]:u}),c.common.smartName=u}if(r!==void 0&&(n?(c.common.custom||={},c.common.custom[o]||={},c.common.custom[o].smartName||={},r?c.common.custom[o].smartName.smartType=r:delete c.common.custom[o].smartName.smartType):(c.common.smartName||={},r?c.common.smartName.smartType=r:delete c.common.smartName.smartType)),i!==void 0&&(n?(c.common.custom||={},c.common.custom[o]||={},c.common.custom[o].smartName||={},c.common.custom[o].smartName.byON=i):(c.common.smartName||={},c.common.smartName.byON=i)),t!==void 0){let u;if(n?(c.common.custom||={},c.common.custom[o]||={},c.common.custom[o].smartName||={},u=c.common.custom[o].smartName):(c.common.smartName||={},u=c.common.smartName),u[M]=t,u&&(!u[M]||u[M]===c.common.name&&!c.common.role)){delete u[M];let L=!0;for(const g in u)if(Object.prototype.hasOwnProperty.call(u,g)){L=!1;break}if(L)if(n&&((N=c.common.custom)!=null&&N[o]))c.common.custom[o].smartName.byON===void 0?delete c.common.custom[o]:(delete c.common.custom[o].en,delete c.common.custom[o].de,delete c.common.custom[o].ru,delete c.common.custom[o].nl,delete c.common.custom[o].pl,delete c.common.custom[o].it,delete c.common.custom[o].fr,delete c.common.custom[o].pt,delete c.common.custom[o].es,delete c.common.custom[o].uk,delete c.common.custom[o]["zh-cn"]);else if(c.common.smartName&&c.common.smartName.byON!==void 0){const g=c.common.smartName;delete g.en,delete g.de,delete g.ru,delete g.nl,delete g.pl,delete g.it,delete g.fr,delete g.pt,delete g.es,delete g.uk,delete g["zh-cn"]}else c.common.smartName=null}}}static updateSmartNameEx(e,t){var o,n,M,c;const i=D.getLanguage(),r=e;if(typeof r.common.smartName=="string"){const l=r.common.smartName;r.common.smartName={},r.common.smartName[i]=l}if((o=r.native)!=null&&o.byON){delete r.native.byON;let l=r.common.smartName;l&&typeof l!="object"&&(l={en:l,[i]:l}),r.common.smartName=l}if(t.smartType!==void 0&&(t.noCommon?(r.common.custom||={},r.common.custom[t.instanceId]||={},r.common.custom[t.instanceId].smartName||={},t.smartType?r.common.custom[t.instanceId].smartName.smartType=t.smartType:delete r.common.custom[t.instanceId].smartName.smartType):(r.common.smartName||={},t.smartType?r.common.smartName.smartType=t.smartType:delete r.common.smartName.smartType)),t.byON!==void 0&&(t.noCommon?(r.common.custom||={},r.common.custom[t.instanceId]||={},r.common.custom[t.instanceId].smartName||={},r.common.custom[t.instanceId].smartName.byON=t.byON):(r.common.smartName||={},r.common.smartName.byON=t.byON)),t.noAutoDetect!==void 0&&(t.noCommon?t.noAutoDetect?(r.common.custom||={},r.common.custom[t.instanceId]||={},r.common.custom[t.instanceId].smartName||={},r.common.custom[t.instanceId].smartName.noAutoDetect=t.noAutoDetect):(M=(n=r.common.custom)==null?void 0:n[t.instanceId])!=null&&M.smartName&&delete r.common.custom[t.instanceId].smartName.noAutoDetect:!t.noAutoDetect&&r.common.smartName?delete r.common.smartName.noAutoDetect:(r.common.smartName||={},r.common.smartName.noAutoDetect=t.noAutoDetect)),t.smartName!==void 0){let l;if(t.noCommon?(r.common.custom||={},r.common.custom[t.instanceId]||={},r.common.custom[t.instanceId].smartName||={},l=r.common.custom[t.instanceId].smartName):(r.common.smartName||={},l=r.common.smartName),l[i]=t.smartName,l&&(!l[i]||l[i]===r.common.name&&!r.common.role)){delete l[i];let N=!0;for(const u in l)if(Object.prototype.hasOwnProperty.call(l,u)){N=!1;break}if(N)if(t.noCommon&&((c=r.common.custom)!=null&&c[t.instanceId]))r.common.custom[t.instanceId].smartName.byON===void 0?delete r.common.custom[t.instanceId]:(delete r.common.custom[t.instanceId].en,delete r.common.custom[t.instanceId].de,delete r.common.custom[t.instanceId].ru,delete r.common.custom[t.instanceId].nl,delete r.common.custom[t.instanceId].pl,delete r.common.custom[t.instanceId].it,delete r.common.custom[t.instanceId].fr,delete r.common.custom[t.instanceId].pt,delete r.common.custom[t.instanceId].es,delete r.common.custom[t.instanceId].uk,delete r.common.custom[t.instanceId]["zh-cn"]);else if(r.common.smartName&&r.common.smartName.byON!==void 0){const u=r.common.smartName;delete u.en,delete u.de,delete u.ru,delete u.nl,delete u.pl,delete u.it,delete u.fr,delete u.pt,delete u.es,delete u.uk,delete u["zh-cn"]}else r.common.smartName=null}}}static disableSmartName(e,t,i){const r=e;i?(r.common.custom||={},r.common.custom[t]||={},r.common.custom[t].smartName=!1):r.common.smartName=!1}static copyToClipboard(e,t){return t&&(t.stopPropagation(),t.preventDefault()),E4(e)}static getFileExtension(e){const t=(e||"").lastIndexOf(".");return t!==-1?e.substring(t+1).toLowerCase():null}static formatBytes(e){if(Math.abs(e)<1024)return`${e} B`;const t=["KB","MB","GB"];let i=-1;do e/=1024,++i;while(Math.abs(e)>=1024&&i186?`#000000${i||""}`:`#FFFFFF${i||""}`;const M=(255-r).toString(16),c=(255-o).toString(16),l=(255-n).toString(16);return`#${M.padStart(2,"0")}${c.padStart(2,"0")}${l.padStart(2,"0")}${i||""}`}static color2rgb(e){if(e==null||e===""||typeof e!="string")return!1;if(e.startsWith("rgba")){const t=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+),\s*([.\d]+)\)/);t&&(e=parseInt(t[1],10).toString(16).padStart(2,"0")+parseInt(t[2],10).toString(16).padStart(2,"0")+parseInt(t[2],10).toString(16).padStart(2,"0"))}else if(e.startsWith("rgb")){const t=e.match(/rgb?\((\d+),\s*(\d+),\s*(\d+)\)/);t&&(e=parseInt(t[1],10).toString(16).padStart(2,"0")+parseInt(t[2],10).toString(16).padStart(2,"0")+parseInt(t[2],10).toString(16).padStart(2,"0"))}else e.startsWith("#")&&(e=e.slice(1));return e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),e.length!==6&&e.length!==8?(console.warn(`Cannot invert color: ${e}`),!1):[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)]}static rgb2lab(e){let t=e[0]/255,i=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,i=i>.04045?((i+.055)/1.055)**2.4:i/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;let o=(t*.4124+i*.3576+r*.1805)/.95047,n=t*.2126+i*.7152+r*.0722,M=(t*.0193+i*.1192+r*.9505)/1.08883;return o=o>.008856?o**.33333333:7.787*o+.137931,n=n>.008856?n**.33333333:7.787*n+.137931,M=M>.008856?M**.33333333:7.787*M+.137931,[116*n-16,500*(o-n),200*(n-M)]}static colorDistance(e,t){const i=m.color2rgb(e),r=m.color2rgb(t);if(!i||!r)return 0;const o=m.rgb2lab(i),n=m.rgb2lab(r),M=o[0]-n[0],c=o[1]-n[1],l=o[2]-n[2],N=Math.sqrt(o[1]*o[1]+o[2]*o[2]),u=Math.sqrt(n[1]*n[1]+n[2]*n[2]),L=N-u;let g=c*c+l*l-L*L;g=g<0?0:Math.sqrt(g);const j=1+.045*N,y=1+.015*N,T=M,d=L/j,I=g/y,w=T*T+d*d+I*I;return w<0?0:w}static _toVal(e){let t,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e))for(let r=0;r{if(i=i.trim(),i){const r=i.split("="),o=decodeURIComponent(r[0]).trim();if(r.length>1){const n=decodeURIComponent(r[1]);if(n==="true")t[o]=!0;else if(n==="false")t[o]=!1;else{const M=parseFloat(n);M.toString()===n?t[o]=M:t[o]=n}}else t[o]=!0}}),t}static getParentId(e){const t=(e||"").toString().split(".");return t.length>1?(t.pop(),t.join(".")):null}static formatDate(e,t){if(!e)return"";let i;const r=(e.getMonth()+1).toString().padStart(2,"0"),o=e.getDate().toString().padStart(2,"0");return t==="MM/DD/YYYY"?i=`${r}/${o}/${e.getFullYear()}`:i=`${e.getFullYear()}-${r}-${o}`,i+=` ${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}:${e.getSeconds().toString().padStart(2,"0")}.${e.getMilliseconds().toString().padStart(3,"0")}`,i}static formatTime(e){if(e){e=Math.round(e);const t=Math.floor(e/(3600*24)),i=Math.floor(e%(3600*24)/3600),r=Math.floor(e%3600/60),o=e%60;return t?`${t}.${i.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`:i?`${i}:${r.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`:`0:${r.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`}return"0:00:00"}static MDtext2link(e){const t=e.match(/\d+\.\)\s/);return t&&(e=e.replace(t[0],t[0].replace(/\s/," "))),e.replace(/[^a-zA-Zа-яА-Я0-9]/g,"").trim().replace(/\s/g,"").toLowerCase()}static openLink(e,t){e=e.replace(/\/\/([0-9a-f]*:[0-9a-f]*:[0-9a-f]*:[0-9a-f]*:[0-9a-f]*:[0-9a-f]*)(:\d+)?\//i,"//[$1]$2/"),t==="this"?window.location.href=e:window.open(e,t||"_blank")}static MDgetTitle(e){var o;const t=m.MDextractHeader(e),i=t.header;let r=t.body;if(!i.title){r=r.replace(/{[^}]*}/g,""),r=r.trim();const n=r.replace(/\r/g,"").split(` `);for(let M=0;M{if(!n.trim())return;const M=n.indexOf(":");if(M!==-1){const c=n.substring(0,M).trim();let l=n.substring(M+1).trim();l=l.replace(/^['"]|['"]$/g,""),l==="true"?t[c]=!0:l==="false"?t[c]=!1:parseFloat(l).toString()===t[c]?t[c]=parseFloat(l):t[c]=l}else t[n.trim()]=!0}),e=e.substring(i+7))}return{header:t,body:e}}static MDremoveDocsify(e){const t=e.match(/{docsify-[^}]*}/g);return t&&t.forEach(i=>e=e.replace(i,"")),e}static generateFile(e,t){const i=document.createElement("a");i.setAttribute("href",`data:application/json;charset=utf-8,${encodeURIComponent(JSON.stringify(t,null,2))}`),i.setAttribute("download",e),i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i)}static quality2text(e){const t=e&4294901760,i=Cn[e];let r;return i?r=[i]:e&1?r=[Cn[1],`0x${(e&65534).toString(16)}`]:e&2?r=[Cn[2],`0x${(e&65533).toString(16)}`]:r=[`0x${e.toString(16)}`],t&&r.push(`0x${(t>>16).toString(16).toUpperCase()}`),r}static clone(e){return JSON.parse(JSON.stringify(e))}static getStates(e){var r;const t=(r=e==null?void 0:e.common)==null?void 0:r.states;let i;if(t)if(typeof t=="string"&&t[0]==="{")try{i=JSON.parse(t)}catch{console.error(`Cannot parse states: ${t}`),i=null}else if(typeof t=="string"){const o=t.split(";");i={};for(let n=0;ni[n]=o):(e==null?void 0:e.common.type)==="string"?t.forEach(o=>i[o]=o):(e==null?void 0:e.common.type)==="boolean"&&(i.false=t[0],i.true=t[1])):typeof t=="object"&&(i=t);return i||null}static async getSvg(e){const i=await(await fetch(e)).blob();return new Promise(r=>{const o=new FileReader;o.onload=()=>{var n;return r(((n=o.result)==null?void 0:n.toString())||"")},o.readAsDataURL(i)})}static detectMimeType(e){const t=Object.keys(Bu).find(i=>e.startsWith(i));return t?Bu[t]:null}static isStableRepository(e){return!!(typeof e=="string"&&e.toLowerCase().startsWith("stable")||e&&typeof e!="string"&&e.find(t=>t.toLowerCase().startsWith("stable")))}static isStringInteger(e){return typeof e=="number"?Math.round(e)===e:parseInt(e,10).toString()===e}static isValidDate(e){return e instanceof Date&&!isNaN(e)}static getStyle(e,...t){const i={};for(let r=0;r{if(typeof t[r][o]=="function")i[o]=t[r][o](e);else if(typeof t[r][o]=="object"){const n=t[r][o];i[o]={},Object.keys(n).forEach(M=>{typeof n[M]=="function"?i[o][M]=n(e):(n[M]||n[M]===0)&&(i[o][M]=n[M])})}else(t[r][o]||t[r][o]===0)&&(i[o]=t[r][o])});return i}}const pn={buttonIcon:{marginRight:8}};class Fh extends a.Component{isIFrame;constructor(e){super(e);const t=e.newReact===void 0?!0:e.newReact;if(e.isIFrame!==void 0)this.isIFrame=e.isIFrame;else try{this.isIFrame=!t&&window.self!==window.top}catch{this.isIFrame=!t}}render(){const e=this.props.noTextOnButtons,t={borderRadius:this.props.theme.saveToolbar.button.borderRadius||3,height:this.props.theme.saveToolbar.button.height||32},i={bottom:this.isIFrame?38:0,left:this.props.paddingLeft||0,right:0,position:"absolute",background:this.props.theme.saveToolbar.background};return this.props.dense&&(i.minHeight=48),this.props.error&&(t.border="1px solid red"),a.createElement(CN,{style:i},a.createElement(bt,{variant:"extended","aria-label":"Save",disabled:!this.props.changed||this.props.error,onClick:()=>this.props.onSave(!1),style:t},a.createElement(Xn,{style:e?void 0:pn.buttonIcon}),!e&&D.t("ra_Save")),a.createElement(bt,{variant:"extended","aria-label":"Save and close",disabled:!this.props.changed||this.props.error,onClick:()=>this.props.onSave(!0),style:{...t,marginLeft:10}},a.createElement(Xn,{style:e?void 0:pn.buttonIcon}),e?"+":D.t("ra_Save and close"),e&&a.createElement(we,null)),a.createElement("div",{style:{flexGrow:1}}),a.createElement(bt,{variant:"extended","aria-label":"Close",onClick:()=>this.props.onClose(),style:t},a.createElement(we,{style:e?void 0:pn.buttonIcon}),!e&&D.t("ra_Close")))}}const Ru={suppress:{fontSize:12},suppressRoot:{marginTop:"16px"}};class _4 extends De{constructor(e){if(super(e),!this.props.dialogName&&this.props.suppressQuestionMinutes)throw new Error("dialogName required if suppressQuestionMinutes used");let t=!1;this.props.suppressQuestionMinutes&&(t=parseInt((window._localStorage||window.localStorage).getItem(this.props.dialogName),10)||0,t?Date.now()>t&&((window._localStorage||window.localStorage).removeItem(this.props.dialogName),t=!1):t=!1),this.state={suppress:t}}handleOk(){this.state.suppress&&(window._localStorage||window.localStorage).setItem(this.props.dialogName,Date.now()+(this.props.suppressQuestionMinutes||2)*6e4),this.props.onClose&&this.props.onClose(!0)}handleCancel(){this.props.onClose&&this.props.onClose(!1)}render(){return typeof this.state.suppress=="number"?(setTimeout(()=>this.props.onClose&&this.props.onClose(!0),100),null):a.createElement(Ae,{open:!0,maxWidth:"md",fullWidth:this.props.fullWidth!==void 0?this.props.fullWidth:!0,onClose:(e,t)=>{t!=="backdropClick"&&t!=="escapeKeyDown"&&this.handleCancel()},"aria-labelledby":"ar_confirmation_dialog_title","aria-describedby":"ar_confirmation_dialog_description"},a.createElement(fe,{id:"ar_confirmation_dialog_title"},this.props.title||D.t("ra_Are you sure?")),a.createElement(_e,null,a.createElement(as,{id:"ar_confirmation_dialog_description"},this.props.icon||null,this.props.text,this.props.suppressQuestionMinutes?a.createElement("br",null):null,this.props.suppressQuestionMinutes?a.createElement(V,{sx:{"& .FormControlLabel-label":Ru.suppress,"&.FormControlLabel-root":Ru.suppressRoot},control:a.createElement(ue,{id:`ar_dialog_confirm_suppress_${this.props.dialogName||""}`,checked:!!this.state.suppress,onChange:()=>this.setState({suppress:!this.state.suppress})}),label:this.props.suppressText||D.t("ra_Suppress question for next %s minutes",(this.props.suppressQuestionMinutes||2).toString())}):null)),a.createElement(xe,null,a.createElement(q,{id:`ar_dialog_confirm_ok_${this.props.dialogName||""}`,variant:"contained",onClick:()=>this.handleOk(),color:"primary",autoFocus:!0,startIcon:a.createElement(We,null)},this.props.ok||D.t("ra_Ok")),a.createElement(q,{id:`ar_dialog_confirm_cancel_${this.props.dialogName||""}`,variant:"contained",onClick:()=>this.handleCancel(),color:"grey",startIcon:a.createElement(we,null)},this.props.cancel||D.t("ra_Cancel"))))}}class x4 extends De{handleOk(){this.props.onClose&&this.props.onClose()}render(){return a.createElement(Ae,{open:!0,maxWidth:"sm",fullWidth:this.props.fullWidth!==void 0?this.props.fullWidth:!0,onClose:()=>this.handleOk(),"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description"},a.createElement(fe,{id:"ar_alert_dialog_title"},this.props.title||D.t("ra_Error")),a.createElement(_e,null,a.createElement(as,{id:"ar_alert_dialog_description"},this.props.text||D.t("ra_Unknown error!"))),a.createElement(xe,null,a.createElement(q,{id:"ar_dialog_error_ok",variant:"contained",onClick:()=>this.handleOk(),color:"primary",autoFocus:!0,startIcon:a.createElement(We,null)},D.t("ra_Ok"))))}}const Gh="Actions",Hh="Append",Vh="Cancel",Zh="Categories",Xh="Checked",Kh="Delete",qh="Close",ez="Commercial",tz="Configure",sz="Connected",iz="Continue",rz="Copied",oz="Create",nz="Crop",az="Delete",Mz="Delete",cz="Discard",uz="Disconnected",lz="Error",Nz="Filter",Lz="Friday",gz="Latitude",jz="Logout",yz="Longitude",Tz="Message",Dz="Monday",dz="Name",hz="Objects",zz="Ok",wz="Product",Iz="Rename/Move/Copy",Cz="Repeat",pz="Replace",Az="Root",mz="Saturday",fz="Save",Oz="Selected",Ez="States",_z="Sunday",xz="Thursday",Sz="Timestamp",kz="Tuesday",vz="Update",Yz="Valid till",Qz="Value",bz="Version",Uz="Wednesday",$z="Width",Pz="Yes",Wz="different",Jz="Everyone can read object",Bz="Everyone can read state",Rz="Everyone can write object",Fz="Everyone can write state",Gz="Group can read object",Hz="Group can read state",Vz="Group can write object",Zz="Group can write state",Xz="Owner can read object",Kz="Owner can read state",qz="Owner can write object",ew="Owner can write state",tw="Buttons",sw="Changed from",iw="close",rw="Create boolean state",ow="Create channel",nw="Create device",aw="Create number state",Mw="Create state",cw="Create string state",uw="days",lw="Fr",Nw="Mo",Lw="Sa",gw="Su",jw="Th",yw="Tu",Tw="We",Dw="Expert mode",dw="FALSE",hw="All files",zw="Audio",ww="Code/JSON",Iw="Images",Cw="Text",pw="Video",Aw="Settings",mw="without",fw="Function",Ow="ID",Ew="Name",_w="Role",xw="Room",Sw="Type",kw="Invalid settings",vw="Last change",Yw="locally",Qw="Apr",bw="Aug",Uw="Dec",$w="Feb",Pw="Jan",Ww="Jul",Jw="Jun",Bw="Mai",Rw="Mar",Fw="Nov",Gw="Oct",Hw="Sep",Vw="Apr",Zw="Aug",Xw="Dec",Kw="Feb",qw="Jan",eI="Jul",tI="Jun",sI="Mai",iI="Mar",rI="Nov",oI="Oct",nI="Sep",aI="none",MI="Object changed by",cI="Object last changed at",uI="Settings from other adapter %s",lI="Quality code",NI="repeat",LI='To select folder, just hold the key "shift" by clicking the folder.',gI="Show all",jI="State changed by",yI="Object changed from",TI="Timestamp",DI="Acknowledged",dI="Comment",hI="Copy the state value",zI="Hold Cltr/⌘ key to open the link",wI="Custom settings",II="Delete object",CI="Edit object",pI="Edit the state value",AI="Expires in",mI="From",fI="Last changed",OI="Quality",EI="Time stamp",_I="User",xI="Value",SI="TRUE",kI="Value",vI="Warning: The CRON job will run every minute during the specified period!",YI="Warning: The CRON job will run every second during the specified period!",QI="CRON",bI="Date",UI="Dates",$I="Day",PI="Day of week",WI="Every",JI="every N days",BI="every Nth day of the week",RI="every N day of week",FI="every N hours",GI="every N minutes",HI="every N months",VI="every N seconds",ZI="every day",XI="every day of the week",KI="every day of the week",qI="every hour",eC="every minute",tC="every month",sC="every second",iC="From",rC="Hours",oC="Interval",nC="Interval between",aC="Invalid CRON",MC="Minutes",cC="months",uC="Once",lC="Period",NC="Seconds",LC="Simple",gC="Specific time",jC="specific dates",yC="specific day(s) of the week",TC="specific day of weeks",DC="specific hours",dC="specific minutes",hC="specific months",zC="specific seconds",wC="Time",IC="To",CC="Wizard",pC="all",AC="Astro day",mC="Astro night",fC="Dawn",OC="Dusk",EC="Golden hour",_C="Golden hour end",xC="Nadir",SC="Nautical dawn",kC="Nautical dusk",vC="Night",YC="Night end",QC="Solar noon",bC="Sunrise",UC="Sunrise end",$C="Sunset",PC="Sunset start",WC="at",JC="at %s",BC="every day",RC="every hour",FC="every minute",GC="every month",HC="every %s day",VC="every %s hours",ZC="every %s minutes",XC="every %s months",KC="every %s weeks",qC="every %s years",e2="every week",t2="every year",s2="from %s to %s",i2="never",r2="on %s of %s",o2="on %s and %s of",n2="on every date of",a2="%s",M2="%s and %s",c2="on %s",u2="on %s and %s",l2="on weekends",N2="on working days",L2="will ne be not executed any more, because start is in the past",g2="on %s",j2="from %s",y2="Execute from to",T2="to %s",D2="every",d2="Specific time",h2="from",z2="From-to",w2="Interval time",I2="invert",C2="none",p2="on",A2="Period",m2="Daily",f2="Dates",O2="Day",E2="Every",_2="Every day",x2="Every month",S2="Every week",k2="Every year",v2="Hours",Y2="Minutes",Q2="month",b2="Monthly",U2="Once",$2="Specific months",P2="Week",W2="Weekdays",J2="Weekend",B2="Weekly",R2="Workdays",F2="Year",G2="Yearly",H2="Specific time",V2="Time",Z2="to",X2="Valid",K2="from",q2="to",ep="Whole day",tp="every month",sp={"ra_%s links from aliases":"%s links from aliases","ra_%s object(s) processed":"%s object(s) processed","ra_%s was imported":"%s was imported","ra_Accept license":"Accept license",ra_Actions:Gh,"ra_Add new child object to selected parent":"Add new child object to selected parent","ra_Add objects tree from JSON file":"Add objects tree from JSON file","ra_Add row":"Add row","ra_Advanced options":"Advanced options","ra_All items are filtered out":"All items are filtered out","ra_All objects":"All objects",ra_Append:Hh,"ra_Append %s entries or replace existing?":"Append %s entries or replace existing?","ra_Append or replace?":"Append or replace?","ra_Are you sure?":"Are you sure?","ra_Auto (no custom columns)":"Auto (no custom columns)","ra_Back to %s":"Back to %s","ra_Background image":"Background image",ra_Cancel:Vh,"ra_Cannot add items with set filter":"Cannot add items with set filter","ra_Cannot decode license":"Cannot decode license","ra_Cannot determine position: System settings are empty and GPS detection is disabled in browser":"Cannot determine position: System settings are empty and GPS detection is disabled in browser",'ra_Cannot find "%s"':'Cannot find "%s"','ra_Cannot read "%s"':'Cannot read "%s"',"ra_Cannot read licenses: %s":"Cannot read licenses: %s","ra_Cannot retrieve options, as instance is offline":"Cannot retrieve options, as instance is offline","ra_Cannot update attribute, because not found in the object":"Cannot update attribute, because not found in the object","ra_Cannot upload":"Cannot upload",ra_Categories:Zh,"ra_Chained certificate":"Chained certificate","ra_Change color theme":"Change color theme","ra_Changed from":"Changed from","ra_Channel → State":"Channel → State","ra_Check license":"Check license",ra_Checked:Xh,ra_Clear:Kh,"ra_Clear filter":"Clear filter","ra_Clear icon":"Clear icon","ra_Click to see in full size":"Click to see in full size","ra_Click to show":"Click to show","ra_Clone current row":"Clone current row",ra_Close:qh,"ra_Collapse all nodes":"Collapse all nodes","ra_Collapse one step node":"Collapse one level",ra_Commercial:ez,ra_Configure:tz,"ra_Configure visible columns":"Configure visible columns","ra_Confirm deletion of %s":"Confirm deletion of %s",ra_Connected:sz,ra_Continue:iz,ra_Copied:rz,"ra_Copied %s":'Copied "%s"',"ra_Copy content":"Copy content",ra_Create:oz,"ra_Create alias":"Create alias","ra_Create folder":"Create folder","ra_Create new folder in %s":"Create new folder in %s",ra_Crop:nz,"ra_Define CRON...":"Define CRON...","ra_Define functions":"Define functions","ra_Define rooms":"Define rooms","ra_Define schedule":"Define schedule","ra_Define schedule...":"Define schedule...",ra_Del:az,ra_Delete:Mz,"ra_Delete current row":"Delete current row","ra_Deselect all":"Unselect all","ra_Device → Channel → State":"Device → Channel → State","ra_Disable/Enable translation":"Disable/Enable translation",ra_Discard:cz,ra_Disconnected:uz,"ra_Do not ask for next 2 hours in this session":"Do not ask for next 2 hours in this session","ra_Do not export values of states":"Do not export values of states","ra_Do not use let's encrypt":"Do not use let's encrypt","ra_Docker is not available":"Docker is not available","ra_Docker is not installed or not running":"Docker is not installed or not running","ra_Double click to reset table layout":"Double click to reset table layout","ra_Drag 'n' drop some files here, or click to select files":"Drag 'n' drop some files here, or click to select files","ra_Drop file here":"Drop file here","ra_Drop the files here...":"Drop the file here...","ra_Duplicate name":"Duplicate name","ra_Edit ACL":"Edit ACL","ra_Edit alias":"Edit alias","ra_Edit custom config":"Edit custom config","ra_Edit full path":"Edit full path","ra_Edit function":"Edit function","ra_Edit object field":"Edit object field","ra_Edit role":"Edit role","ra_Edit room":"Edit room","ra_Edit value":"Edit value","ra_Enter the code from that page here":"Enter the code from that page here",ra_Error:lz,"ra_Expand all nodes":"Expand all nodes","ra_Expand one step node":"Expand one level","ra_Expand/Collapse card":"Expand/Collapse card","ra_Export configuration section":"Export configuration section","ra_Export data to %s file":"Export data to %s file","ra_Failed to open JSON File":"Failed to open JSON File","ra_Fallback custom certificates":"Fallback custom certificates","ra_File is too big. Max %sk allowed. Try use SVG.":"File is too big. Max %sk allowed. Try use SVG.",ra_Filter:Nz,"ra_Filter and Data Actions":"Filter and Data Actions","ra_Filter files":"Filter files","ra_Folder name":"Folder name","ra_Folder → Channel → State":"Folder → Channel → State","ra_Folder → Device → Channel → State":"Folder → Device → Channel → State","ra_Folder → State":"Folder → State","ra_Folders always first":"Folders always first",ra_Friday:Lz,"ra_From file":"From file","ra_From text":"From text","ra_Get %s access":"Get %s access","ra_Good luck":"Good luck","ra_Hide empty folders":"Hide empty folders","ra_If no file will be created in the folder, it will disappear after the browser closed":"If no file will be created in the folder, it will disappear after the browser closed","ra_If the button above does not work, you can authorize manually this app by visiting this url":"If the button above does not work, you can authorize manually this app by visiting this url","ra_Import and add configuration section":"Import and add configuration section","ra_Import and replace configuration section":"Import and replace configuration section","ra_Import data from %s file":"Import data from %s file","ra_Import from %s":"Import from %s","ra_Instance %s is alive":"Instance %s is alive","ra_Instance %s is not alive":"Instance %s is not alive","ra_Instance is not alive":"Instance is not alive","ra_Invalid CRON":"Invalid CRON","ra_Invalid JSON":"Invalid JSON","ra_Invalid JSON file.":"Invalid JSON file.","ra_Invalid JSON format. Expected an array.":"Invalid JSON format. Expected an array.","ra_Invalid answer from server":"Invalid answer from server","ra_Invalid parent folder!":"Invalid parent folder!","ra_Invalid structure":"Invalid structure","ra_JSON editor":"JSON editor","ra_Last change":"Last change",ra_Latitude:gz,"ra_License %s":"License %s","ra_License agreement":"License agreement","ra_License does not exist":"License does not exist","ra_License expired on %s":"License expired on %s",'ra_License for other product "%s"':'License for other product "%s"',"ra_License is for version %s, but required version is %s.":"License is for version %s, but required version is %s.","ra_License must be converted":"License must be converted to newer version. You can do it in your iobroker.net profile.","ra_License not found in license manager. Do you want to read licenses from iobroker.net?":"License not found in the license manager. Do you want to update licenses from iobroker.net?","ra_Listen on all IPs":"Listen on all IPs","ra_Load configuration from file":"Load configuration from file",ra_Logout:jz,ra_Longitude:yz,'ra_May not trigger "updateLicenses"':'May not trigger "updateLicenses"',ra_Message:Tz,ra_Monday:Dz,"ra_Move down":"Move down","ra_Move up":"Move up",ra_Name:dz,"ra_No data found in file":"No data found in file","ra_No one license found in license manager":"No one license found in license manager","ra_No response from admin":"No response from admin","ra_No response from the backend":"No response from the backend",'ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".':'Non-experts may create new objects only in "0_userdata.0" or "alias.0".',"ra_Not a number":"Not a number","ra_OAuth Client ID":"OAuth Client ID","ra_OAuth Client secret":"OAuth Client secret",ra_Objects:hz,ra_Ok:zz,"ra_On weekdays":"On weekdays","ra_Only following structures of objects are available:":"Only following structures of objects are available:","ra_Only selected":"Only selected","ra_Owner group":"Owner group","ra_Owner user":"Owner user","ra_Passwords are not equal!":"Passwords are not equal!","ra_Place your files here or click here to open the browse dialog":"Place your files here or click here to open the browse dialog","ra_Please allow popups in your browser for this page!":"Please allow popups in your browser for this page!","ra_Please confirm":"Please confirm","ra_Please create license":"Please create license","ra_Please enter the license":"Please enter the license","ra_Please select file...":"Please select file...","ra_Please select object ID...":"Please select object ID...","ra_Port could be used by %s":"Port could be used by %s","ra_Port is already used by %s":"Port is already used by %s","ra_Press ENTER Key to add new item":"Press ENTER Key to add new item","ra_Private certificate":"Private certificate",ra_Product:wz,"ra_Public certificate":"Public certificate","ra_Quality code":"Quality","ra_Refresh tree":"Refresh tree","ra_Reload files":"Reload files",ra_Rename_Move_Copy:Iz,"ra_Renew %s access":"Renew %s access",ra_Repeat:Cz,ra_Replace:pz,"ra_Request timed out":"Request timed out","ra_Restrict to folder":"Restrict to folder",ra_Root:Az,ra_Saturday:mz,ra_Save:fz,"ra_Save and close":"Save and close","ra_Save configuration to file":"Save configuration to file","ra_Save objects tree as JSON file":"Save objects tree as JSON file","ra_Select all":"Select all","ra_Select color":"Select color","ra_Select predefined icon":"Select predefined icon","ra_Select type of export":"Select type of export",ra_Selected:Oz,"ra_Selected %s object(s)":"Selected %s object(s)","ra_Serial number (UUID)":"Serial number (UUID)",'ra_Serial number (UUID) "%s" in license is for other device.':'Serial number (UUID) "%s" in license is for other device.',"ra_Session will expire in %s seconds. Continue?":"Session will expire in %s seconds. Continue?","ra_Show all folders":"Show all folders","ra_Show lines between rows":"Show lines between rows","ra_Show/Hide object descriptions":"Show/Hide object descriptions","ra_Show/hide filter input":"Show/hide filter input","ra_Some data are not stored. Discard?":"Some data are not stored. Discard?",ra_States:Ez,"ra_Successfully authorized. Token valid till %s and will be automatically renewed.":"Successfully authorized. Token valid till %s and will be automatically renewed.","ra_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":"Successfully authorized. Token valid till %s but it can expire as the instance is not running.","ra_Suitable license not found in license manager":"Suitable license not found in license manager",ra_Sunday:_z,"ra_Suppress question for next %s minutes":"Suppress question for next %s minutes","ra_System language":"System language","ra_Take browser position":"Take position from browser","ra_Take position from system settings":"Take position from system settings",'ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").':'The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").',"ra_The page you are looking for was not found":"The page you are looking for was not found","ra_The schedule will be executed every minute. Are you sure?":"The schedule will be executed every minute. Are you sure?","ra_The schedule will be executed every second. Are you sure?":"The schedule will be executed every second. Are you sure?",ra_Thursday:xz,ra_Timestamp:Sz,"ra_Toggle expert mode":"Toggle expert mode","ra_Toggle the states view":"Toggle the states view","ra_Toggle view mode":"Toggle view mode","ra_Too big":"Too big","ra_Too small":"Too small","ra_Transparent dialog":"Transparent dialog",ra_Tuesday:kz,"ra_Unknown error":"Unknown error","ra_Unknown error!":"Unknown error!",ra_Update:vz,"ra_Upload file":"Upload file","ra_Use all available let's encrypt certificates":"Use all available let's encrypt certificates","ra_Use iobroker.acme adapter for letsencrypt certificates":"Use iobroker.acme adapter for letsencrypt certificates","ra_Use system settings for position":"Use system settings for position","ra_Used system settings":"Used system settings","ra_User files":"User files",ra_ValidTill:Yz,ra_Value:Qz,ra_Version:bz,"ra_View file":"View file","ra_View: %s":"View: %s",ra_Wednesday:Uz,ra_Width:$z,"ra_YAML editor":"YAML editor",ra_Yes:Pz,"ra_You can export all objects or just the selected branch.":"You can export all objects or just the selected branch.","ra_You can filter entries by entering here some text":"You can filter entries by entering here some text","ra_You can use * as wildcard":"You can use * as wildcard",ra___different__:Wz,ra_aclEveryone_read_object:Jz,ra_aclEveryone_read_state:Bz,ra_aclEveryone_write_object:Rz,ra_aclEveryone_write_state:Fz,ra_aclGroup_read_object:Gz,ra_aclGroup_read_state:Hz,ra_aclGroup_write_object:Vz,ra_aclGroup_write_state:Zz,ra_aclOwner_read_object:Xz,ra_aclOwner_read_state:Kz,ra_aclOwner_write_object:qz,ra_aclOwner_write_state:ew,ra_buttons:tw,ra_changedFrom:sw,ra_close:iw,ra_create_boolean_state:rw,ra_create_channel:ow,ra_create_device:nw,ra_create_number_state:aw,ra_create_state:Mw,ra_create_string_state:cw,ra_daysShortText:uw,ra_dow_Fr:lw,ra_dow_Mo:Nw,ra_dow_Sa:Lw,ra_dow_Su:gw,ra_dow_Th:jw,ra_dow_Tu:yw,ra_dow_We:Tw,ra_expertMode:Dw,ra_false:dw,ra_fileType_all:hw,ra_fileType_audio:zw,ra_fileType_code:ww,ra_fileType_images:Iw,ra_fileType_txt:Cw,ra_fileType_video:pw,"ra_fileType_video,":"Video",ra_filter_customs:Aw,ra_filter_customs_without:mw,ra_filter_func:fw,ra_filter_id:Ow,ra_filter_name:Ew,ra_filter_role:_w,ra_filter_room:xw,ra_filter_type:Sw,"ra_import data from %s file":"Import data from %s file",ra_invalidConfig:kw,ra_lastChange:vw,ra_locally:Yw,ra_month_Apr:Qw,ra_month_Aug:bw,ra_month_Dec:Uw,ra_month_Feb:$w,ra_month_Jan:Pw,ra_month_Jul:Ww,ra_month_Jun:Jw,ra_month_Mai:Bw,ra_month_Mar:Rw,ra_month_Nov:Fw,ra_month_Oct:Gw,ra_month_Sep:Hw,ra_months_Apr:Vw,ra_months_Aug:Zw,ra_months_Dec:Xw,ra_months_Feb:Kw,ra_months_Jan:qw,ra_months_Jul:eI,ra_months_Jun:tI,ra_months_Mai:sI,ra_months_Mar:iI,ra_months_Nov:rI,ra_months_Oct:oI,ra_months_Sep:nI,"ra_no confirm for 5 mins":"no confirm for 5 mins",ra_none:aI,ra_object_changed_by:MI,ra_object_changed_by_user:cI,ra_otherConfig:uI,ra_qualityCode:lI,ra_repeat:NI,ra_select_folder_hint:LI,ra_show_all:gI,ra_state_changed_by:jI,ra_state_changed_from:yI,ra_timestamp:TI,ra_tooltip_ack:DI,ra_tooltip_comment:dI,ra_tooltip_copyState:hI,ra_tooltip_ctrlForLink:zI,ra_tooltip_customConfig:wI,ra_tooltip_deleteObject:II,ra_tooltip_editObject:CI,ra_tooltip_editState:pI,ra_tooltip_expire:AI,ra_tooltip_from:mI,ra_tooltip_lc:fI,ra_tooltip_quality:OI,ra_tooltip_ts:EI,ra_tooltip_user:_I,ra_tooltip_value:xI,ra_true:SI,"ra_use seconds":"use seconds",ra_val:kI,"ra_via internet":"via internet",ra_warning_every_minute:vI,ra_warning_every_second:YI,sc_cron:QI,sc_date:bI,sc_dates:UI,sc_dow:$I,sc_dows:PI,sc_every:WI,sc_everyN_dates:JI,sc_everyN_dow:BI,sc_everyN_dows:RI,sc_everyN_hours:FI,sc_everyN_minutes:GI,sc_everyN_months:HI,sc_everyN_seconds:VI,sc_every_dates:ZI,sc_every_dow:XI,sc_every_dows:KI,sc_every_hours:qI,sc_every_minutes:eC,sc_every_months:tC,sc_every_seconds:sC,sc_from:iC,sc_hours:rC,sc_interval:oC,sc_intervalBetween:nC,sc_invalid_cron:aC,sc_minutes:MC,sc_months:cC,sc_once:uC,sc_period:lC,sc_seconds:NC,sc_simple:LC,sc_specific:gC,sc_specific_dates:jC,sc_specific_dow:yC,sc_specific_dows:TC,sc_specific_hours:DC,sc_specific_minutes:dC,sc_specific_months:hC,sc_specific_seconds:zC,sc_time:wC,sc_to:IC,sc_wizard:CC,sch_all:pC,sch_astroDay:AC,sch_astroNight:mC,sch_astro_dawn:fC,sch_astro_dusk:OC,sch_astro_goldenHour:EC,sch_astro_goldenHourEnd:_C,sch_astro_nadir:xC,sch_astro_nauticalDawn:SC,sch_astro_nauticalDusk:kC,sch_astro_night:vC,sch_astro_nightEnd:YC,sch_astro_solarNoon:QC,sch_astro_sunrise:bC,sch_astro_sunriseEnd:UC,sch_astro_sunset:$C,sch_astro_sunsetStart:PC,sch_at:WC,sch_desc_atTime:JC,sch_desc_everyDay:BC,sch_desc_everyHour:RC,sch_desc_everyMinute:FC,sch_desc_everyMonth:GC,sch_desc_everyNDay:HC,sch_desc_everyNHours:VC,sch_desc_everyNMinutes:ZC,sch_desc_everyNMonths:XC,sch_desc_everyNWeeks:KC,sch_desc_everyNYears:qC,sch_desc_everyWeek:e2,sch_desc_everyYear:t2,sch_desc_intervalFromTo:s2,sch_desc_never:i2,sch_desc_onDate:r2,sch_desc_onDates:o2,sch_desc_onEveryDate:n2,sch_desc_onMonth:a2,sch_desc_onMonths:M2,sch_desc_onWeekday:c2,sch_desc_onWeekdays:u2,sch_desc_onWeekends:l2,sch_desc_onWorkdays:N2,sch_desc_onceInPast:L2,sch_desc_once_on:g2,sch_desc_validFrom:j2,sch_desc_validFromTo:y2,sch_desc_validTo:T2,sch_every:D2,sch_exactTime:d2,sch_from:h2,sch_fromTo:z2,sch_intervalTime:w2,sch_invert:I2,sch_no_one:C2,sch_on:p2,sch_period:A2,sch_periodDaily:m2,sch_periodDates:f2,sch_periodDay:O2,sch_periodEvery:E2,sch_periodEveryDay:_2,sch_periodEveryMonth:x2,sch_periodEveryWeek:S2,sch_periodEveryYear:k2,sch_periodHours:v2,sch_periodMinutes:Y2,sch_periodMonth:Q2,sch_periodMonthly:b2,sch_periodOnce:U2,sch_periodSpecificMonths:$2,sch_periodWeek:P2,sch_periodWeekdays:W2,sch_periodWeekend:J2,sch_periodWeekly:B2,sch_periodWorkdays:R2,sch_periodYear:F2,sch_periodYearly:G2,sch_specificTime:H2,sch_time:V2,sch_to:Z2,sch_valid:X2,sch_validFrom:K2,sch_validTo:q2,sch_wholeDay:ep,sch_yearEveryMonth:tp},ip="Aktionen",rp="Anhängen",op="Abbrechen",np="Kategorien",ap="Geprüft",Mp="Löschen",cp="Schließen",up="Kommerziell",lp="Konfigurieren",Np="Verbunden",Lp="Weitermachen",gp="Kopiert",jp="Erstellen",yp="Ernte",Tp="Entf",Dp="Löschen",dp="Verwerfen",hp="Getrennt",zp="Fehler",wp="Filter",Ip="Freitag",Cp="Breite",pp="Ausloggen",Ap="Längengrad",mp="Meldung",fp="Montag",Op="Name",Ep="Objekte",_p="OK",xp="Produkt",Sp="Umbenennen/Verschieben/Kopieren",kp="Wiederholen",vp="Ersetzen",Yp="Anfang",Qp="Samstag",bp="Speichern",Up="Ausgewählt",$p="Zustände",Pp="Sonntag",Wp="Donnerstag",Jp="Zeitstempel",Bp="Dienstag",Rp="Aktualisieren",Fp="Gültig bis",Gp="Wert",Hp="Ausführung",Vp="Mittwoch",Zp="Breite",Xp="Ja",Kp="unterschiedlich",qp="Jeder kann Objekt lesen",eA="Jeder kann Zustand lesen",tA="Jeder kann ein Objekt schreiben",sA="Jeder kann Zustand schreiben",iA="Gruppe kann Objekt lesen",rA="Gruppe kann Status lesen",oA="Gruppe kann Objekt schreiben",nA="Gruppe kann Status schreiben",aA="Besitzer kann Objekt lesen",MA="Besitzer kann Zustand lesen",cA="Besitzer kann Objekt schreiben",uA="Besitzer kann Zustand schreiben",lA="Tasten",NA="Geändert von",LA="Schließen",gA="Booleschen Zustand erstellen",jA="Kanal erstellen",yA="Gerät erstellen",TA="Nummern-Zustand erstellen",DA="Zustand erstellen",dA="String-Zustand erstellen",hA="T.",zA="Fr",wA="Mo",IA="Sa",CA="So",pA="Do",AA="Di",mA="Mi",fA="Expertenmodus",OA="FALSCH",EA="Alle Dateien",_A="Audio",xA="Code/JSON",SA="Bilder",kA="Text",vA="Video",YA="Einstellungen",QA="ohne",bA="Funktion",UA="ID",$A="Name",PA="Rolle",WA="Raum",JA="Typ",BA="Ungültige Einstellungen",RA="Letzte Änderung",FA="örtlich",GA="Apr",HA="Aug",VA="Dez",ZA="Feb",XA="Jan",KA="Jul",qA="Jun",em="Mai",tm="Mär",sm="Nov",im="Okt",rm="Sep",om="Apr",nm="Aug",am="Dez",Mm="Feb",cm="Jan",um="Jul",lm="Jun",Nm="Mai",Lm="Mär",gm="Nov",jm="Okt",ym="Sep",Tm="kein",Dm="Objekt geändert von",dm="Objekt zuletzt geändert um",hm="Einstellungen von anderen Adaptern %s",zm="Qualitätscode",wm="wiederholen",Im='Um einen Ordner auszuwählen, halten Sie einfach die Taste "Shift" gedrückt, indem Sie auf den Ordner klicken.',Cm="Alle anzeigen",pm="Zustand geändert durch",Am="Objekt geändert von",mm="Zeitstempel",fm="Bestätigt",Om="Kommentar",Em="Statuswert kopieren",_m="Strg/⌘-Taste gedrückt halten, um den Link zu öffnen",xm="Benutzerdefinierte Einstellungen",Sm="Objekt löschen",km="Objekt bearbeiten",vm="Statuswert bearbeiten",Ym="Läuft ab in",Qm="Von",bm="Zuletzt geändert",Um="Qualität",$m="Zeitstempel",Pm="Benutzer",Wm="Wert",Jm="WAHR",Bm="Wert",Rm="Achtung: Der CRON-Job wird im angegebenen Zeitraum jede Minute ausgeführt!",Fm="Achtung: Der CRON-Job wird im angegebenen Zeitraum jede Sekunde ausgeführt!",Gm="CRON",Hm="Datum",Vm="Tage",Zm="Tag",Xm="Wochentage",Km="Jeden",qm="alle N Tage",e3="jeden x-ten Tag der Woche",t3="alle N Wochentage",s3="alle N Stunden",i3="alle N Minuten",r3="alle N Monate",o3="alle N Sekunden",n3="jeden Tag",a3="jeden Tag der Woche",M3="jeden Tag der Woche",c3="jede Stunde",u3="jede Minute",l3="jeden Monat",N3="jede Sekunde",L3="Von",g3="Stunden",j3="Intervall",y3="Intervall zwischen",T3="Ungültiger CRON",D3="Minuten",d3="Monate",h3="Einmal",z3="Zeitraum",w3="Sekunden",I3="Einfach",C3="Bestimmte Zeit",p3="bestimmte Tage",A3="bestimmte(r) Tag(e) der Woche",m3="bestimmten Wochentag",f3="bestimmte Stunden",O3="bestimmte Minuten",E3="bestimmte Monate",_3="bestimmte Sekunden",x3="Zeit",S3="Bis",k3="Wizard",v3="alle",Y3="Astronomischer Tag",Q3="Astronomische Nacht",b3="Morgendämmerung",U3="Abenddämmerung",$3="Goldene Stunde",P3="Goldene Stundenende",W3="Nadir",J3="Nautische Morgendämmerung",B3="Nautische Abenddämmerung",R3="Nacht",F3="Nachtende",G3="Sonnenmittag",H3="Sonnenaufgang",V3="Sonnenaufgangende",Z3="Sonnenuntergang",X3="Sonnenuntergangstart",K3="am",q3="um %s",ef="jeden Tag",tf="jede Stunde",sf="jede Minute",rf="jeden Monat",of="jeden %s Tag",nf="alle %s Stunden",af="alle %s Minuten",Mf="alle %s Monate",cf="alle %s Wochen",uf="alle %s Jahre",lf="jede Woche",Nf="jedes Jahr",Lf="von %s bis %s",gf="noch nie",jf="am %s von %s",yf="am %s und %s von",Tf="an jedem Datum von",Df="%s",df="%s und %s",hf="auf %s",zf="auf %s und %s",wf="an Wochenenden",If="an Werktagen",Cf="wird nicht mehr ausgeführt, weil der Start in der Vergangenheit ist",pf="auf %s",Af="von %s",mf="Ausführen von bis",ff="bis %s",Of="jeden",Ef="Bestimmte Zeit",_f="von",xf="Von bis",Sf="Zeitintervall",kf="umkehren",vf="keiner",Yf="am",Qf="Zeitraum",bf="Täglich",Uf="Daten",$f="Tag",Pf="Jeden",Wf="Jeden Tag",Jf="Jeden Monat",Bf="Jede Woche",Rf="Jedes Jahr",Ff="Stunden",Gf="Minuten",Hf="Monat",Vf="Monatlich",Zf="Einmal",Xf="Bestimmte Monate",Kf="Woche",qf="Wochentage",eO="Wochenende",tO="Wöchentlich",sO="Arbeitstage",iO="Jahr",rO="Jährlich",oO="Bestimmte Zeit",nO="Zeit",aO="zu",MO="Gültigkeit",cO="von",uO="bis",lO="Ganzer Tag",NO="jeden Monat",LO={"ra_%s links from aliases":"%s Links von Aliasen","ra_%s object(s) processed":"%s Objekt(e) verarbeitet","ra_%s was imported":"%s wurde importiert","ra_Accept license":"Lizenz akzeptieren",ra_Actions:ip,"ra_Add new child object to selected parent":"Dem ausgewählten übergeordneten Objekt ein neues untergeordnetes Objekt hinzufügen","ra_Add objects tree from JSON file":"Objektbaum aus JSON-Datei hinzufügen","ra_Add row":"Zeile hinzufügen","ra_Advanced options":"Erweiterte Optionen","ra_All items are filtered out":"Alle Elemente sind herausgefiltert","ra_All objects":"Alle Objekte",ra_Append:rp,"ra_Append %s entries or replace existing?":"%s Einträge anhängen oder vorhandene ersetzen?","ra_Append or replace?":"Anhängen oder ersetzen?","ra_Are you sure?":"Bist du sicher?","ra_Auto (no custom columns)":"Auto (keine benutzerdefinierten Spalten)","ra_Back to %s":"Zurück zu %s","ra_Background image":"Hintergrundbild",ra_Cancel:op,"ra_Cannot add items with set filter":"Elemente mit festgelegtem Filter können nicht hinzugefügt werden","ra_Cannot decode license":"Lizenz kann nicht entschlüsselt werden","ra_Cannot determine position: System settings are empty and GPS detection is disabled in browser":"Position kann nicht bestimmt werden: Die Systemeinstellungen sind leer und die GPS-Erkennung ist im Browser deaktiviert",'ra_Cannot find "%s"':'Kann "%s" nicht finden','ra_Cannot read "%s"':'"%s" kann nicht gelesen werden',"ra_Cannot read licenses: %s":"Lizenzen können nicht gelesen werden: %s","ra_Cannot retrieve options, as instance is offline":"Optionen können nicht abgerufen werden, da die Instanz offline ist","ra_Cannot update attribute, because not found in the object":"Attribut kann nicht aktualisiert werden, da es nicht im Objekt gefunden wurde","ra_Cannot upload":"Kann nicht hochladen",ra_Categories:np,"ra_Chained certificate":"Chained Zertifikat","ra_Change color theme":"Farbthema ändern","ra_Changed from":"Geändert von","ra_Channel → State":"Kanal → Zustand","ra_Check license":"Lizenz prüfen",ra_Checked:ap,ra_Clear:Mp,"ra_Clear filter":"Filter löschen","ra_Clear icon":"Symbol löschen","ra_Click to see in full size":"Klicken Sie hier, um die Vollbildansicht zu öffnen.","ra_Click to show":"Zum Anzeigen klicken","ra_Clone current row":"Aktuelle Zeile klonen",ra_Close:cp,"ra_Collapse all nodes":"Alle Knoten zuklappen","ra_Collapse one step node":"Eine Ebene zuklappen",ra_Commercial:up,ra_Configure:lp,"ra_Configure visible columns":"Spalten Konfigurieren","ra_Confirm deletion of %s":"Das Löschen von %s bestätigen",ra_Connected:Np,ra_Continue:Lp,ra_Copied:gp,"ra_Copied %s":'"%s" kopiert',"ra_Copy content":"Inhalte kopieren",ra_Create:jp,"ra_Create alias":"Alias erstellen","ra_Create folder":"Ordner erstellen","ra_Create new folder in %s":'Neuen Ordner in "%s" erstellen',ra_Crop:yp,"ra_Define CRON...":"Definieren Sie CRON ...","ra_Define functions":"Funktionen definieren","ra_Define rooms":"Räume definieren","ra_Define schedule":"Zeitplan definieren","ra_Define schedule...":"Zeitplan definieren ...",ra_Del:Tp,ra_Delete:Dp,"ra_Delete current row":"Aktuelle Zeile löschen","ra_Deselect all":"Alles abwählen","ra_Device → Channel → State":"Gerät → Kanal → Zustand","ra_Disable/Enable translation":"Übersetzung deaktivieren/aktivieren",ra_Discard:dp,ra_Disconnected:hp,"ra_Do not ask for next 2 hours in this session":"Fragen Sie nicht nach den nächsten 2 Stunden in dieser Sitzung","ra_Do not export values of states":"Keine Zustandswerte exportieren","ra_Do not use let's encrypt":"Let's encrypt nicht verwenden","ra_Docker is not available":"Docker ist nicht verfügbar","ra_Docker is not installed or not running":"Docker ist nicht installiert oder läuft nicht","ra_Double click to reset table layout":"Doppelklicken, um das Tabellenlayout zurückzusetzen","ra_Drag 'n' drop some files here, or click to select files":"Die Datei hierher ziehen und ablegen, oder klicken, um die Datei auszuwählen","ra_Drop file here":"Datei hier ablegen","ra_Drop the files here...":"Datei hier ablegen...","ra_Duplicate name":"Doppelter Name","ra_Edit ACL":"ACL bearbeiten","ra_Edit alias":"Alias bearbeiten","ra_Edit custom config":"Bearbeite Benutzerdefinierte Konfiguration","ra_Edit full path":"Vollständigen Pfad bearbeiten","ra_Edit function":"Funktion bearbeiten","ra_Edit object field":"Objektfeld bearbeiten","ra_Edit role":"Rolle bearbeiten","ra_Edit room":"Raum bearbeiten","ra_Edit value":"Wert bearbeiten","ra_Enter the code from that page here":"Geben Sie den Code von dieser Seite hier ein",ra_Error:zp,"ra_Expand all nodes":"Alle Knoten aufklappen","ra_Expand one step node":"Eine Ebene aufklappen","ra_Expand/Collapse card":"Karte ein-/ausklappen","ra_Export configuration section":"Konfigurationsabschnitt exportieren","ra_Export data to %s file":"Daten in %s-Datei exportieren","ra_Failed to open JSON File":"Fehler beim Öffnen der JSON-Datei","ra_Fallback custom certificates":"Benutzerdefinierte Fallback-Zertifikate","ra_File is too big. Max %sk allowed. Try use SVG.":"Datei ist zu groß. Max %sk erlaubt. Versuchen Sie, SVG zu verwenden.",ra_Filter:wp,"ra_Filter and Data Actions":"Filter- und Datenaktionen","ra_Filter files":"Dateien filtern","ra_Folder name":"Ordnernamen","ra_Folder → Channel → State":"Ordner → Kanal → Zustand","ra_Folder → Device → Channel → State":"Ordner → Gerät → Kanal → Zustand","ra_Folder → State":"Ordner → Zustand","ra_Folders always first":"Ordner immer zuerst",ra_Friday:Ip,"ra_From file":"Aus der Datei","ra_From text":"Aus dem Text","ra_Get %s access":"%s Zugriff erhalten","ra_Good luck":"Viel Glück","ra_Hide empty folders":"Leere Ordner ausblenden","ra_If no file will be created in the folder, it will disappear after the browser closed":"Wenn im Ordner keine Datei erstellt wird, verschwindet dieser nach dem Schließen des Browsers","ra_If the button above does not work, you can authorize manually this app by visiting this url":"Wenn die Schaltfläche oben nicht funktioniert, können Sie diese App manuell autorisieren, indem Sie diese URL besuchen","ra_Import and add configuration section":"Konfigurationsabschnitt importieren und hinzufügen","ra_Import and replace configuration section":"Konfigurationsabschnitt importieren und ersetzen","ra_Import data from %s file":"Daten aus %s-Datei importieren","ra_Import from %s":"Von %s importieren","ra_Instance %s is alive":"Instanz %s ist aktiv","ra_Instance %s is not alive":"Instanz %s ist nicht aktiv","ra_Instance is not alive":"Instanz ist nicht am Leben","ra_Invalid CRON":"Ungültiger CRON","ra_Invalid JSON":"Ungültiges JSON","ra_Invalid JSON file.":"Ungültige JSON-Datei.","ra_Invalid JSON format. Expected an array.":"Ungültiges JSON-Format. Array erwartet.","ra_Invalid answer from server":"Ungültige Antwort vom Server","ra_Invalid parent folder!":"Ungültiger übergeordneter Ordner!","ra_Invalid structure":"Ungültige Struktur","ra_JSON editor":"JSON-Editor","ra_Last change":"Letzte Änderung",ra_Latitude:Cp,"ra_License %s":"Lizenz %s","ra_License agreement":"Lizenzvereinbarung","ra_License does not exist":"Lizenz existiert nicht","ra_License expired on %s":"Lizenz am %s abgelaufen",'ra_License for other product "%s"':"Lizenz für anderes Produkt „%s“","ra_License is for version %s, but required version is %s.":"Lizenz ist für Version %s, aber erforderliche Version ist %s.","ra_License must be converted":"Die Lizenz muss auf eine neuere Version konvertiert werden. Sie können dies in Ihrem iobroker.net-Profil tun.","ra_License not found in license manager. Do you want to read licenses from iobroker.net?":"Lizenz im Lizenzmanager nicht gefunden. Möchten Sie Lizenzen von iobroker.net aktualisieren?","ra_Listen on all IPs":"Zugriff von allen IPs zulassen","ra_Load configuration from file":"Konfiguration aus Datei laden",ra_Logout:pp,ra_Longitude:Ap,'ra_May not trigger "updateLicenses"':"Löst möglicherweise nicht „updateLicenses“ aus",ra_Message:mp,ra_Monday:fp,"ra_Move down":"Nach unten","ra_Move up":"Nach oben",ra_Name:Op,"ra_No data found in file":"Keine Daten in der Datei gefunden","ra_No one license found in license manager":"Im Lizenzmanager wurde keine Lizenz gefunden","ra_No response from admin":"Keine Antwort vom Administrator","ra_No response from the backend":"Keine Antwort vom Backend",'ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".':'Nicht-Experten dürfen neue Objekte nur in "0_userdata.0" oder "alias.0" erstellen.',"ra_Not a number":"Keine Nummer","ra_OAuth Client ID":"OAuth-Client-ID","ra_OAuth Client secret":"OAuth-Client-Secret",ra_Objects:Ep,ra_Ok:_p,"ra_On weekdays":"An Wochentagen","ra_Only following structures of objects are available:":"Es stehen nur folgende Objektstrukturen zur Verfügung:","ra_Only selected":"Nur ausgewählt","ra_Owner group":"Besitzergruppe","ra_Owner user":"Besitzer Benutzer","ra_Passwords are not equal!":"Passwörter sind nicht gleich!","ra_Place your files here or click here to open the browse dialog":"Die Dateien hier platzieren oder hier klicken, um den Suchdialog zu öffnen","ra_Please allow popups in your browser for this page!":"Bitte lassen Sie Popups für diese Seite in Ihrem Browser zu!","ra_Please confirm":"Bitte bestätigen","ra_Please create license":"Bitte erstellen Sie eine Lizenz","ra_Please enter the license":"Bitte die Lizenz eingeben","ra_Please select file...":"Bitte Datei auswählen...","ra_Please select object ID...":"Bitte Objekt-ID auswählen...","ra_Port could be used by %s":"Port könnte von %s verwendet werden","ra_Port is already used by %s":"Port wird bereits von %s verwendet","ra_Press ENTER Key to add new item":"Die Eingabetaste drücken, um ein neues Element hinzuzufügen","ra_Private certificate":"Privates Zertifikat",ra_Product:xp,"ra_Public certificate":"Öffentliches Zertifikat","ra_Quality code":"Qualität","ra_Refresh tree":"Baum aktualisieren","ra_Reload files":"Dateien neu laden",ra_Rename_Move_Copy:Sp,"ra_Renew %s access":"%s Zugriff erneuern",ra_Repeat:kp,ra_Replace:vp,"ra_Request timed out":"Zeitüberschreitung der Anforderung","ra_Restrict to folder":"Auf Ordner beschränken",ra_Root:Yp,ra_Saturday:Qp,ra_Save:bp,"ra_Save and close":"Speichern und schließen","ra_Save configuration to file":"Konfiguration in Datei speichern","ra_Save objects tree as JSON file":"Objektbaum als JSON-Datei speichern","ra_Select all":"Alle auswählen","ra_Select color":"Wähle Farbe","ra_Select predefined icon":"Vordefiniertes Symbol auswählen","ra_Select type of export":"Die Art des Exports auswählen ",ra_Selected:Up,"ra_Selected %s object(s)":"Ausgewählt %s Objekt(en)","ra_Serial number (UUID)":"Seriennummer (UUID)",'ra_Serial number (UUID) "%s" in license is for other device.':"Seriennummer (UUID) „%s“ in der Lizenz gilt für ein anderes Gerät.","ra_Session will expire in %s seconds. Continue?":"Die Sitzung läuft in %s Sekunden ab. Fortfahren?","ra_Show all folders":"Alle Ordner anzeigen","ra_Show lines between rows":"Linien zwischen Zeilen anzeigen","ra_Show/Hide object descriptions":"Objektbeschreibungen ein-/ausblenden","ra_Show/hide filter input":"Filtereingabe ein-/ausblenden","ra_Some data are not stored. Discard?":"Einige Daten werden nicht gespeichert. Verwerfen?",ra_States:$p,"ra_Successfully authorized. Token valid till %s and will be automatically renewed.":"Erfolgreich autorisiert. Token gültig bis %s und wird automatisch erneuert.","ra_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":"Erfolgreich autorisiert. Token gültig bis %s, kann aber ablaufen, da die Instanz nicht ausgeführt wird.","ra_Suitable license not found in license manager":"Passende Lizenz im Lizenzmanager nicht gefunden",ra_Sunday:Pp,"ra_Suppress question for next %s minutes":"Frage für die nächsten %s Minuten unterdrücken","ra_System language":"Systemsprache","ra_Take browser position":"Position vom Browser einnehmen","ra_Take position from system settings":"Position aus den Systemeinstellungen übernehmen",'ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").':'Die Experten können Objekte überall erstellen, außer auf der zweiten Ebene (z. B. "vis.0" oder "javascript.0").',"ra_The page you are looking for was not found":"Die gesuchte Seite wurde nicht gefunden","ra_The schedule will be executed every minute. Are you sure?":"Der Zeitplan wird jede Minute ausgeführt. Sind Sie sicher?","ra_The schedule will be executed every second. Are you sure?":"Der Zeitplan wird jede Sekunde ausgeführt. Sind Sie sicher?",ra_Thursday:Wp,ra_Timestamp:Jp,"ra_Toggle expert mode":"Expertenmodus umschalten","ra_Toggle the states view":"Statusansicht umschalten","ra_Toggle view mode":"Ansichtsmodus umschalten","ra_Too big":"Zu groß","ra_Too small":"Zu klein","ra_Transparent dialog":"Transparenter Dialog",ra_Tuesday:Bp,"ra_Unknown error":"Unbekannter Fehler","ra_Unknown error!":"Unbekannter Fehler!",ra_Update:Rp,"ra_Upload file":"Datei hochladen","ra_Use all available let's encrypt certificates":"Alle verfügbaren Zertifikate von Let's encrypt benutzen","ra_Use iobroker.acme adapter for letsencrypt certificates":"ioBroker.acme-Adapter für letsencrypt-Zertifikate verwenden","ra_Use system settings for position":"Systemeinstellungen für die Position verwenden","ra_Used system settings":"Systemeinstellungen","ra_User files":"Benutzerdaten",ra_ValidTill:Fp,ra_Value:Gp,ra_Version:Hp,"ra_View file":"Datei ansehen","ra_View: %s":"Anschauen: %s",ra_Wednesday:Vp,ra_Width:Zp,"ra_YAML editor":"YAML-Editor",ra_Yes:Xp,"ra_You can export all objects or just the selected branch.":"Sie können alle Objekte oder nur den ausgewählten Zweig exportieren.","ra_You can filter entries by entering here some text":"Sie können Einträge filtern, indem Sie hier Text eingeben","ra_You can use * as wildcard":"Sie können * als Platzhalter verwenden",ra___different__:Kp,ra_aclEveryone_read_object:qp,ra_aclEveryone_read_state:eA,ra_aclEveryone_write_object:tA,ra_aclEveryone_write_state:sA,ra_aclGroup_read_object:iA,ra_aclGroup_read_state:rA,ra_aclGroup_write_object:oA,ra_aclGroup_write_state:nA,ra_aclOwner_read_object:aA,ra_aclOwner_read_state:MA,ra_aclOwner_write_object:cA,ra_aclOwner_write_state:uA,ra_buttons:lA,ra_changedFrom:NA,ra_close:LA,ra_create_boolean_state:gA,ra_create_channel:jA,ra_create_device:yA,ra_create_number_state:TA,ra_create_state:DA,ra_create_string_state:dA,ra_daysShortText:hA,ra_dow_Fr:zA,ra_dow_Mo:wA,ra_dow_Sa:IA,ra_dow_Su:CA,ra_dow_Th:pA,ra_dow_Tu:AA,ra_dow_We:mA,ra_expertMode:fA,ra_false:OA,ra_fileType_all:EA,ra_fileType_audio:_A,ra_fileType_code:xA,ra_fileType_images:SA,ra_fileType_txt:kA,ra_fileType_video:vA,"ra_fileType_video,":"Video",ra_filter_customs:YA,ra_filter_customs_without:QA,ra_filter_func:bA,ra_filter_id:UA,ra_filter_name:$A,ra_filter_role:PA,ra_filter_room:WA,ra_filter_type:JA,"ra_import data from %s file":"Daten aus %s-Datei importieren",ra_invalidConfig:BA,ra_lastChange:RA,ra_locally:FA,ra_month_Apr:GA,ra_month_Aug:HA,ra_month_Dec:VA,ra_month_Feb:ZA,ra_month_Jan:XA,ra_month_Jul:KA,ra_month_Jun:qA,ra_month_Mai:em,ra_month_Mar:tm,ra_month_Nov:sm,ra_month_Oct:im,ra_month_Sep:rm,ra_months_Apr:om,ra_months_Aug:nm,ra_months_Dec:am,ra_months_Feb:Mm,ra_months_Jan:cm,ra_months_Jul:um,ra_months_Jun:lm,ra_months_Mai:Nm,ra_months_Mar:Lm,ra_months_Nov:gm,ra_months_Oct:jm,ra_months_Sep:ym,"ra_no confirm for 5 mins":"5 Minuten lang keine Bestätigung",ra_none:Tm,ra_object_changed_by:Dm,ra_object_changed_by_user:dm,ra_otherConfig:hm,ra_qualityCode:zm,ra_repeat:wm,ra_select_folder_hint:Im,ra_show_all:Cm,ra_state_changed_by:pm,ra_state_changed_from:Am,ra_timestamp:mm,ra_tooltip_ack:fm,ra_tooltip_comment:Om,ra_tooltip_copyState:Em,ra_tooltip_ctrlForLink:_m,ra_tooltip_customConfig:xm,ra_tooltip_deleteObject:Sm,ra_tooltip_editObject:km,ra_tooltip_editState:vm,ra_tooltip_expire:Ym,ra_tooltip_from:Qm,ra_tooltip_lc:bm,ra_tooltip_quality:Um,ra_tooltip_ts:$m,ra_tooltip_user:Pm,ra_tooltip_value:Wm,ra_true:Jm,"ra_use seconds":"Sekunden benutzen",ra_val:Bm,"ra_via internet":"übers Internet",ra_warning_every_minute:Rm,ra_warning_every_second:Fm,sc_cron:Gm,sc_date:Hm,sc_dates:Vm,sc_dow:Zm,sc_dows:Xm,sc_every:Km,sc_everyN_dates:qm,sc_everyN_dow:e3,sc_everyN_dows:t3,sc_everyN_hours:s3,sc_everyN_minutes:i3,sc_everyN_months:r3,sc_everyN_seconds:o3,sc_every_dates:n3,sc_every_dow:a3,sc_every_dows:M3,sc_every_hours:c3,sc_every_minutes:u3,sc_every_months:l3,sc_every_seconds:N3,sc_from:L3,sc_hours:g3,sc_interval:j3,sc_intervalBetween:y3,sc_invalid_cron:T3,sc_minutes:D3,sc_months:d3,sc_once:h3,sc_period:z3,sc_seconds:w3,sc_simple:I3,sc_specific:C3,sc_specific_dates:p3,sc_specific_dow:A3,sc_specific_dows:m3,sc_specific_hours:f3,sc_specific_minutes:O3,sc_specific_months:E3,sc_specific_seconds:_3,sc_time:x3,sc_to:S3,sc_wizard:k3,sch_all:v3,sch_astroDay:Y3,sch_astroNight:Q3,sch_astro_dawn:b3,sch_astro_dusk:U3,sch_astro_goldenHour:$3,sch_astro_goldenHourEnd:P3,sch_astro_nadir:W3,sch_astro_nauticalDawn:J3,sch_astro_nauticalDusk:B3,sch_astro_night:R3,sch_astro_nightEnd:F3,sch_astro_solarNoon:G3,sch_astro_sunrise:H3,sch_astro_sunriseEnd:V3,sch_astro_sunset:Z3,sch_astro_sunsetStart:X3,sch_at:K3,sch_desc_atTime:q3,sch_desc_everyDay:ef,sch_desc_everyHour:tf,sch_desc_everyMinute:sf,sch_desc_everyMonth:rf,sch_desc_everyNDay:of,sch_desc_everyNHours:nf,sch_desc_everyNMinutes:af,sch_desc_everyNMonths:Mf,sch_desc_everyNWeeks:cf,sch_desc_everyNYears:uf,sch_desc_everyWeek:lf,sch_desc_everyYear:Nf,sch_desc_intervalFromTo:Lf,sch_desc_never:gf,sch_desc_onDate:jf,sch_desc_onDates:yf,sch_desc_onEveryDate:Tf,sch_desc_onMonth:Df,sch_desc_onMonths:df,sch_desc_onWeekday:hf,sch_desc_onWeekdays:zf,sch_desc_onWeekends:wf,sch_desc_onWorkdays:If,sch_desc_onceInPast:Cf,sch_desc_once_on:pf,sch_desc_validFrom:Af,sch_desc_validFromTo:mf,sch_desc_validTo:ff,sch_every:Of,sch_exactTime:Ef,sch_from:_f,sch_fromTo:xf,sch_intervalTime:Sf,sch_invert:kf,sch_no_one:vf,sch_on:Yf,sch_period:Qf,sch_periodDaily:bf,sch_periodDates:Uf,sch_periodDay:$f,sch_periodEvery:Pf,sch_periodEveryDay:Wf,sch_periodEveryMonth:Jf,sch_periodEveryWeek:Bf,sch_periodEveryYear:Rf,sch_periodHours:Ff,sch_periodMinutes:Gf,sch_periodMonth:Hf,sch_periodMonthly:Vf,sch_periodOnce:Zf,sch_periodSpecificMonths:Xf,sch_periodWeek:Kf,sch_periodWeekdays:qf,sch_periodWeekend:eO,sch_periodWeekly:tO,sch_periodWorkdays:sO,sch_periodYear:iO,sch_periodYearly:rO,sch_specificTime:oO,sch_time:nO,sch_to:aO,sch_valid:MO,sch_validFrom:cO,sch_validTo:uO,sch_wholeDay:lO,sch_yearEveryMonth:NO},gO="Действия",jO="Добавить",yO="Отмена",TO="Категории",DO="Проверено",dO="Удалить",hO="Закрыть",zO="Коммерческая",wO="Настроить",IO="Соединение установлено",CO="Продолжать",pO="скопировано",AO="Создать",mO="Обрезать",fO="Delete",OO="Удалить",EO="Отказаться",_O="Отключено",xO="Ошибка",SO="Фильтр",kO="Пятница",vO="Широта",YO="Выйти",QO="Долгота",bO="Сообщение",UO="Понедельник",$O="Имя",PO="Объекты",WO="Ok",JO="Продукт",BO="Переименовать/Переместить/Копировать",RO="Повторение",FO="Заменять",GO="Начало",HO="Суббота",VO="Сохранить",ZO="выбранный",XO="Состояния",KO="Воскресенье",qO="Четверг",eE="Времени",tE="Вторник",sE="Обновить",iE="Годен до",rE="Значение",oE="Версия",nE="Среда",aE="Ширина",ME="Да",cE="разное",uE="Каждый может читать объект",lE="Каждый может читать состояние",NE="Каждый может написать объект",LE="Каждый может написать состояние",gE="Группа может читать объект",jE="Группа может читать состояние",yE="Группа может писать объект",TE="Группа может записывать состояние",DE="Владелец может читать объект",dE="Владелец может читать состояние",hE="Владелец может писать объект",zE="Владелец может писать состояние",wE="Кнопки",IE="Изменено с",CE="Закрыть",pE="Создать логическое состояние",AE="Создать канал",mE="Создать устройство",fE="Создать состояние номера",OE="Создать состояние",EE="Создать состояние строки",_E="д.",xE="Пт",SE="Пн",kE="Сб",vE="Вс",YE="Чт",QE="Вт",bE="Ср",UE="Экспертный режим",$E="ЛОЖЬ",PE="Все файлы",WE="Аудио",JE="Код/JSON",BE="Картинки",RE="Текст",FE="видео",GE="настройки",HE="без",VE="функция",ZE="ID",XE="Имя",KE="роль",qE="комната",e_="Тип",t_="Неверные настройки",s_="Последнее изменение",i_="локально",r_="Апр",o_="Авг",n_="Дек",a_="Фев",M_="Янв",c_="Июл",u_="Июн",l_="Май",N_="Мрт",L_="Ноя",g_="Окт",j_="Сен",y_="Апр",T_="Авг",D_="Дек",d_="Фев",h_="Янв",z_="Июнь",w_="Июль",I_="Май",C_="Март",p_="Ноя",A_="Окт",m_="Сен",f_="ничего",O_="Объект изменен",E_="Последний раз объект изменен в",__="Настройки из другого адаптера %s",x_="Код качества",S_="повтор",k_="Чтобы выбрать папку, просто удерживайте клавишу «Shift», щелкнув папку.",v_="Показать все",Y_="Состояние изменено",Q_="Объект изменен с",b_="Отметка времени",U_="Подтверждено",$_="Комментарий",P_="Скопируйте значение состояния",W_="Удерживайте клавишу Cltr/⌘, чтобы открыть ссылку",J_="Пользовательские настройки",B_="Удалить объект",R_="Редактировать объект",F_="Изменить значение состояния",G_="Истекает через",H_="От",V_="Последнее изменение",Z_="Качество",X_="Отметка времени",K_="пользователь",q_="Значение",ex="истинный",tx="Значение",sx="Внимание: задание CRON будет запускаться каждую минуту в течение указанного периода!",ix="Внимание: задание CRON будет выполняться каждую секунду в течение указанного периода!",rx="CRON",ox="Дата",nx="Даты",ax="День",Mx="День недели",cx="каждый(ую/ые)",ux="каждый N день",lx="каждый N-й день недели",Nx="каждый N день недели",Lx="каждые N часов",gx="каждые N минут",jx="каждые N месяцев",yx="каждые N секунд",Tx="каждый день",Dx="Каждый день недели",dx="каждый день недели",hx="каждый час",zx="каждую минуту",wx="каждый месяц",Ix="каждую секунду",Cx="От",px="часы",Ax="Интервал",mx="Интервал между",fx="Неверный CRON",Ox="минуты",Ex="Месяцы",_x="один раз",xx="Период",Sx="секунды",kx="Просто",vx="Конкретное время",Yx="конкретные даты",Qx="конкретный день(а) недели",bx="конкретный день недели",Ux="конкретные часы",$x="конкретные минуты",Px="конкретные месяцы",Wx="конкретные секунды",Jx="Время",Bx="До",Rx="Форма",Fx="все",Gx="днём",Hx="ночью",Vx="Рассвет",Zx="Сумерки",Xx="Золотой час",Kx="Конец золотого часа",qx="Надир",eS="Морской рассвет",tS="Морские сумерки",sS="Ночь",iS="Конец ночи",rS="Солнечный полдень",oS="Восход",nS="Восход солнца",aS="Заход солнца",MS="Начало заката",cS="дата",uS="в %s",lS="каждый день",NS="каждый час",LS="каждую минуту",gS="каждый месяц",jS="каждый %s день",yS="каждый %s часов",TS="каждые %s минут",DS="каждые %s месяцев",dS="каждые %s недель",hS="каждые %s лет",zS="каждую неделю",wS="каждый год",IS="от %s до %s",CS="никогда",pS="%s %s",AS="%s и %s",mS="в каждый день",fS="%s",OS="%s и %s",ES="%s",_S="%s и %s",xS="на выходных",SS="в рабочие дни",kS="не будет больше выполняться, потому что начало в прошлом",vS="%s",YS="%s",QS="Выполнить с",bS="%s",US="каждый",$S="Конкретное время",PS="от",WS="От и до",JS="Интервал времени",BS="инвертировать",RS="никакой",FS="на",GS="период",HS="Ежедневно",VS="Даты",ZS="День",XS="каждый",KS="Каждый день",qS="Каждый месяц",e5="Каждую неделю",t5="Каждый год",s5="часов",i5="минут",r5="месяц",o5="ежемесячно",n5="однажды",a5="Конкретные месяцы",M5="Неделю",c5="Будние дни",u5="выходные",l5="еженедельно",N5="Рабочие дни",L5="Год",g5="каждый год",j5="Конкретное время",y5="Время",T5="в",D5="действительный",d5="от",h5="в",z5="Весь день",w5="каждый месяц",I5={"ra_%s links from aliases":"%s ссылок из псевдонимов","ra_%s object(s) processed":"Объектов обработано: %s","ra_%s was imported":"%s был импортирован","ra_Accept license":"Принять лицензию",ra_Actions:gO,"ra_Add new child object to selected parent":"Добавить новый дочерний объект к выбранному родительскому объекту","ra_Add objects tree from JSON file":"Добавить дерево объектов из файла JSON","ra_Add row":"Добавить ряд","ra_Advanced options":"Расширенные настройки","ra_All items are filtered out":"Все элементы отфильтрованы","ra_All objects":"Все объекты",ra_Append:jO,"ra_Append %s entries or replace existing?":"Добавить записи %s или заменить существующие?","ra_Append or replace?":"Дополнить или заменить?","ra_Are you sure?":"Вы уверены?","ra_Auto (no custom columns)":"Авто (без настраиваемых столбцов)","ra_Back to %s":"Вернуться к %s","ra_Background image":"Фоновая картинка",ra_Cancel:yO,"ra_Cannot add items with set filter":"Невозможно добавить элементы с установленным фильтром","ra_Cannot decode license":"Не могу декодировать лицензию","ra_Cannot determine position: System settings are empty and GPS detection is disabled in browser":"Невозможно определить местоположение: системные настройки пусты, а обнаружение GPS отключено в браузере.",'ra_Cannot find "%s"':'Не могу найти "%s"','ra_Cannot read "%s"':'Не могу прочитать "%s"',"ra_Cannot read licenses: %s":"Невозможно прочитать лицензии: %s","ra_Cannot retrieve options, as instance is offline":"Невозможно получить параметры, так как экземпляр находится в автономном режиме.","ra_Cannot update attribute, because not found in the object":"Невозможно обновить атрибут, потому что он не найден в объекте","ra_Cannot upload":"Невозможно загрузить",ra_Categories:TO,"ra_Chained certificate":"Chained сертификат","ra_Change color theme":"Изменить цветовую тему","ra_Changed from":"Изменено","ra_Channel → State":"Канал → Состояние","ra_Check license":"Проверить лицензию",ra_Checked:DO,ra_Clear:dO,"ra_Clear filter":"Очистить фильтр","ra_Clear icon":"Очистить значок","ra_Click to see in full size":"Нажмите, чтобы посмотреть в полном размере","ra_Click to show":"Нажмите, чтобы показать","ra_Clone current row":"Клонировать текущую строку",ra_Close:hO,"ra_Collapse all nodes":"Свернуть все узлы","ra_Collapse one step node":"Свернуть один уровень",ra_Commercial:zO,ra_Configure:wO,"ra_Configure visible columns":"Настроить видимые столбцы","ra_Confirm deletion of %s":"Подтвердите удаление %s",ra_Connected:IO,ra_Continue:CO,ra_Copied:pO,"ra_Copied %s":'Скопировано "%s"',"ra_Copy content":"Копировать содержимое",ra_Create:AO,"ra_Create alias":"Создать псевдоним","ra_Create folder":"Создать папку","ra_Create new folder in %s":"Создать новую папку в %s",ra_Crop:mO,"ra_Define CRON...":"Определите CRON...","ra_Define functions":"Задать функции","ra_Define rooms":"Задать комнаты","ra_Define schedule":"Задать расписание","ra_Define schedule...":"Определить расписание ...",ra_Del:fO,ra_Delete:OO,"ra_Delete current row":"Удалить текущую строку","ra_Deselect all":"Убрать выбор везде","ra_Device → Channel → State":"Устройство → Канал → Состояние","ra_Disable/Enable translation":"Включить/отключить перевод",ra_Discard:EO,ra_Disconnected:_O,"ra_Do not ask for next 2 hours in this session":"Не спрашивайте о следующих 2 часах в этом сеансе","ra_Do not export values of states":"Не экспортировать значения состояний","ra_Do not use let's encrypt":"Не использовать Let’s Encrypt","ra_Docker is not available":"Докер недоступен","ra_Docker is not installed or not running":"Docker не установлен или не запущен","ra_Double click to reset table layout":"Дважды щелкните, чтобы сбросить макет таблицы","ra_Drag 'n' drop some files here, or click to select files":"Перетащите сюда несколько файлов или щелкните, чтобы выбрать файлы","ra_Drop file here":"Перетащите файл сюда","ra_Drop the files here...":"Перетащите файл сюда ...","ra_Duplicate name":"Повторяющееся имя","ra_Edit ACL":"Изменить ACL-список","ra_Edit alias":"Изменить псевдоним","ra_Edit custom config":"Редактировать настраиваемую конфигурацию","ra_Edit full path":"Изменить полный путь","ra_Edit function":"Изменить функцию","ra_Edit object field":"Поле редактирования объекта","ra_Edit role":"Изменить роль","ra_Edit room":"Редактировать комнату","ra_Edit value":"Изменить значение","ra_Enter the code from that page here":"Введите код с этой страницы здесь",ra_Error:xO,"ra_Expand all nodes":"Развернуть все узлы","ra_Expand one step node":"Открыть один уровень","ra_Expand/Collapse card":"Развернуть/Свернуть карточку","ra_Export configuration section":"Раздел конфигурации экспорта","ra_Export data to %s file":"Экспорт данных в файл %s","ra_Failed to open JSON File":"Не удалось открыть файл JSON","ra_Fallback custom certificates":"Резервные пользовательские сертификаты","ra_File is too big. Max %sk allowed. Try use SVG.":"Файл слишком большой. Разрешено максимальное количество %sk. Попробуйте использовать SVG.",ra_Filter:SO,"ra_Filter and Data Actions":"Фильтрация и действия с данными","ra_Filter files":"Фильтровать файлы","ra_Folder name":"Имя папки","ra_Folder → Channel → State":"Папка → Канал → Состояние","ra_Folder → Device → Channel → State":"Папка → Устройство → Канал → Состояние","ra_Folder → State":"Папка → Состояние","ra_Folders always first":"Папки всегда на первом месте",ra_Friday:kO,"ra_From file":"Из файла","ra_From text":"Из текста","ra_Get %s access":"Получить %s доступ","ra_Good luck":"Удачи","ra_Hide empty folders":"Скрыть пустые папки","ra_If no file will be created in the folder, it will disappear after the browser closed":"Если в папке не будет создан файл, он исчезнет после закрытия браузера.","ra_If the button above does not work, you can authorize manually this app by visiting this url":"Если кнопка выше не работает, вы можете вручную авторизовать это приложение, перейдя по этой ссылке.","ra_Import and add configuration section":"Импорт и добавление раздела конфигурации","ra_Import and replace configuration section":"Импорт и замена раздела конфигурации","ra_Import data from %s file":"Импорт данных из файла %s","ra_Import from %s":"Импорт из %s","ra_Instance %s is alive":"Экземпляр %s работает","ra_Instance %s is not alive":"Экземпляр %s не работает","ra_Instance is not alive":"Экземпляр не живой","ra_Invalid CRON":"Неверный CRON","ra_Invalid JSON":"Неверный JSON","ra_Invalid JSON file.":"Неверный файл JSON.","ra_Invalid JSON format. Expected an array.":"Недопустимый формат JSON. Ожидается массив.","ra_Invalid answer from server":"Неверный ответ от сервера","ra_Invalid parent folder!":"Неверная родительская папка!","ra_Invalid structure":"Неверная структура","ra_JSON editor":"Редактор JSON","ra_Last change":"Последнее изменение",ra_Latitude:vO,"ra_License %s":"Лицензия %s","ra_License agreement":"Лицензионное соглашение","ra_License does not exist":"Лицензия не существует","ra_License expired on %s":"Срок действия лицензии истек %s",'ra_License for other product "%s"':'Лицензия на другой продукт "%s"',"ra_License is for version %s, but required version is %s.":"Лицензия предназначена для версии %s, но необходима версия %s.","ra_License must be converted":"Лицензия должна быть преобразована в более новую версию. Вы можете сделать это в своем профиле на iobroker.net.","ra_License not found in license manager. Do you want to read licenses from iobroker.net?":"Лицензия не найдена в диспетчере лицензий. Вы хотите обновить лицензии от iobroker.net?","ra_Listen on all IPs":"Слушать на всех IP","ra_Load configuration from file":"Загрузить конфигурацию из файла",ra_Logout:YO,ra_Longitude:QO,'ra_May not trigger "updateLicenses"':"Не может запускать «updateLicenses»",ra_Message:bO,ra_Monday:UO,"ra_Move down":"Вниз","ra_Move up":"Вверх",ra_Name:$O,"ra_No data found in file":"Данные в файле не найдены","ra_No one license found in license manager":"В менеджере лицензий не найдена ни одна лицензия","ra_No response from admin":"Нет ответа от администратора","ra_No response from the backend":"Нет ответа от бэкэнда",'ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".':"Не-эксперты могут создавать новые объекты только в «0_userdata.0» или «alias.0».","ra_Not a number":"Не число","ra_OAuth Client ID":"Идентификатор клиента OAuth","ra_OAuth Client secret":"Секрет клиента OAuth",ra_Objects:PO,ra_Ok:WO,"ra_On weekdays":"На выходных","ra_Only following structures of objects are available:":"Доступны только следующие структуры объектов:","ra_Only selected":"Только выбранные","ra_Owner group":"Группа владельцев","ra_Owner user":"Пользователь-владелец","ra_Passwords are not equal!":"Пароли не равны!","ra_Place your files here or click here to open the browse dialog":"Поместите свои файлы сюда или щелкните здесь, чтобы открыть диалоговое окно выбора","ra_Please allow popups in your browser for this page!":"Пожалуйста, разрешите всплывающие окна в вашем браузере для этой страницы!","ra_Please confirm":"Пожалуйста подтвердите","ra_Please create license":"Пожалуйста, создайте лицензию","ra_Please enter the license":"Пожалуйста, введите лицензию","ra_Please select file...":"Пожалуйста, выберите файл...","ra_Please select object ID...":"Пожалуйста, выберите идентификатор объекта ...","ra_Port could be used by %s":"Порт может использоваться %s","ra_Port is already used by %s":"Порт уже используется %s","ra_Press ENTER Key to add new item":"Нажмите клавишу ENTER, чтобы добавить новый элемент.","ra_Private certificate":"Частный сертификат",ra_Product:JO,"ra_Public certificate":"Публичный сертификат","ra_Quality code":"Валидность","ra_Refresh tree":"Обновить дерево","ra_Reload files":"Обновить",ra_Rename_Move_Copy:BO,"ra_Renew %s access":"Продлить доступ %s",ra_Repeat:RO,ra_Replace:FO,"ra_Request timed out":"Истекло время запроса","ra_Restrict to folder":"Ограничить папкой",ra_Root:GO,ra_Saturday:HO,ra_Save:VO,"ra_Save and close":"Сохранить и закрыть","ra_Save configuration to file":"Сохранить конфигурацию в файл","ra_Save objects tree as JSON file":"Сохранить дерево объектов как файл JSON","ra_Select all":"Выбрать все","ra_Select color":"Выберите цвет","ra_Select predefined icon":"Выберите предопределенный значок","ra_Select type of export":"Выберите тип экспорта",ra_Selected:ZO,"ra_Selected %s object(s)":"Объектов: %s","ra_Serial number (UUID)":"Серийный номер (UUID)",'ra_Serial number (UUID) "%s" in license is for other device.':"Серийный номер (UUID) «%s» в лицензии предназначен для другого устройства.","ra_Session will expire in %s seconds. Continue?":"Сессия истечет через %s секунд. Продолжить?","ra_Show all folders":"Показать все папки","ra_Show lines between rows":"Показать линии между строками","ra_Show/Hide object descriptions":"Показать/скрыть описания объектов","ra_Show/hide filter input":"Показать/скрыть ввод фильтра","ra_Some data are not stored. Discard?":"Некоторые данные не сохранились. Отказаться?",ra_States:XO,"ra_Successfully authorized. Token valid till %s and will be automatically renewed.":"Авторизация выполнена успешно. Токен действителен до %s и будет автоматически продлен.","ra_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":"Авторизация выполнена успешно. Токен действителен до %s, но его срок действия может истечь, так как экземпляр не запущен.","ra_Suitable license not found in license manager":"Подходящая лицензия не найдена в менеджере лицензий",ra_Sunday:KO,"ra_Suppress question for next %s minutes":"Скрыть вопрос на следующие %s минут(ы)","ra_System language":"Язык системы","ra_Take browser position":"Взять позицию из браузера","ra_Take position from system settings":"Занять позицию из системных настроек",'ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").':"Эксперты могут создавать объекты везде, кроме второго уровня (например, «vis.0» или «javascript.0»).","ra_The page you are looking for was not found":"Страница, которую вы ищете, не найдена","ra_The schedule will be executed every minute. Are you sure?":"Расписание будет выполняться каждую минуту. Вы уверены?","ra_The schedule will be executed every second. Are you sure?":"Расписание будет выполняться каждую секунду. Вы уверены?",ra_Thursday:qO,ra_Timestamp:eE,"ra_Toggle expert mode":"Переключить экспертный режим","ra_Toggle the states view":"Переключить режим просмотра состояний","ra_Toggle view mode":"Переключить режим просмотра","ra_Too big":"Слишком большое","ra_Too small":"Слишком маленькое","ra_Transparent dialog":"Прозрачный диалог",ra_Tuesday:tE,"ra_Unknown error":"Неизвестная ошибка","ra_Unknown error!":"Неизвестная ошибка!",ra_Update:sE,"ra_Upload file":"Загрузить файл","ra_Use all available let's encrypt certificates":"Использовать все доступные сертификаты Let’s encrypt","ra_Use iobroker.acme adapter for letsencrypt certificates":"Используйте адаптер iobroker.acme для сертификатов letsencrypt","ra_Use system settings for position":"Использовать системные настройки для позиции","ra_Used system settings":"Системные настройки","ra_User files":"Файлы пользователя",ra_ValidTill:iE,ra_Value:rE,ra_Version:oE,"ra_View file":"Посмотреть файл","ra_View: %s":"Просмотр: %s",ra_Wednesday:nE,ra_Width:aE,"ra_YAML editor":"Редактор YAML",ra_Yes:ME,"ra_You can export all objects or just the selected branch.":"Вы можете экспортировать все объекты или только выбранную ветвь.","ra_You can filter entries by entering here some text":"Вы можете отфильтровать записи, введя здесь текст","ra_You can use * as wildcard":"Вы можете использовать * в качестве подстановочного знака",ra___different__:cE,ra_aclEveryone_read_object:uE,ra_aclEveryone_read_state:lE,ra_aclEveryone_write_object:NE,ra_aclEveryone_write_state:LE,ra_aclGroup_read_object:gE,ra_aclGroup_read_state:jE,ra_aclGroup_write_object:yE,ra_aclGroup_write_state:TE,ra_aclOwner_read_object:DE,ra_aclOwner_read_state:dE,ra_aclOwner_write_object:hE,ra_aclOwner_write_state:zE,ra_buttons:wE,ra_changedFrom:IE,ra_close:CE,ra_create_boolean_state:pE,ra_create_channel:AE,ra_create_device:mE,ra_create_number_state:fE,ra_create_state:OE,ra_create_string_state:EE,ra_daysShortText:_E,ra_dow_Fr:xE,ra_dow_Mo:SE,ra_dow_Sa:kE,ra_dow_Su:vE,ra_dow_Th:YE,ra_dow_Tu:QE,ra_dow_We:bE,ra_expertMode:UE,ra_false:$E,ra_fileType_all:PE,ra_fileType_audio:WE,ra_fileType_code:JE,ra_fileType_images:BE,ra_fileType_txt:RE,ra_fileType_video:FE,"ra_fileType_video,":"видео",ra_filter_customs:GE,ra_filter_customs_without:HE,ra_filter_func:VE,ra_filter_id:ZE,ra_filter_name:XE,ra_filter_role:KE,ra_filter_room:qE,ra_filter_type:e_,"ra_import data from %s file":"Импортировать данные из файла %s",ra_invalidConfig:t_,ra_lastChange:s_,ra_locally:i_,ra_month_Apr:r_,ra_month_Aug:o_,ra_month_Dec:n_,ra_month_Feb:a_,ra_month_Jan:M_,ra_month_Jul:c_,ra_month_Jun:u_,ra_month_Mai:l_,ra_month_Mar:N_,ra_month_Nov:L_,ra_month_Oct:g_,ra_month_Sep:j_,ra_months_Apr:y_,ra_months_Aug:T_,ra_months_Dec:D_,ra_months_Feb:d_,ra_months_Jan:h_,ra_months_Jul:z_,ra_months_Jun:w_,ra_months_Mai:I_,ra_months_Mar:C_,ra_months_Nov:p_,ra_months_Oct:A_,ra_months_Sep:m_,"ra_no confirm for 5 mins":"не спрашивать подтверждения в течение 5 минут",ra_none:f_,ra_object_changed_by:O_,ra_object_changed_by_user:E_,ra_otherConfig:__,ra_qualityCode:x_,ra_repeat:S_,ra_select_folder_hint:k_,ra_show_all:v_,ra_state_changed_by:Y_,ra_state_changed_from:Q_,ra_timestamp:b_,ra_tooltip_ack:U_,ra_tooltip_comment:$_,ra_tooltip_copyState:P_,ra_tooltip_ctrlForLink:W_,ra_tooltip_customConfig:J_,ra_tooltip_deleteObject:B_,ra_tooltip_editObject:R_,ra_tooltip_editState:F_,ra_tooltip_expire:G_,ra_tooltip_from:H_,ra_tooltip_lc:V_,ra_tooltip_quality:Z_,ra_tooltip_ts:X_,ra_tooltip_user:K_,ra_tooltip_value:q_,ra_true:ex,"ra_use seconds":"секунды",ra_val:tx,"ra_via internet":"через интернет",ra_warning_every_minute:sx,ra_warning_every_second:ix,sc_cron:rx,sc_date:ox,sc_dates:nx,sc_dow:ax,sc_dows:Mx,sc_every:cx,sc_everyN_dates:ux,sc_everyN_dow:lx,sc_everyN_dows:Nx,sc_everyN_hours:Lx,sc_everyN_minutes:gx,sc_everyN_months:jx,sc_everyN_seconds:yx,sc_every_dates:Tx,sc_every_dow:Dx,sc_every_dows:dx,sc_every_hours:hx,sc_every_minutes:zx,sc_every_months:wx,sc_every_seconds:Ix,sc_from:Cx,sc_hours:px,sc_interval:Ax,sc_intervalBetween:mx,sc_invalid_cron:fx,sc_minutes:Ox,sc_months:Ex,sc_once:_x,sc_period:xx,sc_seconds:Sx,sc_simple:kx,sc_specific:vx,sc_specific_dates:Yx,sc_specific_dow:Qx,sc_specific_dows:bx,sc_specific_hours:Ux,sc_specific_minutes:$x,sc_specific_months:Px,sc_specific_seconds:Wx,sc_time:Jx,sc_to:Bx,sc_wizard:Rx,sch_all:Fx,sch_astroDay:Gx,sch_astroNight:Hx,sch_astro_dawn:Vx,sch_astro_dusk:Zx,sch_astro_goldenHour:Xx,sch_astro_goldenHourEnd:Kx,sch_astro_nadir:qx,sch_astro_nauticalDawn:eS,sch_astro_nauticalDusk:tS,sch_astro_night:sS,sch_astro_nightEnd:iS,sch_astro_solarNoon:rS,sch_astro_sunrise:oS,sch_astro_sunriseEnd:nS,sch_astro_sunset:aS,sch_astro_sunsetStart:MS,sch_at:cS,sch_desc_atTime:uS,sch_desc_everyDay:lS,sch_desc_everyHour:NS,sch_desc_everyMinute:LS,sch_desc_everyMonth:gS,sch_desc_everyNDay:jS,sch_desc_everyNHours:yS,sch_desc_everyNMinutes:TS,sch_desc_everyNMonths:DS,sch_desc_everyNWeeks:dS,sch_desc_everyNYears:hS,sch_desc_everyWeek:zS,sch_desc_everyYear:wS,sch_desc_intervalFromTo:IS,sch_desc_never:CS,sch_desc_onDate:pS,sch_desc_onDates:AS,sch_desc_onEveryDate:mS,sch_desc_onMonth:fS,sch_desc_onMonths:OS,sch_desc_onWeekday:ES,sch_desc_onWeekdays:_S,sch_desc_onWeekends:xS,sch_desc_onWorkdays:SS,sch_desc_onceInPast:kS,sch_desc_once_on:vS,sch_desc_validFrom:YS,sch_desc_validFromTo:QS,sch_desc_validTo:bS,sch_every:US,sch_exactTime:$S,sch_from:PS,sch_fromTo:WS,sch_intervalTime:JS,sch_invert:BS,sch_no_one:RS,sch_on:FS,sch_period:GS,sch_periodDaily:HS,sch_periodDates:VS,sch_periodDay:ZS,sch_periodEvery:XS,sch_periodEveryDay:KS,sch_periodEveryMonth:qS,sch_periodEveryWeek:e5,sch_periodEveryYear:t5,sch_periodHours:s5,sch_periodMinutes:i5,sch_periodMonth:r5,sch_periodMonthly:o5,sch_periodOnce:n5,sch_periodSpecificMonths:a5,sch_periodWeek:M5,sch_periodWeekdays:c5,sch_periodWeekend:u5,sch_periodWeekly:l5,sch_periodWorkdays:N5,sch_periodYear:L5,sch_periodYearly:g5,sch_specificTime:j5,sch_time:y5,sch_to:T5,sch_valid:D5,sch_validFrom:d5,sch_validTo:h5,sch_wholeDay:z5,sch_yearEveryMonth:w5},C5="Ações",p5="Acrescentar",A5="Cancelar",m5="Categorias",f5="Verificado",O5="Excluir",E5="Perto",_5="Comercial",x5="Configurar",S5="Conectado",k5="Continuar",v5="Copiado",Y5="Crio",Q5="Colheita",b5="Delete",U5="Excluir",$5="Descartar",P5="Desconectado",W5="Erro",J5="Filtro",B5="Sexta-feira",R5="Latitude",F5="Sair",G5="Longitude",H5="mensagem",V5="Segunda-feira",Z5="Nome",X5="Objetos",K5="Está bem",q5="produtos",ek="Renomear/Mover/Copiar",tk="Repita",sk="Substituir",ik="Raiz",rk="Sábado",ok="Salve ",nk="Selecionado",ak="Estados",Mk="Domingo",ck="Quinta-feira",uk="Timestamp",lk="Terça-feira",Nk="Atualizar",Lk="Válida até",gk="Valor",jk="Versão",yk="Quarta-feira",Tk="Largura",Dk="Sim",dk="diferente",hk="Todos podem ler objetos",zk="Todos podem ler o estado",wk="Todos podem escrever objetos",Ik="Todos podem escrever o estado",Ck="O grupo pode ler o objeto",pk="O grupo pode ler o estado",Ak="O grupo pode escrever o objeto",mk="O grupo pode escrever o estado",fk="O proprietário pode ler o objeto",Ok="O proprietário pode ler o estado",Ek="O proprietário pode escrever o objeto",_k="O proprietário pode escrever o estado",xk="Botões",Sk="Mudou de",kk="fechar",vk="Criar estado booleano",Yk="Criar canal",Qk="Criar dispositivo",bk="Criar estado numérico",Uk="Criar estado",$k="Criar estado de string",Pk="d.",Wk="Fr",Jk="Mo",Bk="Sa",Rk="Su",Fk="º",Gk="Tu",Hk="Nós",Vk="Modo especialista",Zk="FALSO",Xk="Todos os arquivos",Kk="áudio",qk="Código/JSON",ev="Imagens",tv="Texto",sv="Vídeo",iv="Configurações",rv="sem",ov="Função",nv="ID",av="Nome",Mv="Papel (Função)",cv="Quarto",uv="Tipo",lv="Configurações inválidas",Nv="Última mudança",Lv="localmente",gv="abril",jv="agosto",yv="dezembro",Tv="fevereiro",Dv="janeiro",dv="julho",hv="junho",zv="Mai",wv="março",Iv="novembro",Cv="outubro",pv="setembro",Av="abril",mv="agosto",fv="dezembro",Ov="fevereiro",Ev="janeiro",_v="julho",xv="junho",Sv="Mai",kv="março",vv="novembro",Yv="outubro",Qv="setembro",bv="Nenhum",Uv="Objeto alterado por",$v="Objeto alterado pela última vez em",Pv="Configurações de outro adaptador %s",Wv="Código de qualidade",Jv="repetir",Bv='Para selecionar a pasta, basta segurar a tecla "shift" clicando na pasta.',Rv="Mostrar tudo",Fv="Estado alterado por",Gv="Objeto alterado de",Hv="Timestamp",Vv="Confirmado",Zv="Comente",Xv="Copie o valor do estado",Kv="Segure a tecla Ctrl/⌘ para abrir o link",qv="Opções customizadas",eY="Excluir objeto",tY="Editar objeto",sY="Edite o valor do estado",iY="Expira em",rY="De",oY="Última alteração",nY="Qualidade",aY="Timestamp",MY="Usuário",cY="Valor",uY="verdadeiro",lY="Valor",NY="Aviso: O trabalho CRON será executado a cada minuto durante o período especificado!",LY="Aviso: O trabalho CRON será executado a cada segundo durante o período especificado!",gY="CRON",jY="Data",yY="Dias",TY="Dia",DY="Dia da semana",dY="todos",hY="a cada N dias",zY="todo enésimo dia da semana",wY="todos os N dias da semana",IY="a cada N horas",CY="a cada N minutos",pY="a cada N meses",AY="a cada N segundos",mY="todo dia",fY="todos os dias da semana",OY="todos os dias da semana",EY="toda hora",_Y="todo minuto",xY="todo mês",SY="todo segundo",kY="de",vY="horas",YY="intervalo",QY="intervalo entre",bY="CRON inválido",UY="minutos",$Y="meses",PY="uma vez",WY="período",JY="segundos",BY="simples",RY="tempo específico",FY="datas específicas",GY="dia(s) específico(s) da semana",HY="dia específico de semanas",VY="horas específicas",ZY="minutos específicos",XY="meses específicos",KY="segundos específicos",qY="tempo",eQ="para",tQ="assistente",sQ="tudo",iQ="dia astral",rQ="noite astral",oQ="amanhecer",nQ="anoitecer",aQ="hora dourada",MQ="Fim da hora dourada",cQ="nadir",uQ="Amanhecer náutico",lQ="Anoitecer náutico",NQ="noite",LQ="fim da noite",gQ="meio-dia solar",jQ="nascer do sol",yQ="fim do nascer do sol",TQ="pôr do sol",DQ="início do pôr do sol",dQ="às",hQ="em %s",zQ="todo dia",wQ="toda hora",IQ="todo minuto",CQ="todo mês",pQ="a cada %s dias",AQ="a cada %s horas",mQ="a cada %s minutos",fQ="a cada %s meses",OQ="a cada %s semanas",EQ="a cada %s anos",_Q="toda semana",xQ="todo ano",SQ="de %s para %s",kQ="nunca",vQ="em %s de %s",YQ="em %s e %s de",QQ="em toda data de",bQ="%s",UQ="%s e %s",$Q="em %s",PQ="em %s e %s",WQ="nos fins de semana",JQ="em dias úteis",BQ="não será mais executado, porque o começo está no passado",RQ="em %s",FQ="de %s",GQ="Executar de até",HQ="até %s",VQ="cada",ZQ="tempo específico",XQ="de",KQ="de a´t",qQ="tempo de intervalo",eb="invertido",tb="nenhum",sb="em",ib="período",rb="diariamente",ob="datas",nb="dia",ab="todos",Mb="todo dia",cb="todo mês",ub="toda semana",lb="todo ano",Nb="horas",Lb="minutos",gb="mês",jb="por mês",yb="uma vez",Tb="meses específicos",Db="semana",db="dias úteis",hb="final de semana",zb="semanal",wb="dias úteis",Ib="ano",Cb="anual",pb="tempo específico",Ab="tempo",mb="para",fb="válido",Ob="de",Eb="para",_b="dia inteiro",xb="todo mês",Sb={"ra_%s links from aliases":"%s links de aliases","ra_%s object(s) processed":"%s objeto(s) processado(s)","ra_%s was imported":"%s foi importado","ra_Accept license":"Aceitar licença",ra_Actions:C5,"ra_Add new child object to selected parent":"Adicionar novo objeto filho ao pai selecionado","ra_Add objects tree from JSON file":"Adicionar árvore de objetos do arquivo JSON","ra_Add row":"Adicionar linha","ra_Advanced options":"Opções avançadas","ra_All items are filtered out":"Todos os itens são filtrados","ra_All objects":"Todos os objetos",ra_Append:p5,"ra_Append %s entries or replace existing?":"Acrescentar %s entradas ou substituir as existentes?","ra_Append or replace?":"Acrescentar ou substituir?","ra_Are you sure?":"Você tem certeza?","ra_Auto (no custom columns)":"Auto (sem colunas personalizadas)","ra_Back to %s":"Voltar para %s","ra_Background image":"Imagem de fundo",ra_Cancel:A5,"ra_Cannot add items with set filter":"Não é possível adicionar itens com filtro definido","ra_Cannot decode license":"Não é possível decodificar a licença","ra_Cannot determine position: System settings are empty and GPS detection is disabled in browser":"Não é possível determinar a posição: as configurações do sistema estão vazias e a detecção de GPS está desativada no navegador",'ra_Cannot find "%s"':'Não foi possível encontrar "%s"','ra_Cannot read "%s"':'Não é possível ler "%s"',"ra_Cannot read licenses: %s":"Não é possível ler licenças: %s","ra_Cannot retrieve options, as instance is offline":"Não é possível recuperar opções, pois a instância está off-line","ra_Cannot update attribute, because not found in the object":"Não é possível atualizar o atributo, porque não foi encontrado no objeto","ra_Cannot upload":"Não é possível fazer upload",ra_Categories:m5,"ra_Chained certificate":"certificado encadeado","ra_Change color theme":"Alterar tema de cores","ra_Changed from":"Mudou de","ra_Channel → State":"Canal → Estado","ra_Check license":"Verifique a licença",ra_Checked:f5,ra_Clear:O5,"ra_Clear filter":"Filtro limpo","ra_Clear icon":"Ícone de limpeza","ra_Click to see in full size":"Clique para ver em tamanho real.","ra_Click to show":"Clique para mostrar","ra_Clone current row":"Clonar linha atual",ra_Close:E5,"ra_Collapse all nodes":"Recolher todos os nós","ra_Collapse one step node":"Recolher um nível",ra_Commercial:_5,ra_Configure:x5,"ra_Configure visible columns":"Configurar colunas visíveis","ra_Confirm deletion of %s":"Confirme a exclusão de %s",ra_Connected:S5,ra_Continue:k5,ra_Copied:v5,"ra_Copied %s":'"%s" copiado',"ra_Copy content":"Copiar conteúdo",ra_Create:Y5,"ra_Create alias":"Criar alias","ra_Create folder":"Criar pasta","ra_Create new folder in %s":"Crie uma nova pasta em %s",ra_Crop:Q5,"ra_Define CRON...":"Defina CRON...","ra_Define functions":"Definir funções","ra_Define rooms":"Definir quartos","ra_Define schedule":"Definir cronograma","ra_Define schedule...":"Definir programação ...",ra_Del:b5,ra_Delete:U5,"ra_Delete current row":"Excluir linha atual","ra_Deselect all":"Desmarque todos","ra_Device → Channel → State":"Dispositivo → Canal → Estado","ra_Disable/Enable translation":"Desativar/Ativar tradução",ra_Discard:$5,ra_Disconnected:P5,"ra_Do not ask for next 2 hours in this session":"Não peça as próximas 2 horas nesta sessão","ra_Do not export values of states":"Não exporte valores de estados","ra_Do not use let's encrypt":"Não use vamos criptografar","ra_Docker is not available":"O Docker não está disponível","ra_Docker is not installed or not running":"O Docker não está instalado ou não está em execução","ra_Double click to reset table layout":"Clique duas vezes para redefinir o layout da tabela","ra_Drag 'n' drop some files here, or click to select files":"Arraste e solte alguns arquivos aqui ou clique para selecionar arquivos","ra_Drop file here":"Solte o arquivo aqui","ra_Drop the files here...":"Solte o arquivo aqui ...","ra_Duplicate name":"Nome duplicado","ra_Edit ACL":"Editar ACL","ra_Edit alias":"Editar alias","ra_Edit custom config":"Editar configuração personalizada","ra_Edit full path":"Editar caminho completo","ra_Edit function":"Função de edição","ra_Edit object field":"Editar campo de objeto","ra_Edit role":"Editar papel","ra_Edit room":"Sala de edição","ra_Edit value":"Editar valor","ra_Enter the code from that page here":"Digite o código dessa página aqui",ra_Error:W5,"ra_Expand all nodes":"Expanda todos os nós","ra_Expand one step node":"Expanda um nível","ra_Expand/Collapse card":"Expandir/Recolher cartão","ra_Export configuration section":"Seção de configuração de exportação","ra_Export data to %s file":"Exportar dados para o arquivo %s","ra_Failed to open JSON File":"Falha ao abrir arquivo JSON","ra_Fallback custom certificates":"Certificados personalizados alternativos","ra_File is too big. Max %sk allowed. Try use SVG.":"O arquivo é muito grande. Max %sk permitido. Tente usar SVG.",ra_Filter:J5,"ra_Filter and Data Actions":"Ações de filtro e dados","ra_Filter files":"Filtrar arquivos","ra_Folder name":"Nome da pasta","ra_Folder → Channel → State":"Pasta → Canal → Estado","ra_Folder → Device → Channel → State":"Pasta → Dispositivo → Canal → Estado","ra_Folder → State":"Pasta → Estado","ra_Folders always first":"Pastas sempre primeiro",ra_Friday:B5,"ra_From file":"Do arquivo","ra_From text":"Do texto","ra_Get %s access":"Obtenha acesso %s","ra_Good luck":"Boa sorte","ra_Hide empty folders":"Esconder pastas vazias","ra_If no file will be created in the folder, it will disappear after the browser closed":"Se nenhum arquivo for criado na pasta, ele desaparecerá depois que o navegador for fechado","ra_If the button above does not work, you can authorize manually this app by visiting this url":"Se o botão acima não funcionar, você pode autorizar manualmente este aplicativo visitando esta url","ra_Import and add configuration section":"Seção de importação e adição de configuração","ra_Import and replace configuration section":"Seção de configuração de importação e substituição","ra_Import data from %s file":"Importar dados do arquivo %s","ra_Import from %s":"Importar de %s","ra_Instance %s is alive":"O %s da instância está ativo","ra_Instance %s is not alive":"O %s da instância não está ativo","ra_Instance is not alive":"A instância não está ativa","ra_Invalid CRON":"CRON inválido","ra_Invalid JSON":"JSON inválido","ra_Invalid JSON file.":"Arquivo JSON inválido.","ra_Invalid JSON format. Expected an array.":"Formato JSON inválido. Esperava-se uma matriz.","ra_Invalid answer from server":"Resposta inválida do servidor","ra_Invalid parent folder!":"Pasta pai inválida!","ra_Invalid structure":"Estrutura inválida","ra_JSON editor":"Editor JSON","ra_Last change":"Última mudança",ra_Latitude:R5,"ra_License %s":"Licença %s","ra_License agreement":"Contrato de licença","ra_License does not exist":"A licença não existe","ra_License expired on %s":"A licença expirou em %s",'ra_License for other product "%s"':'Licença para outro produto "%s"',"ra_License is for version %s, but required version is %s.":"A licença é para a versão %s, mas a versão necessária é %s.","ra_License must be converted":"A licença deve ser convertida para uma versão mais recente. Você pode fazê-lo em seu perfil iobroker.net.","ra_License not found in license manager. Do you want to read licenses from iobroker.net?":"Licença não encontrada no gerenciador de licenças. Deseja atualizar as licenças do iobroker.net?","ra_Listen on all IPs":"Ouça em todos os IPs","ra_Load configuration from file":"Carregar configuração do arquivo",ra_Logout:F5,ra_Longitude:G5,'ra_May not trigger "updateLicenses"':'Pode não acionar "updateLicenses"',ra_Message:H5,ra_Monday:V5,"ra_Move down":"Mover para baixo","ra_Move up":"Subir",ra_Name:Z5,"ra_No data found in file":"Nenhum dado encontrado no arquivo","ra_No one license found in license manager":"Nenhuma licença encontrada no gerenciador de licenças","ra_No response from admin":"Nenhuma resposta do administrador","ra_No response from the backend":"Nenhuma resposta do backend",'ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".':'Os não especialistas podem criar novos objetos apenas em "0_userdata.0" ou "alias.0".',"ra_Not a number":"Não é um número","ra_OAuth Client ID":"ID do cliente OAuth","ra_OAuth Client secret":"Segredo do cliente OAuth",ra_Objects:X5,ra_Ok:K5,"ra_On weekdays":"Nos dias úteis","ra_Only following structures of objects are available:":"Apenas as seguintes estruturas de objetos estão disponíveis:","ra_Only selected":"Apenas selecionado","ra_Owner group":"Grupo proprietário","ra_Owner user":"Usuário proprietário","ra_Passwords are not equal!":"As senhas não são iguais!","ra_Place your files here or click here to open the browse dialog":"Coloque seus arquivos aqui ou clique aqui para abrir a janela de navegação","ra_Please allow popups in your browser for this page!":"Por favor, permita pop-ups no seu navegador para esta página!","ra_Please confirm":"Por favor confirme","ra_Please create license":"Crie uma licença","ra_Please enter the license":"Por favor, insira a licença","ra_Please select file...":"Selecione o arquivo...","ra_Please select object ID...":"Selecione o ID do objeto ...","ra_Port could be used by %s":"A porta pode ser usada por %s","ra_Port is already used by %s":"A porta já está sendo usada por %s","ra_Press ENTER Key to add new item":"Pressione a tecla ENTER para adicionar um novo item","ra_Private certificate":"certificado privado",ra_Product:q5,"ra_Public certificate":"certificado público","ra_Quality code":"Qualidade","ra_Refresh tree":"Atualizar árvore","ra_Reload files":"Recarregar arquivos",ra_Rename_Move_Copy:ek,"ra_Renew %s access":"Renovar acesso %s",ra_Repeat:tk,ra_Replace:sk,"ra_Request timed out":"Solicitação expirou","ra_Restrict to folder":"Restringir à pasta",ra_Root:ik,ra_Saturday:rk,ra_Save:ok,"ra_Save and close":"Salvar e fechar","ra_Save configuration to file":"Salvar configuração em arquivo","ra_Save objects tree as JSON file":"Salvar árvore de objetos como arquivo JSON","ra_Select all":"Selecionar tudo","ra_Select color":"Selecione a cor","ra_Select predefined icon":"Selecione o ícone predefinido","ra_Select type of export":"Selecione o tipo de exportação",ra_Selected:nk,"ra_Selected %s object(s)":"%s objeto(s) selecionado(s)","ra_Serial number (UUID)":"Número de série (UUID)",'ra_Serial number (UUID) "%s" in license is for other device.':'O número de série (UUID) "%s" na licença é para outro dispositivo.',"ra_Session will expire in %s seconds. Continue?":"A sessão irá expirar em %s segundos. Continuar?","ra_Show all folders":"Mostrar todas as pastas","ra_Show lines between rows":"Mostrar linhas entre as linhas","ra_Show/Hide object descriptions":"Mostrar/ocultar descrições de objetos","ra_Show/hide filter input":"Mostrar/ocultar entrada de filtro","ra_Some data are not stored. Discard?":"Alguns dados não são armazenados. Descartar?",ra_States:ak,"ra_Successfully authorized. Token valid till %s and will be automatically renewed.":"Autorizado com sucesso. Token válido até %s e será renovado automaticamente.","ra_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":"Autorizado com sucesso. Token válido até %s, mas pode expirar, pois a instância não está em execução.","ra_Suitable license not found in license manager":"Licença adequada não encontrada no gerenciador de licenças",ra_Sunday:Mk,"ra_Suppress question for next %s minutes":"Suprimir pergunta nos próximos %s minutos","ra_System language":"Idioma do sistema","ra_Take browser position":"Tomar posição do navegador","ra_Take position from system settings":"Tomar posição a partir das configurações do sistema",'ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").':'Os especialistas podem criar objetos em qualquer lugar, exceto no segundo nível (por exemplo, "vis.0" ou "javascript.0").',"ra_The page you are looking for was not found":"A página que você está procurando não foi encontrada","ra_The schedule will be executed every minute. Are you sure?":"O agendamento será executado a cada minuto. Tem certeza?","ra_The schedule will be executed every second. Are you sure?":"O agendamento será executado a cada segundo. Tem certeza?",ra_Thursday:ck,ra_Timestamp:uk,"ra_Toggle expert mode":"Alternar modo especialista","ra_Toggle the states view":"Alternar a visualização dos estados","ra_Toggle view mode":"Alternar modo de visualização","ra_Too big":"Muito grande","ra_Too small":"Muito pequeno","ra_Transparent dialog":"Diálogo transparente",ra_Tuesday:lk,"ra_Unknown error":"Erro desconhecido","ra_Unknown error!":"Erro desconhecido!",ra_Update:Nk,"ra_Upload file":"Subir arquivo","ra_Use all available let's encrypt certificates":"Use todos os certificados disponíveis vamos criptografar","ra_Use iobroker.acme adapter for letsencrypt certificates":"Use o adaptador iobroker.acme para certificados letsencrypt","ra_Use system settings for position":"Use as configurações do sistema para a posição","ra_Used system settings":"Configurações do sistema usadas","ra_User files":"Arquivos do usuário",ra_ValidTill:Lk,ra_Value:gk,ra_Version:jk,"ra_View file":"Visualizar arquivo","ra_View: %s":"Visualizar: %s",ra_Wednesday:yk,ra_Width:Tk,"ra_YAML editor":"Editor YAML",ra_Yes:Dk,"ra_You can export all objects or just the selected branch.":"Você pode exportar todos os objetos ou apenas a ramificação selecionada.","ra_You can filter entries by entering here some text":"Você pode filtrar as entradas digitando aqui algum texto","ra_You can use * as wildcard":"Você pode usar * como curinga",ra___different__:dk,ra_aclEveryone_read_object:hk,ra_aclEveryone_read_state:zk,ra_aclEveryone_write_object:wk,ra_aclEveryone_write_state:Ik,ra_aclGroup_read_object:Ck,ra_aclGroup_read_state:pk,ra_aclGroup_write_object:Ak,ra_aclGroup_write_state:mk,ra_aclOwner_read_object:fk,ra_aclOwner_read_state:Ok,ra_aclOwner_write_object:Ek,ra_aclOwner_write_state:_k,ra_buttons:xk,ra_changedFrom:Sk,ra_close:kk,ra_create_boolean_state:vk,ra_create_channel:Yk,ra_create_device:Qk,ra_create_number_state:bk,ra_create_state:Uk,ra_create_string_state:$k,ra_daysShortText:Pk,ra_dow_Fr:Wk,ra_dow_Mo:Jk,ra_dow_Sa:Bk,ra_dow_Su:Rk,ra_dow_Th:Fk,ra_dow_Tu:Gk,ra_dow_We:Hk,ra_expertMode:Vk,ra_false:Zk,ra_fileType_all:Xk,ra_fileType_audio:Kk,ra_fileType_code:qk,ra_fileType_images:ev,ra_fileType_txt:tv,ra_fileType_video:sv,"ra_fileType_video,":"Vídeo",ra_filter_customs:iv,ra_filter_customs_without:rv,ra_filter_func:ov,ra_filter_id:nv,ra_filter_name:av,ra_filter_role:Mv,ra_filter_room:cv,ra_filter_type:uv,"ra_import data from %s file":"Importar dados do arquivo %s",ra_invalidConfig:lv,ra_lastChange:Nv,ra_locally:Lv,ra_month_Apr:gv,ra_month_Aug:jv,ra_month_Dec:yv,ra_month_Feb:Tv,ra_month_Jan:Dv,ra_month_Jul:dv,ra_month_Jun:hv,ra_month_Mai:zv,ra_month_Mar:wv,ra_month_Nov:Iv,ra_month_Oct:Cv,ra_month_Sep:pv,ra_months_Apr:Av,ra_months_Aug:mv,ra_months_Dec:fv,ra_months_Feb:Ov,ra_months_Jan:Ev,ra_months_Jul:_v,ra_months_Jun:xv,ra_months_Mai:Sv,ra_months_Mar:kv,ra_months_Nov:vv,ra_months_Oct:Yv,ra_months_Sep:Qv,"ra_no confirm for 5 mins":"sem confirmação por 5 minutos",ra_none:bv,ra_object_changed_by:Uv,ra_object_changed_by_user:$v,ra_otherConfig:Pv,ra_qualityCode:Wv,ra_repeat:Jv,ra_select_folder_hint:Bv,ra_show_all:Rv,ra_state_changed_by:Fv,ra_state_changed_from:Gv,ra_timestamp:Hv,ra_tooltip_ack:Vv,ra_tooltip_comment:Zv,ra_tooltip_copyState:Xv,ra_tooltip_ctrlForLink:Kv,ra_tooltip_customConfig:qv,ra_tooltip_deleteObject:eY,ra_tooltip_editObject:tY,ra_tooltip_editState:sY,ra_tooltip_expire:iY,ra_tooltip_from:rY,ra_tooltip_lc:oY,ra_tooltip_quality:nY,ra_tooltip_ts:aY,ra_tooltip_user:MY,ra_tooltip_value:cY,ra_true:uY,"ra_use seconds":"use segundos",ra_val:lY,"ra_via internet":"via internet",ra_warning_every_minute:NY,ra_warning_every_second:LY,sc_cron:gY,sc_date:jY,sc_dates:yY,sc_dow:TY,sc_dows:DY,sc_every:dY,sc_everyN_dates:hY,sc_everyN_dow:zY,sc_everyN_dows:wY,sc_everyN_hours:IY,sc_everyN_minutes:CY,sc_everyN_months:pY,sc_everyN_seconds:AY,sc_every_dates:mY,sc_every_dow:fY,sc_every_dows:OY,sc_every_hours:EY,sc_every_minutes:_Y,sc_every_months:xY,sc_every_seconds:SY,sc_from:kY,sc_hours:vY,sc_interval:YY,sc_intervalBetween:QY,sc_invalid_cron:bY,sc_minutes:UY,sc_months:$Y,sc_once:PY,sc_period:WY,sc_seconds:JY,sc_simple:BY,sc_specific:RY,sc_specific_dates:FY,sc_specific_dow:GY,sc_specific_dows:HY,sc_specific_hours:VY,sc_specific_minutes:ZY,sc_specific_months:XY,sc_specific_seconds:KY,sc_time:qY,sc_to:eQ,sc_wizard:tQ,sch_all:sQ,sch_astroDay:iQ,sch_astroNight:rQ,sch_astro_dawn:oQ,sch_astro_dusk:nQ,sch_astro_goldenHour:aQ,sch_astro_goldenHourEnd:MQ,sch_astro_nadir:cQ,sch_astro_nauticalDawn:uQ,sch_astro_nauticalDusk:lQ,sch_astro_night:NQ,sch_astro_nightEnd:LQ,sch_astro_solarNoon:gQ,sch_astro_sunrise:jQ,sch_astro_sunriseEnd:yQ,sch_astro_sunset:TQ,sch_astro_sunsetStart:DQ,sch_at:dQ,sch_desc_atTime:hQ,sch_desc_everyDay:zQ,sch_desc_everyHour:wQ,sch_desc_everyMinute:IQ,sch_desc_everyMonth:CQ,sch_desc_everyNDay:pQ,sch_desc_everyNHours:AQ,sch_desc_everyNMinutes:mQ,sch_desc_everyNMonths:fQ,sch_desc_everyNWeeks:OQ,sch_desc_everyNYears:EQ,sch_desc_everyWeek:_Q,sch_desc_everyYear:xQ,sch_desc_intervalFromTo:SQ,sch_desc_never:kQ,sch_desc_onDate:vQ,sch_desc_onDates:YQ,sch_desc_onEveryDate:QQ,sch_desc_onMonth:bQ,sch_desc_onMonths:UQ,sch_desc_onWeekday:$Q,sch_desc_onWeekdays:PQ,sch_desc_onWeekends:WQ,sch_desc_onWorkdays:JQ,sch_desc_onceInPast:BQ,sch_desc_once_on:RQ,sch_desc_validFrom:FQ,sch_desc_validFromTo:GQ,sch_desc_validTo:HQ,sch_every:VQ,sch_exactTime:ZQ,sch_from:XQ,sch_fromTo:KQ,sch_intervalTime:qQ,sch_invert:eb,sch_no_one:tb,sch_on:sb,sch_period:ib,sch_periodDaily:rb,sch_periodDates:ob,sch_periodDay:nb,sch_periodEvery:ab,sch_periodEveryDay:Mb,sch_periodEveryMonth:cb,sch_periodEveryWeek:ub,sch_periodEveryYear:lb,sch_periodHours:Nb,sch_periodMinutes:Lb,sch_periodMonth:gb,sch_periodMonthly:jb,sch_periodOnce:yb,sch_periodSpecificMonths:Tb,sch_periodWeek:Db,sch_periodWeekdays:db,sch_periodWeekend:hb,sch_periodWeekly:zb,sch_periodWorkdays:wb,sch_periodYear:Ib,sch_periodYearly:Cb,sch_specificTime:pb,sch_time:Ab,sch_to:mb,sch_valid:fb,sch_validFrom:Ob,sch_validTo:Eb,sch_wholeDay:_b,sch_yearEveryMonth:xb},kb="Acties",vb="toevoegen",Yb="Annuleer",Qb="Categorieën",bb="Gecontroleerd",Ub="Verwijderen",$b="Dichtbij",Pb="Reclame",Wb="Configureren",Jb="Verbonden",Bb="Doorgaan",Rb="Gekopieerd",Fb="Creëer",Gb="Bijsnijden",Hb="Delete",Vb="Verwijderen",Zb="Weggooien",Xb="Verbinding verbroken",Kb="Fout",qb="Filter",eU="Vrijdag",tU="Breedtegraad",sU="Uitloggen",iU="Lengtegraad",rU="Bericht",oU="Maandag",nU="Naam",aU="Voorwerpen",MU="OK",cU="Product",uU="Hernoemen/Verplaatsen/Kopiëren",lU="Herhaling",NU="Vervangen",LU="Wortel",gU="Zaterdag",jU="Sparen",yU="Geselecteerd",TU="Staten",DU="Zondag",dU="Donderdag",hU="Tijdstempel",zU="Dinsdag",wU="Bijwerken",IU="Geldig tot",CU="Waarde",pU="Versie",AU="Woensdag",mU="Breedte",fU="Ja",OU="verschillend",EU="Iedereen kan object lezen",_U="Iedereen kan staat lezen",xU="Iedereen kan object schrijven",SU="Iedereen kan staat schrijven",kU="Groep kan object lezen",vU="Groep kan status lezen",YU="Groep kan object schrijven",QU="Groep kan staat schrijven",bU="Eigenaar kan object lezen",UU="Eigenaar kan staat lezen",$U="Eigenaar kan object schrijven",PU="Eigenaar kan staat schrijven",WU="Toetsen",JU="Veranderd van",BU="dichtbij",RU="Creëer een Booleaanse status",FU="Kanaal maken",GU="Apparaat maken",HU="Nummerstatus maken",VU="Staat creëren",ZU="Tekenreeksstatus maken",XU="d.",KU="Fr",qU="Mo",e6="Za",t6="Zo",s6="Th",i6="Tu",r6="Wij",o6="Expert modus",n6="ONWAAR",a6="Alle bestanden",M6="Audio",c6="Code/JSON",u6="Afbeeldingen",l6="Tekst",N6="Video",L6="Instellingen",g6="zonder",j6="Functie",y6="ID",T6="Naam",D6="Rol",d6="Kamer",h6="Type",z6="Ongeldige instellingen",w6="Laatste wijziging",I6="plaatselijk",C6="april",p6="aug",A6="dec",m6="februari",f6="jan",O6="jul",E6="juni",_6="Mei",x6="mrt",S6="nov",k6="Okt",v6="sept",Y6="april",Q6="aug",b6="dec",U6="februari",$6="jan",P6="jul",W6="juni",J6="Mei",B6="mrt",R6="nov",F6="Okt",G6="sept",H6="geen",V6="Object veranderd door",Z6="Object voor het laatst gewijzigd om",X6="Instellingen van andere adapter %s",K6="Kwaliteitscode",q6="herhalen",e8='Om een map te selecteren, houdt u gewoon de toets "shift" ingedrukt door op de map te klikken.',t8="Alles weergeven",s8="Staat veranderd door",i8="Object veranderd van",r8="Tijdstempel",o8="Erkende vlag",n8="Opmerking",a8="Kopieer de statuswaarde",M8="Houd de Cltr/⌘-toets ingedrukt om de link te openen",c8="Aangepaste instellingen",u8="Object verwijderen",l8="Object bewerken",N8="Bewerk de statuswaarde",L8="Verloopt over",g8="Van",j8="Laatst gewijzigd",y8="Kwaliteit",T8="Tijdstempel",D8="Gebruiker",d8="Waarde",h8="WAAR",z8="Waarde",w8="Waarschuwing: De CRON-taak wordt elke minuut uitgevoerd gedurende de opgegeven periode!",I8="Waarschuwing: De CRON-taak wordt elke seconde uitgevoerd gedurende de opgegeven periode!",C8="CRON",p8="Datum",A8="data",m8="Dag",f8="Dag van de week",O8="elk",E8="elke N dagen",_8="elke N-de dag van de week",x8="elke N dag van de week",S8="elke N uur",k8="elke N minuten",v8="elke N maanden",Y8="elke N seconden",Q8="elke dag",b8="elke dag van de week",U8="elke dag van de week",$8="elk uur",P8="elke minuut",W8="elke maand",J8="elke seconde",B8="Van",R8="uren",F8="Interval",G8="Interval tussen",H8="Ongeldige CRON",V8="Notulen",Z8="maanden",X8="Een keer",K8="Periode",q8="seconden",e9="Gemakkelijk",t9="Specifieke tijd",s9="specifieke data",i9="specifieke dag(en) van de week",r9="specifieke dag van weken",o9="specifieke uren",n9="specifieke minuten",a9="specifieke maanden",M9="specifieke seconden",c9="Tijd",u9="Naar",l9="tovenaar",N9="allemaal",L9="Astro-dag",g9="Astro-nacht",j9="Dageraad",y9="Schemer",T9="gouden uur",D9="Gouden uur einde",d9="Nadir",h9="Nautische dageraad",z9="Nautische schemering",w9="Nacht",I9="Nacht einde",C9="Zonne middag",p9="zonsopkomst",A9="Sunrise einde",m9="Zonsondergang",f9="Zonsondergang start",O9="Bij",E9="op %s",_9="elke dag",x9="elk uur",S9="elke minuut",k9="elke maand",v9="elke %s dag",Y9="elke %s uur",Q9="elke %s minuten",b9="elke %s maanden",U9="elke %s weken",$9="elke %s jaar",P9="elke week",W9="elk jaar",J9="van %s tot %s",B9="nooit",R9="op %s van %s",F9="op %s en %s van",G9="op elke datum van",H9="%s",V9="%s en %s",Z9="op %s",X9="op %s en %s",K9="in het weekend",q9="op werkdagen",e7="zal niet meer worden uitgevoerd, omdat start verleden tijd is",t7="op %s",s7="van %s",i7="Uitvoeren van tot",r7="tot %s",o7="elk",n7="Specifieke tijd",a7="van",M7="Van naar",c7="Interval tijd",u7="omkeren",l7="geen",N7="Aan",L7="Periode",g7="Dagelijks",j7="data",y7="Dag",T7="elk",D7="Elke dag",d7="Elke maand",h7="Elke week",z7="Elk jaar",w7="uren",I7="Notulen",C7="maand",p7="Maandelijks",A7="Een keer",m7="Specifieke maanden",f7="Week",O7="Doordeweekse dagen",E7="Weekend",_7="Wekelijks",x7="werkdagen",S7="Jaar",k7="jaar-",v7="Specifieke tijd",Y7="Tijd",Q7="naar",b7="Geldig",U7="van",$7="naar",P7="Hele dag",W7="elke maand",J7={"ra_%s links from aliases":"%s links van aliassen","ra_%s object(s) processed":"%s object(en) verwerkt","ra_%s was imported":"%s is geïmporteerd","ra_Accept license":"Accepteer licentie",ra_Actions:kb,"ra_Add new child object to selected parent":"Voeg een nieuw kindobject toe aan het geselecteerde bovenliggende object","ra_Add objects tree from JSON file":"Objectenboom toevoegen vanuit JSON-bestand","ra_Add row":"Voeg een rij toe","ra_Advanced options":"Geavanceerde mogelijkheden","ra_All items are filtered out":"Alle items zijn uitgefilterd","ra_All objects":"Alle objecten",ra_Append:vb,"ra_Append %s entries or replace existing?":"%s ingangen toevoegen of bestaande vervangen?","ra_Append or replace?":"Toevoegen of vervangen?","ra_Are you sure?":"Weet je het zeker?","ra_Auto (no custom columns)":"Auto (geen aangepaste kolommen)","ra_Back to %s":"Terug naar %s","ra_Background image":"Achtergrond afbeelding",ra_Cancel:Yb,"ra_Cannot add items with set filter":"Kan geen items toevoegen met ingestelde filter","ra_Cannot decode license":"Kan licentie niet decoderen","ra_Cannot determine position: System settings are empty and GPS detection is disabled in browser":"Kan positie niet bepalen: systeeminstellingen zijn leeg en GPS-detectie is uitgeschakeld in browser",'ra_Cannot find "%s"':'Kan "%s" niet vinden','ra_Cannot read "%s"':'Kan "%s" niet lezen',"ra_Cannot read licenses: %s":"Kan licenties niet lezen: %s","ra_Cannot retrieve options, as instance is offline":"Kan opties niet ophalen, omdat instantie offline is","ra_Cannot update attribute, because not found in the object":"Kan kenmerk niet bijwerken, omdat het niet in het object is gevonden","ra_Cannot upload":"Kan niet uploaden",ra_Categories:Qb,"ra_Chained certificate":"Geketend certificaat","ra_Change color theme":"Kleurthema wijzigen","ra_Changed from":"Veranderd van","ra_Channel → State":"Kanaal → Staat","ra_Check license":"Licentie controleren",ra_Checked:bb,ra_Clear:Ub,"ra_Clear filter":"Filter wissen","ra_Clear icon":"Pictogram wissen","ra_Click to see in full size":"Klik om de afbeelding op volledige grootte te bekijken.","ra_Click to show":"Klik om te tonen","ra_Clone current row":"Kloon de huidige rij",ra_Close:$b,"ra_Collapse all nodes":"Vouw alle knooppunten samen","ra_Collapse one step node":"Eén niveau samenvouwen",ra_Commercial:Pb,ra_Configure:Wb,"ra_Configure visible columns":"Configureer zichtbare kolommen","ra_Confirm deletion of %s":"Bevestig het verwijderen van %s",ra_Connected:Jb,ra_Continue:Bb,ra_Copied:Rb,"ra_Copied %s":'"%s" gekopieerd',"ra_Copy content":"Inhoud kopiëren",ra_Create:Fb,"ra_Create alias":"Alias maken","ra_Create folder":"Map aanmaken","ra_Create new folder in %s":"Maak een nieuwe map in %s",ra_Crop:Gb,"ra_Define CRON...":"Definieer CRON...","ra_Define functions":"Definieer functies","ra_Define rooms":"Definieer kamers","ra_Define schedule":"Definieer schema","ra_Define schedule...":"Schema definiëren ...",ra_Del:Hb,ra_Delete:Vb,"ra_Delete current row":"Huidige rij verwijderen","ra_Deselect all":"Deselecteer alles","ra_Device → Channel → State":"Apparaat → Kanaal → Staat","ra_Disable/Enable translation":"Vertaling uitschakelen/inschakelen",ra_Discard:Zb,ra_Disconnected:Xb,"ra_Do not ask for next 2 hours in this session":"Vraag niet om de volgende 2 uur in deze sessie","ra_Do not export values of states":"Exporteer geen waarden van staten","ra_Do not use let's encrypt":"Gebruik geen let's encrypt","ra_Docker is not available":"Docker is niet beschikbaar","ra_Docker is not installed or not running":"Docker is niet geïnstalleerd of draait niet","ra_Double click to reset table layout":"Dubbelklik om de tafelindeling te resetten","ra_Drag 'n' drop some files here, or click to select files":"Sleep enkele bestanden hierheen, of klik om bestanden te selecteren","ra_Drop file here":"Zet het bestand hier neer","ra_Drop the files here...":"Zet het bestand hier neer...","ra_Duplicate name":"Dubbele naam","ra_Edit ACL":"ACL bewerken","ra_Edit alias":"Alias bewerken","ra_Edit custom config":"Bewerk aangepaste config","ra_Edit full path":"Volledig pad bewerken","ra_Edit function":"Bewerkingsfunctie","ra_Edit object field":"Bewerk objectveld","ra_Edit role":"Rol bewerken","ra_Edit room":"Kamer bewerken","ra_Edit value":"Waarde bewerken","ra_Enter the code from that page here":"Voer hier de code van die pagina in",ra_Error:Kb,"ra_Expand all nodes":"Vouw alle knooppunten uit","ra_Expand one step node":"Vouw een niveau uit","ra_Expand/Collapse card":"Kaart uit-/inklappen","ra_Export configuration section":"Sectie Exportconfiguratie","ra_Export data to %s file":"Exporteer gegevens naar %s bestand","ra_Failed to open JSON File":"JSON-bestand kan niet worden geopend","ra_Fallback custom certificates":"Fallback aangepaste certificaten","ra_File is too big. Max %sk allowed. Try use SVG.":"Bestand is te groot. Max. %sk toegestaan. Probeer SVG te gebruiken.",ra_Filter:qb,"ra_Filter and Data Actions":"Filter- en gegevensacties","ra_Filter files":"Bestanden filteren","ra_Folder name":"Naam van de map","ra_Folder → Channel → State":"Map → Kanaal → Staat","ra_Folder → Device → Channel → State":"Map → Apparaat → Kanaal → Staat","ra_Folder → State":"Map → Staat","ra_Folders always first":"Mappen altijd eerst",ra_Friday:eU,"ra_From file":"Van bestand","ra_From text":"Van tekst","ra_Get %s access":"Krijg %s toegang","ra_Good luck":"Veel geluk","ra_Hide empty folders":"Verberg lege mappen","ra_If no file will be created in the folder, it will disappear after the browser closed":"Als er geen bestand in de map wordt gemaakt, verdwijnt het nadat de browser is gesloten","ra_If the button above does not work, you can authorize manually this app by visiting this url":"Als de bovenstaande knop niet werkt, kunt u deze app handmatig autoriseren door deze url te bezoeken","ra_Import and add configuration section":"Configuratiesectie importeren en toevoegen","ra_Import and replace configuration section":"Configuratiesectie importeren en vervangen","ra_Import data from %s file":"Importeer gegevens uit %s bestand","ra_Import from %s":"Importeren uit %s","ra_Instance %s is alive":"Instantie %s leeft","ra_Instance %s is not alive":"Instantie %s is niet actief","ra_Instance is not alive":"Instantie leeft niet","ra_Invalid CRON":"Ongeldige CRON","ra_Invalid JSON":"Ongeldige JSON","ra_Invalid JSON file.":"Ongeldig JSON-bestand.","ra_Invalid JSON format. Expected an array.":"Ongeldige JSON-indeling. Er werd een array verwacht.","ra_Invalid answer from server":"Ongeldig antwoord van de server","ra_Invalid parent folder!":"Ongeldige bovenliggende map!","ra_Invalid structure":"Ongeldige structuur","ra_JSON editor":"JSON-editor","ra_Last change":"Laatste wijziging",ra_Latitude:tU,"ra_License %s":"Licentie %s","ra_License agreement":"Licentieovereenkomst","ra_License does not exist":"Licentie bestaat niet","ra_License expired on %s":"Licentie verlopen op %s",'ra_License for other product "%s"':'Licentie voor ander product "%s"',"ra_License is for version %s, but required version is %s.":"Licentie is voor versie %s, maar vereiste versie is %s.","ra_License must be converted":"Licentie moet worden omgezet naar nieuwere versie. U kunt dit doen in uw iobroker.net-profiel.","ra_License not found in license manager. Do you want to read licenses from iobroker.net?":"Licentie niet gevonden in licentiebeheer. Wilt u licenties van iobroker.net bijwerken?","ra_Listen on all IPs":"Luister op alle IP's","ra_Load configuration from file":"Laad configuratie uit bestand",ra_Logout:sU,ra_Longitude:iU,'ra_May not trigger "updateLicenses"':'Activeert mogelijk niet "updateLicenses"',ra_Message:rU,ra_Monday:oU,"ra_Move down":"Naar beneden verplaatsen","ra_Move up":"Omhoog gaan",ra_Name:nU,"ra_No data found in file":"Geen gegevens gevonden in bestand","ra_No one license found in license manager":"Geen enkele licentie gevonden in licentiebeheer","ra_No response from admin":"Geen reactie van de beheerder","ra_No response from the backend":"Geen reactie van de backend",'ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".':'Niet-experts mogen alleen nieuwe objecten maken in "0_userdata.0" of "alias.0".',"ra_Not a number":"Geen nummer","ra_OAuth Client ID":"OAuth-client-ID","ra_OAuth Client secret":"OAuth-clientgeheim",ra_Objects:aU,ra_Ok:MU,"ra_On weekdays":"Op weekdagen","ra_Only following structures of objects are available:":"Alleen de volgende structuren van objecten zijn beschikbaar:","ra_Only selected":"Alleen geselecteerd","ra_Owner group":"Eigenaarsgroep","ra_Owner user":"Eigenaar gebruiker","ra_Passwords are not equal!":"Wachtwoorden zijn niet gelijk!","ra_Place your files here or click here to open the browse dialog":"Plaats uw bestanden hier of klik hier om het bladervenster te openen","ra_Please allow popups in your browser for this page!":"Sta pop-ups toe in uw browser voor deze pagina!","ra_Please confirm":"Bevestig alstublieft","ra_Please create license":"Maak een licentie aan","ra_Please enter the license":"Voer de licentie in","ra_Please select file...":"Selecteer bestand...","ra_Please select object ID...":"Selecteer object-ID ...","ra_Port could be used by %s":"Poort kan worden gebruikt door %s","ra_Port is already used by %s":"Poort wordt al gebruikt door %s","ra_Press ENTER Key to add new item":"Druk op de ENTER-toets om een nieuw item toe te voegen","ra_Private certificate":"Privé certificaat",ra_Product:cU,"ra_Public certificate":"Openbaar certificaat","ra_Quality code":"Kwaliteit","ra_Refresh tree":"Vernieuw de boom","ra_Reload files":"Laad bestanden opnieuw",ra_Rename_Move_Copy:uU,"ra_Renew %s access":"%s toegang verlengen",ra_Repeat:lU,ra_Replace:NU,"ra_Request timed out":"Verzoek verlopen","ra_Restrict to folder":"Beperken tot map",ra_Root:LU,ra_Saturday:gU,ra_Save:jU,"ra_Save and close":"Opslaan en afsluiten","ra_Save configuration to file":"Sla de configuratie op in een bestand","ra_Save objects tree as JSON file":"Sla de objectenboom op als JSON-bestand","ra_Select all":"Selecteer alles","ra_Select color":"Selecteer kleur","ra_Select predefined icon":"Selecteer voorgedefinieerd pictogram","ra_Select type of export":"Selecteer het type export",ra_Selected:yU,"ra_Selected %s object(s)":"Geselecteerde %s object(en)","ra_Serial number (UUID)":"Serienummer (UUID)",'ra_Serial number (UUID) "%s" in license is for other device.':'Serienummer (UUID) "%s" in licentie is voor ander apparaat.',"ra_Session will expire in %s seconds. Continue?":"Sessie verloopt over %s seconden. Doorgaan?","ra_Show all folders":"Toon alle mappen","ra_Show lines between rows":"Toon lijnen tussen rijen","ra_Show/Hide object descriptions":"Toon/verberg objectbeschrijvingen","ra_Show/hide filter input":"Filterinvoer weergeven/verbergen","ra_Some data are not stored. Discard?":"Sommige gegevens worden niet opgeslagen. Weggooien?",ra_States:TU,"ra_Successfully authorized. Token valid till %s and will be automatically renewed.":"Succesvol geautoriseerd. Token geldig tot %s en wordt automatisch verlengd.","ra_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":"Succesvol geautoriseerd. Token geldig tot %s, maar kan verlopen omdat de instantie niet actief is.","ra_Suitable license not found in license manager":"Geschikte licentie niet gevonden in licentiebeheer",ra_Sunday:DU,"ra_Suppress question for next %s minutes":"Vraag de volgende %s minuten onderdrukken","ra_System language":"Systeemtaal","ra_Take browser position":"Positie innemen vanuit de browser","ra_Take position from system settings":"Neem positie over van systeeminstellingen",'ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").':'De experts kunnen overal objecten maken, behalve vanaf het tweede niveau (bijv. "Vis.0" of "javascript.0").',"ra_The page you are looking for was not found":"De pagina die u zoekt is niet gevonden","ra_The schedule will be executed every minute. Are you sure?":"Het schema wordt elke minuut uitgevoerd. Weet u het zeker?","ra_The schedule will be executed every second. Are you sure?":"Het schema wordt elke seconde uitgevoerd. Weet je het zeker?",ra_Thursday:dU,ra_Timestamp:hU,"ra_Toggle expert mode":"Schakel tussen expertmodus","ra_Toggle the states view":"Schakel de statusweergave in of uit","ra_Toggle view mode":"Schakelen tussen weergavemodus","ra_Too big":"Te groot","ra_Too small":"Te klein","ra_Transparent dialog":"Transparant dialoogvenster",ra_Tuesday:zU,"ra_Unknown error":"Onbekende fout","ra_Unknown error!":"Onbekende fout!",ra_Update:wU,"ra_Upload file":"Upload bestand","ra_Use all available let's encrypt certificates":"Gebruik alle beschikbare Let's Encrypt-certificaten","ra_Use iobroker.acme adapter for letsencrypt certificates":"Gebruik de iobroker.acme-adapter voor letsencrypt-certificaten","ra_Use system settings for position":"Gebruik systeeminstellingen voor positie","ra_Used system settings":"Gebruikte systeeminstellingen","ra_User files":"Gebruikersbestanden",ra_ValidTill:IU,ra_Value:CU,ra_Version:pU,"ra_View file":"Bestand bekijken","ra_View: %s":"Bekijk: %s",ra_Wednesday:AU,ra_Width:mU,"ra_YAML editor":"YAML-editor",ra_Yes:fU,"ra_You can export all objects or just the selected branch.":"U kunt alle objecten of alleen de geselecteerde tak exporteren.","ra_You can filter entries by entering here some text":"U kunt items filteren door hier wat tekst in te voeren","ra_You can use * as wildcard":"U kunt * als joker gebruiken",ra___different__:OU,ra_aclEveryone_read_object:EU,ra_aclEveryone_read_state:_U,ra_aclEveryone_write_object:xU,ra_aclEveryone_write_state:SU,ra_aclGroup_read_object:kU,ra_aclGroup_read_state:vU,ra_aclGroup_write_object:YU,ra_aclGroup_write_state:QU,ra_aclOwner_read_object:bU,ra_aclOwner_read_state:UU,ra_aclOwner_write_object:$U,ra_aclOwner_write_state:PU,ra_buttons:WU,ra_changedFrom:JU,ra_close:BU,ra_create_boolean_state:RU,ra_create_channel:FU,ra_create_device:GU,ra_create_number_state:HU,ra_create_state:VU,ra_create_string_state:ZU,ra_daysShortText:XU,ra_dow_Fr:KU,ra_dow_Mo:qU,ra_dow_Sa:e6,ra_dow_Su:t6,ra_dow_Th:s6,ra_dow_Tu:i6,ra_dow_We:r6,ra_expertMode:o6,ra_false:n6,ra_fileType_all:a6,ra_fileType_audio:M6,ra_fileType_code:c6,ra_fileType_images:u6,ra_fileType_txt:l6,ra_fileType_video:N6,"ra_fileType_video,":"Video",ra_filter_customs:L6,ra_filter_customs_without:g6,ra_filter_func:j6,ra_filter_id:y6,ra_filter_name:T6,ra_filter_role:D6,ra_filter_room:d6,ra_filter_type:h6,"ra_import data from %s file":"Importeer gegevens uit %s bestand",ra_invalidConfig:z6,ra_lastChange:w6,ra_locally:I6,ra_month_Apr:C6,ra_month_Aug:p6,ra_month_Dec:A6,ra_month_Feb:m6,ra_month_Jan:f6,ra_month_Jul:O6,ra_month_Jun:E6,ra_month_Mai:_6,ra_month_Mar:x6,ra_month_Nov:S6,ra_month_Oct:k6,ra_month_Sep:v6,ra_months_Apr:Y6,ra_months_Aug:Q6,ra_months_Dec:b6,ra_months_Feb:U6,ra_months_Jan:$6,ra_months_Jul:P6,ra_months_Jun:W6,ra_months_Mai:J6,ra_months_Mar:B6,ra_months_Nov:R6,ra_months_Oct:F6,ra_months_Sep:G6,"ra_no confirm for 5 mins":"geen bevestiging gedurende 5 minuten",ra_none:H6,ra_object_changed_by:V6,ra_object_changed_by_user:Z6,ra_otherConfig:X6,ra_qualityCode:K6,ra_repeat:q6,ra_select_folder_hint:e8,ra_show_all:t8,ra_state_changed_by:s8,ra_state_changed_from:i8,ra_timestamp:r8,ra_tooltip_ack:o8,ra_tooltip_comment:n8,ra_tooltip_copyState:a8,ra_tooltip_ctrlForLink:M8,ra_tooltip_customConfig:c8,ra_tooltip_deleteObject:u8,ra_tooltip_editObject:l8,ra_tooltip_editState:N8,ra_tooltip_expire:L8,ra_tooltip_from:g8,ra_tooltip_lc:j8,ra_tooltip_quality:y8,ra_tooltip_ts:T8,ra_tooltip_user:D8,ra_tooltip_value:d8,ra_true:h8,"ra_use seconds":"gebruik seconden",ra_val:z8,"ra_via internet":"via internet",ra_warning_every_minute:w8,ra_warning_every_second:I8,sc_cron:C8,sc_date:p8,sc_dates:A8,sc_dow:m8,sc_dows:f8,sc_every:O8,sc_everyN_dates:E8,sc_everyN_dow:_8,sc_everyN_dows:x8,sc_everyN_hours:S8,sc_everyN_minutes:k8,sc_everyN_months:v8,sc_everyN_seconds:Y8,sc_every_dates:Q8,sc_every_dow:b8,sc_every_dows:U8,sc_every_hours:$8,sc_every_minutes:P8,sc_every_months:W8,sc_every_seconds:J8,sc_from:B8,sc_hours:R8,sc_interval:F8,sc_intervalBetween:G8,sc_invalid_cron:H8,sc_minutes:V8,sc_months:Z8,sc_once:X8,sc_period:K8,sc_seconds:q8,sc_simple:e9,sc_specific:t9,sc_specific_dates:s9,sc_specific_dow:i9,sc_specific_dows:r9,sc_specific_hours:o9,sc_specific_minutes:n9,sc_specific_months:a9,sc_specific_seconds:M9,sc_time:c9,sc_to:u9,sc_wizard:l9,sch_all:N9,sch_astroDay:L9,sch_astroNight:g9,sch_astro_dawn:j9,sch_astro_dusk:y9,sch_astro_goldenHour:T9,sch_astro_goldenHourEnd:D9,sch_astro_nadir:d9,sch_astro_nauticalDawn:h9,sch_astro_nauticalDusk:z9,sch_astro_night:w9,sch_astro_nightEnd:I9,sch_astro_solarNoon:C9,sch_astro_sunrise:p9,sch_astro_sunriseEnd:A9,sch_astro_sunset:m9,sch_astro_sunsetStart:f9,sch_at:O9,sch_desc_atTime:E9,sch_desc_everyDay:_9,sch_desc_everyHour:x9,sch_desc_everyMinute:S9,sch_desc_everyMonth:k9,sch_desc_everyNDay:v9,sch_desc_everyNHours:Y9,sch_desc_everyNMinutes:Q9,sch_desc_everyNMonths:b9,sch_desc_everyNWeeks:U9,sch_desc_everyNYears:$9,sch_desc_everyWeek:P9,sch_desc_everyYear:W9,sch_desc_intervalFromTo:J9,sch_desc_never:B9,sch_desc_onDate:R9,sch_desc_onDates:F9,sch_desc_onEveryDate:G9,sch_desc_onMonth:H9,sch_desc_onMonths:V9,sch_desc_onWeekday:Z9,sch_desc_onWeekdays:X9,sch_desc_onWeekends:K9,sch_desc_onWorkdays:q9,sch_desc_onceInPast:e7,sch_desc_once_on:t7,sch_desc_validFrom:s7,sch_desc_validFromTo:i7,sch_desc_validTo:r7,sch_every:o7,sch_exactTime:n7,sch_from:a7,sch_fromTo:M7,sch_intervalTime:c7,sch_invert:u7,sch_no_one:l7,sch_on:N7,sch_period:L7,sch_periodDaily:g7,sch_periodDates:j7,sch_periodDay:y7,sch_periodEvery:T7,sch_periodEveryDay:D7,sch_periodEveryMonth:d7,sch_periodEveryWeek:h7,sch_periodEveryYear:z7,sch_periodHours:w7,sch_periodMinutes:I7,sch_periodMonth:C7,sch_periodMonthly:p7,sch_periodOnce:A7,sch_periodSpecificMonths:m7,sch_periodWeek:f7,sch_periodWeekdays:O7,sch_periodWeekend:E7,sch_periodWeekly:_7,sch_periodWorkdays:x7,sch_periodYear:S7,sch_periodYearly:k7,sch_specificTime:v7,sch_time:Y7,sch_to:Q7,sch_valid:b7,sch_validFrom:U7,sch_validTo:$7,sch_wholeDay:P7,sch_yearEveryMonth:W7},B7="Actes",R7="Ajouter",F7="Annuler",G7="Catégories",H7="Vérifié",V7="Effacer",Z7="Fermer",X7="Commercial",K7="Configurer",q7="Lié",e$="Continuer",t$="Copié",s$="Créer",i$="Recadrer",r$="Delete",o$="Supprimer",n$="Jeter",a$="Débranché",M$="Erreur",c$="Filtre",u$="Vendredi",l$="Latitude",N$="Déconnexion",L$="Longitude",g$="Message",j$="Lundi",y$="Nom",T$="Objets",D$="D'accord",d$="Produit",h$="Renommer/Déplacer/Copier",z$="Répéter",w$="Remplacer",I$="Racine",C$="Samedi",p$="sauver",A$="Choisi",m$="États",f$="Dimanche",O$="Jeudi",E$="Horodatage",_$="Mardi",x$="Mise à jour",S$="Valable jusqu'au",k$="Valeur",v$="Version",Y$="Mercredi",Q$="Largeur",b$="Oui",U$="différent",$$="Tout le monde peut lire un objet",P$="Tout le monde peut lire l'état",W$="Tout le monde peut écrire un objet",J$="Tout le monde peut écrire l'état",B$="Le groupe peut lire l'objet",R$="Le groupe peut lire l'état",F$="Le groupe peut écrire un objet",G$="Le groupe peut écrire l'état",H$="Le propriétaire peut lire l'objet",V$="Le propriétaire peut lire l'état",Z$="Le propriétaire peut écrire un objet",X$="Le propriétaire peut écrire l'état",K$="Boutons",q$="Changé de",eP="Fermer",tP="Créer un état booléen",sP="Créer une chaîne",iP="Créer un appareil",rP="Créer un état de numéro",oP="Créer un état",nP="Créer un état de chaîne",aP="j.",MP="Fr",cP="Mo",uP="Sa",lP="Su",NP="Th",LP="Tu",gP="Nous",jP="Mode expert",yP="FAUX",TP="Tous les fichiers",DP="l'audio",dP="Code/JSON",hP="Images",zP="Texte",wP="Vidéo",IP="Paramètres",CP="sans",pP="Une fonction",AP="ID",mP="Prénom",fP="Rôle",OP="Pièce",EP="Type",_P="Paramètres invalides",xP="Dernier changement",SP="localement",kP="Avr",vP="Août",YP="Déc",QP="Fév",bP="Jan",UP="Juil",$P="Juin",PP="Mai",WP="Mar",JP="Nov",BP="Oct",RP="Sep",FP="Avr",GP="Août",HP="Déc",VP="Fév",ZP="Jan",XP="Juil",KP="Juin",qP="Mai",eW="Mar",tW="Nov",sW="Oct",iW="Sep",rW="rien",oW="Objet modifié par",nW="Objet modifié pour la dernière fois à",aW="Paramètres d'un autre adaptateur %s",MW="Code de qualité",cW="répéter",uW='Pour sélectionner un dossier, maintenez simplement la touche "shift" enfoncée en cliquant sur le dossier.',lW="Tout afficher",NW="État modifié par",LW="Objet changé de",gW="Horodatage",jW="Drapeau reconnu",yW="Commentaire",TW="Copiez la valeur d'état",DW="Maintenez la touche Cltr/⌘ enfoncée pour ouvrir le lien",dW="Paramètres personnalisés",hW="Supprimer un objet",zW="Modifier l'objet",wW="Modifier la valeur d'état",IW="Expire dans",CW="De",pW="Dernière modification",AW="Qualité",mW="Horodatage",fW="Utilisateur",OW="Valeur",EW="VRAI",_W="Valeur",xW="Attention : la tâche CRON s’exécutera toutes les minutes pendant la période spécifiée !",SW="Attention : la tâche CRON s’exécutera toutes les secondes pendant la période spécifiée !",kW="CRON",vW="Date",YW="Rendez-vous",QW="Jour",bW="Jour de la semaine",UW="Chaque",$W="tous les N jours",PW="chaque Nième jour de la semaine",WW="tous les N jours de la semaine",JW="toutes les N heures",BW="toutes les N minutes",RW="tous les N mois",FW="toutes les N secondes",GW="tous les jours",HW="Chaque jour de la semaine",VW="Chaque jour de la semaine",ZW="Toutes les heures",XW="chaque minute",KW="chaque mois",qW="chaque seconde",eJ="De",tJ="Heures",sJ="Intervalle",iJ="Intervalle entre",rJ="CRON non valide",oJ="Minutes",nJ="mois",aJ="Une fois que",MJ="Période",cJ="Secondes",uJ="Facile",lJ="Temps spécifique",NJ="dates spécifiques",LJ="jour(s) spécifique(s) de la semaine",gJ="jour spécifique de semaines",jJ="heures spécifiques",yJ="minutes spécifiques",TJ="mois spécifiques",DJ="secondes spécifiques",dJ="Temps",hJ="À",zJ="sorcier",wJ="tout",IJ="Journée astronomique",CJ="Nuit astronomique",pJ="Aube",AJ="Crépuscule",mJ="Heure d'or",fJ="Fin de l'heure d'or",OJ="Nadir",EJ="Aube nautique",_J="Crépuscule nautique",xJ="Nuit",SJ="Fin de nuit",kJ="Midi solaire",vJ="lever du soleil",YJ="Fin du lever du soleil",QJ="Le coucher du soleil",bJ="Coucher du soleil",UJ="à",$J="à %s",PJ="tous les jours",WJ="Toutes les heures",JJ="chaque minute",BJ="chaque mois",RJ="chaque %s jour",FJ="chaque %s heures",GJ="toutes les %s minutes",HJ="tous les %s mois",VJ="chaque %s semaines",ZJ="tous les %s ans",XJ="toutes les semaines",KJ="chaque année",qJ="de %s à %s",eB="jamais",tB="sur %s de %s",sB="sur %s et %s de",iB="à chaque date de",rB="%s",oB="%s et %s",nB="sur %s",aB="sur %s et %s",MB="les weekends",cB="les jours ouvrables",uB="ne sera plus exécuté, car start est dans le passé",lB="sur %s",NB="de %s",LB="Exécuter de à",gB="à %s",jB="chaque",yB="Temps spécifique",TB="de",DB="De à",dB="Temps d'interval",hB="inverser",zB="aucun",wB="sur",IB="Période",CB="du quotidien",pB="Rendez-vous",AB="journée",mB="Chaque",fB="Tous les jours",OB="Chaque mois",EB="Toutes les semaines",_B="Chaque année",xB="Heures",SB="Minutes",kB="mois",vB="Mensuel",YB="Une fois que",QB="Mois spécifiques",bB="La semaine",UB="Jours de la semaine",$B="Weekend",PB="Hebdomadaire",WB="Jours ouvrables",JB="Année",BB="Annuel",RB="Temps spécifique",FB="Temps",GB="à",HB="Valide",VB="de",ZB="à",XB="Toute la journée",KB="chaque mois",qB={"ra_%s links from aliases":"%s liens provenant d'alias","ra_%s object(s) processed":"%s objet(s) traité(s)","ra_%s was imported":"%s a été importé","ra_Accept license":"Accepter la licence",ra_Actions:B7,"ra_Add new child object to selected parent":"Ajouter un nouvel objet enfant au parent sélectionné","ra_Add objects tree from JSON file":"Ajouter une arborescence d'objets à partir d'un fichier JSON","ra_Add row":"Ajouter une rangée","ra_Advanced options":"Options avancées","ra_All items are filtered out":"Tous les éléments sont filtrés","ra_All objects":"Tous les objets",ra_Append:R7,"ra_Append %s entries or replace existing?":"Ajouter %s entrées ou remplacer l'existant ?","ra_Append or replace?":"Ajouter ou remplacer ?","ra_Are you sure?":"Êtes-vous sûr?","ra_Auto (no custom columns)":"Auto (pas de colonnes personnalisées)","ra_Back to %s":"Retour à %s","ra_Background image":"Image de fond",ra_Cancel:F7,"ra_Cannot add items with set filter":"Impossible d'ajouter des éléments avec le filtre défini","ra_Cannot decode license":"Impossible de décoder la licence","ra_Cannot determine position: System settings are empty and GPS detection is disabled in browser":"Impossible de déterminer la position : les paramètres système sont vides et la détection GPS est désactivée dans le navigateur",'ra_Cannot find "%s"':'Impossible de trouver "%s"','ra_Cannot read "%s"':'Impossible de lire "%s"',"ra_Cannot read licenses: %s":"Impossible de lire les licences : %s","ra_Cannot retrieve options, as instance is offline":"Impossible de récupérer les options, car l'instance est hors ligne","ra_Cannot update attribute, because not found in the object":"Impossible de mettre à jour l'attribut, car il est introuvable dans l'objet","ra_Cannot upload":"Impossible de télécharger",ra_Categories:G7,"ra_Chained certificate":"Certificat chaîné","ra_Change color theme":"Changer le thème de couleur","ra_Changed from":"Changé de","ra_Channel → State":"Canal → État","ra_Check license":"Vérifier la licence",ra_Checked:H7,ra_Clear:V7,"ra_Clear filter":"Effacer le filtre","ra_Clear icon":"Effacer l'icône","ra_Click to see in full size":"Cliquez pour afficher en taille réelle","ra_Click to show":"Cliquez pour afficher","ra_Clone current row":"Cloner la ligne actuelle",ra_Close:Z7,"ra_Collapse all nodes":"Réduire tous les nœuds","ra_Collapse one step node":"Réduire d'un niveau",ra_Commercial:X7,ra_Configure:K7,"ra_Configure visible columns":"Configurer les colonnes visibles","ra_Confirm deletion of %s":"Confirmer la suppression de %s",ra_Connected:q7,ra_Continue:e$,ra_Copied:t$,"ra_Copied %s":'"%s" copié',"ra_Copy content":"Copier le contenu",ra_Create:s$,"ra_Create alias":"Créer un alias","ra_Create folder":"Créer le dossier","ra_Create new folder in %s":"Créer un nouveau dossier dans %s",ra_Crop:i$,"ra_Define CRON...":"Définir CRON...","ra_Define functions":"Définir des fonctions","ra_Define rooms":"Définir des pièces","ra_Define schedule":"Définir le calendrier","ra_Define schedule...":"Définir le calendrier ...",ra_Del:r$,ra_Delete:o$,"ra_Delete current row":"Supprimer la ligne actuelle","ra_Deselect all":"Tout déselectionner","ra_Device → Channel → State":"Appareil → Canal → État","ra_Disable/Enable translation":"Activer/Désactiver la traduction",ra_Discard:n$,ra_Disconnected:a$,"ra_Do not ask for next 2 hours in this session":"Ne demandez pas les 2 prochaines heures de cette session","ra_Do not export values of states":"Ne pas exporter les valeurs des états","ra_Do not use let's encrypt":"Ne pas utiliser let's encrypt","ra_Docker is not available":"Docker n'est pas disponible","ra_Docker is not installed or not running":"Docker n'est pas installé ou n'est pas en cours d'exécution","ra_Double click to reset table layout":"Double-cliquez pour réinitialiser la disposition du tableau","ra_Drag 'n' drop some files here, or click to select files":"Glissez-déposez des fichiers ici, ou cliquez pour sélectionner des fichiers","ra_Drop file here":"Déposer le fichier ici","ra_Drop the files here...":"Déposez le fichier ici...","ra_Duplicate name":"Nom en double","ra_Edit ACL":"Modifier la LCA","ra_Edit alias":"Modifier l'alias","ra_Edit custom config":"Modifier la configuration personnalisée","ra_Edit full path":"Modifier le chemin complet","ra_Edit function":"Fonction d'édition","ra_Edit object field":"Modifier le champ d'objet","ra_Edit role":"Modifier le rôle","ra_Edit room":"Modifier la salle","ra_Edit value":"Modifier la valeur","ra_Enter the code from that page here":"Entrez le code de cette page ici",ra_Error:M$,"ra_Expand all nodes":"Développer tous les nœuds","ra_Expand one step node":"Développer un niveau","ra_Expand/Collapse card":"Carte Développer/Réduire","ra_Export configuration section":"Exporter la section de configuration","ra_Export data to %s file":"Exporter les données vers le fichier %s","ra_Failed to open JSON File":"Échec de l'ouverture du fichier JSON","ra_Fallback custom certificates":"Certificats personnalisés de secours","ra_File is too big. Max %sk allowed. Try use SVG.":"Le fichier est trop volumineux. Max %sk autorisé. Essayez d'utiliser SVG.",ra_Filter:c$,"ra_Filter and Data Actions":"Actions sur les filtres et les données","ra_Filter files":"Filtrer les fichiers","ra_Folder name":"Nom de dossier","ra_Folder → Channel → State":"Dossier → Chaîne → État","ra_Folder → Device → Channel → State":"Dossier → Appareil → Canal → État","ra_Folder → State":"Dossier → État","ra_Folders always first":"Les dossiers toujours en premier",ra_Friday:u$,"ra_From file":"À partir du fichier","ra_From text":"À partir du texte","ra_Get %s access":"Obtenir l'accès %s","ra_Good luck":"Bonne chance","ra_Hide empty folders":"Masquer les dossiers vides","ra_If no file will be created in the folder, it will disappear after the browser closed":"Si aucun fichier ne sera créé dans le dossier, il disparaîtra après la fermeture du navigateur","ra_If the button above does not work, you can authorize manually this app by visiting this url":"Si le bouton ci-dessus ne fonctionne pas, vous pouvez autoriser manuellement cette application en visitant cette URL","ra_Import and add configuration section":"Importer et ajouter la section de configuration","ra_Import and replace configuration section":"Importer et remplacer la section de configuration","ra_Import data from %s file":"Importer des données à partir du fichier %s","ra_Import from %s":"Importer depuis %s","ra_Instance %s is alive":"L'instance %s est active","ra_Instance %s is not alive":"L'instance %s n'est pas active","ra_Instance is not alive":"L'instance n'est pas active","ra_Invalid CRON":"CRON invalide","ra_Invalid JSON":"JSON invalide","ra_Invalid JSON file.":"Fichier JSON invalide.","ra_Invalid JSON format. Expected an array.":"Format JSON invalide. Tableau attendu.","ra_Invalid answer from server":"Réponse invalide du serveur","ra_Invalid parent folder!":"Dossier parent non valide!","ra_Invalid structure":"Structure invalide","ra_JSON editor":"Éditeur JSON","ra_Last change":"Dernier changement",ra_Latitude:l$,"ra_License %s":"Licence %s","ra_License agreement":"Accord de licence","ra_License does not exist":"La licence n'existe pas","ra_License expired on %s":"Licence expirée le %s",'ra_License for other product "%s"':'Licence pour un autre produit "%s"',"ra_License is for version %s, but required version is %s.":"La licence est pour la version %s, mais la version requise est %s.","ra_License must be converted":"La licence doit être convertie en une version plus récente. Vous pouvez le faire dans votre profil iobroker.net.","ra_License not found in license manager. Do you want to read licenses from iobroker.net?":"Licence introuvable dans le gestionnaire de licences. Voulez-vous mettre à jour les licences depuis iobroker.net ?","ra_Listen on all IPs":"Écoutez sur toutes les adresses IP","ra_Load configuration from file":"Charger la configuration à partir du fichier",ra_Logout:N$,ra_Longitude:L$,'ra_May not trigger "updateLicenses"':'Peut ne pas déclencher "updateLicences"',ra_Message:g$,ra_Monday:j$,"ra_Move down":"Descendre","ra_Move up":"Déplacer vers le haut",ra_Name:y$,"ra_No data found in file":"Aucune donnée trouvée dans le fichier","ra_No one license found in license manager":"Aucune licence trouvée dans le gestionnaire de licences","ra_No response from admin":"Aucune réponse de l'administrateur","ra_No response from the backend":"Aucune réponse du backend",'ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".':'Les non-experts ne peuvent créer de nouveaux objets que dans "0_userdata.0" ou "alias.0".',"ra_Not a number":"Pas un numéro","ra_OAuth Client ID":"ID client OAuth","ra_OAuth Client secret":"Secret client OAuth",ra_Objects:T$,ra_Ok:D$,"ra_On weekdays":"En semaine","ra_Only following structures of objects are available:":"Seules les structures d'objets suivantes sont disponibles:","ra_Only selected":"Uniquement sélectionné","ra_Owner group":"Groupe propriétaire","ra_Owner user":"Utilisateur propriétaire","ra_Passwords are not equal!":"Les mots de passe ne sont pas égaux !","ra_Place your files here or click here to open the browse dialog":"Placez vos fichiers ici ou cliquez ici pour ouvrir la boîte de dialogue de navigation","ra_Please allow popups in your browser for this page!":"Veuillez autoriser les popups dans votre navigateur pour cette page !","ra_Please confirm":"Veuillez confirmer","ra_Please create license":"Veuillez créer une licence","ra_Please enter the license":"Veuillez entrer la licence","ra_Please select file...":"Veuillez sélectionner le fichier...","ra_Please select object ID...":"Veuillez sélectionner l'ID d'objet ...","ra_Port could be used by %s":"Le port pourrait être utilisé par %s","ra_Port is already used by %s":"Le port est déjà utilisé par %s","ra_Press ENTER Key to add new item":"Appuyez sur la touche ENTRÉE pour ajouter un nouvel élément","ra_Private certificate":"Certificat privé",ra_Product:d$,"ra_Public certificate":"Certificat public","ra_Quality code":"Qualité","ra_Refresh tree":"Rafraîchir l'arborescence","ra_Reload files":"Recharger les fichiers",ra_Rename_Move_Copy:h$,"ra_Renew %s access":"Renouveler l'accès %s",ra_Repeat:z$,ra_Replace:w$,"ra_Request timed out":"La demande a expiré","ra_Restrict to folder":"Restreindre au dossier",ra_Root:I$,ra_Saturday:C$,ra_Save:p$,"ra_Save and close":"Sauver et fermer","ra_Save configuration to file":"Enregistrer la configuration dans un fichier","ra_Save objects tree as JSON file":"Enregistrer l'arborescence des objets en tant que fichier JSON","ra_Select all":"Tout sélectionner","ra_Select color":"Choisissez la couleur","ra_Select predefined icon":"Sélectionnez l'icône prédéfinie","ra_Select type of export":"Sélectionnez le type d'exportation",ra_Selected:A$,"ra_Selected %s object(s)":"Objet(s) %s sélectionné(s)","ra_Serial number (UUID)":"Numéro de série (UUID)",'ra_Serial number (UUID) "%s" in license is for other device.':'Le numéro de série (UUID) "%s" dans la licence est pour un autre appareil.',"ra_Session will expire in %s seconds. Continue?":"La session expirera dans %s secondes. Continuer ?","ra_Show all folders":"Afficher tous les dossiers","ra_Show lines between rows":"Afficher les lignes entre les lignes","ra_Show/Hide object descriptions":"Afficher/Masquer les descriptions d'objets","ra_Show/hide filter input":"Afficher/masquer l'entrée de filtre","ra_Some data are not stored. Discard?":"Certaines données ne sont pas stockées. Jeter?",ra_States:m$,"ra_Successfully authorized. Token valid till %s and will be automatically renewed.":"Autorisation réussie. Jeton valide jusqu'au %s et sera automatiquement renouvelé.","ra_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":"Autorisation réussie. Jeton valide jusqu'à %s, mais il peut expirer car l'instance n'est pas en cours d'exécution.","ra_Suitable license not found in license manager":"Licence appropriée introuvable dans le gestionnaire de licences",ra_Sunday:f$,"ra_Suppress question for next %s minutes":"Supprimer la question pour les %s prochaines minutes","ra_System language":"Langue du système","ra_Take browser position":"Prendre position depuis le navigateur","ra_Take position from system settings":"Prendre position à partir des paramètres système",'ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").':'Les experts peuvent créer des objets partout mais à partir du deuxième niveau (par exemple "vis.0" ou "javascript.0").',"ra_The page you are looking for was not found":"La page que vous recherchez n'a pas été trouvée","ra_The schedule will be executed every minute. Are you sure?":"Le planning sera exécuté toutes les minutes. Êtes-vous sûr ?","ra_The schedule will be executed every second. Are you sure?":"Le planning sera exécuté toutes les secondes. Êtes-vous sûr ?",ra_Thursday:O$,ra_Timestamp:E$,"ra_Toggle expert mode":"Basculer en mode expert","ra_Toggle the states view":"Basculer la vue des états","ra_Toggle view mode":"Basculer le mode d'affichage","ra_Too big":"Trop grand","ra_Too small":"Trop petit","ra_Transparent dialog":"Dialogue transparent",ra_Tuesday:_$,"ra_Unknown error":"Erreur inconnue","ra_Unknown error!":"Erreur inconnue!",ra_Update:x$,"ra_Upload file":"Téléverser un fichier","ra_Use all available let's encrypt certificates":"Utilisez tous les certificats let's encrypt disponibles","ra_Use iobroker.acme adapter for letsencrypt certificates":"Utiliser l'adaptateur iobroker.acme pour les certificats Letsencrypt","ra_Use system settings for position":"Utiliser les paramètres système pour la position","ra_Used system settings":"Paramètres système utilisés","ra_User files":"Fichiers utilisateurs",ra_ValidTill:S$,ra_Value:k$,ra_Version:v$,"ra_View file":"Voir la fiche","ra_View: %s":"Affichage : %s",ra_Wednesday:Y$,ra_Width:Q$,"ra_YAML editor":"Éditeur YAML",ra_Yes:b$,"ra_You can export all objects or just the selected branch.":"Vous pouvez exporter tous les objets ou uniquement la branche sélectionnée.","ra_You can filter entries by entering here some text":"Vous pouvez filtrer les entrées en saisissant ici du texte","ra_You can use * as wildcard":"Vous pouvez utiliser * comme caractère générique",ra___different__:U$,ra_aclEveryone_read_object:$$,ra_aclEveryone_read_state:P$,ra_aclEveryone_write_object:W$,ra_aclEveryone_write_state:J$,ra_aclGroup_read_object:B$,ra_aclGroup_read_state:R$,ra_aclGroup_write_object:F$,ra_aclGroup_write_state:G$,ra_aclOwner_read_object:H$,ra_aclOwner_read_state:V$,ra_aclOwner_write_object:Z$,ra_aclOwner_write_state:X$,ra_buttons:K$,ra_changedFrom:q$,ra_close:eP,ra_create_boolean_state:tP,ra_create_channel:sP,ra_create_device:iP,ra_create_number_state:rP,ra_create_state:oP,ra_create_string_state:nP,ra_daysShortText:aP,ra_dow_Fr:MP,ra_dow_Mo:cP,ra_dow_Sa:uP,ra_dow_Su:lP,ra_dow_Th:NP,ra_dow_Tu:LP,ra_dow_We:gP,ra_expertMode:jP,ra_false:yP,ra_fileType_all:TP,ra_fileType_audio:DP,ra_fileType_code:dP,ra_fileType_images:hP,ra_fileType_txt:zP,ra_fileType_video:wP,"ra_fileType_video,":"Vidéo",ra_filter_customs:IP,ra_filter_customs_without:CP,ra_filter_func:pP,ra_filter_id:AP,ra_filter_name:mP,ra_filter_role:fP,ra_filter_room:OP,ra_filter_type:EP,"ra_import data from %s file":"Importer des données à partir du fichier %s",ra_invalidConfig:_P,ra_lastChange:xP,ra_locally:SP,ra_month_Apr:kP,ra_month_Aug:vP,ra_month_Dec:YP,ra_month_Feb:QP,ra_month_Jan:bP,ra_month_Jul:UP,ra_month_Jun:$P,ra_month_Mai:PP,ra_month_Mar:WP,ra_month_Nov:JP,ra_month_Oct:BP,ra_month_Sep:RP,ra_months_Apr:FP,ra_months_Aug:GP,ra_months_Dec:HP,ra_months_Feb:VP,ra_months_Jan:ZP,ra_months_Jul:XP,ra_months_Jun:KP,ra_months_Mai:qP,ra_months_Mar:eW,ra_months_Nov:tW,ra_months_Oct:sW,ra_months_Sep:iW,"ra_no confirm for 5 mins":"pas de confirmation pendant 5 minutes",ra_none:rW,ra_object_changed_by:oW,ra_object_changed_by_user:nW,ra_otherConfig:aW,ra_qualityCode:MW,ra_repeat:cW,ra_select_folder_hint:uW,ra_show_all:lW,ra_state_changed_by:NW,ra_state_changed_from:LW,ra_timestamp:gW,ra_tooltip_ack:jW,ra_tooltip_comment:yW,ra_tooltip_copyState:TW,ra_tooltip_ctrlForLink:DW,ra_tooltip_customConfig:dW,ra_tooltip_deleteObject:hW,ra_tooltip_editObject:zW,ra_tooltip_editState:wW,ra_tooltip_expire:IW,ra_tooltip_from:CW,ra_tooltip_lc:pW,ra_tooltip_quality:AW,ra_tooltip_ts:mW,ra_tooltip_user:fW,ra_tooltip_value:OW,ra_true:EW,"ra_use seconds":"utiliser les secondes",ra_val:_W,"ra_via internet":"par Internet",ra_warning_every_minute:xW,ra_warning_every_second:SW,sc_cron:kW,sc_date:vW,sc_dates:YW,sc_dow:QW,sc_dows:bW,sc_every:UW,sc_everyN_dates:$W,sc_everyN_dow:PW,sc_everyN_dows:WW,sc_everyN_hours:JW,sc_everyN_minutes:BW,sc_everyN_months:RW,sc_everyN_seconds:FW,sc_every_dates:GW,sc_every_dow:HW,sc_every_dows:VW,sc_every_hours:ZW,sc_every_minutes:XW,sc_every_months:KW,sc_every_seconds:qW,sc_from:eJ,sc_hours:tJ,sc_interval:sJ,sc_intervalBetween:iJ,sc_invalid_cron:rJ,sc_minutes:oJ,sc_months:nJ,sc_once:aJ,sc_period:MJ,sc_seconds:cJ,sc_simple:uJ,sc_specific:lJ,sc_specific_dates:NJ,sc_specific_dow:LJ,sc_specific_dows:gJ,sc_specific_hours:jJ,sc_specific_minutes:yJ,sc_specific_months:TJ,sc_specific_seconds:DJ,sc_time:dJ,sc_to:hJ,sc_wizard:zJ,sch_all:wJ,sch_astroDay:IJ,sch_astroNight:CJ,sch_astro_dawn:pJ,sch_astro_dusk:AJ,sch_astro_goldenHour:mJ,sch_astro_goldenHourEnd:fJ,sch_astro_nadir:OJ,sch_astro_nauticalDawn:EJ,sch_astro_nauticalDusk:_J,sch_astro_night:xJ,sch_astro_nightEnd:SJ,sch_astro_solarNoon:kJ,sch_astro_sunrise:vJ,sch_astro_sunriseEnd:YJ,sch_astro_sunset:QJ,sch_astro_sunsetStart:bJ,sch_at:UJ,sch_desc_atTime:$J,sch_desc_everyDay:PJ,sch_desc_everyHour:WJ,sch_desc_everyMinute:JJ,sch_desc_everyMonth:BJ,sch_desc_everyNDay:RJ,sch_desc_everyNHours:FJ,sch_desc_everyNMinutes:GJ,sch_desc_everyNMonths:HJ,sch_desc_everyNWeeks:VJ,sch_desc_everyNYears:ZJ,sch_desc_everyWeek:XJ,sch_desc_everyYear:KJ,sch_desc_intervalFromTo:qJ,sch_desc_never:eB,sch_desc_onDate:tB,sch_desc_onDates:sB,sch_desc_onEveryDate:iB,sch_desc_onMonth:rB,sch_desc_onMonths:oB,sch_desc_onWeekday:nB,sch_desc_onWeekdays:aB,sch_desc_onWeekends:MB,sch_desc_onWorkdays:cB,sch_desc_onceInPast:uB,sch_desc_once_on:lB,sch_desc_validFrom:NB,sch_desc_validFromTo:LB,sch_desc_validTo:gB,sch_every:jB,sch_exactTime:yB,sch_from:TB,sch_fromTo:DB,sch_intervalTime:dB,sch_invert:hB,sch_no_one:zB,sch_on:wB,sch_period:IB,sch_periodDaily:CB,sch_periodDates:pB,sch_periodDay:AB,sch_periodEvery:mB,sch_periodEveryDay:fB,sch_periodEveryMonth:OB,sch_periodEveryWeek:EB,sch_periodEveryYear:_B,sch_periodHours:xB,sch_periodMinutes:SB,sch_periodMonth:kB,sch_periodMonthly:vB,sch_periodOnce:YB,sch_periodSpecificMonths:QB,sch_periodWeek:bB,sch_periodWeekdays:UB,sch_periodWeekend:$B,sch_periodWeekly:PB,sch_periodWorkdays:WB,sch_periodYear:JB,sch_periodYearly:BB,sch_specificTime:RB,sch_time:FB,sch_to:GB,sch_valid:HB,sch_validFrom:VB,sch_validTo:ZB,sch_wholeDay:XB,sch_yearEveryMonth:KB},eR="Azioni",tR="Aggiungere",sR="Annulla",iR="Categorie",rR="Controllato",oR="Elimina",nR="Vicino",aR="Commerciale",MR="Configura",cR="Collegato",uR="Continuare",lR="Copiato",NR="Creare",LR="Raccolto",gR="Delete",jR="Elimina",yR="Scartare",TR="Disconnesso",DR="Errore",dR="Filtro",hR="Venerdì",zR="Latitudine",wR="Esci",IR="Longitudine",CR="Messaggio",pR="Lunedi",AR="Nome",mR="Oggetti",fR="Ok",OR="Prodotto",ER="Rinomina/Sposta/Copia",_R="Ripetere",xR="Sostituire",SR="Radice",kR="Sabato",vR="Salva",YR="Selezionato",QR="stati",bR="Domenica",UR="Giovedì",$R="Timestamp",PR="Martedì",WR="Aggiornare",JR="Valido fino a",BR="Valore",RR="Versione",FR="Mercoledì",GR="Larghezza",HR="SÌ",VR="diverso",ZR="Tutti possono leggere gli oggetti",XR="Tutti possono leggere lo stato",KR="Tutti possono scrivere oggetti",qR="Tutti possono scrivere stato",eF="Il gruppo può leggere l'oggetto",tF="Il gruppo può leggere lo stato",sF="Il gruppo può scrivere l'oggetto",iF="Il gruppo può scrivere lo stato",rF="Il proprietario può leggere l'oggetto",oF="Il proprietario può leggere lo stato",nF="Il proprietario può scrivere l'oggetto",aF="Il proprietario può scrivere lo stato",MF="Bottoni",cF="Cambiato da",uF="vicino",lF="Crea uno stato booleano",NF="Crea canale",LF="Crea dispositivo",gF="Crea lo stato del numero",jF="Crea stato",yF="Crea lo stato della stringa",TF="g.",DF="fr",dF="momento",hF="Sa",zF="su",wF="th",IF="Tu",CF="Noi",pF="Modalità esperto",AF="FALSO",mF="Tutti i files",fF="Audio",OF="Codice/JSON",EF="immagini",_F="Testo",xF="video",SF="impostazioni",kF="senza",vF="Funzione",YF="ID",QF="Nome",bF="Ruolo",UF="Camera",$F="genere",PF="Impostazioni non valide",WF="Ultima modifica",JF="localmente",BF="apr",RF="agosto",FF="Dic",GF="febbraio",HF="gen",VF="lug",ZF="giu",XF="Mai",KF="marzo",qF="nov",eG="ottobre",tG="Sett",sG="apr",iG="agosto",rG="Dic",oG="febbraio",nG="gen",aG="lug",MG="giu",cG="Mai",uG="marzo",lG="nov",NG="ottobre",LG="Sett",gG="nessuna",jG="Oggetto modificato da",yG="L'oggetto è stato modificato l'ultima volta alle",TG="Impostazioni dall'altro adattatore %s",DG="Codice di qualità",dG="ripetere",hG='Per selezionare la cartella, basta tenere premuto il tasto "shift" facendo clic sulla cartella.',zG="Mostra tutto",wG="Stato cambiato da",IG="Oggetto cambiato da",CG="Timestamp",pG="Bandiera riconosciuta",AG="Commento",mG="Copia il valore dello stato",fG="Tieni premuto il tasto Cltr/⌘ per aprire il collegamento",OG="Impostazioni personalizzate",EG="Elimina oggetto",_G="Modifica oggetto",xG="Modifica il valore dello stato",SG="Scade tra",kG="A partire dal",vG="Ultima modifica",YG="Qualità",QG="Data e ora",bG="Utente",UG="Valore",$G="VERO",PG="Valore",WG="Attenzione: il processo CRON verrà eseguito ogni minuto durante il periodo specificato!",JG="Attenzione: il processo CRON verrà eseguito ogni secondo durante il periodo specificato!",BG="CRON",RG="Data",FG="Date",GG="Giorno",HG="Giorno della settimana",VG="Ogni",ZG="ogni N giorni",XG="ogni Nesimo giorno della settimana",KG="ogni N giorno della settimana",qG="ogni N ore",eH="ogni N minuti",tH="ogni N mesi",sH="ogni N secondi",iH="ogni giorno",rH="Tutti i giorni della settimana",oH="Tutti i giorni della settimana",nH="ogni ora",aH="ogni minuto",MH="ogni mese",cH="ogni secondo",uH="A partire dal",lH="Ore",NH="Intervallo",LH="Intervallo tra",gH="CRON non valido",jH="Minuti",yH="mesi",TH="Una volta",DH="Periodo",dH="secondi",hH="Semplice",zH="Orario preciso",wH="date specifiche",IH="giorno/i specifico/i della settimana",CH="giorno specifico delle settimane",pH="orari specifici",AH="minuti specifici",mH="mesi specifici",fH="secondi specifici",OH="Tempo",EH="Per",_H="procedura guidata",xH="tutti",SH="Astro day",kH="Astro night",vH="Alba",YH="Crepuscolo",QH="Ora d'oro",bH="Fine dell'ora d'oro",UH="Nadir",$H="Alba nautica",PH="Crepuscolo nautico",WH="Notte",JH="Fine della notte",BH="Mezzogiorno solare",RH="Alba",FH="Fine dell'alba",GH="Tramonto",HH="Inizio del tramonto",VH="a",ZH="a %s",XH="ogni giorno",KH="ogni ora",qH="ogni minuto",eV="ogni mese",tV="ogni %s giorno",sV="ogni %s ore",iV="ogni %s minuti",rV="ogni %s mesi",oV="ogni %s settimane",nV="ogni %s anni",aV="ogni settimana",MV="ogni anno",cV="da %s a %s",uV="mai",lV="su %s di %s",NV="su %s e %s di",LV="in ogni data di",gV="%s",jV="%s e %s",yV="su %s",TV="su %s e %s",DV="nei finesettimana",dV="nei giorni lavorativi",hV="non verrà più eseguito, perché start è nel passato",zV="su %s",wV="da %s",IV="Eseguire da a",CV="a %s",pV="ogni",AV="Orario preciso",mV="a partire dal",fV="Da A",OV="Intervallo di tempo",EV="invertire",_V="nessuna",xV="sopra",SV="Periodo",kV="Quotidiano",vV="Date",YV="Giorno",QV="Ogni",bV="Ogni giorno",UV="Ogni mese",$V="Ogni settimana",PV="Ogni anno",WV="Ore",JV="Minuti",BV="mese",RV="Mensile",FV="Una volta",GV="Mesi specifici",HV="Settimana",VV="Giorni della settimana",ZV="Fine settimana",XV="settimanalmente",KV="giorni feriali",qV="Anno",eZ="Annuale",tZ="Orario preciso",sZ="Tempo",iZ="per",rZ="Valido",oZ="a partire dal",nZ="per",aZ="Giorno intero",MZ="ogni mese",cZ={"ra_%s links from aliases":"%s link da alias","ra_%s object(s) processed":"%s oggetti elaborati","ra_%s was imported":"%s è stato importato","ra_Accept license":"Accetta licenza",ra_Actions:eR,"ra_Add new child object to selected parent":"Aggiungi un nuovo oggetto figlio al genitore selezionato","ra_Add objects tree from JSON file":"Aggiungi l'albero degli oggetti dal file JSON","ra_Add row":"Aggiungi riga","ra_Advanced options":"Opzioni avanzate","ra_All items are filtered out":"Tutti gli elementi vengono filtrati","ra_All objects":"Tutti gli oggetti",ra_Append:tR,"ra_Append %s entries or replace existing?":"Aggiungi %s voci o sostituisci quelle esistenti?","ra_Append or replace?":"Aggiungere o sostituire?","ra_Are you sure?":"Sei sicuro?","ra_Auto (no custom columns)":"Auto (nessuna colonna personalizzata)","ra_Back to %s":"Torna a %s","ra_Background image":"Immagine di sfondo",ra_Cancel:sR,"ra_Cannot add items with set filter":"Impossibile aggiungere elementi con il filtro impostato","ra_Cannot decode license":"Impossibile decodificare la licenza","ra_Cannot determine position: System settings are empty and GPS detection is disabled in browser":"Impossibile determinare la posizione: le impostazioni di sistema sono vuote e il rilevamento GPS è disabilitato nel browser",'ra_Cannot find "%s"':'Impossibile trovare "%s"','ra_Cannot read "%s"':'Impossibile leggere "%s"',"ra_Cannot read licenses: %s":"Impossibile leggere le licenze: %s","ra_Cannot retrieve options, as instance is offline":"Impossibile recuperare le opzioni, poiché l'istanza è offline","ra_Cannot update attribute, because not found in the object":"Impossibile aggiornare l'attributo, perché non trovato nell'oggetto","ra_Cannot upload":"Impossibile caricare",ra_Categories:iR,"ra_Chained certificate":"Certificato incatenato","ra_Change color theme":"Cambia tema colore","ra_Changed from":"Cambiato da","ra_Channel → State":"Canale → Stato","ra_Check license":"Controlla la licenza",ra_Checked:rR,ra_Clear:oR,"ra_Clear filter":"Filtro pulito","ra_Clear icon":"Cancella icona","ra_Click to see in full size":"Clicca per visualizzare l'immagine a dimensioni intere","ra_Click to show":"Clicca per mostrare","ra_Clone current row":"Clona riga corrente",ra_Close:nR,"ra_Collapse all nodes":"Comprimi tutti i nodi","ra_Collapse one step node":"Comprimi un livello",ra_Commercial:aR,ra_Configure:MR,"ra_Configure visible columns":"Configura colonne visibili","ra_Confirm deletion of %s":"Conferma l'eliminazione di %s",ra_Connected:cR,ra_Continue:uR,ra_Copied:lR,"ra_Copied %s":'"%s" copiato',"ra_Copy content":"Copia contenuto",ra_Create:NR,"ra_Create alias":"Crea alias","ra_Create folder":"Creare una cartella","ra_Create new folder in %s":"Crea nuova cartella in %s",ra_Crop:LR,"ra_Define CRON...":"Definisci CRON...","ra_Define functions":"Definire le funzioni","ra_Define rooms":"Definisci le stanze","ra_Define schedule":"Definisci programma","ra_Define schedule...":"Definisci pianificazione ...",ra_Del:gR,ra_Delete:jR,"ra_Delete current row":"Elimina la riga corrente","ra_Deselect all":"Deseleziona tutto","ra_Device → Channel → State":"Dispositivo → Canale → Stato","ra_Disable/Enable translation":"Disabilita/Abilita la traduzione",ra_Discard:yR,ra_Disconnected:TR,"ra_Do not ask for next 2 hours in this session":"Non chiedere per le prossime 2 ore in questa sessione","ra_Do not export values of states":"Non esportare i valori degli stati","ra_Do not use let's encrypt":"Non utilizzare crittografiamo","ra_Docker is not available":"Docker non è disponibile","ra_Docker is not installed or not running":"Docker non è installato o non è in esecuzione","ra_Double click to reset table layout":"Fare doppio clic per ripristinare il layout della tabella","ra_Drag 'n' drop some files here, or click to select files":"Trascina e rilascia alcuni file qui o fai clic per selezionare i file","ra_Drop file here":"Trascina il file qui","ra_Drop the files here...":"Trascina qui il file...","ra_Duplicate name":"Nome duplicato","ra_Edit ACL":"Modifica ACL","ra_Edit alias":"Modifica alias","ra_Edit custom config":"Modifica configurazione personalizzata","ra_Edit full path":"Modifica percorso completo","ra_Edit function":"Funzione di modifica","ra_Edit object field":"Modifica campo oggetto","ra_Edit role":"Modifica ruolo","ra_Edit room":"Modifica stanza","ra_Edit value":"Modifica valore","ra_Enter the code from that page here":"Inserisci qui il codice da quella pagina",ra_Error:DR,"ra_Expand all nodes":"Espandi tutti i nodi","ra_Expand one step node":"Espandi un livello","ra_Expand/Collapse card":"Espandi/Comprimi scheda","ra_Export configuration section":"Sezione di configurazione dell'esportazione","ra_Export data to %s file":"Esporta i dati nel file %s","ra_Failed to open JSON File":"Impossibile aprire il file JSON","ra_Fallback custom certificates":"Certificati personalizzati di fallback","ra_File is too big. Max %sk allowed. Try use SVG.":"Il file è troppo grande. Max %sk consentito. Prova a usare SVG.",ra_Filter:dR,"ra_Filter and Data Actions":"Azioni sui filtri e sui dati","ra_Filter files":"Filtra i file","ra_Folder name":"Nome della cartella","ra_Folder → Channel → State":"Cartella → Canale → Stato","ra_Folder → Device → Channel → State":"Cartella → Dispositivo → Canale → Stato","ra_Folder → State":"Cartella → Stato","ra_Folders always first":"Le cartelle sono sempre al primo posto",ra_Friday:hR,"ra_From file":"Dal file","ra_From text":"Dal testo","ra_Get %s access":"Ottieni l'accesso %s","ra_Good luck":"Buona fortuna","ra_Hide empty folders":"Nascondi cartelle vuote","ra_If no file will be created in the folder, it will disappear after the browser closed":"Se nessun file verrà creato nella cartella, scomparirà dopo la chiusura del browser","ra_If the button above does not work, you can authorize manually this app by visiting this url":"Se il pulsante sopra non funziona, puoi autorizzare manualmente questa app visitando questo URL","ra_Import and add configuration section":"Importa e aggiungi la sezione di configurazione","ra_Import and replace configuration section":"Importa e sostituisci la sezione di configurazione","ra_Import data from %s file":"Importa i dati dal file %s","ra_Import from %s":"Importa da %s","ra_Instance %s is alive":"Il %s dell'istanza è vivo","ra_Instance %s is not alive":"Il TESTO dell'istanza non è vivo","ra_Instance is not alive":"L'istanza non è viva","ra_Invalid CRON":"CRON non valido","ra_Invalid JSON":"JSON non valido","ra_Invalid JSON file.":"File JSON non valido.","ra_Invalid JSON format. Expected an array.":"Formato JSON non valido. È previsto un array.","ra_Invalid answer from server":"Risposta non valida dal server","ra_Invalid parent folder!":"Cartella principale non valida!","ra_Invalid structure":"Struttura non valida","ra_JSON editor":"Editor JSON","ra_Last change":"Ultima modifica",ra_Latitude:zR,"ra_License %s":"Licenza %s","ra_License agreement":"Contratto di licenza","ra_License does not exist":"La licenza non esiste","ra_License expired on %s":"Licenza scaduta il %s",'ra_License for other product "%s"':'Licenza per altro prodotto "%s"',"ra_License is for version %s, but required version is %s.":"La licenza è per la versione %s, ma la versione richiesta è %s.","ra_License must be converted":"La licenza deve essere convertita in una versione più recente. Puoi farlo nel tuo profilo iobroker.net.","ra_License not found in license manager. Do you want to read licenses from iobroker.net?":"Licenza non trovata nel gestore delle licenze. Vuoi aggiornare le licenze da iobroker.net?","ra_Listen on all IPs":"Ascolta su tutti gli IP","ra_Load configuration from file":"Carica la configurazione dal file",ra_Logout:wR,ra_Longitude:IR,'ra_May not trigger "updateLicenses"':'Potrebbe non attivare "updateLicenses"',ra_Message:CR,ra_Monday:pR,"ra_Move down":"Abbassati","ra_Move up":"Andare avanti",ra_Name:AR,"ra_No data found in file":"Nessun dato trovato nel file","ra_No one license found in license manager":"Nessuna licenza trovata nel gestore delle licenze","ra_No response from admin":"Nessuna risposta dall'amministratore","ra_No response from the backend":"Nessuna risposta dal backend",'ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".':'I non esperti possono creare nuovi oggetti solo in "0_userdata.0" o "alias.0".',"ra_Not a number":"Non un numero","ra_OAuth Client ID":"ID client OAuth","ra_OAuth Client secret":"Segreto del client OAuth",ra_Objects:mR,ra_Ok:fR,"ra_On weekdays":"Nei giorni della settimana","ra_Only following structures of objects are available:":"Sono disponibili solo le seguenti strutture di oggetti:","ra_Only selected":"Solo selezionato","ra_Owner group":"Gruppo di proprietari","ra_Owner user":"Utente proprietario","ra_Passwords are not equal!":"Le password non sono uguali!","ra_Place your files here or click here to open the browse dialog":"Posiziona i file qui o fai clic qui per aprire la finestra di dialogo Sfoglia","ra_Please allow popups in your browser for this page!":"Si prega di abilitare i popup nel browser per questa pagina!","ra_Please confirm":"Si prega di confermare","ra_Please create license":"Si prega di creare la licenza","ra_Please enter the license":"Inserisci la licenza","ra_Please select file...":"Si prega di selezionare il file...","ra_Please select object ID...":"Seleziona l'ID oggetto ...","ra_Port could be used by %s":"La porta potrebbe essere utilizzata da %s","ra_Port is already used by %s":"La porta è già utilizzata da %s","ra_Press ENTER Key to add new item":"Premere il tasto INVIO per aggiungere un nuovo elemento","ra_Private certificate":"Certificato privato",ra_Product:OR,"ra_Public certificate":"Certificato pubblico","ra_Quality code":"Qualità","ra_Refresh tree":"Aggiorna l'albero","ra_Reload files":"Ricarica i file",ra_Rename_Move_Copy:ER,"ra_Renew %s access":"Rinnova l'accesso %s",ra_Repeat:_R,ra_Replace:xR,"ra_Request timed out":"Tempo scaduto per la richiesta","ra_Restrict to folder":"Limita alla cartella",ra_Root:SR,ra_Saturday:kR,ra_Save:vR,"ra_Save and close":"Salva e chiudi","ra_Save configuration to file":"Salva la configurazione su file","ra_Save objects tree as JSON file":"Salva l'albero degli oggetti come file JSON","ra_Select all":"Seleziona tutto","ra_Select color":"Seleziona il colore","ra_Select predefined icon":"Seleziona l'icona predefinita","ra_Select type of export":"Seleziona il tipo di esportazione",ra_Selected:YR,"ra_Selected %s object(s)":"%s oggetto/i selezionato/i","ra_Serial number (UUID)":"Numero di serie (UUID)",'ra_Serial number (UUID) "%s" in license is for other device.':'Il numero di serie (UUID) "%s" nella licenza è per un altro dispositivo.',"ra_Session will expire in %s seconds. Continue?":"La sessione scadrà tra %s secondi. Continuare?","ra_Show all folders":"Mostra tutte le cartelle","ra_Show lines between rows":"Mostra linee tra le righe","ra_Show/Hide object descriptions":"Mostra/Nascondi le descrizioni degli oggetti","ra_Show/hide filter input":"Mostra/nascondi input filtro","ra_Some data are not stored. Discard?":"Alcuni dati non vengono memorizzati. Scartare?",ra_States:QR,"ra_Successfully authorized. Token valid till %s and will be automatically renewed.":"Autorizzazione completata. Il token è valido fino al %s e verrà rinnovato automaticamente.","ra_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":"Autorizzazione completata. Il token è valido fino al %s, ma potrebbe scadere perché l'istanza non è in esecuzione.","ra_Suitable license not found in license manager":"Licenza adatta non trovata nel gestore delle licenze",ra_Sunday:bR,"ra_Suppress question for next %s minutes":"Sopprimi la domanda per i prossimi %s minuti","ra_System language":"Linguaggio di sistema","ra_Take browser position":"Prendi posizione dal browser","ra_Take position from system settings":"Prendi posizione dalle impostazioni di sistema",'ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").':'Gli esperti possono creare oggetti ovunque ma dal secondo livello (es. "Vis.0" o "javascript.0").',"ra_The page you are looking for was not found":"La pagina che stai cercando non è stata trovata","ra_The schedule will be executed every minute. Are you sure?":"La pianificazione verrà eseguita ogni minuto. Sei sicuro?","ra_The schedule will be executed every second. Are you sure?":"La pianificazione verrà eseguita ogni secondo. Sei sicuro?",ra_Thursday:UR,ra_Timestamp:$R,"ra_Toggle expert mode":"Attiva / disattiva la modalità esperto","ra_Toggle the states view":"Attiva o disattiva la visualizzazione degli stati","ra_Toggle view mode":"Attiva / disattiva la modalità di visualizzazione","ra_Too big":"Troppo grande","ra_Too small":"Troppo piccolo","ra_Transparent dialog":"Finestra di dialogo trasparente",ra_Tuesday:PR,"ra_Unknown error":"Errore sconosciuto","ra_Unknown error!":"Errore sconosciuto!",ra_Update:WR,"ra_Upload file":"Caricare un file","ra_Use all available let's encrypt certificates":"Usa tutti i certificati Let's Encrypt disponibili","ra_Use iobroker.acme adapter for letsencrypt certificates":"Utilizzare l'adattatore iobroker.acme per i certificati letsencrypt","ra_Use system settings for position":"Usa le impostazioni di sistema per la posizione","ra_Used system settings":"Impostazioni di sistema utilizzate","ra_User files":"File utente",ra_ValidTill:JR,ra_Value:BR,ra_Version:RR,"ra_View file":"Vedi il file","ra_View: %s":"Visualizza: %s",ra_Wednesday:FR,ra_Width:GR,"ra_YAML editor":"Editor YAML",ra_Yes:HR,"ra_You can export all objects or just the selected branch.":"Puoi esportare tutti gli oggetti o solo il ramo selezionato.","ra_You can filter entries by entering here some text":"Puoi filtrare le voci inserendo qui del testo","ra_You can use * as wildcard":"Puoi usare * come carattere jolly",ra___different__:VR,ra_aclEveryone_read_object:ZR,ra_aclEveryone_read_state:XR,ra_aclEveryone_write_object:KR,ra_aclEveryone_write_state:qR,ra_aclGroup_read_object:eF,ra_aclGroup_read_state:tF,ra_aclGroup_write_object:sF,ra_aclGroup_write_state:iF,ra_aclOwner_read_object:rF,ra_aclOwner_read_state:oF,ra_aclOwner_write_object:nF,ra_aclOwner_write_state:aF,ra_buttons:MF,ra_changedFrom:cF,ra_close:uF,ra_create_boolean_state:lF,ra_create_channel:NF,ra_create_device:LF,ra_create_number_state:gF,ra_create_state:jF,ra_create_string_state:yF,ra_daysShortText:TF,ra_dow_Fr:DF,ra_dow_Mo:dF,ra_dow_Sa:hF,ra_dow_Su:zF,ra_dow_Th:wF,ra_dow_Tu:IF,ra_dow_We:CF,ra_expertMode:pF,ra_false:AF,ra_fileType_all:mF,ra_fileType_audio:fF,ra_fileType_code:OF,ra_fileType_images:EF,ra_fileType_txt:_F,ra_fileType_video:xF,"ra_fileType_video,":"video",ra_filter_customs:SF,ra_filter_customs_without:kF,ra_filter_func:vF,ra_filter_id:YF,ra_filter_name:QF,ra_filter_role:bF,ra_filter_room:UF,ra_filter_type:$F,"ra_import data from %s file":"Importa dati dal file %s",ra_invalidConfig:PF,ra_lastChange:WF,ra_locally:JF,ra_month_Apr:BF,ra_month_Aug:RF,ra_month_Dec:FF,ra_month_Feb:GF,ra_month_Jan:HF,ra_month_Jul:VF,ra_month_Jun:ZF,ra_month_Mai:XF,ra_month_Mar:KF,ra_month_Nov:qF,ra_month_Oct:eG,ra_month_Sep:tG,ra_months_Apr:sG,ra_months_Aug:iG,ra_months_Dec:rG,ra_months_Feb:oG,ra_months_Jan:nG,ra_months_Jul:aG,ra_months_Jun:MG,ra_months_Mai:cG,ra_months_Mar:uG,ra_months_Nov:lG,ra_months_Oct:NG,ra_months_Sep:LG,"ra_no confirm for 5 mins":"nessuna conferma per 5 minuti",ra_none:gG,ra_object_changed_by:jG,ra_object_changed_by_user:yG,ra_otherConfig:TG,ra_qualityCode:DG,ra_repeat:dG,ra_select_folder_hint:hG,ra_show_all:zG,ra_state_changed_by:wG,ra_state_changed_from:IG,ra_timestamp:CG,ra_tooltip_ack:pG,ra_tooltip_comment:AG,ra_tooltip_copyState:mG,ra_tooltip_ctrlForLink:fG,ra_tooltip_customConfig:OG,ra_tooltip_deleteObject:EG,ra_tooltip_editObject:_G,ra_tooltip_editState:xG,ra_tooltip_expire:SG,ra_tooltip_from:kG,ra_tooltip_lc:vG,ra_tooltip_quality:YG,ra_tooltip_ts:QG,ra_tooltip_user:bG,ra_tooltip_value:UG,ra_true:$G,"ra_use seconds":"usa i secondi",ra_val:PG,"ra_via internet":"attraverso internet",ra_warning_every_minute:WG,ra_warning_every_second:JG,sc_cron:BG,sc_date:RG,sc_dates:FG,sc_dow:GG,sc_dows:HG,sc_every:VG,sc_everyN_dates:ZG,sc_everyN_dow:XG,sc_everyN_dows:KG,sc_everyN_hours:qG,sc_everyN_minutes:eH,sc_everyN_months:tH,sc_everyN_seconds:sH,sc_every_dates:iH,sc_every_dow:rH,sc_every_dows:oH,sc_every_hours:nH,sc_every_minutes:aH,sc_every_months:MH,sc_every_seconds:cH,sc_from:uH,sc_hours:lH,sc_interval:NH,sc_intervalBetween:LH,sc_invalid_cron:gH,sc_minutes:jH,sc_months:yH,sc_once:TH,sc_period:DH,sc_seconds:dH,sc_simple:hH,sc_specific:zH,sc_specific_dates:wH,sc_specific_dow:IH,sc_specific_dows:CH,sc_specific_hours:pH,sc_specific_minutes:AH,sc_specific_months:mH,sc_specific_seconds:fH,sc_time:OH,sc_to:EH,sc_wizard:_H,sch_all:xH,sch_astroDay:SH,sch_astroNight:kH,sch_astro_dawn:vH,sch_astro_dusk:YH,sch_astro_goldenHour:QH,sch_astro_goldenHourEnd:bH,sch_astro_nadir:UH,sch_astro_nauticalDawn:$H,sch_astro_nauticalDusk:PH,sch_astro_night:WH,sch_astro_nightEnd:JH,sch_astro_solarNoon:BH,sch_astro_sunrise:RH,sch_astro_sunriseEnd:FH,sch_astro_sunset:GH,sch_astro_sunsetStart:HH,sch_at:VH,sch_desc_atTime:ZH,sch_desc_everyDay:XH,sch_desc_everyHour:KH,sch_desc_everyMinute:qH,sch_desc_everyMonth:eV,sch_desc_everyNDay:tV,sch_desc_everyNHours:sV,sch_desc_everyNMinutes:iV,sch_desc_everyNMonths:rV,sch_desc_everyNWeeks:oV,sch_desc_everyNYears:nV,sch_desc_everyWeek:aV,sch_desc_everyYear:MV,sch_desc_intervalFromTo:cV,sch_desc_never:uV,sch_desc_onDate:lV,sch_desc_onDates:NV,sch_desc_onEveryDate:LV,sch_desc_onMonth:gV,sch_desc_onMonths:jV,sch_desc_onWeekday:yV,sch_desc_onWeekdays:TV,sch_desc_onWeekends:DV,sch_desc_onWorkdays:dV,sch_desc_onceInPast:hV,sch_desc_once_on:zV,sch_desc_validFrom:wV,sch_desc_validFromTo:IV,sch_desc_validTo:CV,sch_every:pV,sch_exactTime:AV,sch_from:mV,sch_fromTo:fV,sch_intervalTime:OV,sch_invert:EV,sch_no_one:_V,sch_on:xV,sch_period:SV,sch_periodDaily:kV,sch_periodDates:vV,sch_periodDay:YV,sch_periodEvery:QV,sch_periodEveryDay:bV,sch_periodEveryMonth:UV,sch_periodEveryWeek:$V,sch_periodEveryYear:PV,sch_periodHours:WV,sch_periodMinutes:JV,sch_periodMonth:BV,sch_periodMonthly:RV,sch_periodOnce:FV,sch_periodSpecificMonths:GV,sch_periodWeek:HV,sch_periodWeekdays:VV,sch_periodWeekend:ZV,sch_periodWeekly:XV,sch_periodWorkdays:KV,sch_periodYear:qV,sch_periodYearly:eZ,sch_specificTime:tZ,sch_time:sZ,sch_to:iZ,sch_valid:rZ,sch_validFrom:oZ,sch_validTo:nZ,sch_wholeDay:aZ,sch_yearEveryMonth:MZ},uZ="Comportamiento",lZ="Adjuntar",NZ="Cancelar",LZ="Categorías",gZ="Comprobado",jZ="Borrar",yZ="Cerca",TZ="Comercial",DZ="Configurar",dZ="Conectado",hZ="Continuar",zZ="Copiado",wZ="Crear",IZ="Cultivo",CZ="Delete",pZ="Eliminar",AZ="Desechar",mZ="Desconectado",fZ="Error",OZ="Filtrar",EZ="Viernes",_Z="Latitud",xZ="Cerrar sesión",SZ="Longitud",kZ="Mensaje",vZ="Lunes",YZ="Nombre",QZ="Objetos",bZ="Okay",UZ="Producto",$Z="Cambiar nombre/Mover/Copiar",PZ="Repetir",WZ="Reemplazar",JZ="Raíz",BZ="Sábado",RZ="Salvar",FZ="Seleccionado",GZ="Estados",HZ="Domingo",VZ="Jueves",ZZ="Marca de tiempo",XZ="Martes",KZ="Actualizar",qZ="Válida hasta",eX="Valor",tX="Versión",sX="Miércoles",iX="Anchura",rX="Sí",oX="diferente",nX="Todo el mundo puede leer el objeto",aX="Todos pueden leer el estado",MX="Todos pueden escribir objetos",cX="Todos pueden escribir el estado",uX="El grupo puede leer el objeto",lX="El grupo puede leer el estado",NX="El grupo puede escribir un objeto",LX="El grupo puede escribir el estado",gX="El propietario puede leer el objeto",jX="El propietario puede leer el estado",yX="El propietario puede escribir el objeto",TX="El propietario puede escribir el estado",DX="Botones",dX="Cambiaron desde",hX="cerrar",zX="Crear estado booleano",wX="Crear canal",IX="Crear dispositivo",CX="Crear estado numérico",pX="Crear estado",AX="Crear estado de cadena",mX="d.",fX="Fr",OX="Mes",EX="Sa",_X="Su",xX="Th",SX="Tu",kX="Nosotros",vX="Modo experto",YX="FALSO",QX="Todos los archivos",bX="Audio",UX="Código/JSON",$X="Imágenes",PX="Texto",WX="Video",JX="Configuraciones",BX="sin",RX="Función",FX="ID",GX="Nombre",HX="Papel",VX="Habitación",ZX="Tipo",XX="Configuraciones inválidas",KX="Ultimo cambio",qX="en la zona",eK="Abr",tK="Ago",sK="Dic",iK="Feb",rK="Ene",oK="Jul",nK="Jun",aK="Mai",MK="Mar",cK="Nov",uK="Oct",lK="Sep",NK="Abr",LK="Ago",gK="Dic",jK="Feb",yK="Ene",TK="Jul",DK="Jun",dK="Mai",hK="Mar",zK="Nov",wK="Oct",IK="Sep",CK="ninguno",pK="Objeto cambiado por",AK="Objeto cambiado por última vez a las",mK="Configuraciones de otro adaptador %s",fK="Código de calidad",OK="repetir",EK='Para seleccionar la carpeta, simplemente mantenga presionada la tecla "shift" haciendo clic en la carpeta.',_K="Mostrar todo",xK="Estado cambiado por",SK="Objeto cambiado de",kK="Marca de tiempo",vK="Bandera reconocida",YK="Comentario",QK="Copie el valor del estado",bK="Mantenga presionada la tecla Cltr/⌘ para abrir el enlace",UK="Ajustes personalizados",$K="Eliminar objeto",PK="Editar objeto",WK="Edite el valor del estado",JK="Caduca en",BK="Desde",RK="Último cambio",FK="Calidad",GK="Sello de tiempo",HK="Usuario",VK="Valor",ZK="VERDADERO",XK="Valor",KK="Advertencia: ¡El trabajo CRON se ejecutará cada minuto durante el período especificado!",qK="Advertencia: ¡El trabajo CRON se ejecutará cada segundo durante el período especificado!",eq="CRON",tq="Fecha",sq="fechas",iq="Día",rq="Día de la semana",oq="Cada",nq="cada N días",aq="cada enésimo día de la semana",Mq="cada N día de la semana",cq="cada N horas",uq="cada N minutos",lq="cada N meses",Nq="cada N segundos",Lq="cada día",gq="Cada día de la semana",jq="Cada día de la semana",yq="cada hora",Tq="cada minuto",Dq="cada mes",dq="cada segundo",hq="De",zq="Horas",wq="Intervalo",Iq="Intervalo entre",Cq="CRON no válido",pq="Minutos",Aq="meses",mq="Una vez",fq="Período",Oq="Segundos",Eq="Sencillo",_q="Tiempo específico",xq="fechas especificas",Sq="día(s) específico(s) de la semana",kq="día específico de semanas",vq="horas específicas",Yq="minutos específicos",Qq="meses específicos",bq="segundos específicos",Uq="Hora",$q="A",Pq="Mago",Wq="todas",Jq="Día astro",Bq="Noche astro",Rq="Amanecer",Fq="Oscuridad",Gq="hora dorada",Hq="Fin de la hora dorada",Vq="Nadir",Zq="Amanecer náutico",Xq="Anochecer náutico",Kq="Noche",qq="Fin de la noche",eee="Mediodía solar",tee="amanecer",see="Fin del amanecer",iee="Puesta de sol",ree="Puesta de sol",oee="a",nee="en %s",aee="cada día",Mee="cada hora",cee="cada minuto",uee="cada mes",lee="cada %s días",Nee="cada %s horas",Lee="cada %s minutos",gee="cada %s meses",jee="cada %s semanas",yee="cada %s años",Tee="cada semana",Dee="todos los años",dee="de %s a %s",hee="Nunca",zee="en %s de %s",wee="en %s y %s de",Iee="en cada fecha de",Cee="%s",pee="%s y %s",Aee="en %s",mee="en %s y %s",fee="en los fines de semana",Oee="en días laborables",Eee="ya no se ejecutará más, porque el inicio está en el pasado",_ee="en %s",xee="de %s",See="Ejecutar desde hasta",kee="a %s",vee="cada",Yee="Tiempo específico",Qee="de",bee="De-a",Uee="Tiempo de intervalo",$ee="invertir; poner boca abajo o en la posición opuesta, orden o arreglo; Boca abajo",Pee="ninguna",Wee="en",Jee="Período",Bee="Diario",Ree="fechas",Fee="Día",Gee="Cada",Hee="Cada día",Vee="Cada mes",Zee="Cada semana",Xee="Todos los años",Kee="Horas",qee="Minutos",ete="mes",tte="Mensual",ste="Una vez",ite="Meses específicos",rte="Semana",ote="Días laborables",nte="Fin de semana",ate="Semanal",Mte="Días laborables",cte="Año",ute="Anual",lte="Tiempo específico",Nte="Hora",Lte="a",gte="Válido",jte="de",yte="a",Tte="Todo el dia",Dte="cada mes",dte={"ra_%s links from aliases":"%s enlaces de alias","ra_%s object(s) processed":"%s objeto(s) procesados","ra_%s was imported":"%s fue importado","ra_Accept license":"Aceptar licencia",ra_Actions:uZ,"ra_Add new child object to selected parent":"Agregar nuevo objeto hijo al padre seleccionado","ra_Add objects tree from JSON file":"Agregar árbol de objetos desde el archivo JSON","ra_Add row":"Añadir fila","ra_Advanced options":"Opciones avanzadas","ra_All items are filtered out":"Todos los elementos se filtran","ra_All objects":"Todos los objetos",ra_Append:lZ,"ra_Append %s entries or replace existing?":"¿Agregar %s entradas o reemplazar las existentes?","ra_Append or replace?":"¿Agregar o reemplazar?","ra_Are you sure?":"¿Estás seguro?","ra_Auto (no custom columns)":"Automático (sin columnas personalizadas)","ra_Back to %s":"Volver a %s","ra_Background image":"Imagen de fondo",ra_Cancel:NZ,"ra_Cannot add items with set filter":"No se pueden agregar elementos con el filtro establecido","ra_Cannot decode license":"No se puede decodificar la licencia","ra_Cannot determine position: System settings are empty and GPS detection is disabled in browser":"No se puede determinar la posición: la configuración del sistema está vacía y la detección de GPS está deshabilitada en el navegador",'ra_Cannot find "%s"':'No se puede encontrar "%s"','ra_Cannot read "%s"':'No se puede leer "%s"',"ra_Cannot read licenses: %s":"No se pueden leer licencias: %s","ra_Cannot retrieve options, as instance is offline":"No se pueden recuperar las opciones, ya que la instancia está fuera de línea","ra_Cannot update attribute, because not found in the object":"No se puede actualizar el atributo porque no se encuentra en el objeto","ra_Cannot upload":"no se puede cargar",ra_Categories:LZ,"ra_Chained certificate":"certificado encadenado","ra_Change color theme":"Cambiar tema de color","ra_Changed from":"Cambiaron desde","ra_Channel → State":"Canal → Estado","ra_Check license":"Verificar licencia",ra_Checked:gZ,ra_Clear:jZ,"ra_Clear filter":"Filtro claro","ra_Clear icon":"Icono claro","ra_Click to see in full size":"Haz clic para ver en tamaño completo.","ra_Click to show":"Haga clic para mostrar","ra_Clone current row":"Clonar fila actual",ra_Close:yZ,"ra_Collapse all nodes":"Contraer todos los nodos","ra_Collapse one step node":"Contraer un nivel",ra_Commercial:TZ,ra_Configure:DZ,"ra_Configure visible columns":"Configurar columnas visibles","ra_Confirm deletion of %s":"Confirmar la eliminación de %s",ra_Connected:dZ,ra_Continue:hZ,ra_Copied:zZ,"ra_Copied %s":'Copiado "%s"',"ra_Copy content":"Copiar contenido",ra_Create:wZ,"ra_Create alias":"Crear alias","ra_Create folder":"Crear carpeta","ra_Create new folder in %s":"Crear nueva carpeta en %s",ra_Crop:IZ,"ra_Define CRON...":"Definir CRON...","ra_Define functions":"Definir funciones","ra_Define rooms":"Definir habitaciones","ra_Define schedule":"Definir horario","ra_Define schedule...":"Definir horario ...",ra_Del:CZ,ra_Delete:pZ,"ra_Delete current row":"Eliminar fila actual","ra_Deselect all":"Deselecciona todo","ra_Device → Channel → State":"Dispositivo → Canal → Estado","ra_Disable/Enable translation":"Deshabilitar/Habilitar traducción",ra_Discard:AZ,ra_Disconnected:mZ,"ra_Do not ask for next 2 hours in this session":"No preguntes por las siguientes 2 horas en esta sesión.","ra_Do not export values of states":"No exportar valores de estados.","ra_Do not use let's encrypt":"No use vamos a cifrar","ra_Docker is not available":"Docker no está disponible","ra_Docker is not installed or not running":"Docker no está instalado o no se está ejecutando","ra_Double click to reset table layout":"Haga doble clic para restablecer el diseño de la tabla","ra_Drag 'n' drop some files here, or click to select files":"Arrastre y suelte algunos archivos aquí, o haga clic para seleccionar archivos","ra_Drop file here":"Suelta el archivo aquí","ra_Drop the files here...":"Suelta el archivo aquí ...","ra_Duplicate name":"Nombre duplicado","ra_Edit ACL":"Editar LCA","ra_Edit alias":"Editar alias","ra_Edit custom config":"Editar configuración personalizada","ra_Edit full path":"Editar ruta completa","ra_Edit function":"Función de edición","ra_Edit object field":"Editar campo de objeto","ra_Edit role":"Editar rol","ra_Edit room":"Cuarto de edición","ra_Edit value":"Editar valor","ra_Enter the code from that page here":"Introduzca el código de esa página aquí",ra_Error:fZ,"ra_Expand all nodes":"Expandir todos los nodos","ra_Expand one step node":"Expandir un nivel","ra_Expand/Collapse card":"Expandir/Contraer tarjeta","ra_Export configuration section":"Exportar sección de configuración","ra_Export data to %s file":"Exportar datos al archivo %s","ra_Failed to open JSON File":"No se pudo abrir el archivo JSON","ra_Fallback custom certificates":"Certificados personalizados alternativos","ra_File is too big. Max %sk allowed. Try use SVG.":"El archivo es demasiado grande. Máximo de %sk permitido. Intenta usar SVG.",ra_Filter:OZ,"ra_Filter and Data Actions":"Acciones de filtrado y datos","ra_Filter files":"Filtrar archivos","ra_Folder name":"Nombre de la carpeta","ra_Folder → Channel → State":"Carpeta → Canal → Estado","ra_Folder → Device → Channel → State":"Carpeta → Dispositivo → Canal → Estado","ra_Folder → State":"Carpeta → Estado","ra_Folders always first":"Carpetas siempre primero",ra_Friday:EZ,"ra_From file":"Desde archivo","ra_From text":"Del texto","ra_Get %s access":"Obtener %s acceso","ra_Good luck":"Buena suerte","ra_Hide empty folders":"Ocultar carpetas vacías","ra_If no file will be created in the folder, it will disappear after the browser closed":"Si no se creará ningún archivo en la carpeta, desaparecerá después de que se cierre el navegador.","ra_If the button above does not work, you can authorize manually this app by visiting this url":"Si el botón de arriba no funciona, puedes autorizar manualmente esta aplicación visitando esta URL","ra_Import and add configuration section":"Importar y agregar sección de configuración","ra_Import and replace configuration section":"Importar y reemplazar sección de configuración","ra_Import data from %s file":"Importar datos del archivo %s","ra_Import from %s":"Importar desde %s","ra_Instance %s is alive":"Instancia %s está vivo","ra_Instance %s is not alive":"Instancia %s no está vivo","ra_Instance is not alive":"La instancia no está viva","ra_Invalid CRON":"CRON no válido","ra_Invalid JSON":"JSON no válido","ra_Invalid JSON file.":"Archivo JSON inválido.","ra_Invalid JSON format. Expected an array.":"Formato JSON inválido. Se esperaba un array.","ra_Invalid answer from server":"Respuesta inválida del servidor","ra_Invalid parent folder!":"Carpeta principal no válida.","ra_Invalid structure":"Estructura inválida","ra_JSON editor":"editor JSON","ra_Last change":"Ultimo cambio",ra_Latitude:_Z,"ra_License %s":"Licencia %s","ra_License agreement":"Acuerdo de licencia","ra_License does not exist":"La licencia no existe","ra_License expired on %s":"La licencia venció el %s",'ra_License for other product "%s"':'Licencia para otro producto "%s"',"ra_License is for version %s, but required version is %s.":"La licencia es para la versión %s, pero la versión requerida es %s.","ra_License must be converted":"La licencia debe convertirse a una versión más reciente. Puedes hacerlo en tu perfil de iobroker.net.","ra_License not found in license manager. Do you want to read licenses from iobroker.net?":"Licencia no encontrada en el administrador de licencias. ¿Quieres actualizar las licencias de iobroker.net?","ra_Listen on all IPs":"Escuche en todas las IP","ra_Load configuration from file":"Cargar configuración desde archivo",ra_Logout:xZ,ra_Longitude:SZ,'ra_May not trigger "updateLicenses"':'No puede activar "updateLicenses"',ra_Message:kZ,ra_Monday:vZ,"ra_Move down":"Mover hacia abajo","ra_Move up":"Ascender",ra_Name:YZ,"ra_No data found in file":"No se encontraron datos en el archivo","ra_No one license found in license manager":"No se encontró ninguna licencia en el administrador de licencias","ra_No response from admin":"No hay respuesta del administrador","ra_No response from the backend":"No hay respuesta del backend",'ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".':'Los no expertos pueden crear nuevos objetos solo en "0_userdata.0" o "alias.0".',"ra_Not a number":"No un número","ra_OAuth Client ID":"ID de cliente OAuth","ra_OAuth Client secret":"Secreto de cliente OAuth",ra_Objects:QZ,ra_Ok:bZ,"ra_On weekdays":"De lunes a viernes","ra_Only following structures of objects are available:":"Solo están disponibles las siguientes estructuras de objetos:","ra_Only selected":"Solo seleccionados","ra_Owner group":"Grupo propietario","ra_Owner user":"Usuario propietario","ra_Passwords are not equal!":"¡Las contraseñas no son iguales!","ra_Place your files here or click here to open the browse dialog":"Coloque sus archivos aquí o haga clic aquí para abrir el cuadro de diálogo de exploración","ra_Please allow popups in your browser for this page!":"¡Permita ventanas emergentes en su navegador para esta página!","ra_Please confirm":"Por favor confirmar","ra_Please create license":"Por favor cree una licencia","ra_Please enter the license":"Por favor ingrese la licencia","ra_Please select file...":"Seleccione el archivo...","ra_Please select object ID...":"Por favor seleccione ID de objeto ...","ra_Port could be used by %s":"El puerto podría ser utilizado por %s","ra_Port is already used by %s":"El puerto ya está en uso por %s","ra_Press ENTER Key to add new item":"Presione la tecla ENTER para agregar un nuevo elemento","ra_Private certificate":"certificado privado",ra_Product:UZ,"ra_Public certificate":"Certificado público","ra_Quality code":"Calidad","ra_Refresh tree":"Actualizar árbol","ra_Reload files":"Recargar archivos",ra_Rename_Move_Copy:$Z,"ra_Renew %s access":"Renovar el acceso a %s",ra_Repeat:PZ,ra_Replace:WZ,"ra_Request timed out":"Tiempo de espera agotado","ra_Restrict to folder":"Restringir a carpeta",ra_Root:JZ,ra_Saturday:BZ,ra_Save:RZ,"ra_Save and close":"Guardar y cerrar","ra_Save configuration to file":"Guardar configuración en archivo","ra_Save objects tree as JSON file":"Guardar el árbol de objetos como archivo JSON","ra_Select all":"Seleccionar todo","ra_Select color":"Seleccionar el color","ra_Select predefined icon":"Seleccionar icono predefinido","ra_Select type of export":"Seleccione tipo de exportación",ra_Selected:FZ,"ra_Selected %s object(s)":"%s objetos seleccionados","ra_Serial number (UUID)":"Número de serie (UUID)",'ra_Serial number (UUID) "%s" in license is for other device.':'El número de serie (UUID) "%s" en la licencia es para otro dispositivo.',"ra_Session will expire in %s seconds. Continue?":"La sesión expirará en %s segundos. ¿Continuar?","ra_Show all folders":"Mostrar todas las carpetas","ra_Show lines between rows":"Mostrar líneas entre filas","ra_Show/Hide object descriptions":"Mostrar/ocultar descripciones de objetos","ra_Show/hide filter input":"Mostrar/ocultar entrada de filtro","ra_Some data are not stored. Discard?":"Algunos datos no se almacenan. ¿Desechar?",ra_States:GZ,"ra_Successfully authorized. Token valid till %s and will be automatically renewed.":"Autorizado correctamente. El token es válido hasta el %s y se renovará automáticamente.","ra_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":"Autorizado correctamente. El token es válido hasta %s, pero puede caducar porque la instancia no está en ejecución.","ra_Suitable license not found in license manager":"Licencia adecuada no encontrada en el administrador de licencias",ra_Sunday:HZ,"ra_Suppress question for next %s minutes":"Suprimir pregunta durante los próximos %s minutos","ra_System language":"Lenguaje del sistema","ra_Take browser position":"Tomar posición desde el navegador","ra_Take position from system settings":"Tomar posición desde la configuración del sistema",'ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").':'Los expertos pueden crear objetos en todas partes excepto desde el segundo nivel (por ejemplo, "vis.0" o "javascript.0").',"ra_The page you are looking for was not found":"No se encontró la página que busca","ra_The schedule will be executed every minute. Are you sure?":"El cronograma se ejecutará cada minuto. ¿Estás seguro?","ra_The schedule will be executed every second. Are you sure?":"El cronograma se ejecutará cada segundo. ¿Estás seguro?",ra_Thursday:VZ,ra_Timestamp:ZZ,"ra_Toggle expert mode":"Alternar modo experto","ra_Toggle the states view":"Alternar la vista de estados","ra_Toggle view mode":"Alternar modo de vista","ra_Too big":"Demasiado grande","ra_Too small":"Demasiado pequeña","ra_Transparent dialog":"Diálogo transparente",ra_Tuesday:XZ,"ra_Unknown error":"Error desconocido","ra_Unknown error!":"¡Error desconocido!",ra_Update:KZ,"ra_Upload file":"Subir archivo","ra_Use all available let's encrypt certificates":"Utilice todos los certificados let's encrypt disponibles","ra_Use iobroker.acme adapter for letsencrypt certificates":"Use el adaptador iobroker.acme para los certificados de letsencrypt","ra_Use system settings for position":"Usar la configuración del sistema para la posición","ra_Used system settings":"Configuraciones del sistema usadas","ra_User files":"Archivos de usuario",ra_ValidTill:qZ,ra_Value:eX,ra_Version:tX,"ra_View file":"Ver archivo","ra_View: %s":"Ver: %s",ra_Wednesday:sX,ra_Width:iX,"ra_YAML editor":"Editor YAML",ra_Yes:rX,"ra_You can export all objects or just the selected branch.":"Puede exportar todos los objetos o solo la rama seleccionada.","ra_You can filter entries by entering here some text":"Puede filtrar las entradas ingresando aquí algún texto","ra_You can use * as wildcard":"Puedes utilizar * como comodín",ra___different__:oX,ra_aclEveryone_read_object:nX,ra_aclEveryone_read_state:aX,ra_aclEveryone_write_object:MX,ra_aclEveryone_write_state:cX,ra_aclGroup_read_object:uX,ra_aclGroup_read_state:lX,ra_aclGroup_write_object:NX,ra_aclGroup_write_state:LX,ra_aclOwner_read_object:gX,ra_aclOwner_read_state:jX,ra_aclOwner_write_object:yX,ra_aclOwner_write_state:TX,ra_buttons:DX,ra_changedFrom:dX,ra_close:hX,ra_create_boolean_state:zX,ra_create_channel:wX,ra_create_device:IX,ra_create_number_state:CX,ra_create_state:pX,ra_create_string_state:AX,ra_daysShortText:mX,ra_dow_Fr:fX,ra_dow_Mo:OX,ra_dow_Sa:EX,ra_dow_Su:_X,ra_dow_Th:xX,ra_dow_Tu:SX,ra_dow_We:kX,ra_expertMode:vX,ra_false:YX,ra_fileType_all:QX,ra_fileType_audio:bX,ra_fileType_code:UX,ra_fileType_images:$X,ra_fileType_txt:PX,ra_fileType_video:WX,"ra_fileType_video,":"Video",ra_filter_customs:JX,ra_filter_customs_without:BX,ra_filter_func:RX,ra_filter_id:FX,ra_filter_name:GX,ra_filter_role:HX,ra_filter_room:VX,ra_filter_type:ZX,"ra_import data from %s file":"Importar datos del archivo %s",ra_invalidConfig:XX,ra_lastChange:KX,ra_locally:qX,ra_month_Apr:eK,ra_month_Aug:tK,ra_month_Dec:sK,ra_month_Feb:iK,ra_month_Jan:rK,ra_month_Jul:oK,ra_month_Jun:nK,ra_month_Mai:aK,ra_month_Mar:MK,ra_month_Nov:cK,ra_month_Oct:uK,ra_month_Sep:lK,ra_months_Apr:NK,ra_months_Aug:LK,ra_months_Dec:gK,ra_months_Feb:jK,ra_months_Jan:yK,ra_months_Jul:TK,ra_months_Jun:DK,ra_months_Mai:dK,ra_months_Mar:hK,ra_months_Nov:zK,ra_months_Oct:wK,ra_months_Sep:IK,"ra_no confirm for 5 mins":"Sin confirmación durante 5 minutos",ra_none:CK,ra_object_changed_by:pK,ra_object_changed_by_user:AK,ra_otherConfig:mK,ra_qualityCode:fK,ra_repeat:OK,ra_select_folder_hint:EK,ra_show_all:_K,ra_state_changed_by:xK,ra_state_changed_from:SK,ra_timestamp:kK,ra_tooltip_ack:vK,ra_tooltip_comment:YK,ra_tooltip_copyState:QK,ra_tooltip_ctrlForLink:bK,ra_tooltip_customConfig:UK,ra_tooltip_deleteObject:$K,ra_tooltip_editObject:PK,ra_tooltip_editState:WK,ra_tooltip_expire:JK,ra_tooltip_from:BK,ra_tooltip_lc:RK,ra_tooltip_quality:FK,ra_tooltip_ts:GK,ra_tooltip_user:HK,ra_tooltip_value:VK,ra_true:ZK,"ra_use seconds":"usar segundos",ra_val:XK,"ra_via internet":"vía Internet",ra_warning_every_minute:KK,ra_warning_every_second:qK,sc_cron:eq,sc_date:tq,sc_dates:sq,sc_dow:iq,sc_dows:rq,sc_every:oq,sc_everyN_dates:nq,sc_everyN_dow:aq,sc_everyN_dows:Mq,sc_everyN_hours:cq,sc_everyN_minutes:uq,sc_everyN_months:lq,sc_everyN_seconds:Nq,sc_every_dates:Lq,sc_every_dow:gq,sc_every_dows:jq,sc_every_hours:yq,sc_every_minutes:Tq,sc_every_months:Dq,sc_every_seconds:dq,sc_from:hq,sc_hours:zq,sc_interval:wq,sc_intervalBetween:Iq,sc_invalid_cron:Cq,sc_minutes:pq,sc_months:Aq,sc_once:mq,sc_period:fq,sc_seconds:Oq,sc_simple:Eq,sc_specific:_q,sc_specific_dates:xq,sc_specific_dow:Sq,sc_specific_dows:kq,sc_specific_hours:vq,sc_specific_minutes:Yq,sc_specific_months:Qq,sc_specific_seconds:bq,sc_time:Uq,sc_to:$q,sc_wizard:Pq,sch_all:Wq,sch_astroDay:Jq,sch_astroNight:Bq,sch_astro_dawn:Rq,sch_astro_dusk:Fq,sch_astro_goldenHour:Gq,sch_astro_goldenHourEnd:Hq,sch_astro_nadir:Vq,sch_astro_nauticalDawn:Zq,sch_astro_nauticalDusk:Xq,sch_astro_night:Kq,sch_astro_nightEnd:qq,sch_astro_solarNoon:eee,sch_astro_sunrise:tee,sch_astro_sunriseEnd:see,sch_astro_sunset:iee,sch_astro_sunsetStart:ree,sch_at:oee,sch_desc_atTime:nee,sch_desc_everyDay:aee,sch_desc_everyHour:Mee,sch_desc_everyMinute:cee,sch_desc_everyMonth:uee,sch_desc_everyNDay:lee,sch_desc_everyNHours:Nee,sch_desc_everyNMinutes:Lee,sch_desc_everyNMonths:gee,sch_desc_everyNWeeks:jee,sch_desc_everyNYears:yee,sch_desc_everyWeek:Tee,sch_desc_everyYear:Dee,sch_desc_intervalFromTo:dee,sch_desc_never:hee,sch_desc_onDate:zee,sch_desc_onDates:wee,sch_desc_onEveryDate:Iee,sch_desc_onMonth:Cee,sch_desc_onMonths:pee,sch_desc_onWeekday:Aee,sch_desc_onWeekdays:mee,sch_desc_onWeekends:fee,sch_desc_onWorkdays:Oee,sch_desc_onceInPast:Eee,sch_desc_once_on:_ee,sch_desc_validFrom:xee,sch_desc_validFromTo:See,sch_desc_validTo:kee,sch_every:vee,sch_exactTime:Yee,sch_from:Qee,sch_fromTo:bee,sch_intervalTime:Uee,sch_invert:$ee,sch_no_one:Pee,sch_on:Wee,sch_period:Jee,sch_periodDaily:Bee,sch_periodDates:Ree,sch_periodDay:Fee,sch_periodEvery:Gee,sch_periodEveryDay:Hee,sch_periodEveryMonth:Vee,sch_periodEveryWeek:Zee,sch_periodEveryYear:Xee,sch_periodHours:Kee,sch_periodMinutes:qee,sch_periodMonth:ete,sch_periodMonthly:tte,sch_periodOnce:ste,sch_periodSpecificMonths:ite,sch_periodWeek:rte,sch_periodWeekdays:ote,sch_periodWeekend:nte,sch_periodWeekly:ate,sch_periodWorkdays:Mte,sch_periodYear:cte,sch_periodYearly:ute,sch_specificTime:lte,sch_time:Nte,sch_to:Lte,sch_valid:gte,sch_validFrom:jte,sch_validTo:yte,sch_wholeDay:Tte,sch_yearEveryMonth:Dte},hte="Akcje",zte="Dodać",wte="Anuluj",Ite="Kategorie",Cte="Sprawdzony",pte="Kasować",Ate="Blisko",mte="Handlowy",fte="Konfiguruj",Ote="Połączony",Ete="Kontynuować",_te="Skopiowano",xte="Stwórz",Ste="Przyciąć",kte="Delete",vte="Usunąć",Yte="Wyrzucać",Qte="Niepowiązany",bte="Błąd",Ute="Filtr",$te="Piątek",Pte="Szerokość",Wte="Wyloguj",Jte="Długość geograficzna",Bte="Wiadomość",Rte="Poniedziałek",Fte="Nazwa",Gte="Obiekty",Hte="Dobrze",Vte="Produkt",Zte="Zmień nazwę/Przenieś/Kopiuj",Xte="Powtarzać",Kte="Zastępować",qte="Korzeń",ese="Sobota",tse="Zapisać",sse="Wybrany",ise="Stany",rse="Niedziela",ose="Czwartek",nse="Znak czasu",ase="Wtorek",Mse="Aktualizacja",cse="Obowiązuje do",use="Wartość",lse="Wersja",Nse="Środa",Lse="Szerokość",gse="Tak",jse="różne",yse="Każdy może czytać obiekt",Tse="Każdy może czytać stan",Dse="Każdy może pisać przedmiot",dse="Każdy może pisać stan",hse="Grupa może odczytać obiekt",zse="Grupa może odczytać stan",wse="Grupa może pisać obiekt",Ise="Grupa może pisać stan",Cse="Właściciel może czytać obiekt",pse="Właściciel może odczytać stan",Ase="Właściciel może napisać obiekt",mse="Właściciel może pisać stan",fse="guziki",Ose="Zmieniony z",Ese="blisko",_se="Utwórz stan logiczny",xse="Utwórz kanał",Sse="Utwórz urządzenie",kse="Utwórz stan liczbowy",vse="Utwórz stan",Yse="Utwórz stan ciągu",Qse="d.",bse="Ks",Use="Mo",$se="Sa",Pse="Su",Wse="Th",Jse="Tu",Bse="My",Rse="Tryb ekspercki",Fse="FAŁSZ",Gse="Wszystkie pliki",Hse="Audio",Vse="Kod/JSON",Zse="Obrazy",Xse="Tekst",Kse="Wideo",qse="Ustawienia",eie="bez",tie="Funkcjonować",sie="ID",iie="Imię",rie="Rola",oie="Sala",nie="Rodzaj",aie="Nieprawidłowe ustawienia",Mie="Ostatnia zmiana",cie="lokalnie",uie="kwiecień",lie="sierpień",Nie="grudzień",Lie="luty",gie="styczeń",jie="lipiec",yie="czerwiec",Tie="Mai",Die="Zniszczyć",die="listopad",hie="październik",zie="wrzesień",wie="kwiecień",Iie="sierpień",Cie="grudzień",pie="luty",Aie="styczeń",mie="lipiec",fie="czerwiec",Oie="Mai",Eie="Zniszczyć",_ie="listopad",xie="październik",Sie="wrzesień",kie="Żaden",vie="Obiekt zmieniony przez",Yie="Obiekt ostatnio zmieniony o godz",Qie="Ustawienia z innego adaptera %s",bie="Kod jakości",Uie="powtarzać",$ie="Aby wybrać folder, wystarczy przytrzymać klawisz „shift”, klikając folder.",Pie="Pokaż wszystko",Wie="Stan zmieniony przez",Jie="Obiekt zmieniony z",Bie="Znak czasu",Rie="Potwierdzon",Fie="Komentarz",Gie="Skopiuj wartość stanu",Hie="Przytrzymaj klawisz CTRL/⌘, aby otworzyć link",Vie="Własne ustawienia",Zie="Usuń obiekt",Xie="Edytuj obiekt",Kie="Edytuj wartość stanu",qie="Wygasa za",ere="Z",tre="Ostatnia zmiana",sre="Jakość",ire="Znak czasu",rre="Użytkownik",ore="Wartość",nre="PRAWDA",are="Wartość",Mre="Ostrzeżenie: Zadanie CRON będzie uruchamiane co minutę w określonym przedziale czasowym!",cre="Ostrzeżenie: Zadanie CRON będzie uruchamiane co sekundę w określonym przedziale czasowym!",ure="CRON",lre="Data",Nre="Daktyle",Lre="Dzień",gre="Dzień tygodnia",jre="Każdy",yre="co N dni",Tre="w każdy N-ty dzień tygodnia",Dre="co N dnia tygodnia",dre="co N godzin",hre="co N minut",zre="co N miesięcy",wre="co N sekund",Ire="codziennie",Cre="każdy dzień tygodnia",pre="każdy dzień tygodnia",Are="co godzinę",mre="każda minuta",fre="każdego miesiąca",Ore="każda sekunda",Ere="Od",_re="godziny",xre="Interwał",Sre="Interwał między",kre="Nieprawidłowy CRON",vre="Minuty",Yre="miesięcy",Qre="Pewnego razu",bre="Kropka",Ure="sekundy",$re="Prosty",Pre="Określony czas",Wre="konkretne daty",Jre="określone dni tygodnia",Bre="określony dzień tygodni",Rre="określone godziny",Fre="określone minuty",Gre="określone miesiące",Hre="określone sekundy",Vre="Czas",Zre="Do",Xre="Czarodziej",Kre="wszystko",qre="Dzień Astro",eoe="Noc Astro",toe="Świt",soe="Zmierzch",ioe="Złota godzina",roe="Koniec złotej godziny",ooe="Północ",noe="Morski świt",aoe="Morski zmierzch",Moe="Noc",coe="Koniec nocy",uoe="Południe słoneczne",loe="Wschód słońca",Noe="Koniec wschodu słońca",Loe="Zachód słońca",goe="Początek zachodu słońca",joe="w",yoe="na %s",Toe="codziennie",Doe="co godzinę",doe="każda minuta",hoe="każdego miesiąca",zoe="każdego dnia %s",woe="co %s godzin",Ioe="co %s minut",Coe="co %s miesięcy",poe="co %s tygodni",Aoe="co %s lat",moe="co tydzień",foe="każdego roku",Ooe="od %s do %s",Eoe="nigdy",_oe="na %s z %s",xoe="na %s i %s z",Soe="w każdą datę",koe="%s",voe="%s i %s",Yoe="na %s",Qoe="na %s i %s",boe="w weekendy",Uoe="w dni robocze",$oe="nie będzie już wykonywany, ponieważ start jest w przeszłości",Poe="na %s",Woe="z %s",Joe="Wykonaj od do",Boe="do %s",Roe="każdy",Foe="Określony czas",Goe="od",Hoe="Od-do",Voe="Czas przerwy",Zoe="odwracać",Xoe="Żaden",Koe="na",qoe="Kropka",ene="Codziennie",tne="Daktyle",sne="Dzień",ine="Każdy",rne="Codziennie",one="Każdego miesiąca",nne="Co tydzień",ane="Każdego roku",Mne="godziny",cne="Minuty",une="miesiąc",lne="Miesięczny",Nne="Pewnego razu",Lne="Określone miesiące",gne="Tydzień",jne="Dni powszednie",yne="Weekend",Tne="Co tydzień",Dne="Dni robocze",dne="Rok",hne="Rocznie",zne="Określony czas",wne="Czas",Ine="do",Cne="Ważny",pne="od",Ane="do",mne="Cały dzień",fne="każdego miesiąca",One={"ra_%s links from aliases":"%s linków z aliasów","ra_%s object(s) processed":"Przetworzono %s obiektów","ra_%s was imported":"%s został zaimportowany","ra_Accept license":"Zaakceptuj licencję",ra_Actions:hte,"ra_Add new child object to selected parent":"Dodaj nowy obiekt potomny do wybranego rodzica","ra_Add objects tree from JSON file":"Dodaj drzewo obiektów z pliku JSON","ra_Add row":"Dodaj wiersz","ra_Advanced options":"Zaawansowane opcje","ra_All items are filtered out":"Wszystkie pozycje są odfiltrowane","ra_All objects":"Wszystkie obiekty",ra_Append:zte,"ra_Append %s entries or replace existing?":"Dołączyć wpisy %s czy zastąpić istniejące?","ra_Append or replace?":"Dołączyć czy zastąpić?","ra_Are you sure?":"Jesteś pewny?","ra_Auto (no custom columns)":"Auto (bez kolumn niestandardowych)","ra_Back to %s":"Powrót do %s","ra_Background image":"Zdjęcie w tle",ra_Cancel:wte,"ra_Cannot add items with set filter":"Nie można dodać elementów z ustawionym filtrem","ra_Cannot decode license":"Nie można zdekodować licencji","ra_Cannot determine position: System settings are empty and GPS detection is disabled in browser":"Nie można określić pozycji: ustawienia systemu są puste, a wykrywanie GPS jest wyłączone w przeglądarce",'ra_Cannot find "%s"':"Nie można znaleźć „%s”",'ra_Cannot read "%s"':"Nie można odczytać „%s”","ra_Cannot read licenses: %s":"Nie można odczytać licencji: %s","ra_Cannot retrieve options, as instance is offline":"Nie można pobrać opcji, ponieważ instancja jest w trybie offline","ra_Cannot update attribute, because not found in the object":"Nie można zaktualizować atrybutu, ponieważ nie znaleziono go w obiekcie","ra_Cannot upload":"Nie można przesłać",ra_Categories:Ite,"ra_Chained certificate":"Certyfikat łańcuchowy","ra_Change color theme":"Zmień motyw kolorystyczny","ra_Changed from":"Zmieniony z","ra_Channel → State":"Kanał → Stan","ra_Check license":"Sprawdź licencję",ra_Checked:Cte,ra_Clear:pte,"ra_Clear filter":"Czysty filtr","ra_Clear icon":"Wyczyść ikonę","ra_Click to see in full size":"Kliknij, aby zobaczyć w pełnym rozmiarze","ra_Click to show":"Kliknij, aby pokazać","ra_Clone current row":"Sklonuj bieżący wiersz",ra_Close:Ate,"ra_Collapse all nodes":"Zwiń wszystkie węzły","ra_Collapse one step node":"Zwiń o jeden poziom",ra_Commercial:mte,ra_Configure:fte,"ra_Configure visible columns":"Skonfiguruj widoczne kolumny","ra_Confirm deletion of %s":"Potwierdź usunięcie %s",ra_Connected:Ote,ra_Continue:Ete,ra_Copied:_te,"ra_Copied %s":'Skopiowano "%s"',"ra_Copy content":"Kopiuj zawartość",ra_Create:xte,"ra_Create alias":"Utwórz alias","ra_Create folder":"Utwórz folder","ra_Create new folder in %s":"Utwórz nowy folder w %s",ra_Crop:Ste,"ra_Define CRON...":"Zdefiniuj CRON...","ra_Define functions":"Zdefiniuj funkcje","ra_Define rooms":"Zdefiniuj pokoje","ra_Define schedule":"Zdefiniuj harmonogram","ra_Define schedule...":"Zdefiniuj harmonogram ...",ra_Del:kte,ra_Delete:vte,"ra_Delete current row":"Usuń bieżący wiersz","ra_Deselect all":"Odznacz wszystko","ra_Device → Channel → State":"Urządzenie → Kanał → Stan","ra_Disable/Enable translation":"Wyłącz/Włącz tłumaczenie",ra_Discard:Yte,ra_Disconnected:Qte,"ra_Do not ask for next 2 hours in this session":"Nie proś o kolejne 2 godziny w tej sesji","ra_Do not export values of states":"Nie eksportuj wartości stanów","ra_Do not use let's encrypt":"Nie używaj zaszyfrujmy","ra_Docker is not available":"Docker nie jest dostępny","ra_Docker is not installed or not running":"Docker nie jest zainstalowany lub nie działa","ra_Double click to reset table layout":"Kliknij dwukrotnie, aby zresetować układ tabeli","ra_Drag 'n' drop some files here, or click to select files":"Przeciągnij i upuść kilka plików tutaj lub kliknij, aby wybrać pliki","ra_Drop file here":"Upuść plik tutaj","ra_Drop the files here...":"Upuść plik tutaj...","ra_Duplicate name":"Zduplikowana nazwa","ra_Edit ACL":"Edytuj listy ACL","ra_Edit alias":"Edytuj alias","ra_Edit custom config":"Edytuj konfigurację niestandardową","ra_Edit full path":"Edytuj pełną ścieżkę","ra_Edit function":"Funkcja edycji","ra_Edit object field":"Edytuj pole obiektu","ra_Edit role":"Edytuj rolę","ra_Edit room":"Edytuj pokój","ra_Edit value":"Edytuj wartość","ra_Enter the code from that page here":"Wpisz kod z tej strony tutaj",ra_Error:bte,"ra_Expand all nodes":"Rozwiń wszystkie węzły","ra_Expand one step node":"Rozwiń o jeden poziom","ra_Expand/Collapse card":"Rozwiń/Zwiń kartę","ra_Export configuration section":"Sekcja konfiguracji eksportu","ra_Export data to %s file":"Eksportuj dane do pliku %s","ra_Failed to open JSON File":"Nie udało się otworzyć pliku JSON","ra_Fallback custom certificates":"Niestandardowe certyfikaty zastępcze","ra_File is too big. Max %sk allowed. Try use SVG.":"Plik jest za duży. Maksymalna dozwolona liczba %sk. Spróbuj użyć SVG.",ra_Filter:Ute,"ra_Filter and Data Actions":"Akcje filtrów i danych","ra_Filter files":"Filtruj pliki","ra_Folder name":"Nazwa folderu","ra_Folder → Channel → State":"Folder → Kanał → Stan","ra_Folder → Device → Channel → State":"Folder → Urządzenie → Kanał → Stan","ra_Folder → State":"Folder → Stan","ra_Folders always first":"Foldery zawsze na pierwszym miejscu",ra_Friday:$te,"ra_From file":"Z pliku","ra_From text":"Z tekstu","ra_Get %s access":"Uzyskaj dostęp %s","ra_Good luck":"Powodzenia","ra_Hide empty folders":"Ukryj puste foldery","ra_If no file will be created in the folder, it will disappear after the browser closed":"Jeśli w folderze nie zostanie utworzony żaden plik, zniknie on po zamknięciu przeglądarki","ra_If the button above does not work, you can authorize manually this app by visiting this url":"Jeśli przycisk powyżej nie działa, możesz autoryzować tę aplikację ręcznie, odwiedzając ten adres URL","ra_Import and add configuration section":"Importuj i dodaj sekcję konfiguracji","ra_Import and replace configuration section":"Importuj i zastąp sekcję konfiguracji","ra_Import data from %s file":"Importuj dane z pliku %s","ra_Import from %s":"Importuj z %s","ra_Instance %s is alive":"Instancja %s jest aktywna","ra_Instance %s is not alive":"Instancja TEKST nie jest aktywna","ra_Instance is not alive":"Instancja nie jest aktywna","ra_Invalid CRON":"Nieprawidłowy CRON","ra_Invalid JSON":"Nieprawidłowy JSON","ra_Invalid JSON file.":"Nieprawidłowy plik JSON.","ra_Invalid JSON format. Expected an array.":"Nieprawidłowy format JSON. Oczekiwano tablicy.","ra_Invalid answer from server":"Nieprawidłowa odpowiedź z serwera","ra_Invalid parent folder!":"Nieprawidłowy folder nadrzędny!","ra_Invalid structure":"Nieprawidłowa struktura","ra_JSON editor":"Edytor JSON","ra_Last change":"Ostatnia zmiana",ra_Latitude:Pte,"ra_License %s":"Licencja %s","ra_License agreement":"Umowa licencyjna","ra_License does not exist":"Licencja nie istnieje","ra_License expired on %s":"Licencja wygasła w dniu %s",'ra_License for other product "%s"':"Licencja na inny produkt „%s”","ra_License is for version %s, but required version is %s.":"Licencja dotyczy wersji %s, ale wymagana wersja to %s.","ra_License must be converted":"Licencja musi zostać przekonwertowana na nowszą wersję. Możesz to zrobić w swoim profilu iobroker.net.","ra_License not found in license manager. Do you want to read licenses from iobroker.net?":"Nie znaleziono licencji w menedżerze licencji. Chcesz zaktualizować licencje z iobroker.net?","ra_Listen on all IPs":"Słuchaj na wszystkich adresach IP","ra_Load configuration from file":"Załaduj konfigurację z pliku",ra_Logout:Wte,ra_Longitude:Jte,'ra_May not trigger "updateLicenses"':"Może nie uruchamiać „updateLicenses”",ra_Message:Bte,ra_Monday:Rte,"ra_Move down":"Padnij","ra_Move up":"Podnieść",ra_Name:Fte,"ra_No data found in file":"Nie znaleziono danych w pliku","ra_No one license found in license manager":"Nie znaleziono licencji w menedżerze licencji","ra_No response from admin":"Brak odpowiedzi od administratora","ra_No response from the backend":"Brak odpowiedzi z zaplecza",'ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".':"Osoby nie będące ekspertami mogą tworzyć nowe obiekty tylko w „0_userdata.0” lub „alias.0”.","ra_Not a number":"Nie numer","ra_OAuth Client ID":"Identyfikator klienta OAuth","ra_OAuth Client secret":"Tajny klucz klienta OAuth",ra_Objects:Gte,ra_Ok:Hte,"ra_On weekdays":"W dni powszednie","ra_Only following structures of objects are available:":"Dostępne są tylko następujące struktury obiektów:","ra_Only selected":"Tylko wybrane","ra_Owner group":"Grupa właścicieli","ra_Owner user":"Właściciel użytkownika","ra_Passwords are not equal!":"Hasła nie są równe!","ra_Place your files here or click here to open the browse dialog":"Umieść swoje pliki tutaj lub kliknij tutaj, aby otworzyć okno dialogowe przeglądania","ra_Please allow popups in your browser for this page!":"Proszę zezwolić na wyświetlanie wyskakujących okienek w przeglądarce dla tej strony!","ra_Please confirm":"Proszę potwierdzić","ra_Please create license":"Utwórz licencję","ra_Please enter the license":"Proszę wprowadzić licencję","ra_Please select file...":"Wybierz plik...","ra_Please select object ID...":"Wybierz identyfikator obiektu ...","ra_Port could be used by %s":"Port może być używany przez %s","ra_Port is already used by %s":"Port jest już używany przez %s","ra_Press ENTER Key to add new item":"Naciśnij klawisz ENTER, aby dodać nowy element","ra_Private certificate":"Prywatny certyfikat",ra_Product:Vte,"ra_Public certificate":"Certyfikat publiczny","ra_Quality code":"Jakości","ra_Refresh tree":"Odśwież drzewo","ra_Reload files":"Załaduj ponownie pliki",ra_Rename_Move_Copy:Zte,"ra_Renew %s access":"Odnów dostęp %s",ra_Repeat:Xte,ra_Replace:Kte,"ra_Request timed out":"Upłynął limit czasu żądania","ra_Restrict to folder":"Ogranicz do folderu",ra_Root:qte,ra_Saturday:ese,ra_Save:tse,"ra_Save and close":"Zapisz i zamknij","ra_Save configuration to file":"Zapisz konfigurację do pliku","ra_Save objects tree as JSON file":"Zapisz drzewo obiektów jako plik JSON","ra_Select all":"Zaznacz wszystko","ra_Select color":"Wybierz kolor","ra_Select predefined icon":"Wybierz predefiniowaną ikonę","ra_Select type of export":"Wybierz rodzaj eksportu",ra_Selected:sse,"ra_Selected %s object(s)":"Wybrane obiekty %s","ra_Serial number (UUID)":"Numer seryjny (UUID)",'ra_Serial number (UUID) "%s" in license is for other device.':"Numer seryjny (UUID) „%s” w licencji dotyczy innego urządzenia.","ra_Session will expire in %s seconds. Continue?":"Sesja wygaśnie za %s sekund. Kontynuować?","ra_Show all folders":"Pokaż wszystkie foldery","ra_Show lines between rows":"Pokaż linie między rzędami","ra_Show/Hide object descriptions":"Pokaż/ukryj opisy obiektów","ra_Show/hide filter input":"Pokaż/ukryj wejście filtra","ra_Some data are not stored. Discard?":"Niektóre dane nie są przechowywane. Wyrzucać?",ra_States:ise,"ra_Successfully authorized. Token valid till %s and will be automatically renewed.":"Pomyślnie autoryzowano. Token ważny do %s i zostanie automatycznie odnowiony.","ra_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":"Pomyślnie autoryzowano. Token ważny do %s, ale może wygasnąć, ponieważ instancja nie jest uruchomiona.","ra_Suitable license not found in license manager":"Nie znaleziono odpowiedniej licencji w menedżerze licencji",ra_Sunday:rse,"ra_Suppress question for next %s minutes":"Ukryj pytanie przez następne %s minut","ra_System language":"Język systemu","ra_Take browser position":"Zajmij pozycję z przeglądarki","ra_Take position from system settings":"Zajmij pozycję z ustawień systemowych",'ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").':"Eksperci mogą tworzyć obiekty wszędzie poza drugim poziomem (np. „Vis.0” lub „javascript.0”).","ra_The page you are looking for was not found":"Strona, której szukasz nie została znaleziona","ra_The schedule will be executed every minute. Are you sure?":"Harmonogram będzie wykonywany co minutę. Czy jesteś pewien?","ra_The schedule will be executed every second. Are you sure?":"Harmonogram będzie wykonywany co sekundę. Czy jesteś pewien?",ra_Thursday:ose,ra_Timestamp:nse,"ra_Toggle expert mode":"Przełącz tryb eksperta","ra_Toggle the states view":"Przełącz widok stanów","ra_Toggle view mode":"Przełącz tryb widoku","ra_Too big":"Za duży","ra_Too small":"Za mały","ra_Transparent dialog":"Przejrzyste okno dialogowe",ra_Tuesday:ase,"ra_Unknown error":"Nieznany błąd","ra_Unknown error!":"Nieznany błąd!",ra_Update:Mse,"ra_Upload file":"Przesyłanie pliku","ra_Use all available let's encrypt certificates":"Użyj wszystkich dostępnych certyfikatów Let's Encrypt","ra_Use iobroker.acme adapter for letsencrypt certificates":"Użyj adaptera iobroker.acme dla certyfikatów letsencrypt","ra_Use system settings for position":"Użyj ustawień systemowych dla pozycji","ra_Used system settings":"Używane ustawienia systemowe","ra_User files":"Pliki użytkownika",ra_ValidTill:cse,ra_Value:use,ra_Version:lse,"ra_View file":"Zobaczyć plik","ra_View: %s":"Widok: %s",ra_Wednesday:Nse,ra_Width:Lse,"ra_YAML editor":"Edytor YAML",ra_Yes:gse,"ra_You can export all objects or just the selected branch.":"Możesz wyeksportować wszystkie obiekty lub tylko wybraną gałąź.","ra_You can filter entries by entering here some text":"Możesz filtrować wpisy, wpisując tutaj jakiś tekst","ra_You can use * as wildcard":"Możesz użyć * jako symbolu wieloznacznego",ra___different__:jse,ra_aclEveryone_read_object:yse,ra_aclEveryone_read_state:Tse,ra_aclEveryone_write_object:Dse,ra_aclEveryone_write_state:dse,ra_aclGroup_read_object:hse,ra_aclGroup_read_state:zse,ra_aclGroup_write_object:wse,ra_aclGroup_write_state:Ise,ra_aclOwner_read_object:Cse,ra_aclOwner_read_state:pse,ra_aclOwner_write_object:Ase,ra_aclOwner_write_state:mse,ra_buttons:fse,ra_changedFrom:Ose,ra_close:Ese,ra_create_boolean_state:_se,ra_create_channel:xse,ra_create_device:Sse,ra_create_number_state:kse,ra_create_state:vse,ra_create_string_state:Yse,ra_daysShortText:Qse,ra_dow_Fr:bse,ra_dow_Mo:Use,ra_dow_Sa:$se,ra_dow_Su:Pse,ra_dow_Th:Wse,ra_dow_Tu:Jse,ra_dow_We:Bse,ra_expertMode:Rse,ra_false:Fse,ra_fileType_all:Gse,ra_fileType_audio:Hse,ra_fileType_code:Vse,ra_fileType_images:Zse,ra_fileType_txt:Xse,ra_fileType_video:Kse,"ra_fileType_video,":"Wideo",ra_filter_customs:qse,ra_filter_customs_without:eie,ra_filter_func:tie,ra_filter_id:sie,ra_filter_name:iie,ra_filter_role:rie,ra_filter_room:oie,ra_filter_type:nie,"ra_import data from %s file":"Importuj dane z pliku %s",ra_invalidConfig:aie,ra_lastChange:Mie,ra_locally:cie,ra_month_Apr:uie,ra_month_Aug:lie,ra_month_Dec:Nie,ra_month_Feb:Lie,ra_month_Jan:gie,ra_month_Jul:jie,ra_month_Jun:yie,ra_month_Mai:Tie,ra_month_Mar:Die,ra_month_Nov:die,ra_month_Oct:hie,ra_month_Sep:zie,ra_months_Apr:wie,ra_months_Aug:Iie,ra_months_Dec:Cie,ra_months_Feb:pie,ra_months_Jan:Aie,ra_months_Jul:mie,ra_months_Jun:fie,ra_months_Mai:Oie,ra_months_Mar:Eie,ra_months_Nov:_ie,ra_months_Oct:xie,ra_months_Sep:Sie,"ra_no confirm for 5 mins":"brak potwierdzenia przez 5 minut",ra_none:kie,ra_object_changed_by:vie,ra_object_changed_by_user:Yie,ra_otherConfig:Qie,ra_qualityCode:bie,ra_repeat:Uie,ra_select_folder_hint:$ie,ra_show_all:Pie,ra_state_changed_by:Wie,ra_state_changed_from:Jie,ra_timestamp:Bie,ra_tooltip_ack:Rie,ra_tooltip_comment:Fie,ra_tooltip_copyState:Gie,ra_tooltip_ctrlForLink:Hie,ra_tooltip_customConfig:Vie,ra_tooltip_deleteObject:Zie,ra_tooltip_editObject:Xie,ra_tooltip_editState:Kie,ra_tooltip_expire:qie,ra_tooltip_from:ere,ra_tooltip_lc:tre,ra_tooltip_quality:sre,ra_tooltip_ts:ire,ra_tooltip_user:rre,ra_tooltip_value:ore,ra_true:nre,"ra_use seconds":"użyj sekund",ra_val:are,"ra_via internet":"przez internet",ra_warning_every_minute:Mre,ra_warning_every_second:cre,sc_cron:ure,sc_date:lre,sc_dates:Nre,sc_dow:Lre,sc_dows:gre,sc_every:jre,sc_everyN_dates:yre,sc_everyN_dow:Tre,sc_everyN_dows:Dre,sc_everyN_hours:dre,sc_everyN_minutes:hre,sc_everyN_months:zre,sc_everyN_seconds:wre,sc_every_dates:Ire,sc_every_dow:Cre,sc_every_dows:pre,sc_every_hours:Are,sc_every_minutes:mre,sc_every_months:fre,sc_every_seconds:Ore,sc_from:Ere,sc_hours:_re,sc_interval:xre,sc_intervalBetween:Sre,sc_invalid_cron:kre,sc_minutes:vre,sc_months:Yre,sc_once:Qre,sc_period:bre,sc_seconds:Ure,sc_simple:$re,sc_specific:Pre,sc_specific_dates:Wre,sc_specific_dow:Jre,sc_specific_dows:Bre,sc_specific_hours:Rre,sc_specific_minutes:Fre,sc_specific_months:Gre,sc_specific_seconds:Hre,sc_time:Vre,sc_to:Zre,sc_wizard:Xre,sch_all:Kre,sch_astroDay:qre,sch_astroNight:eoe,sch_astro_dawn:toe,sch_astro_dusk:soe,sch_astro_goldenHour:ioe,sch_astro_goldenHourEnd:roe,sch_astro_nadir:ooe,sch_astro_nauticalDawn:noe,sch_astro_nauticalDusk:aoe,sch_astro_night:Moe,sch_astro_nightEnd:coe,sch_astro_solarNoon:uoe,sch_astro_sunrise:loe,sch_astro_sunriseEnd:Noe,sch_astro_sunset:Loe,sch_astro_sunsetStart:goe,sch_at:joe,sch_desc_atTime:yoe,sch_desc_everyDay:Toe,sch_desc_everyHour:Doe,sch_desc_everyMinute:doe,sch_desc_everyMonth:hoe,sch_desc_everyNDay:zoe,sch_desc_everyNHours:woe,sch_desc_everyNMinutes:Ioe,sch_desc_everyNMonths:Coe,sch_desc_everyNWeeks:poe,sch_desc_everyNYears:Aoe,sch_desc_everyWeek:moe,sch_desc_everyYear:foe,sch_desc_intervalFromTo:Ooe,sch_desc_never:Eoe,sch_desc_onDate:_oe,sch_desc_onDates:xoe,sch_desc_onEveryDate:Soe,sch_desc_onMonth:koe,sch_desc_onMonths:voe,sch_desc_onWeekday:Yoe,sch_desc_onWeekdays:Qoe,sch_desc_onWeekends:boe,sch_desc_onWorkdays:Uoe,sch_desc_onceInPast:$oe,sch_desc_once_on:Poe,sch_desc_validFrom:Woe,sch_desc_validFromTo:Joe,sch_desc_validTo:Boe,sch_every:Roe,sch_exactTime:Foe,sch_from:Goe,sch_fromTo:Hoe,sch_intervalTime:Voe,sch_invert:Zoe,sch_no_one:Xoe,sch_on:Koe,sch_period:qoe,sch_periodDaily:ene,sch_periodDates:tne,sch_periodDay:sne,sch_periodEvery:ine,sch_periodEveryDay:rne,sch_periodEveryMonth:one,sch_periodEveryWeek:nne,sch_periodEveryYear:ane,sch_periodHours:Mne,sch_periodMinutes:cne,sch_periodMonth:une,sch_periodMonthly:lne,sch_periodOnce:Nne,sch_periodSpecificMonths:Lne,sch_periodWeek:gne,sch_periodWeekdays:jne,sch_periodWeekend:yne,sch_periodWeekly:Tne,sch_periodWorkdays:Dne,sch_periodYear:dne,sch_periodYearly:hne,sch_specificTime:zne,sch_time:wne,sch_to:Ine,sch_valid:Cne,sch_validFrom:pne,sch_validTo:Ane,sch_wholeDay:mne,sch_yearEveryMonth:fne},Ene="Дії",_ne="Додайте",xne="Скасувати",Sne="Категорії",kne="Перевірено",vne="Видалити",Yne="Закрити",Qne="Комерційний",bne="Налаштувати",Une="Підключено",$ne="Продовжити",Pne="Скопійовано",Wne="Створити",Jne="Урожай",Bne="Delete",Rne="Видалити",Fne="Відкинути",Gne="Відключено",Hne="Помилка",Vne="фільтр",Zne="П'ятниця",Xne="Широта",Kne="Вийти",qne="Довгота",eae="повідомлення",tae="понеділок",sae="Ім'я",iae="Об'єкти",rae="В порядку",oae="Продукт",nae="Перейменувати/Перемістити/Копіювати",aae="Повторіть",Mae="Замінити",cae="Корінь",uae="Субота",lae="зберегти",Nae="Вибране",Lae="держави",gae="неділя",jae="четвер",yae="Мітка часу",Tae="вівторок",Dae="оновлення",dae="Дійсний до",hae="Значення",zae="Версія",wae="Середа",Iae="Ширина",Cae="Так",pae="інший",Aae="Кожен може читати об'єкт",mae="Кожен може читати стан",fae="Кожен може написати об'єкт",Oae="Кожен може написати стан",Eae="Група може читати об'єкт",_ae="Група може читати стан",xae="Група може писати об'єкт",Sae="Група може писати стан",kae="Власник може читати об'єкт",vae="Власник може читати стан",Yae="Власник може написати об'єкт",Qae="Власник може написати стан",bae="кнопки",Uae="Змінено з",$ae="закрити",Pae="Створіть логічний стан",Wae="Створити канал",Jae="Створити пристрій",Bae="Створити номерний стан",Rae="Створити состояние",Fae="Створити рядковий стан",Gae="днів",Hae="О",Vae="пн",Zae="Sa",Xae="Нд",Kae="чт",qae="вт",eMe="ми",tMe="Експертний режим",sMe="НЕПРАВДА",iMe="Всі файли",rMe="Аудіо",oMe="Код/JSON",nMe="Зображення",aMe="текст",MMe="відео",cMe="Налаштування",uMe="без",lMe="функція",NMe="ID",LMe="Ім'я",gMe="Роль",jMe="Кімната",yMe="Тип",TMe="Недійсні налаштування",DMe="Остання зміна",dMe="локально",hMe="квіт",zMe="серп",wMe="груд",IMe="лютий",CMe="січня",pMe="лип",AMe="черв",mMe="травень",fMe="березень",OMe="Листопад",EMe="жовт",_Me="вер",xMe="квіт",SMe="серп",kMe="груд",vMe="лютий",YMe="січня",QMe="лип",bMe="черв",UMe="травень",$Me="березень",PMe="Листопад",WMe="жовт",JMe="вер",BMe="немає",RMe="Об'єкт змінено",FMe="Об'єкт востаннє змінено о",GMe="Налаштування з іншого адаптера %s",HMe="Код якості",VMe="повторити",ZMe="Щоб вибрати папку, просто клацніть папку, утримуючи клавішу «Shift».",XMe="Показати все",KMe="Стан змінено на",qMe="Об'єкт змінено з",ece="Мітка часу",tce="Визнано",sce="коментар",ice="Скопіюйте значення стану",rce="Утримуйте клавішу Cltr/⌘, щоб відкрити посилання",oce="Спеціальні налаштування",nce="Видалити об'єкт",ace="Редагувати об'єкт",Mce="Відредагуйте значення стану",cce="Термін дії закінчується через",uce="Від",lce="Востаннє змінено",Nce="якість",Lce="Позначка часу",gce="Користувач",jce="Значення",yce="ПРАВДА",Tce="Значення",Dce="Попередження: завдання CRON виконуватиметься щохвилини протягом зазначеного періоду!",dce="Попередження: завдання CRON виконуватиметься кожну секунду протягом зазначеного періоду!",hce="CRON",zce="Дата",wce="дати",Ice="День",Cce="День тижня",pce="кожен",Ace="кожні N днів",mce="кожен N-й день тижня",fce="кожні N днів тижня",Oce="кожні N годин",Ece="кожні N хвилин",_ce="кожні N місяців",xce="кожні N секунд",Sce="кожен день",kce="кожен день тижня",vce="кожен день тижня",Yce="щогодини",Qce="кожну хвилину",bce="щомісяця",Uce="кожна секунда",$ce="Від",Pce="години",Wce="Інтервал",Jce="Інтервал між",Bce="Недійсний CRON",Rce="хвилин",Fce="місяців",Gce="Один раз",Hce="Крапка",Vce="секунд",Zce="просто",Xce="Конкретний час",Kce="конкретні дати",qce="конкретний день (дні) тижня",eue="конкретний день тижня",tue="конкретні години",sue="конкретні хвилини",iue="конкретні місяці",rue="конкретні секунди",oue="час",nue="до",aue="майстер",Mue="все",cue="Астродень",uue="Астро ніч",lue="Світанок",Nue="Сутінки",Lue="Золота година",gue="Кінець золотої години",jue="Надір",yue="Морський світанок",Tue="Морські сутінки",Due="ніч",due="Кінець ночі",hue="Сонячний полудень",zue="Схід сонця",wue="Кінець сходу сонця",Iue="Захід сонця",Cue="Початок заходу сонця",pue="в",Aue="в %s",mue="кожен день",fue="щогодини",Oue="кожну хвилину",Eue="щомісяця",_ue="кожен %s день",xue="кожні %s годин",Sue="кожні %s хвилин",kue="кожні %s місяців",vue="кожні %s тижнів",Yue="кожні %s років",Que="щотижня",bue="щороку",Uue="від %s до %s",$ue="ніколи",Pue="на %s з %s",Wue="на %s і %s з",Jue="на кожну дату",Bue="%s",Rue="%s і %s",Fue="на %s",Gue="на %s і %s",Hue="на вихідних",Vue="в робочі дні",Zue="більше не виконуватиметься, оскільки запуск у минулому",Xue="на %s",Kue="від %s",que="Виконати від до",ele="до %s",tle="кожен",sle="Конкретний час",ile="від",rle="Від до",ole="Час інтервалу",nle="інвертувати",ale="немає",Mle="на",cle="Крапка",ule="Щодня",lle="дати",Nle="День",Lle="кожен",gle="Кожен день",jle="Щомісяця",yle="Щотижня",Tle="Щороку",Dle="години",dle="хвилин",hle="місяць",zle="Щомісяця",wle="Один раз",Ile="Конкретні місяці",Cle="тиждень",ple="будні",Ale="Вихідні",mle="Щотижня",fle="робочі дні",Ole="рік",Ele="щорічно",_le="Конкретний час",xle="час",Sle="до",kle="Дійсний",vle="від",Yle="до",Qle="Цілий день",ble="щомісяця",Ule={"ra_%s links from aliases":"%s посилань із псевдонімів","ra_%s object(s) processed":"Оброблено %s об’єктів","ra_%s was imported":"%s було імпортовано","ra_Accept license":"Прийняти ліцензію",ra_Actions:Ene,"ra_Add new child object to selected parent":"Додати новий дочірній об’єкт до вибраного батьківського","ra_Add objects tree from JSON file":"Додайте дерево об’єктів із файлу JSON","ra_Add row":"Додати рядок","ra_Advanced options":"Розширені опції","ra_All items are filtered out":"Усі елементи відфільтровано","ra_All objects":"Всі об'єкти",ra_Append:_ne,"ra_Append %s entries or replace existing?":"Додати %s записів чи замінити наявні?","ra_Append or replace?":"Додати чи замінити?","ra_Are you sure?":"Ти впевнений?","ra_Auto (no custom columns)":"Автоматично (без спеціальних стовпців)","ra_Back to %s":"Назад до %s","ra_Background image":"Фонове зображення",ra_Cancel:xne,"ra_Cannot add items with set filter":"Неможливо додати елементи зі встановленим фільтром","ra_Cannot decode license":"Неможливо розшифрувати ліцензію","ra_Cannot determine position: System settings are empty and GPS detection is disabled in browser":"Неможливо визначити положення: системні налаштування порожні, а визначення GPS вимкнено в браузері",'ra_Cannot find "%s"':'Не вдається знайти "%s"','ra_Cannot read "%s"':'Неможливо прочитати "%s"',"ra_Cannot read licenses: %s":"Неможливо прочитати ліцензії: %s","ra_Cannot retrieve options, as instance is offline":"Неможливо отримати параметри, оскільки екземпляр офлайн","ra_Cannot update attribute, because not found in the object":"Неможливо оновити атрибут, оскільки його не знайдено в об’єкті","ra_Cannot upload":"Неможливо завантажити",ra_Categories:Sne,"ra_Chained certificate":"Прикутий сертифікат","ra_Change color theme":"Змінити кольорову тему","ra_Changed from":"Змінено з","ra_Channel → State":"Канал → Стан","ra_Check license":"Перевірити ліцензію",ra_Checked:kne,ra_Clear:vne,"ra_Clear filter":"Очистити фільтр","ra_Clear icon":"Очистити значок","ra_Click to see in full size":"Натисніть, щоб побачити в повному розмірі","ra_Click to show":"Натисніть, щоб показати","ra_Clone current row":"Клонувати поточний рядок",ra_Close:Yne,"ra_Collapse all nodes":"Згорнути всі вузли","ra_Collapse one step node":"Згорнути на один рівень",ra_Commercial:Qne,ra_Configure:bne,"ra_Configure visible columns":"Налаштувати видимі стовпці","ra_Confirm deletion of %s":"Підтвердити видалення %s",ra_Connected:Une,ra_Continue:$ne,ra_Copied:Pne,"ra_Copied %s":'Скопійовано "%s"',"ra_Copy content":"Скопіюйте вміст",ra_Create:Wne,"ra_Create alias":"Створити псевдонім","ra_Create folder":"Створити папку","ra_Create new folder in %s":"Створіть нову папку в %s",ra_Crop:Jne,"ra_Define CRON...":"Визначити CRON...","ra_Define functions":"Визначити функції","ra_Define rooms":"Визначте кімнати","ra_Define schedule":"Визначити розклад","ra_Define schedule...":"Визначити розклад...",ra_Del:Bne,ra_Delete:Rne,"ra_Delete current row":"Видалити поточний рядок","ra_Deselect all":"Скасувати вибір усіх","ra_Device → Channel → State":"Пристрій → Канал → Стан","ra_Disable/Enable translation":"Вимкнути/Увімкнути переклад",ra_Discard:Fne,ra_Disconnected:Gne,"ra_Do not ask for next 2 hours in this session":"Не запитуйте про наступні 2 години цього сеансу","ra_Do not export values of states":"Не експортуйте значення станів","ra_Do not use let's encrypt":"Не використовуйте let's encrypt","ra_Docker is not available":"Докер недоступний","ra_Docker is not installed or not running":"Docker не встановлено або не працює","ra_Double click to reset table layout":"Двічі клацніть, щоб скинути макет таблиці","ra_Drag 'n' drop some files here, or click to select files":"Перетягніть деякі файли сюди або натисніть, щоб вибрати файли","ra_Drop file here":"Перетягніть файл сюди","ra_Drop the files here...":"Перетягніть файл сюди...","ra_Duplicate name":"Повторюване ім'я","ra_Edit ACL":"Редагувати ACL","ra_Edit alias":"Редагувати псевдонім","ra_Edit custom config":"Редагувати спеціальну конфігурацію","ra_Edit full path":"Редагувати повний шлях","ra_Edit function":"функція редагування","ra_Edit object field":"Поле редагування об'єкта","ra_Edit role":"Редагувати роль","ra_Edit room":"Редагувати кімнату","ra_Edit value":"Редагувати значення","ra_Enter the code from that page here":"Введіть тут код з цієї сторінки",ra_Error:Hne,"ra_Expand all nodes":"Розгорнути всі вузли","ra_Expand one step node":"Розгорніть один рівень","ra_Expand/Collapse card":"Розгорнути/Згорнути картку","ra_Export configuration section":"Розділ конфігурації експорту","ra_Export data to %s file":"Експортувати дані у файл %s","ra_Failed to open JSON File":"Не вдалося відкрити файл JSON","ra_Fallback custom certificates":"Запасні спеціальні сертифікати","ra_File is too big. Max %sk allowed. Try use SVG.":"Файл завеликий. Максимально дозволено %sk. Спробуйте використовувати SVG.",ra_Filter:Vne,"ra_Filter and Data Actions":"Фільтр і дії з даними","ra_Filter files":"Фільтр файлів","ra_Folder name":"Назва папки","ra_Folder → Channel → State":"Папка → Канал → Стан","ra_Folder → Device → Channel → State":"Папка → Пристрій → Канал → Стан","ra_Folder → State":"Папка → Стан","ra_Folders always first":"Папки завжди першими",ra_Friday:Zne,"ra_From file":"З файлу","ra_From text":"З тексту","ra_Get %s access":"Отримайте доступ %s","ra_Good luck":"Удачі","ra_Hide empty folders":"Приховати порожні папки","ra_If no file will be created in the folder, it will disappear after the browser closed":"Якщо в папці не буде створено файл, він зникне після закриття браузера","ra_If the button above does not work, you can authorize manually this app by visiting this url":"Якщо кнопка вище не працює, ви можете авторизувати цю програму вручну, перейшовши за цим посиланням","ra_Import and add configuration section":"Розділ імпорту та додавання конфігурації","ra_Import and replace configuration section":"Розділ імпорту та заміни конфігурації","ra_Import data from %s file":"Імпортувати дані з файлу %s","ra_Import from %s":"Імпортувати з %s","ra_Instance %s is alive":"Примірник %s живий","ra_Instance %s is not alive":"Примірник %s не живий","ra_Instance is not alive":"Примірник не живий","ra_Invalid CRON":"Недійсний CRON","ra_Invalid JSON":"Недійсний JSON","ra_Invalid JSON file.":"Недійсний JSON-файл.","ra_Invalid JSON format. Expected an array.":"Недійсний формат JSON. Очікується масив.","ra_Invalid answer from server":"Недійсна відповідь від сервера","ra_Invalid parent folder!":"Недійсна батьківська папка!","ra_Invalid structure":"Недійсна структура","ra_JSON editor":"Редактор JSON","ra_Last change":"Остання зміна",ra_Latitude:Xne,"ra_License %s":"Ліцензія %s","ra_License agreement":"Ліцензійна угода","ra_License does not exist":"Ліцензії не існує","ra_License expired on %s":"Термін дії ліцензії закінчився %s",'ra_License for other product "%s"':'Ліцензія на інший продукт "%s"',"ra_License is for version %s, but required version is %s.":"Ліцензія для версії %s, але потрібна версія %s.","ra_License must be converted":"Ліцензію необхідно конвертувати до новішої версії. Ви можете зробити це у своєму профілі на iobroker.net.","ra_License not found in license manager. Do you want to read licenses from iobroker.net?":"Ліцензія не знайдена в менеджері ліцензій. Хочете оновити ліцензії з iobroker.net?","ra_Listen on all IPs":"Прослуховування на всіх IP","ra_Load configuration from file":"Завантажити конфігурацію з файлу",ra_Logout:Kne,ra_Longitude:qne,'ra_May not trigger "updateLicenses"':'Може не запускати "updateLicenses"',ra_Message:eae,ra_Monday:tae,"ra_Move down":"Рухатися вниз","ra_Move up":"Рухатися вгору",ra_Name:sae,"ra_No data found in file":"Немає даних у файлі","ra_No one license found in license manager":"У менеджері ліцензій не знайдено жодної ліцензії","ra_No response from admin":"Немає відповіді від адміністратора","ra_No response from the backend":"Немає відповіді від сервера",'ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".':"Неексперти можуть створювати нові об’єкти лише в «0_userdata.0» або «alias.0».","ra_Not a number":"Не номер","ra_OAuth Client ID":"Ідентифікатор клієнта OAuth","ra_OAuth Client secret":"Секрет клієнта OAuth",ra_Objects:iae,ra_Ok:rae,"ra_On weekdays":"В будні дні","ra_Only following structures of objects are available:":"Доступні тільки такі структури об'єктів:","ra_Only selected":"Тільки обрані","ra_Owner group":"Група власників","ra_Owner user":"Користувач-власник","ra_Passwords are not equal!":"Паролі не бувають рівними!","ra_Place your files here or click here to open the browse dialog":"Розмістіть свої файли тут або натисніть тут, щоб відкрити діалогове вікно перегляду","ra_Please allow popups in your browser for this page!":"Будь ласка, дозвольте спливаючі вікна у вашому браузері для цієї сторінки!","ra_Please confirm":"Будь-ласка підтвердіть","ra_Please create license":"Будь ласка, створіть ліцензію","ra_Please enter the license":"Будь ласка, введіть ліцензію","ra_Please select file...":"Виберіть файл...","ra_Please select object ID...":"Виберіть ідентифікатор об'єкта...","ra_Port could be used by %s":"Порт може використовуватися %s","ra_Port is already used by %s":"Порт уже використовується %s","ra_Press ENTER Key to add new item":"Натисніть клавішу ENTER, щоб додати новий елемент","ra_Private certificate":"Приватний сертифікат",ra_Product:oae,"ra_Public certificate":"Публічний сертифікат","ra_Quality code":"якість","ra_Refresh tree":"Оновити дерево","ra_Reload files":"Перезавантажте файли",ra_Rename_Move_Copy:nae,"ra_Renew %s access":"Поновити доступ %s",ra_Repeat:aae,ra_Replace:Mae,"ra_Request timed out":"Час запиту вичерпано","ra_Restrict to folder":"Обмежити папкою",ra_Root:cae,ra_Saturday:uae,ra_Save:lae,"ra_Save and close":"Зберегти та закрити","ra_Save configuration to file":"Зберегти конфігурацію у файл","ra_Save objects tree as JSON file":"Зберегти дерево об’єктів як файл JSON","ra_Select all":"Вибрати все","ra_Select color":"Виберіть колір","ra_Select predefined icon":"Виберіть попередньо визначений значок","ra_Select type of export":"Виберіть тип експорту",ra_Selected:Nae,"ra_Selected %s object(s)":"Вибрані об’єкти %s","ra_Serial number (UUID)":"Серійний номер (UUID)",'ra_Serial number (UUID) "%s" in license is for other device.':'Серійний номер (UUID) "%s" у ліцензії призначений для іншого пристрою.',"ra_Session will expire in %s seconds. Continue?":"Сеанс закінчиться через %s секунд. Продовжити?","ra_Show all folders":"Показати всі папки","ra_Show lines between rows":"Показувати лінії між рядками","ra_Show/Hide object descriptions":"Показати/Сховати описи об’єктів","ra_Show/hide filter input":"Показати/сховати введення фільтра","ra_Some data are not stored. Discard?":"Деякі дані не зберігаються. Відкинути?",ra_States:Lae,"ra_Successfully authorized. Token valid till %s and will be automatically renewed.":"Авторизацію успішно пройшло. Токен дійсний до %s та буде автоматично поновлено.","ra_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":"Авторизацію успішно виконано. Токен дійсний до %s, але його термін дії може закінчитися, оскільки екземпляр не запущено.","ra_Suitable license not found in license manager":"Відповідна ліцензія не знайдена в менеджері ліцензій",ra_Sunday:gae,"ra_Suppress question for next %s minutes":"Приховати запитання на наступні %s хвилин","ra_System language":"Системна мова","ra_Take browser position":"Займіть позицію з браузера","ra_Take position from system settings":"Займіть позицію в налаштуваннях системи",'ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").':"Експерти можуть створювати об’єкти всюди, крім другого рівня (наприклад, «vis.0» або «javascript.0»).","ra_The page you are looking for was not found":"Сторінка, яку ви шукаєте, не знайдена","ra_The schedule will be executed every minute. Are you sure?":"Розклад буде виконуватися щохвилини. Ви впевнені?","ra_The schedule will be executed every second. Are you sure?":"Розклад буде виконуватися щосекунди. Ви впевнені?",ra_Thursday:jae,ra_Timestamp:yae,"ra_Toggle expert mode":"Перемкнути експертний режим","ra_Toggle the states view":"Перемкнути перегляд штатів","ra_Toggle view mode":"Перемкнути режим перегляду","ra_Too big":"Занадто великий","ra_Too small":"Занадто малий","ra_Transparent dialog":"Прозорий діалог",ra_Tuesday:Tae,"ra_Unknown error":"Невідома помилка","ra_Unknown error!":"Невідома помилка!",ra_Update:Dae,"ra_Upload file":"Завантажити файл","ra_Use all available let's encrypt certificates":"Використовуйте всі доступні сертифікати let's encrypt","ra_Use iobroker.acme adapter for letsencrypt certificates":"Використовуйте адаптер iobroker.acme для сертифікатів letsencrypt","ra_Use system settings for position":"Використовуйте системні налаштування для позиції","ra_Used system settings":"Використані системні налаштування","ra_User files":"Файли користувача",ra_ValidTill:dae,ra_Value:hae,ra_Version:zae,"ra_View file":"Переглянути файл","ra_View: %s":"Перегляд: %s",ra_Wednesday:wae,ra_Width:Iae,"ra_YAML editor":"Редактор YAML",ra_Yes:Cae,"ra_You can export all objects or just the selected branch.":"Ви можете експортувати всі об’єкти або лише вибрану гілку.","ra_You can filter entries by entering here some text":"Ви можете фільтрувати записи, ввівши тут певний текст","ra_You can use * as wildcard":"Ви можете використовувати * як символ підстановки",ra___different__:pae,ra_aclEveryone_read_object:Aae,ra_aclEveryone_read_state:mae,ra_aclEveryone_write_object:fae,ra_aclEveryone_write_state:Oae,ra_aclGroup_read_object:Eae,ra_aclGroup_read_state:_ae,ra_aclGroup_write_object:xae,ra_aclGroup_write_state:Sae,ra_aclOwner_read_object:kae,ra_aclOwner_read_state:vae,ra_aclOwner_write_object:Yae,ra_aclOwner_write_state:Qae,ra_buttons:bae,ra_changedFrom:Uae,ra_close:$ae,ra_create_boolean_state:Pae,ra_create_channel:Wae,ra_create_device:Jae,ra_create_number_state:Bae,ra_create_state:Rae,ra_create_string_state:Fae,ra_daysShortText:Gae,ra_dow_Fr:Hae,ra_dow_Mo:Vae,ra_dow_Sa:Zae,ra_dow_Su:Xae,ra_dow_Th:Kae,ra_dow_Tu:qae,ra_dow_We:eMe,ra_expertMode:tMe,ra_false:sMe,ra_fileType_all:iMe,ra_fileType_audio:rMe,ra_fileType_code:oMe,ra_fileType_images:nMe,ra_fileType_txt:aMe,ra_fileType_video:MMe,"ra_fileType_video,":"відео",ra_filter_customs:cMe,ra_filter_customs_without:uMe,ra_filter_func:lMe,ra_filter_id:NMe,ra_filter_name:LMe,ra_filter_role:gMe,ra_filter_room:jMe,ra_filter_type:yMe,"ra_import data from %s file":"Імпортувати дані з файлу %s",ra_invalidConfig:TMe,ra_lastChange:DMe,ra_locally:dMe,ra_month_Apr:hMe,ra_month_Aug:zMe,ra_month_Dec:wMe,ra_month_Feb:IMe,ra_month_Jan:CMe,ra_month_Jul:pMe,ra_month_Jun:AMe,ra_month_Mai:mMe,ra_month_Mar:fMe,ra_month_Nov:OMe,ra_month_Oct:EMe,ra_month_Sep:_Me,ra_months_Apr:xMe,ra_months_Aug:SMe,ra_months_Dec:kMe,ra_months_Feb:vMe,ra_months_Jan:YMe,ra_months_Jul:QMe,ra_months_Jun:bMe,ra_months_Mai:UMe,ra_months_Mar:$Me,ra_months_Nov:PMe,ra_months_Oct:WMe,ra_months_Sep:JMe,"ra_no confirm for 5 mins":"без підтвердження протягом 5 хв",ra_none:BMe,ra_object_changed_by:RMe,ra_object_changed_by_user:FMe,ra_otherConfig:GMe,ra_qualityCode:HMe,ra_repeat:VMe,ra_select_folder_hint:ZMe,ra_show_all:XMe,ra_state_changed_by:KMe,ra_state_changed_from:qMe,ra_timestamp:ece,ra_tooltip_ack:tce,ra_tooltip_comment:sce,ra_tooltip_copyState:ice,ra_tooltip_ctrlForLink:rce,ra_tooltip_customConfig:oce,ra_tooltip_deleteObject:nce,ra_tooltip_editObject:ace,ra_tooltip_editState:Mce,ra_tooltip_expire:cce,ra_tooltip_from:uce,ra_tooltip_lc:lce,ra_tooltip_quality:Nce,ra_tooltip_ts:Lce,ra_tooltip_user:gce,ra_tooltip_value:jce,ra_true:yce,"ra_use seconds":"використовуйте секунди",ra_val:Tce,"ra_via internet":"через інтернет",ra_warning_every_minute:Dce,ra_warning_every_second:dce,sc_cron:hce,sc_date:zce,sc_dates:wce,sc_dow:Ice,sc_dows:Cce,sc_every:pce,sc_everyN_dates:Ace,sc_everyN_dow:mce,sc_everyN_dows:fce,sc_everyN_hours:Oce,sc_everyN_minutes:Ece,sc_everyN_months:_ce,sc_everyN_seconds:xce,sc_every_dates:Sce,sc_every_dow:kce,sc_every_dows:vce,sc_every_hours:Yce,sc_every_minutes:Qce,sc_every_months:bce,sc_every_seconds:Uce,sc_from:$ce,sc_hours:Pce,sc_interval:Wce,sc_intervalBetween:Jce,sc_invalid_cron:Bce,sc_minutes:Rce,sc_months:Fce,sc_once:Gce,sc_period:Hce,sc_seconds:Vce,sc_simple:Zce,sc_specific:Xce,sc_specific_dates:Kce,sc_specific_dow:qce,sc_specific_dows:eue,sc_specific_hours:tue,sc_specific_minutes:sue,sc_specific_months:iue,sc_specific_seconds:rue,sc_time:oue,sc_to:nue,sc_wizard:aue,sch_all:Mue,sch_astroDay:cue,sch_astroNight:uue,sch_astro_dawn:lue,sch_astro_dusk:Nue,sch_astro_goldenHour:Lue,sch_astro_goldenHourEnd:gue,sch_astro_nadir:jue,sch_astro_nauticalDawn:yue,sch_astro_nauticalDusk:Tue,sch_astro_night:Due,sch_astro_nightEnd:due,sch_astro_solarNoon:hue,sch_astro_sunrise:zue,sch_astro_sunriseEnd:wue,sch_astro_sunset:Iue,sch_astro_sunsetStart:Cue,sch_at:pue,sch_desc_atTime:Aue,sch_desc_everyDay:mue,sch_desc_everyHour:fue,sch_desc_everyMinute:Oue,sch_desc_everyMonth:Eue,sch_desc_everyNDay:_ue,sch_desc_everyNHours:xue,sch_desc_everyNMinutes:Sue,sch_desc_everyNMonths:kue,sch_desc_everyNWeeks:vue,sch_desc_everyNYears:Yue,sch_desc_everyWeek:Que,sch_desc_everyYear:bue,sch_desc_intervalFromTo:Uue,sch_desc_never:$ue,sch_desc_onDate:Pue,sch_desc_onDates:Wue,sch_desc_onEveryDate:Jue,sch_desc_onMonth:Bue,sch_desc_onMonths:Rue,sch_desc_onWeekday:Fue,sch_desc_onWeekdays:Gue,sch_desc_onWeekends:Hue,sch_desc_onWorkdays:Vue,sch_desc_onceInPast:Zue,sch_desc_once_on:Xue,sch_desc_validFrom:Kue,sch_desc_validFromTo:que,sch_desc_validTo:ele,sch_every:tle,sch_exactTime:sle,sch_from:ile,sch_fromTo:rle,sch_intervalTime:ole,sch_invert:nle,sch_no_one:ale,sch_on:Mle,sch_period:cle,sch_periodDaily:ule,sch_periodDates:lle,sch_periodDay:Nle,sch_periodEvery:Lle,sch_periodEveryDay:gle,sch_periodEveryMonth:jle,sch_periodEveryWeek:yle,sch_periodEveryYear:Tle,sch_periodHours:Dle,sch_periodMinutes:dle,sch_periodMonth:hle,sch_periodMonthly:zle,sch_periodOnce:wle,sch_periodSpecificMonths:Ile,sch_periodWeek:Cle,sch_periodWeekdays:ple,sch_periodWeekend:Ale,sch_periodWeekly:mle,sch_periodWorkdays:fle,sch_periodYear:Ole,sch_periodYearly:Ele,sch_specificTime:_le,sch_time:xle,sch_to:Sle,sch_valid:kle,sch_validFrom:vle,sch_validTo:Yle,sch_wholeDay:Qle,sch_yearEveryMonth:ble},$le="操作",Ple="附加",Wle="取消",Jle="类别",Ble="勾选",Rle="删除",Fle="关",Gle="商业的",Hle="配置",Vle="连接的",Zle="继续",Xle="复制的",Kle="创建",qle="庄稼",e0e="Delete",t0e="删除",s0e="丢弃",i0e="断开连接",r0e="错误",o0e="筛选",n0e="星期五",a0e="纬度",M0e="登出",c0e="经度",u0e="信息",l0e="周一",N0e="姓名",L0e="对象",g0e="好",j0e="产品",y0e="重命名/移动/复制",T0e="重复",D0e="代替",d0e="根",h0e="周六",z0e="保存",w0e="已选",I0e="状态",C0e="星期日",p0e="周四",A0e="时间戳记",m0e="周二",f0e="更新资料",O0e="有效期至",E0e="值",_0e="版本",x0e="周三",S0e="宽度",k0e="是的",v0e="不同的",Y0e="每个人都可以阅读对象",Q0e="每个人都可以阅读状态",b0e="每个人都可以写对象",U0e="每个人都可以写状态",$0e="组可以读取对象",P0e="群组可以读取状态",W0e="组可以写对象",J0e="组可以写状态",B0e="所有者可以读取对象",R0e="所有者可以读取状态",F0e="所有者可以写对象",G0e="所有者可以写状态",H0e="纽扣",V0e="更改为",Z0e="关闭",X0e="创建布尔状态",K0e="创建频道",q0e="创建设备",eNe="创建号码状态",tNe="创建状态",sNe="创建字符串状态",iNe="天",rNe="r",oNe="莫",nNe="萨",aNe="苏",MNe="Th",cNe="Tu",uNe="我们",lNe="专家模式",NNe="错误的",LNe="所有文件",gNe="声音的",jNe="代码/JSON",yNe="图片",TNe="文本",DNe="视频",dNe="设定值",hNe="没有",zNe="功能",wNe="ID",INe="名称",CNe="角色",pNe="房间",ANe="类型",mNe="无效的设定",fNe="最后一次变更",ONe="本地",ENe="4月",_Ne="八月",xNe="十二月",SNe="二月",kNe="简",vNe="七月",YNe="君",QNe="迈",bNe="三月",UNe="十一月",$Ne="十月",PNe="九月",WNe="4月",JNe="八月",BNe="十二月",RNe="二月",FNe="简",GNe="七月",HNe="君",VNe="迈",ZNe="三月",XNe="十一月",KNe="十月",qNe="九月",e4e="没有任何",t4e="物件变更者",s4e="对象上次更改时间为",i4e="来自其他适配器%s的设置",r4e="质量代码",o4e="重复",n4e="要选择文件夹,只需按住“shift”键单击文件夹即可。",a4e="显示全部",M4e="状态由",c4e="对象已从更改",u4e="时间戳记",l4e="致谢国旗",N4e="评论",L4e="复制状态值",g4e="按住 Cltr/⌘ 键打开链接",j4e="自定义设置",y4e="删除物件",T4e="编辑物件",D4e="编辑状态值",d4e="有效期:",h4e="从",z4e="最后改变了",w4e="质量",I4e="时间戳",C4e="用户",p4e="值",A4e="真的",m4e="值",f4e="警告:CRON 作业将在指定期间内每分钟运行一次!",O4e="警告:CRON 作业将在指定期间内每秒运行一次!",E4e="周期任务",_4e="日期",x4e="日",S4e="天",k4e="星期",v4e="每",Y4e="每N天",Q4e="每周的第 N 天",b4e="每周N天",U4e="每N小时一次",$4e="每N分钟",P4e="每N个月",W4e="每N秒",J4e="每天",B4e="一周的每一天",R4e="一周的每一天",F4e="每小时",G4e="每分钟",H4e="每月",V4e="每秒",Z4e="从",X4e="小时",K4e="间隔",q4e="间隔时间",eLe="无效的 CRON",tLe="分钟",sLe="月",iLe="一次",rLe="周期",oLe="秒",nLe="简单模式",aLe="特定的时间",MLe="特定的日子",cLe="一周中的特定日子",uLe="特定的一周",lLe="特定的小时",NLe="特定的分钟",LLe="特定的月份",gLe="特定的描述",jLe="时间",yLe="至",TLe="向导模式",DLe="全选",dLe="天文白天",hLe="天文夜晚",zLe="黎明",wLe="黄昏",ILe="黄金时段",CLe="黄金时段结束",pLe="天底",ALe="航海黎明",mLe="航海黄昏",fLe="夜晚",OLe="夜晚结束",ELe="正午",_Le="日出",xLe="日出结束",SLe="日落",kLe="日落开始",vLe="在",YLe="的%s",QLe="每天",bLe="每小时",ULe="每分钟",$Le="每月",PLe="每%s天",WLe="每%s小时",JLe="每%s分钟",BLe="每%s月",RLe="每%s周",FLe="每%s年",GLe="每周",HLe="每年",VLe="从%s到%s",ZLe="决不",XLe="在%s的%s上",KLe="在%s和%s上",qLe="在每天",ege="%s",tge="%s和%s",sge="在%s上",ige="在%s和%s上",rge="在周末",oge="在工作日",nge="将不再执行,因为起始时间已经是过去的时间了。",age="在%s上",Mge="来自%s",cge="从执行到",uge="到%s",lge="每",Nge="特定的时间",Lge="从",gge="从到",jge="间隔时间",yge="倒置",Tge="取消全选",Dge="的",dge="周期",hge="每天",zge="日期",wge="天",Ige="每",Cge="每天",pge="每月",Age="每周",mge="每年",fge="小时",Oge="分钟",Ege="月",_ge="每月一次",xge="一次",Sge="特定的月份",kge="周",vge="工作日",Yge="周末",Qge="每周",bge="工作日",Uge="年",$ge="每年",Pge="特定的时间",Wge="时间",Jge="至",Bge="生效",Rge="从",Fge="至",Gge="一整天",Hge="每月",Vge={"ra_%s links from aliases":"来自别名的 %s 个链接","ra_%s object(s) processed":"已处理%s个对象","ra_%s was imported":"对象已导入","ra_Accept license":"接受许可",ra_Actions:$le,"ra_Add new child object to selected parent":"将新的子对象添加到选定的父对象","ra_Add objects tree from JSON file":"从JSON文件添加对象树","ra_Add row":"添加行","ra_Advanced options":"高级选项","ra_All items are filtered out":"所有项目都被过滤掉","ra_All objects":"所有对象",ra_Append:Ple,"ra_Append %s entries or replace existing?":"追加 %s 条目还是替换现有条目?","ra_Append or replace?":"追加还是替换?","ra_Are you sure?":"你确定吗?","ra_Auto (no custom columns)":"自动(无自定义列)","ra_Back to %s":"返回“%s”","ra_Background image":"背景图像",ra_Cancel:Wle,"ra_Cannot add items with set filter":"无法使用设置过滤器添加项目","ra_Cannot decode license":"无法解码许可证","ra_Cannot determine position: System settings are empty and GPS detection is disabled in browser":"无法确定位置:系统设置为空且浏览器中禁用了 GPS 检测",'ra_Cannot find "%s"':"找不到“%s”",'ra_Cannot read "%s"':"无法阅读“%s”","ra_Cannot read licenses: %s":"无法读取许可证:%s","ra_Cannot retrieve options, as instance is offline":"无法检索选项,因为实例处于脱机状态","ra_Cannot update attribute, because not found in the object":"无法更新属性,因为在对象中找不到","ra_Cannot upload":"无法上传",ra_Categories:Jle,"ra_Chained certificate":"链式证书","ra_Change color theme":"更改颜色主题","ra_Changed from":"更改为","ra_Channel → State":"频道→状态","ra_Check license":"检查许可证",ra_Checked:Ble,ra_Clear:Rle,"ra_Clear filter":"清除筛选","ra_Clear icon":"清除图标","ra_Click to see in full size":"点击查看完整尺寸","ra_Click to show":"点击显示","ra_Clone current row":"克隆当前行",ra_Close:Fle,"ra_Collapse all nodes":"收合所有节点","ra_Collapse one step node":"折叠一级",ra_Commercial:Gle,ra_Configure:Hle,"ra_Configure visible columns":"配置可见列","ra_Confirm deletion of %s":"确认删除%s",ra_Connected:Vle,ra_Continue:Zle,ra_Copied:Xle,"ra_Copied %s":'复制的"%s"',"ra_Copy content":"复制内容",ra_Create:Kle,"ra_Create alias":"创建别名","ra_Create folder":"创建文件夹","ra_Create new folder in %s":"在%s中创建新文件夹",ra_Crop:qle,"ra_Define CRON...":"定义 CRON...","ra_Define functions":"定义功能","ra_Define rooms":"定义房间","ra_Define schedule":"定义时间表","ra_Define schedule...":"定义时间表...",ra_Del:e0e,ra_Delete:t0e,"ra_Delete current row":"删除当前行","ra_Deselect all":"全部取消选择","ra_Device → Channel → State":"设备→频道→状态","ra_Disable/Enable translation":"禁用/启用翻译",ra_Discard:s0e,ra_Disconnected:i0e,"ra_Do not ask for next 2 hours in this session":"本次会话中不要询问接下来的 2 个小时","ra_Do not export values of states":"不导出状态值","ra_Do not use let's encrypt":"不要使用让我们加密","ra_Docker is not available":"Docker 不可用","ra_Docker is not installed or not running":"Docker 未安装或未运行","ra_Double click to reset table layout":"双击重置表格布局","ra_Drag 'n' drop some files here, or click to select files":"将一些文件拖放到此处,或单击以选择文件","ra_Drop file here":"将档案放在这里","ra_Drop the files here...":"把文件放在这里...","ra_Duplicate name":"名称重复","ra_Edit ACL":"编辑访问控制列表","ra_Edit alias":"编辑别名","ra_Edit custom config":"编辑自定义配置","ra_Edit full path":"编辑完整路径","ra_Edit function":"编辑功能","ra_Edit object field":"编辑对象字段","ra_Edit role":"编辑角色","ra_Edit room":"编辑室","ra_Edit value":"编辑值","ra_Enter the code from that page here":"在此处输入该页面的代码",ra_Error:r0e,"ra_Expand all nodes":"展开所有节点","ra_Expand one step node":"扩大一级","ra_Expand/Collapse card":"展开/折叠卡","ra_Export configuration section":"导出配置部分","ra_Export data to %s file":"将数据导出到 %s 文件","ra_Failed to open JSON File":"无法打开JSON文件","ra_Fallback custom certificates":"后备自定义证书","ra_File is too big. Max %sk allowed. Try use SVG.":"文件太大。允许的最大字节%s数。尝试使用 SVG。",ra_Filter:o0e,"ra_Filter and Data Actions":"过滤和数据操作","ra_Filter files":"过滤文件","ra_Folder name":"文件夹名称","ra_Folder → Channel → State":"文件夹→频道→状态","ra_Folder → Device → Channel → State":"文件夹→设备→频道→状态","ra_Folder → State":"文件夹→状态","ra_Folders always first":"资料夹永远优先",ra_Friday:n0e,"ra_From file":"从文件","ra_From text":"文本","ra_Get %s access":"获取 %s 访问权限","ra_Good luck":"祝你好运","ra_Hide empty folders":"隐藏空文件夹","ra_If no file will be created in the folder, it will disappear after the browser closed":"如果在该文件夹中未创建任何文件,则该文件将在浏览器关闭后消失","ra_If the button above does not work, you can authorize manually this app by visiting this url":"如果上面的按钮不起作用,您可以通过访问此网址手动授权此应用","ra_Import and add configuration section":"导入并添加配置部分","ra_Import and replace configuration section":"导入和替换配置部分","ra_Import data from %s file":"从 %s 文件导入数据","ra_Import from %s":"从 %s 导入","ra_Instance %s is alive":"实例 %s 是活动的","ra_Instance %s is not alive":"实例 %s 不存在","ra_Instance is not alive":"实例不存在","ra_Invalid CRON":"无效的 CRON","ra_Invalid JSON":"JSON 无效","ra_Invalid JSON file.":"无效的JSON文件。","ra_Invalid JSON format. Expected an array.":"JSON格式无效。应为数组。","ra_Invalid answer from server":"来自服务器的无效答案","ra_Invalid parent folder!":"父文件夹无效!","ra_Invalid structure":"结构无效","ra_JSON editor":"JSON 编辑器","ra_Last change":"最后一次变更",ra_Latitude:a0e,"ra_License %s":"许可证 %s","ra_License agreement":"许可协议","ra_License does not exist":"许可证不存在","ra_License expired on %s":"许可证已于 %s 过期",'ra_License for other product "%s"':"其他产品“%s”的许可证","ra_License is for version %s, but required version is %s.":"许可证适用于版本 %s,但所需版本为 %s。","ra_License must be converted":"许可证必须转换为更新版本。您可以在 iobroker.net 个人资料中执行此操作。","ra_License not found in license manager. Do you want to read licenses from iobroker.net?":"在许可证管理器中找不到许可证。您要从 iobroker.net 更新许可证吗?","ra_Listen on all IPs":"监听所有IP","ra_Load configuration from file":"从文件加载配置",ra_Logout:M0e,ra_Longitude:c0e,'ra_May not trigger "updateLicenses"':"可能不会触发“updateLicenses”",ra_Message:u0e,ra_Monday:l0e,"ra_Move down":"下移","ra_Move up":"提升",ra_Name:N0e,"ra_No data found in file":"文件中未找到数据","ra_No one license found in license manager":"许可证管理器中未找到任何许可证","ra_No response from admin":"管理员没有回应","ra_No response from the backend":"后端无响应",'ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".':"非专家只能在“ 0_userdata.0”或“ alias.0”中创建新对象。","ra_Not a number":"不是数字","ra_OAuth Client ID":"OAuth客户端ID","ra_OAuth Client secret":"OAuth 客户端密钥",ra_Objects:L0e,ra_Ok:g0e,"ra_On weekdays":"在工作日","ra_Only following structures of objects are available:":"仅以下对象结构可用:","ra_Only selected":"只选择","ra_Owner group":"所有者组","ra_Owner user":"所有者用户","ra_Passwords are not equal!":"密码不相等!","ra_Place your files here or click here to open the browse dialog":"将文件放在此处或单击此处打开浏览对话框","ra_Please allow popups in your browser for this page!":"请允许浏览器弹出此页面!","ra_Please confirm":"请确认","ra_Please create license":"请创建许可证","ra_Please enter the license":"请输入许可证","ra_Please select file...":"请选择文件...","ra_Please select object ID...":"请选择对象ID ...","ra_Port could be used by %s":"%s 可以使用端口","ra_Port is already used by %s":"端口已被 %s 使用","ra_Press ENTER Key to add new item":"按 ENTER 键添加新项目","ra_Private certificate":"私有证书",ra_Product:j0e,"ra_Public certificate":"公共证书","ra_Quality code":"质量代码","ra_Refresh tree":"刷新树","ra_Reload files":"重新载入文件",ra_Rename_Move_Copy:y0e,"ra_Renew %s access":"续订 %s 访问权限",ra_Repeat:T0e,ra_Replace:D0e,"ra_Request timed out":"请求超时","ra_Restrict to folder":"限制到文件夹",ra_Root:d0e,ra_Saturday:h0e,ra_Save:z0e,"ra_Save and close":"保存并关闭","ra_Save configuration to file":"将配置保存到文件","ra_Save objects tree as JSON file":"将对象树另存为JSON文件","ra_Select all":"全选","ra_Select color":"选择颜色","ra_Select predefined icon":"选择预定义图标","ra_Select type of export":"选择导出类型",ra_Selected:w0e,"ra_Selected %s object(s)":"选定的 %s 个对象","ra_Serial number (UUID)":"序列号 (UUID)",'ra_Serial number (UUID) "%s" in license is for other device.':"许可证中的序列号 (UUID)“%s”用于其他设备。","ra_Session will expire in %s seconds. Continue?":"会话将在 %s 秒后过期。是否继续?","ra_Show all folders":"显示所有文件夹","ra_Show lines between rows":"显示行之间的线","ra_Show/Hide object descriptions":"显示/隐藏对象描述","ra_Show/hide filter input":"显示/隐藏过滤器输入","ra_Some data are not stored. Discard?":"部分数据未存储。丢弃?",ra_States:I0e,"ra_Successfully authorized. Token valid till %s and will be automatically renewed.":"授权成功。令牌有效期至 %s,并将自动续订。","ra_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":"授权成功。令牌有效期至 %s,但由于实例未运行,令牌可能会过期。","ra_Suitable license not found in license manager":"在许可证管理器中找不到合适的许可证",ra_Sunday:C0e,"ra_Suppress question for next %s minutes":"在接下来的%s分钟内取消提问","ra_System language":"系统语言","ra_Take browser position":"从浏览器获取位置","ra_Take position from system settings":"从系统设置中获取位置",'ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").':"专家可以在任何地方创建对象,但要从第二层开始(例如“ vis.0”或“ javascript.0”)。","ra_The page you are looking for was not found":"未找到您要查找的页面","ra_The schedule will be executed every minute. Are you sure?":"该计划将每分钟执行一次。您确定吗?","ra_The schedule will be executed every second. Are you sure?":"该计划将每秒执行一次。你确定吗?",ra_Thursday:p0e,ra_Timestamp:A0e,"ra_Toggle expert mode":"切换专家模式","ra_Toggle the states view":"切换状态视图","ra_Toggle view mode":"切换检视模式","ra_Too big":"太大","ra_Too small":"太小","ra_Transparent dialog":"透明对话框",ra_Tuesday:m0e,"ra_Unknown error":"未知错误","ra_Unknown error!":"未知错误!",ra_Update:f0e,"ra_Upload file":"上传文件","ra_Use all available let's encrypt certificates":"使用所有可用的让我们加密证书","ra_Use iobroker.acme adapter for letsencrypt certificates":"使用 iobroker.acme 适配器获取 letsencrypt 证书","ra_Use system settings for position":"使用系统设置定位","ra_Used system settings":"使用的系统设置","ra_User files":"用户档案",ra_ValidTill:O0e,ra_Value:E0e,ra_Version:_0e,"ra_View file":"查看文件","ra_View: %s":"查看:%s",ra_Wednesday:x0e,ra_Width:S0e,"ra_YAML editor":"YAML 编辑器",ra_Yes:k0e,"ra_You can export all objects or just the selected branch.":"您可以导出所有对象或仅导出选定的分支。","ra_You can filter entries by entering here some text":"您可以通过在此处输入一些文本来过滤条目","ra_You can use * as wildcard":"您可以使用 * 作为通配符",ra___different__:v0e,ra_aclEveryone_read_object:Y0e,ra_aclEveryone_read_state:Q0e,ra_aclEveryone_write_object:b0e,ra_aclEveryone_write_state:U0e,ra_aclGroup_read_object:$0e,ra_aclGroup_read_state:P0e,ra_aclGroup_write_object:W0e,ra_aclGroup_write_state:J0e,ra_aclOwner_read_object:B0e,ra_aclOwner_read_state:R0e,ra_aclOwner_write_object:F0e,ra_aclOwner_write_state:G0e,ra_buttons:H0e,ra_changedFrom:V0e,ra_close:Z0e,ra_create_boolean_state:X0e,ra_create_channel:K0e,ra_create_device:q0e,ra_create_number_state:eNe,ra_create_state:tNe,ra_create_string_state:sNe,ra_daysShortText:iNe,ra_dow_Fr:rNe,ra_dow_Mo:oNe,ra_dow_Sa:nNe,ra_dow_Su:aNe,ra_dow_Th:MNe,ra_dow_Tu:cNe,ra_dow_We:uNe,ra_expertMode:lNe,ra_false:NNe,ra_fileType_all:LNe,ra_fileType_audio:gNe,ra_fileType_code:jNe,ra_fileType_images:yNe,ra_fileType_txt:TNe,ra_fileType_video:DNe,"ra_fileType_video,":"视频",ra_filter_customs:dNe,ra_filter_customs_without:hNe,ra_filter_func:zNe,ra_filter_id:wNe,ra_filter_name:INe,ra_filter_role:CNe,ra_filter_room:pNe,ra_filter_type:ANe,"ra_import data from %s file":"从 %s 文件导入数据",ra_invalidConfig:mNe,ra_lastChange:fNe,ra_locally:ONe,ra_month_Apr:ENe,ra_month_Aug:_Ne,ra_month_Dec:xNe,ra_month_Feb:SNe,ra_month_Jan:kNe,ra_month_Jul:vNe,ra_month_Jun:YNe,ra_month_Mai:QNe,ra_month_Mar:bNe,ra_month_Nov:UNe,ra_month_Oct:$Ne,ra_month_Sep:PNe,ra_months_Apr:WNe,ra_months_Aug:JNe,ra_months_Dec:BNe,ra_months_Feb:RNe,ra_months_Jan:FNe,ra_months_Jul:GNe,ra_months_Jun:HNe,ra_months_Mai:VNe,ra_months_Mar:ZNe,ra_months_Nov:XNe,ra_months_Oct:KNe,ra_months_Sep:qNe,"ra_no confirm for 5 mins":"5分钟内无需确认",ra_none:e4e,ra_object_changed_by:t4e,ra_object_changed_by_user:s4e,ra_otherConfig:i4e,ra_qualityCode:r4e,ra_repeat:o4e,ra_select_folder_hint:n4e,ra_show_all:a4e,ra_state_changed_by:M4e,ra_state_changed_from:c4e,ra_timestamp:u4e,ra_tooltip_ack:l4e,ra_tooltip_comment:N4e,ra_tooltip_copyState:L4e,ra_tooltip_ctrlForLink:g4e,ra_tooltip_customConfig:j4e,ra_tooltip_deleteObject:y4e,ra_tooltip_editObject:T4e,ra_tooltip_editState:D4e,ra_tooltip_expire:d4e,ra_tooltip_from:h4e,ra_tooltip_lc:z4e,ra_tooltip_quality:w4e,ra_tooltip_ts:I4e,ra_tooltip_user:C4e,ra_tooltip_value:p4e,ra_true:A4e,"ra_use seconds":"用秒",ra_val:m4e,"ra_via internet":"通过互联网",ra_warning_every_minute:f4e,ra_warning_every_second:O4e,sc_cron:E4e,sc_date:_4e,sc_dates:x4e,sc_dow:S4e,sc_dows:k4e,sc_every:v4e,sc_everyN_dates:Y4e,sc_everyN_dow:Q4e,sc_everyN_dows:b4e,sc_everyN_hours:U4e,sc_everyN_minutes:$4e,sc_everyN_months:P4e,sc_everyN_seconds:W4e,sc_every_dates:J4e,sc_every_dow:B4e,sc_every_dows:R4e,sc_every_hours:F4e,sc_every_minutes:G4e,sc_every_months:H4e,sc_every_seconds:V4e,sc_from:Z4e,sc_hours:X4e,sc_interval:K4e,sc_intervalBetween:q4e,sc_invalid_cron:eLe,sc_minutes:tLe,sc_months:sLe,sc_once:iLe,sc_period:rLe,sc_seconds:oLe,sc_simple:nLe,sc_specific:aLe,sc_specific_dates:MLe,sc_specific_dow:cLe,sc_specific_dows:uLe,sc_specific_hours:lLe,sc_specific_minutes:NLe,sc_specific_months:LLe,sc_specific_seconds:gLe,sc_time:jLe,sc_to:yLe,sc_wizard:TLe,sch_all:DLe,sch_astroDay:dLe,sch_astroNight:hLe,sch_astro_dawn:zLe,sch_astro_dusk:wLe,sch_astro_goldenHour:ILe,sch_astro_goldenHourEnd:CLe,sch_astro_nadir:pLe,sch_astro_nauticalDawn:ALe,sch_astro_nauticalDusk:mLe,sch_astro_night:fLe,sch_astro_nightEnd:OLe,sch_astro_solarNoon:ELe,sch_astro_sunrise:_Le,sch_astro_sunriseEnd:xLe,sch_astro_sunset:SLe,sch_astro_sunsetStart:kLe,sch_at:vLe,sch_desc_atTime:YLe,sch_desc_everyDay:QLe,sch_desc_everyHour:bLe,sch_desc_everyMinute:ULe,sch_desc_everyMonth:$Le,sch_desc_everyNDay:PLe,sch_desc_everyNHours:WLe,sch_desc_everyNMinutes:JLe,sch_desc_everyNMonths:BLe,sch_desc_everyNWeeks:RLe,sch_desc_everyNYears:FLe,sch_desc_everyWeek:GLe,sch_desc_everyYear:HLe,sch_desc_intervalFromTo:VLe,sch_desc_never:ZLe,sch_desc_onDate:XLe,sch_desc_onDates:KLe,sch_desc_onEveryDate:qLe,sch_desc_onMonth:ege,sch_desc_onMonths:tge,sch_desc_onWeekday:sge,sch_desc_onWeekdays:ige,sch_desc_onWeekends:rge,sch_desc_onWorkdays:oge,sch_desc_onceInPast:nge,sch_desc_once_on:age,sch_desc_validFrom:Mge,sch_desc_validFromTo:cge,sch_desc_validTo:uge,sch_every:lge,sch_exactTime:Nge,sch_from:Lge,sch_fromTo:gge,sch_intervalTime:jge,sch_invert:yge,sch_no_one:Tge,sch_on:Dge,sch_period:dge,sch_periodDaily:hge,sch_periodDates:zge,sch_periodDay:wge,sch_periodEvery:Ige,sch_periodEveryDay:Cge,sch_periodEveryMonth:pge,sch_periodEveryWeek:Age,sch_periodEveryYear:mge,sch_periodHours:fge,sch_periodMinutes:Oge,sch_periodMonth:Ege,sch_periodMonthly:_ge,sch_periodOnce:xge,sch_periodSpecificMonths:Sge,sch_periodWeek:kge,sch_periodWeekdays:vge,sch_periodWeekend:Yge,sch_periodWeekly:Qge,sch_periodWorkdays:bge,sch_periodYear:Uge,sch_periodYearly:$ge,sch_specificTime:Pge,sch_time:Wge,sch_to:Jge,sch_valid:Bge,sch_validFrom:Rge,sch_validTo:Fge,sch_wholeDay:Gge,sch_yearEveryMonth:Hge},Zge={en:sp,de:LO,ru:I5,pt:Sb,nl:J7,fr:qB,it:cZ,es:dte,pl:One,uk:Ule,"zh-cn":Vge},Xge=` @@ -623,7 +623,7 @@ body { V416z M464,400h-72v-80h72V400z`})))}function bve(s){return a.createElement("svg",{width:361,height:361,viewBox:"0 0 361 361",...s},a.createElement("path",{d:"M267.826 263.303c0 3.91-3.156 7.082-7.05 7.082l-157.885.021c-3.894 0-7.05-3.171-7.05-7.083v-157.5c0-3.911 3.156-7.083 7.05-7.083l157.885-.021c3.894 0 7.05 3.172 7.05 7.083v157.501z",fill:"none",stroke:"currentColor",strokeWidth:10,strokeMiterlimit:10}),a.createElement("path",{d:"M258.5 185.584h6.639c2.726 0 5-2.274 5-5s-2.274-5-5-5H258.5c-2.726 0-5 2.274-5 5s2.274 5 5 5z",fill:"currentColor"}),a.createElement("path",{d:"M267.826 103.208c0 2.485-2.711 4.5-6.053 4.5l-159.88.021c-3.342 0-6.052-2.015-6.052-4.5v-9c0-2.485 2.71-4.5 6.052-4.5l159.88-.021c3.342 0 6.053 2.015 6.053 4.5v9z",fill:"none",stroke:"currentColor",strokeWidth:10,strokeMiterlimit:10}))}function qSe(s){return a.createElement("svg",{viewBox:"0 0 361 361",...s},a.createElement("path",{d:"M267.826 263.303c0 3.91-3.156 7.082-7.05 7.082l-157.885.021c-3.894 0-7.05-3.171-7.05-7.083v-157.5c0-3.911 3.156-7.083 7.05-7.083l157.885-.021c3.894 0 7.05 3.172 7.05 7.083v157.501z",fill:"none",stroke:"currentColor",strokeWidth:10,strokeMiterlimit:10}),a.createElement("path",{d:"M228.5 205.584h6.639c2.726 0 5-2.274 5-5s-2.274-5-5-5H228.5c-2.726 0-5 2.274-5 5s2.274 5 5 5z",fill:"currentColor"}),a.createElement("path",{d:"M267.826 103.208c0 2.485-2.711 4.5-6.053 4.5l-159.88.021c-3.342 0-6.052-2.015-6.052-4.5v-9c0-2.485 2.71-4.5 6.052-4.5l159.88-.021c3.342 0 6.053 2.015 6.053 4.5v9z",fill:"none",stroke:"currentColor",strokeWidth:10,strokeMiterlimit:10}),a.createElement("path",{d:"M232.826 280.905c-.339 3.356-18.813-.782-20.919-1.06l-45.073-5.94-45.074-5.94-14.507-1.912c-1.456-.192-6.201-.055-6.412-2.147-.621-6.157 0-12.699 0-18.878v-43.5-82.076-5.13c0-2.551 5.184-1.015 6.412-.853l35.438 4.67 83.723 11.035c1.457.192 6.201.055 6.412 2.147.169 1.673 0 3.451 0 5.13v144.454c0 6.448 10 6.448 10 0V136.451v-5.13c0-7.619-6.137-10.793-12.673-11.655l-28.531-3.76-88.411-11.652-9.897-1.304c-6.555-.864-12.473 4.9-12.473 11.38v144.832c0 2.023-.071 4.04.132 6.053.717 7.111 6.606 9.563 12.759 10.374l76.827 10.125 39.896 5.259 9.697 1.278c7.063.931 12.011-4.778 12.673-11.346.648-6.415-9.358-6.352-9.999 0z",fill:"currentColor"}))}function KL(s){return a.createElement("svg",{width:361,height:361,viewBox:"0 0 361 361",...s},a.createElement("path",{d:"M267.826 263.303c0 3.91-3.156 7.082-7.05 7.082l-157.885.021c-3.894 0-7.05-3.171-7.05-7.083v-157.5c0-3.911 3.156-7.083 7.05-7.083l157.885-.021c3.894 0 7.05 3.172 7.05 7.083v157.501z",fill:"none",stroke:"currentColor",strokeWidth:10,strokeMiterlimit:10}),a.createElement("path",{d:"M267.826 103.208c0 2.485-2.711 4.5-6.053 4.5l-159.88.021c-3.342 0-6.052-2.015-6.052-4.5v-9c0-2.485 2.71-4.5 6.052-4.5l159.88-.021c3.342 0 6.053 2.015 6.053 4.5v9zM265.732 265.178c.584 2.887-1.629 5.228-4.942 5.228H103.457c-3.313 0-6.474-2.341-7.058-5.228L75.24 130.633c-.584-2.887 1.628-5.228 4.942-5.228h157.333c3.313 0 6.474 2.34 7.058 5.228l21.159 134.545z",fill:"none",stroke:"currentColor",strokeWidth:10,strokeMiterlimit:10}),a.createElement("path",{d:"M247.194 199.667h6.639c2.726 0 5-2.274 5-5s-2.274-5-5-5h-6.639c-2.726 0-5 2.274-5 5s2.275 5 5 5z",fill:"currentColor"}))}const e5e={"type-Device type":"Device type","type-airCondition":"Air conditioner","type-blind":"Blinds","type-blindButtons":"Blind controlled by buttons","type-button":"Button","type-buttonSensor":"Button with feedback","type-camera":"Camera","type-chart":"Chart","type-cie":"CIE color light","type-ct":"Color temperature","type-dimmer":"Dimmer","type-door":"Door","type-fireAlarm":"Fire alarm","type-floodAlarm":"Flood alarm","type-gate":"Gate","type-hue":"HUE light","type-humidity":"Humidity","type-illuminance":"Illuminance","type-image":"Image","type-info":"Information","type-instance":"Instance","type-light":"Light","type-location":"Position","type-locationOne":"Position as one state","type-lock":"Lock","type-media":"Media-player","type-motion":"Motion sensor","type-percentage":"Percentage","type-rgb":"RGB light","type-rgbSingle":"R,G,B light - single states","type-rgbwSingle":"R,G,B,W light - single states","type-slider":"Slider","type-socket":"Socket","type-temperature":"Temperature","type-thermostat":"Thermostat","type-url":"URL","type-vacuumCleaner":"Vacuum cleaner","type-valve":"Valve","type-volume":"Volume","type-volumeGroup":"Volume group","type-warning":"Warning","type-weatherCurrent":"Current weather","type-weatherForecast":"Weather forecast","type-window":"Window sensor","type-windowTilt":"Window tilt sensor"},t5e={"type-Device type":"Gerätetyp","type-airCondition":"Klimaanlage","type-blind":"Jalousien","type-blindButtons":"Jalousie über Tasten gesteuert","type-button":"Taste","type-buttonSensor":"Taste mit Rückmeldung","type-camera":"Kamera","type-chart":"Diagramm","type-cie":"CIE Farblicht","type-ct":"Farbtemperatur","type-dimmer":"Dimmer","type-door":"Türsensor","type-fireAlarm":"Feueralarm","type-floodAlarm":"Wasseralarm","type-gate":"Tor-Steuerung","type-hue":"HUE-Licht","type-humidity":"Feuchtigkeit","type-illuminance":"Beleuchtungsstärke","type-image":"Bild","type-info":"Information","type-instance":"Instanz","type-light":"Licht","type-location":"Position","type-locationOne":"Position als ein Zustand","type-lock":"Schloss","type-media":"Mediaplayer","type-motion":"Bewegungssensor","type-percentage":"Prozentsatz","type-rgb":"RGB-Licht","type-rgbSingle":"R,G,B-Licht Einzelwerte","type-rgbwSingle":"R,G,B,W-Licht Einzelwerte","type-slider":"Schieberegler","type-socket":"Steckdose","type-temperature":"Temperatur","type-thermostat":"Thermostat","type-url":"URL","type-vacuumCleaner":"Staubsauger","type-valve":"Ventil","type-volume":"Lautstärke","type-volumeGroup":"Lautstärke-Gruppe","type-warning":"Warnung","type-weatherCurrent":"Aktuelle Wetterlage","type-weatherForecast":"Wettervorhersage","type-window":"Fenstersensor","type-windowTilt":"Fensterkippung-Sensor"},s5e={"type-Device type":"Тип устройства","type-airCondition":"Кондиционер","type-blind":"Рольставни/Жалюзи","type-blindButtons":"Жалюзи управляющиеся кнопками","type-button":"Кнопка","type-buttonSensor":"Кнопка с обратной связью","type-camera":"Камера","type-chart":"Диаграмма","type-cie":"CIE свет","type-ct":"Цветовая температура","type-dimmer":"Диммер","type-door":"Датчик положения двери","type-fireAlarm":"Датчик дыма","type-floodAlarm":"Датчик затопления","type-gate":"Ворота","type-hue":"HUE свет","type-humidity":"Влажность","type-illuminance":"Освещенность","type-image":"Изображение","type-info":"Информация","type-instance":"Инстанция","type-light":"Свет","type-location":"Местоположение","type-locationOne":"Позиция в одном состоянии","type-lock":"Замок","type-media":"Медиа-плейер","type-motion":"Датчик движения","type-percentage":"Проценты","type-rgb":"RGB свет","type-rgbSingle":"R,G,B как отдельные значение","type-rgbwSingle":"R,G,B,W как отдельные значение","type-slider":"Ползунок","type-socket":"Розетка","type-temperature":"Температура","type-thermostat":"Термостат","type-url":"URL","type-vacuumCleaner":"Пылесос","type-valve":"Вентиль","type-volume":"Громкость","type-volumeGroup":"Группа громкости","type-warning":"Предупреждение","type-weatherCurrent":"Актуальная погода","type-weatherForecast":"Прогноз погоды","type-window":"Датчик открытия окна","type-windowTilt":"Датчик наклона окна"},i5e={"type-Device type":"Tipo de dispositivo","type-airCondition":"Ar condicionado","type-blind":"persianas","type-blindButtons":"Persiana controlada por botões","type-button":"botão","type-buttonSensor":"Sensor de botão","type-camera":"câmera","type-chart":"Gráfico","type-cie":"Luz colorida CIE","type-ct":"Temperatura de cor","type-dimmer":"dimmer","type-door":"porta","type-fireAlarm":"alarme de incêndio","type-floodAlarm":"alarme de inundação","type-gate":"portão","type-hue":"Luz HUE","type-humidity":"umidade","type-illuminance":"Iluminância","type-image":"imagem","type-info":"informação","type-instance":"exemplo","type-light":"luz","type-location":"localização","type-locationOne":"Posição como um estado","type-lock":"trancar","type-media":"mídia","type-motion":"movimento","type-percentage":"Percentagem","type-rgb":"Luz RGB","type-rgbSingle":"Luz RGB única","type-rgbwSingle":"RGBW como valor único","type-slider":"controle deslizante","type-socket":"soquete","type-temperature":"temperatura","type-thermostat":"termostato","type-url":"URL","type-vacuumCleaner":"Aspirador de pó","type-valve":"válvula","type-volume":"volume","type-volumeGroup":"grupo de volume","type-warning":"aviso","type-weatherCurrent":"clima atual","type-weatherForecast":"previsão do tempo","type-window":"janela","type-windowTilt":"inclinação da janela"},r5e={"type-Device type":"Typ urządzenia","type-airCondition":"Klimatyzator","type-blind":"żaluzje","type-blindButtons":"Roleta sterowana przyciskami","type-button":"przycisk","type-buttonSensor":"Czujnik przycisku","type-camera":"kamera","type-chart":"Wykres","type-cie":"Światło kolorowe CIE","type-ct":"Temperatura barwowa","type-dimmer":"opornik","type-door":"drzwi","type-fireAlarm":"alarm pożarowy","type-floodAlarm":"alarm przeciwpowodziowy","type-gate":"brama","type-hue":"Światło HUE","type-humidity":"wilgotność","type-illuminance":"Natężenie oświetlenia","type-image":"obraz","type-info":"Informacje","type-instance":"przykład","type-light":"światło","type-location":"lokalizacja","type-locationOne":"Pozycja jako państwa","type-lock":"zamek","type-media":"głoska bezdźwięczna","type-motion":"ruch","type-percentage":"Procent","type-rgb":"Światło RGB","type-rgbSingle":"Pojedyncze światło RGB","type-rgbwSingle":"RGBW jako pojedyncza wartość","type-slider":"suwak","type-socket":"gniazdo","type-temperature":"temperatura","type-thermostat":"termostat","type-url":"Adres URL","type-vacuumCleaner":"Odkurzacz","type-valve":"zawór","type-volume":"tom","type-volumeGroup":"grupa woluminów","type-warning":"ostrzeżenie","type-weatherCurrent":"aktualna pogoda","type-weatherForecast":"prognoza pogody","type-window":"okno","type-windowTilt":"pochylenie okna"},o5e={"type-Device type":"Type d'appareil","type-airCondition":"Climatiseur","type-blind":"stores","type-blindButtons":"Store commandé par boutons","type-button":"bouton","type-buttonSensor":"Capteur de bouton","type-camera":"caméra","type-chart":"Graphique","type-cie":"lumière colorée CIE","type-ct":"Température de couleur","type-dimmer":"variateur","type-door":"porte","type-fireAlarm":"alarme incendie","type-floodAlarm":"alarme d'inondation","type-gate":"grille","type-hue":"Lumière HUE","type-humidity":"humidité","type-illuminance":"Éclairement","type-image":"image","type-info":"informations","type-instance":"exemple","type-light":"lumière","type-location":"emplacement","type-locationOne":"Position en tant qu'État","type-lock":"verrouillage","type-media":"médias","type-motion":"mouvement","type-percentage":"Pourcentage","type-rgb":"lumière RVB","type-rgbSingle":"Lumière RVB simple","type-rgbwSingle":"RGBW comme valeur unique","type-slider":"curseur","type-socket":"douille","type-temperature":"température","type-thermostat":"thermostat","type-url":"URL","type-vacuumCleaner":"Aspirateur","type-valve":"soupape","type-volume":"volume","type-volumeGroup":"groupe de volumes","type-warning":"avertissement","type-weatherCurrent":"météo actuelle","type-weatherForecast":"prévisions météorologiques","type-window":"fenêtre","type-windowTilt":"inclinaison de la fenêtre"},n5e={"type-Device type":"Tipo di dispositivo","type-airCondition":"Condizionatore d'aria","type-blind":"tende","type-blindButtons":"Tenda controllata da pulsanti","type-button":"pulsante","type-buttonSensor":"Sensore del pulsante","type-camera":"telecamera","type-chart":"Grafico","type-cie":"Luce colorata CIE","type-ct":"Temperatura del colore","type-dimmer":"dimmer","type-door":"porta","type-fireAlarm":"allarme antincendio","type-floodAlarm":"allarme allagamento","type-gate":"cancello","type-hue":"Luce HUE","type-humidity":"umidità","type-illuminance":"Illuminamento","type-image":"immagine","type-info":"informazioni","type-instance":"esempio","type-light":"leggero","type-location":"posizione","type-locationOne":"Posizione come stato","type-lock":"serratura","type-media":"media","type-motion":"movimento","type-percentage":"Percentuale","type-rgb":"luce RGB","type-rgbSingle":"Luce RGB singola","type-rgbwSingle":"RGBW come valore singolo","type-slider":"cursore","type-socket":"PRESA","type-temperature":"temperatura","type-thermostat":"termostato","type-url":"URL","type-vacuumCleaner":"Aspirapolvere","type-valve":"valvola","type-volume":"volume","type-volumeGroup":"gruppo di volumi","type-warning":"avvertimento","type-weatherCurrent":"meteo attuale","type-weatherForecast":"previsioni del tempo","type-window":"finestra","type-windowTilt":"inclinazione della finestra"},a5e={"type-Device type":"Apparaattype","type-airCondition":"Airconditioner","type-blind":"jaloezieën","type-blindButtons":"Jaloezie bediend door knoppen","type-button":"knop","type-buttonSensor":"Knopsensor","type-camera":"camera","type-chart":"Grafiek","type-cie":"CIE-kleurenlicht","type-ct":"Kleurtemperatuur","type-dimmer":"dimmer","type-door":"deur","type-fireAlarm":"brandalarm","type-floodAlarm":"overstromingsalarm","type-gate":"hek","type-hue":"HUE-licht","type-humidity":"vochtigheid","type-illuminance":"Verlichtingssterkte","type-image":"afbeelding","type-info":"informatie","type-instance":"aanleg","type-light":"licht","type-location":"locatie","type-locationOne":"Positie als staat","type-lock":"slot","type-media":"media","type-motion":"beweging","type-percentage":"Percentage","type-rgb":"RGB-licht","type-rgbSingle":"RGB-licht enkel","type-rgbwSingle":"RGBW als enkele waarde","type-slider":"schuifregelaar","type-socket":"stopcontact","type-temperature":"temperatuur","type-thermostat":"thermostaat","type-url":"URL","type-vacuumCleaner":"Stofzuiger","type-valve":"ventiel","type-volume":"volume","type-volumeGroup":"volumegroep","type-warning":"waarschuwing","type-weatherCurrent":"huidige weersomstandigheden","type-weatherForecast":"weersvoorspelling","type-window":"raam","type-windowTilt":"raamkanteling"},M5e={"type-Device type":"Тип пристрою","type-airCondition":"Кондиціонер","type-blind":"жалюзі","type-blindButtons":"Штора керується кнопками","type-button":"кнопку","type-buttonSensor":"Датчик кнопки","type-camera":"камера","type-chart":"Діаграма","type-cie":"Кольорове світло CIE","type-ct":"Колірна температура","type-dimmer":"диммер","type-door":"двері","type-fireAlarm":"пожежна сигналізація","type-floodAlarm":"сигналізація про повінь","type-gate":"ворота","type-hue":"світло HUE","type-humidity":"вологість","type-illuminance":"Освітленість","type-image":"зображення","type-info":"інформація","type-instance":"екземпляр","type-light":"світло","type-location":"розташування","type-locationOne":"Позиція як держави","type-lock":"замок","type-media":"ЗМІ","type-motion":"руху","type-percentage":"Відсоток","type-rgb":"RGB світло","type-rgbSingle":"Одиночне світло RGB","type-rgbwSingle":"RGBW як одне значення","type-slider":"повзунок","type-socket":"гніздо","type-temperature":"температура","type-thermostat":"термостат","type-url":"URL","type-vacuumCleaner":"Пилосос","type-valve":"клапан","type-volume":"обсяг","type-volumeGroup":"група обсягів","type-warning":"УВАГА","type-weatherCurrent":"поточна погода","type-weatherForecast":"прогноз погоди","type-window":"вікно","type-windowTilt":"нахил вікна"},c5e={"type-Device type":"设备类型","type-airCondition":"空调","type-blind":"百叶窗","type-blindButtons":"按钮控制百叶窗","type-button":"按钮","type-buttonSensor":"按钮传感器","type-camera":"相机","type-chart":"图表","type-cie":"CIE色光","type-ct":"色温","type-dimmer":"调光器","type-door":"门","type-fireAlarm":"火灾报警","type-floodAlarm":"洪水警报","type-gate":"门","type-hue":"色调灯","type-humidity":"湿度","type-illuminance":"照度","type-image":"图像","type-info":"信息","type-instance":"实例","type-light":"光","type-location":"地点","type-locationOne":"作为一个国家的地位","type-lock":"锁","type-media":"媒体","type-motion":"运动","type-percentage":"百分比","type-rgb":"RGB灯","type-rgbSingle":"RGB灯单","type-rgbwSingle":"RGBW 作为单一值","type-slider":"滑块","type-socket":"插座","type-temperature":"温度","type-thermostat":"恒温器","type-url":"网址","type-vacuumCleaner":"吸尘器","type-valve":"阀门","type-volume":"体积","type-volumeGroup":"卷组","type-warning":"警告","type-weatherCurrent":"当前天气","type-weatherForecast":"天气预报","type-window":"窗户","type-windowTilt":"窗户倾斜"};let P0=!1;function qL(){P0||(P0=!0,D.extendTranslations({en:e5e,de:t5e,ru:s5e,pt:i5e,pl:r5e,fr:o5e,it:n5e,nl:a5e,uk:M5e,"zh-cn":c5e}))}const W0={[G.Types.airCondition]:Dj,[G.Types.blind]:$0,[G.Types.blindButtons]:$0,[G.Types.button]:VSe,[G.Types.buttonSensor]:$Se,[G.Types.camera]:kSe,[G.Types.chart]:ESe,[G.Types.image]:Tj,[G.Types.dimmer]:yj,[G.Types.door]:RSe,[G.Types.fireAlarm]:b0,"sensor.alarm.fire":b0,[G.Types.floodAlarm]:U0,"sensor.alarm.flood":U0,[G.Types.gate]:FSe,[G.Types.humidity]:GSe,[G.Types.illuminance]:WSe,[G.Types.info]:jj,[G.Types.light]:gj,[G.Types.lock]:Lj,[G.Types.location]:Nj,[G.Types.locationOne]:lj,[G.Types.media]:uj,[G.Types.motion]:HSe,[G.Types.ct]:bc,[G.Types.percentage]:Qc,[G.Types.rgb]:Un,[G.Types.rgbSingle]:Un,[G.Types.rgbwSingle]:JSe,[G.Types.hue]:bc,[G.Types.cie]:Un,[G.Types.slider]:Qc,[G.Types.socket]:ZSe,[G.Types.temperature]:XSe,[G.Types.thermostat]:KSe,[G.Types.vacuumCleaner]:BSe,[G.Types.volume]:cj,[G.Types.volumeGroup]:Mj,[G.Types.window]:qSe,[G.Types.windowTilt]:KL,[G.Types.weatherCurrent]:Y0,[G.Types.weatherForecast]:Y0,[G.Types.warning]:Yc,[G.Types.unknown]:aj,[G.Types.instance]:nj,invalid:Yc,hub3:oj,node:rj,hub5:ij,controller:sj},qr={width:32,height:32};function u5e(s){const[e,t]=a.useState(!1);if(Ce(()=>{s.title&&!e&&(qL(),t(!0))},[s.title,e]),!e&&s.title)return a.createElement(J,{style:{...qr,...s.style||void 0},className:s.className,sx:s.sx});const i=s.type||(s.src?Object.keys(W0).find(n=>s.src===n):void 0);if(!i&&s.src)return a.createElement(be,{style:qr,...s,title:s.title===!0?void 0:s.title,src:s.src});const r=i&&W0[i];if(!r)return i?a.createElement("span",{style:{...qr,...s.style||void 0}},i[0].toUpperCase()):null;const o=a.createElement(r,{style:{...qr,...s.style||void 0},onClick:s.onClick,className:s.className,sx:s.sx});return s.title?a.createElement(Le,{slotProps:{popper:{sx:{pointerEvents:"none"}}},title:s.title===!0?D.t(`type-${i}`):s.title},a.createElement("div",{style:{display:"flex"}},o)):o}const Ht={itemChildrenWrapper:{display:"flex",width:"100%",justifyContent:"space-between"},type:{marginTop:10},selectIcon:{paddingRight:8,verticalAlign:"middle",width:20,height:20},selectText:{verticalAlign:"middle"},iconWrapper:{display:"flex",alignItems:"center"},iconStyle:{width:16,height:16,margin:"0 3px"},emptyIcon:{width:16,height:16,margin:"0 3px"}};function Uve(s){const[e,t]=a.useState({}),[i,r]=a.useState([]);return Ce(()=>{const o={};Object.keys(G.Types).filter(M=>{var c,l;return(!s.supportedDevices||((c=s.supportedDevices)==null?void 0:c.includes(M)))&&!((l=s.unsupportedDevices)!=null&&l.includes(M))}).forEach(M=>o[M]=D.t(`type-${G.Types[M]}`));const n=Object.keys(o);n.sort((M,c)=>o[M]===o[c]?0:o[M].localeCompare(o[c],"de")),qL(),r(n),t(o)},[s.supportedDevices,s.unsupportedDevices]),i?a.createElement(Qt,{style:{...Ht.type,...s.style},sx:s.sx,variant:"standard",error:!!s.error},a.createElement(yi,null,s.label||D.t("type-Device type")),a.createElement(nt,{variant:"standard",disabled:!!s.disabled,value:s.value,onChange:o=>s.onChange(o.target.value)},i.map(o=>{var n;return a.createElement(re,{key:G.Types[o],value:G.Types[o]},a.createElement("div",{style:Ht.itemChildrenWrapper},a.createElement("div",null,a.createElement(u5e,{type:G.Types[o],style:{...Ht.selectIcon,color:s.themeType==="dark"?"#FFFFFF":"#000"}}),a.createElement("span",{style:Ht.selectText},e[o])),(n=s.showApplications)!=null&&n.TYPE_OPTIONS[o]?a.createElement("div",{style:Ht.iconWrapper},Object.keys(s.showApplications.TYPE_OPTIONS[o]).map(M=>s.showApplications.TYPE_OPTIONS[o][M]?a.createElement(be,{key:M,style:Ht.iconStyle,src:s.showApplications.ICONS_TYPE[M]}):a.createElement("div",{key:M,style:Ht.emptyIcon}))):null))}))):a.createElement(J,{style:{...Ht.type,...s.style},sx:s.sx})}function l5e(s){return te({attr:{version:"1",viewBox:"0 0 48 48",enableBackground:"new 0 0 48 48"},child:[{tag:"circle",attr:{fill:"#B2EBF2",cx:"32",cy:"24",r:"9"},child:[]},{tag:"path",attr:{fill:"#4DD0E1",d:"M32,12c-6.6,0-12,5.4-12,12c0,6.6,5.4,12,12,12s12-5.4,12-12C44,17.4,38.6,12,32,12z M32,32 c-4.4,0-8-3.6-8-8s3.6-8,8-8s8,3.6,8,8S36.4,32,32,32z"},child:[]},{tag:"g",attr:{fill:"#3F51B5"},child:[{tag:"polygon",attr:{points:"25.4,22 19.8,5.1 13.6,27.7 11.4,22 4,22 4,26 8.6,26 14.4,40.3 20.2,18.9 22.6,26 30,26 30,22"},child:[]},{tag:"circle",attr:{cx:"32",cy:"24",r:"4"},child:[]}]}]})(s)}function N5e(s){return te({attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M4.428 2.727l3.335 3.335c-.486.07-.903.276-1.32.624L.886 12.383c-1.181 1.18-1.181 3.194 0 4.375a2.41 2.41 0 0 0 1.598.834l17.088 3.681-3.335-3.333c.486-.07.903-.278 1.32-.626l5.557-5.695c1.181-1.181 1.181-3.196 0-4.377a2.411 2.411 0 0 0-1.598-.833zM11.653 6.2c.694 0 1.25.486 1.25 1.18 0 .695-.486 1.251-1.181 1.251-.695 0-1.25-.485-1.25-1.18s.555-1.251 1.18-1.251zm1.51 3.792c.049-.006.088.046.088.098-.139.694-.695 1.181-1.39 1.181-.694 0-1.32-.487-1.46-1.112 0 0 .002-.07.071 0 .487.278.972.348 1.32.278.346 0 .833-.07 1.32-.416a.092.092 0 0 1 .05-.029zm.723 2.511c.058.013.06.106.06.158-.209.903-.973 1.666-1.946 1.666a2.167 2.167 0 0 1-2.084-1.528c-.07-.07 0-.138.138-.138.695.347 1.39.416 1.877.416.486 0 1.18-.14 1.875-.556.035-.017.06-.022.08-.018zm.597 3.018c.049-.013.087.09.087.195-.278 1.181-1.25 2.085-2.5 2.155-1.251 0-2.293-.835-2.57-1.946 0-.139.068-.278.207-.209.834.486 1.737.556 2.362.556s1.529-.208 2.362-.694c.018-.035.036-.053.052-.057z"},child:[]}]})(s)}function L5e(s){return te({attr:{version:"1.2",baseProfile:"tiny",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M13 5l.855 3.42 3.389-.971 1.501 2.6-2.535 2.449 2.535 2.451-1.5 2.6-3.39-.971-.855 3.422h-3l-.855-3.422-3.39.971-1.501-2.6 2.535-2.451-2.534-2.449 1.5-2.6 3.39.971.855-3.42h3m0-2h-3c-.918 0-1.718.625-1.939 1.516l-.354 1.412-1.4-.4c-.184-.053-.369-.078-.552-.078-.7 0-1.368.37-1.731 1l-1.5 2.6c-.459.796-.317 1.802.342 2.438l1.047 1.011-1.048 1.015c-.66.637-.802 1.643-.343 2.438l1.502 2.6c.363.631 1.031 1 1.731 1 .183 0 .368-.025.552-.076l1.399-.401.354 1.415c.222.885 1.022 1.51 1.94 1.51h3c.918 0 1.718-.625 1.939-1.516l.354-1.414 1.399.4c.184.053.369.077.552.077.7 0 1.368-.37 1.731-1l1.5-2.6c.459-.796.317-1.8-.342-2.438l-1.047-1.013 1.047-1.013c.66-.637.801-1.644.342-2.438l-1.5-2.6c-.365-.631-1.031-1-1.732-1-.184 0-.368.025-.551.076l-1.4.401-.354-1.413c-.22-.884-1.02-1.509-1.938-1.509zM11.5 10.5c1.104 0 2 .895 2 2 0 1.104-.896 2-2 2s-2-.896-2-2c0-1.105.896-2 2-2m0-1c-1.654 0-3 1.346-3 3s1.346 3 3 3 3-1.346 3-3-1.346-3-3-3z"},child:[]}]})(s)}function g5e(s){return te({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M7.707 17.707 13.414 12 7.707 6.293 6.293 7.707 10.586 12l-4.293 4.293zM15 6h2v12h-2z"},child:[]}]})(s)}function j5e(s){return te({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M327.467 19.992c.748 14.94 2.317 51.268 2.59 98.76 3.474-.286 6.557-.381 9.72 1.08 18.04 8.345 27.243 29.326 27.026 50.506-.217 21.18-11.283 44.136-36.104 54.307a41.62 41.62 0 0 1-2.486.923c-3.408 80.504-12.307 166.37-33.754 225.5-6.876 15.831-17.029 29.217-26.828 40.94l55.27.422c20.676-12.19 32.041-27.395 36.32-46.407l17.558 3.954c-3.67 16.312-11.99 30.662-24.511 42.677l143.052 1.094c-5.13-14.524-16.16-46.501-20.357-70.217C451.89 293.171 450.15 45 450.025 19.992zM18.279 38.984l.881 18.725c17.856 12.047 32.035 23.91 45.969 35.527 12.887-11.156 2.404-29.725-5.82-39.091-13.668-5.346-27.335-10.467-41.03-15.16zM86.723 65.13c4.77 14.56 3.347 29.656-7.477 39.746 24.105 19.479 50.832 38.151 97.1 55.635 13.836-22.588 12.08-43.852-3.338-60.739-29.03-10.9-57.703-22.997-86.285-34.642zm-31.721 42.988V400h17.996V122.723c-6.187-4.856-12.114-9.73-17.996-14.606zm145.264 1.434c3.253 8.283 4.54 16.754 3.982 25.043-.765 11.35-4.673 22.135-10.545 32.095 16.926 5.691 36.192 11.248 58.451 16.655l2.604.633 1.834 1.953c9.223 9.826 22.535 17.206 35.469 21.006 12.933 3.8 25.473 3.655 31.814 1.056 18.024-7.385 24.773-22.363 24.932-37.84.152-14.822-7.069-28.554-15.479-33.306-45.88-1.699-89.948-12.607-133.062-27.295zm-33.264 66.476V400h17.996V182.605a502.784 502.784 0 0 1-17.996-6.578zM32 419.002v17.996h176v-17.996z"},child:[]}]})(s)}function y5e(s){return te({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.7 21.04l-194.4.41L21.04 159.3l.41 194.4L159.3 491l194.4-.4L491 352.7l-.4-194.4L352.7 21.04zm-8 19.66l126.2 125.7.4 178.3-123.1 123.6-2.6 2.6-178.3.4L41.08 345.6l-.38-178.3L166.4 41.08l178.3-.38zm-7.5 18.01l-163.3.34L58.71 174.8l.34 163.3L174.8 453.3l163.3-.3 115.2-115.8-.3-163.3L337.2 58.71zM108.4 210.4c5.3 0 10.8.5 16.4 1.3 5.7.8 11.5 2 17.5 3.6v20.5c-5.3-2.4-10.5-4.2-15.6-5.4-5.1-1.2-9.9-1.8-14.4-1.8-6 0-10.4.8-13.25 2.5-2.87 1.6-4.3 4.2-4.3 7.7 0 2.6.96 4.6 2.87 6.1 1.95 1.4 5.48 2.7 10.58 3.7l10.6 2.1c10.8 2.2 18.5 5.5 23.1 9.9 4.5 4.5 6.8 10.8 6.8 18.9 0 10.7-3.2 18.7-9.5 24-6.4 5.2-16.1 7.8-29.2 7.8-6.1 0-12.3-.6-18.51-1.8-6.2-1.1-12.41-2.9-18.61-5.2v-21.1c6.2 3.3 12.19 5.8 17.96 7.5 5.82 1.6 11.46 2.4 16.76 2.4 5.5 0 9.7-.9 12.6-2.7 2.9-1.8 4.4-4.4 4.4-7.8 0-3.1-1-5.4-3-7.1-2-1.6-5.9-3.1-11.8-4.4l-9.7-2.1c-9.73-2.1-16.85-5.4-21.37-10-4.47-4.5-6.7-10.7-6.7-18.4 0-9.7 3.12-17.1 9.37-22.3 6.25-5.3 15.24-7.9 27-7.9zm187.7 0c15.6 0 27.8 4.5 36.7 13.5 8.9 8.9 13.3 21.2 13.3 37 0 15.7-4.4 28-13.3 37-8.9 8.9-21.1 13.4-36.7 13.4-15.6 0-27.8-4.5-36.7-13.4-8.9-9-13.3-21.3-13.3-37 0-15.8 4.4-28.1 13.3-37 8.9-9 21.1-13.5 36.7-13.5zm-141.9 1.8h89.6v18.9h-32.2v78.3h-25.1v-78.3h-32.3v-18.9zm205.8 0h41.6c12.3 0 21.8 2.8 28.4 8.3 6.7 5.4 10 13.2 10 23.4s-3.3 18.1-10 23.6c-6.6 5.4-16.1 8.2-28.4 8.2H385v33.7h-25v-97.2zm-63.9 16.4c-7.7 0-13.6 2.8-17.8 8.5-4.2 5.6-6.3 13.6-6.3 23.8 0 10.2 2.1 18.1 6.3 23.8 4.2 5.6 10.1 8.4 17.8 8.4 7.7 0 13.6-2.8 17.8-8.4 4.2-5.7 6.3-13.6 6.3-23.8 0-10.2-2.1-18.2-6.3-23.8-4.2-5.7-10.1-8.5-17.8-8.5zm88.9 1.8v27.1h13.9c4.9 0 8.6-1.2 11.3-3.5 2.6-2.4 3.9-5.8 3.9-10.1s-1.3-7.7-3.9-10c-2.7-2.4-6.4-3.5-11.3-3.5H385z"},child:[]}]})(s)}function T5e(s){return te({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 54.28c-124.603 0-226 101.398-226 226 0 47.864 14.975 92.293 40.465 128.876l29.79-19.86c-17.188-24.545-28.708-53.362-32.696-84.577H96v-18H66.115c-.07-2.14-.115-4.284-.115-6.44 0-45.378 15.816-86.97 42.236-119.598l17.4 17.4 12.727-12.727-18.133-18.132C152.735 114.057 197.335 92.8 247 90.498v29.22h18V90.5c49.665 2.302 94.265 23.56 126.77 56.725l-18.133 18.132 12.726 12.727 17.4-17.4c26.42 32.63 42.237 74.22 42.237 119.6 0 2.154-.044 4.3-.115 6.437H416v18h28.44c-3.987 31.214-15.507 60.03-32.694 84.575l29.79 19.86C467.025 372.574 482 328.146 482 280.282c0-124.602-101.397-226-226-226zm15.83 66.23a144 160 0 0 1 74.608 100.062l49.966-17.568a160 160 0 0 0-4.3-7.012l-5.135 5.153-30.368-30.29-5.76-5.746 7.85-7.874a160 160 0 0 0-86.862-36.726zm156.15 89.844l-175.332 60.6C240.505 272.618 231 283.155 231 295.72c0 13.7 11.3 25 25 25 6.77 0 12.95-2.764 17.473-7.208L427.98 210.354zm-16.513 32.322l-60.713 40.72a144 160 0 0 1-56.6 108.323h76.057a160 160 0 0 0 39.763-68.572H398.48v-52.515h17.022a160 160 0 0 0-4.035-27.957zM128 421.72v36h256v-36H128z"},child:[]}]})(s)}function J0(s){return te({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M140 29.92c-31.4 0-59.89 3.25-79.89 8.25-9.9 2.5-17.8 5.51-22.4 8.25-3.2 1.87-4.1 3.15-4.5 3.58.4.43 1.3 1.71 4.5 3.58 4.6 2.74 12.5 5.75 22.4 8.25 20 5 48.49 8.25 79.89 8.25h5.7c5.3-2 11.1-3.78 17.6-5.4 20.3-5.08 46.5-8.42 75.8-9.36 1.2-.57 2.3-1.14 3.2-1.7 3.1-1.87 4.1-3.15 4.5-3.58-.4-.43-1.4-1.71-4.5-3.58-4.6-2.74-12.5-5.75-22.5-8.25-19.9-5-48.4-8.25-79.8-8.25zm232 0c-31.4 0-59.9 3.25-79.8 8.25-10 2.5-17.9 5.51-22.5 8.25-3.1 1.87-4.1 3.15-4.5 3.58.4.43 1.4 1.71 4.5 3.58.9.56 2 1.13 3.2 1.7 29.3.94 55.5 4.28 75.8 9.36 6.5 1.62 12.3 3.4 17.6 5.4h5.7c31.4 0 59.9-3.25 79.8-8.25 10-2.5 17.9-5.51 22.5-8.25 3.1-1.87 4.1-3.15 4.5-3.58-.4-.43-1.4-1.71-4.5-3.58-4.6-2.74-12.5-5.75-22.5-8.25-19.9-5-48.4-8.25-79.8-8.25zM33.01 71.44V369.9c0 4.3 1.8 8 6.8 12.3 5 4.3 13.1 8.5 23.3 11.9 15.3 5.1 35 8.5 55.89 9.8V278.3l-16.5 28.6-7.79-4.5c-27.4-15.9-44.3-45.3-44.4-77v-9h52.59c-.6 2.6-.9 5.3-.9 8.1 0 13.1 6.8 24.8 17 31.7v-63.4c-1.9 1.3-3.6 2.7-5.2 4.2l-25.99-45.1 7.8-4.5c7.49-4.2 15.29-7.3 23.39-9.3V87.61c-24.19-1.08-45.99-4.01-63.19-8.32-8.9-2.21-16.5-4.76-22.8-7.85zm445.99 0c-6.3 3.09-14 5.63-22.8 7.84-17.2 4.31-39 7.24-63.2 8.32v50.6c8.1 2 16 5.1 23.4 9.3l7.7 4.5-4.4 7.8-21.5 37.2c-1.6-1.5-3.3-2.9-5.2-4.2v63.4c10.2-6.9 17-18.6 17-31.7 0-2.8-.3-5.5-.9-8.1h50.8v9c0 31.8-17 61.1-44.4 77l-7.8 4.5-14.7-25.5v122.5c20.9-1.3 40.7-4.7 55.9-9.8 10.2-3.4 18.3-7.6 23.3-11.9 5-4.3 6.8-8 6.8-12.3zM256 73c-34.7 0-66.2 3.57-88.3 9.1-11.1 2.77-19.8 6.09-25.1 9.19-4.3 2.58-5.3 4.42-5.5 4.71.2.29 1.2 2.12 5.5 4.7 5.3 3.1 14 6.4 25.1 9.2 22.1 5.5 53.6 9.1 88.3 9.1 34.7 0 66.2-3.6 88.3-9.1 11.1-2.8 19.8-6.1 25.1-9.2 4.3-2.58 5.3-4.41 5.5-4.7-.2-.29-1.2-2.13-5.5-4.71-5.3-3.1-14-6.42-25.1-9.19-22.1-5.53-53.6-9.1-88.3-9.1zm118.9 23c.1.1.1.1.1 0s0-.1-.1 0zm-237.8 0c-.1-.1-.1-.1-.1 0s0 .1.1 0zm-.1 22.1V448c0 5 2.2 9.3 7.9 14.2 5.6 4.8 14.7 9.5 25.9 13.3 22.6 7.5 54 11.5 85.2 11.5 31.2 0 62.6-4 85.2-11.5 11.2-3.8 20.3-8.5 25.9-13.3 5.7-4.9 7.9-9.2 7.9-14.2V118.1c-7.2 3.7-16 6.6-26.3 9.3-24.2 6-56.7 9.6-92.7 9.6s-68.5-3.6-92.7-9.6c-10.3-2.7-19.1-5.6-26.3-9.3zM256 191c16.8 0 33.5 4.4 48.5 13l7.8 4.5-4.5 7.8-24.1 41.6c-7.3-6.7-17-10.9-27.7-10.9s-20.4 4.2-27.7 10.9l-28.6-49.4 7.8-4.5c15-8.7 31.7-13 48.5-13zm0 74c12.8 0 23 10.2 23 23s-10.2 23-23 23-23-10.2-23-23 10.2-23 23-23zm-98 15h57.8c-.5 2.6-.8 5.3-.8 8 0 18.1 12 33.7 28.5 39l-29.2 50.5-7.8-4.5c-30-17.3-48.5-49.4-48.5-84zm138.2 0H352v9c0 34.6-18.5 66.7-48.5 84l-7.8 4.5-28.8-50c17.3-4.8 30.1-20.8 30.1-39.5 0-2.7-.3-5.4-.8-8z"},child:[]}]})(s)}function D5e(s){return te({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M288.3 13.4c-12.3-.01-23 6.49-27.3 15.31l-2.9 5.95-6.6-1.01c-5.5-.85-11.3-1.32-17.1-1.32-18.8 0-35.7 4.5-47.3 11.14-11.5 6.64-16.9 14.59-16.9 22 0 7.42 5.4 15.37 16.9 22 11.6 6.64 28.5 11.13 47.3 11.13 7.5-.02 14.9-.74 21.8-2.13l6.3-1.23 3.2 5.46c5.6 9.2 23.7 18.2 44.7 18.2 13.9 0 26.4-3.6 34.8-8.8 8.4-5.2 12.2-11.23 12.2-16.9 0-5.09-3-10.48-10-15.44-6.9-4.97-17.6-8.87-30-9.95l-18.3-1.59 12.5-13.49c4.1-4.41 6.1-9.6 6.1-14.87 0-12.88-12.4-24.46-29.4-24.46zM152.2 65.46C84.8 102.3 39 173.9 39 256c0 32.1 7 62.6 19.54 90 5.95-7.9 10.48-13.4 12.67-16C62.05 307.2 57 282.2 57 256c0-74 40.27-138.5 100.1-172.78-3.1-5.39-4.9-11.34-4.9-17.74v-.02zm210.7 1.75c7.5 6.93 12.5 15.9 12.5 25.99 0 1.14-.1 2.27-.2 3.38C423.7 132.9 455 190.7 455 256c0 23.7-4.2 46.5-11.8 67.6l18.3 2.2c7.4-21.9 11.5-45.4 11.5-69.8 0-80.8-44.4-151.5-110.1-188.79zm58.6 270.49c-11.1.2-23 1.1-35.9 3.1l-.5.1-.5.1c-25.8 7.3-37.1 15.2-46.4 24.7l-2.2 2.2-.3 3.1c-3.4 29.6-5.8 60 0 91.8l1.3 6.8 6.8.6c30.6 2.6 58.7 1.4 86.2 0l1-.1.9-.2c18.5-5.2 34.4-12.8 46.4-24.6l1.7-1.6.6-2.2c10-33.4 3.4-63.8.4-92.7l-.8-7.4-7.3-.7c-16.2-1.5-32.8-3.2-51.4-3zM79.62 348.2c-4.94 6.1-11.43 14.5-18.58 25.6-12.29 18.9-22.53 42.4-20.51 54.9 1.43 8.8 6.97 19.6 14.51 27.6 7.54 7.9 16.69 12.8 24.58 12.8 7.87 0 17.03-4.9 24.58-12.8 7.5-8 13.1-18.8 14.5-27.6 2-12.5-8.2-36-20.5-54.9-7.15-11-13.64-19.5-18.58-25.6zM427 355.7c1.7 0 3.3 0 5 .1 5.4.1 10.7.4 16 .8-5.9 3.4-12.1 6.8-19.5 9.9l-2.4.2c-19.5 1.4-37.7.3-55.4-2 4.7-2 10.5-4 18.3-6.2 13.8-2.2 26.3-2.9 38-2.8zm38 11.6c2.8 22.9 5 44.5-1 66.6-7 6.3-16 11.4-27 15.4 3-22.5 2-44.8-.5-66.6 11.3-5 20.2-10.2 28.5-15.4zm-112.2 13.1c20.7 3.2 42.3 5.4 65.8 4.5 2.5 23 3.5 45.6-.4 67.8-21.5 1-43.1 1.5-65.8-.1-3.5-24-2.2-47.9.4-72.2zm-216.4 34.7c.9 5.5 1 11 .1 16.4-.3 1.6-.6 3.3-1 4.9C170 459.5 211.4 473 256 473c21.6 0 42.5-3.2 62.3-9.1l-2-18.2c-19 6-39.3 9.3-60.3 9.3-44.9 0-86.3-14.8-119.6-39.9z"},child:[]}]})(s)}function d5e(s){return te({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M33.125 19.406L135.5 128.22l81-23.157 18.72-5.344-7.564 17.936-46.125 109.78 134.282-70 26.157-13.655L328.436 170 256.5 309.25l91.25-57.125 22.97-14.375-9.22 25.47-34.625 95.624 71-36.375 21.188-10.845L410.906 334l-33.937 93.063 45.124-6.688 4.53-.656 3.313 3.155 64.313 61.47-30.5-80.5 23.313-46.908-72.5 39.532 51.062-141.158-91.188 47.47 72.344-142.813-128.217 82.81L421.875 70.063 239.03 168.69l30.44-99.563-103.845 25.25-132.5-74.97zM18.155 30.78l77.876 108.25-31.124 75.532 94.125-46.78-98.905 166.812 190.25-99.656-101.03 185.406 140.25-79.063-46.94 102.22 106.5-53-45.655 92.28 86.5-14.467 93.47 31.562-63.158-60.344-56.125 8.314-15.53 2.312 5.374-14.75 31.158-85.437-70.907 36.31-21.124 10.814 8.094-22.313 33.47-92.436-97.22 60.875-28.938 18.092L224.22 331l74.06-143.344-131.06 68.313-22.97 12 10.03-23.908 48.626-115.687-67.75 19.375-5.5 1.563-3.875-4.157L18.157 30.78z"},child:[]}]})(s)}function h5e(s){return te({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M20.127 52.803v58.986L250.46 245.153c26.367-28.823 70.087-36.533 105.313-16.195 35.29 20.374 50.465 62.207 38.567 99.503l101.648 58.855-64.728-74.65 35.638-37.352-57.27-7.687 84.72-86.92-125.71 33.186 12.995-120.208-66.578 96.363-27.448-80.593-16.353 88.77L20.127 52.803zm0 105.12l-.008.018.007.005v-.02zm0 .022l-.002 87.582 155.344 89.95-89.94 33.287h135.493l-63.658 99.87 116.22-70.083 15.77 85.852 38.543-80.01 63.66 87.018-5.853-87.047 90.54 17.268-102.4-59.198c-26.546 26.964-68.89 33.744-103.183 13.945-34.322-19.816-49.62-59.928-39.49-96.424L20.127 157.945zm316.6 119.442c-.938-.003-1.874.027-2.805.092-12.42.86-24.164 7.707-30.9 19.375-10.78 18.67-4.455 42.27 14.214 53.047 18.67 10.78 42.27 4.455 53.047-14.214 10.78-18.67 4.454-42.27-14.215-53.047-6.125-3.536-12.78-5.23-19.34-5.253z"},child:[]}]})(s)}function z5e(s){return te({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 32l-64 96 80 16-16 80 64-96-80-16 16-80zm-96 217c-1.9 0-9.8 3-15.8 6.7-2.8 1.7-5.3 3.5-7.2 4.8v119c1.9 1.3 4.4 3.1 7.2 4.8 6 3.7 13.9 6.7 15.8 6.7 1.9 0 9.8-3 15.8-6.7 5.9-3.7 10.6-7.3 10.6-7.3l2.5-2H201V265h-12.1l-2.5-2s-4.7-3.6-10.6-7.3c-6-3.7-13.9-6.7-15.8-6.7zm192 0c-1.9 0-9.8 3-15.8 6.7-5.9 3.7-10.6 7.3-10.6 7.3l-2.5 2H311v110h12.1l2.5 2s4.7 3.6 10.6 7.3c6 3.7 13.9 6.7 15.8 6.7 1.9 0 9.8-3 15.8-6.7 2.8-1.7 5.3-3.5 7.2-4.8v-119c-1.9-1.3-4.4-3.1-7.2-4.8-6-3.7-13.9-6.7-15.8-6.7zm-133 16v110h14V265h-14zm32 0v110h42V265h-42zM95.5 311c-18.8 0-36.6 9.2-49.94 22.7C32.22 347.1 23 365 23 384v106h18V384c0-13 6.78-27.1 17.32-37.7C68.85 335.8 82.8 329 95.5 329H119v-18H95.5zm297.5 0v18h22.9c13.1 0 27.1 6.8 37.7 17.4C464.2 357 471 371 471 384v106h18V384c0-19-9.2-37-22.7-50.4-13.4-13.4-31.4-22.6-50.4-22.6H393z"},child:[]}]})(s)}function w5e(s){return te({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M376 211H256V16L136 301h120v195z"},child:[]}]})(s)}function I5e(s){return te({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M18.36 6.64a9 9 0 1 1-12.73 0"},child:[]},{tag:"line",attr:{x1:"12",y1:"2",x2:"12",y2:"12"},child:[]}]})(s)}function C5e(s){return te({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"},child:[]}]})(s)}function p5e(s){return te({attr:{version:"1.1",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M6 0l-6 8h6l-4 8 14-10h-8l6-6z"},child:[]}]})(s)}const $ve={SET:SSe,WORKING:Uc,UNREACH:Wc,LOWBAT:$c,MAINTAIN:Oj,ERROR:fj,DIRECTION:mj,CONNECTED:Wc,ACTUAL:L5e,SECOND:g5e,PRESS_LONG:Aj,PRESS:pj,MUTE:Cj,ACCURACY:h5e,RADIUS:fSe,ELEVATION:xSe,LATITUDE:_Se,LONGITUDE:mSe,GPS:Ij,ON_ACTUAL:Pc,ON_SET:Pc,OPEN:wj,STOP:y5e,WATER_ALARM:Q0,WASTE_ALARM:J0,PAUSE:ASe,STATE:D5e,BATTERY:$c,WASTE:J0,WATER:Q0,WORK_MODE:Uc,MODE:zj,POWER:OSe,BOOST:N5e,HUMIDITY:QSe,TEMPERATURE:vSe,BRIGHTNESS:USe,MOTION:hj,FIRE:bSe,WINDOW:KL,SMOKE:YSe,SWING:j5e,SPEED:T5e,DIMMER:C5e,ON:I5e,COLOR_TEMP:dj,ELECTRIC_POWER:p5e,CURRENT:w5e,VOLTAGE:z5e,CONSUMPTION:l5e,FREQUENCY:d5e,HUE:PSe};class eg extends a.Component{static generateFile(e,t){const i=window.document.createElement("a");i.setAttribute("href",`data:application/json;charset=utf-8,${encodeURIComponent(JSON.stringify(t,null,2))}`),i.setAttribute("download",e),i.style.display="none",window.document.body.appendChild(i),i.click(),window.document.body.removeChild(i)}handleFileSelect=e=>{const t=e.target,i=t==null?void 0:t.files;if(!i||!i.length){console.error("No files found. Please report to developers");return}const r=i[0];if(r){const o=new window.FileReader;o.onload=()=>{var M;const n=((M=o.result)==null?void 0:M.toString())||"";try{const c=JSON.parse(n);c.native&&c.common?c.common.name!==this.props.common.name?this.props.onError&&this.props.onError(D.t("ra_otherConfig",c.common.name)):this.props.onLoad&&this.props.onLoad(c.native):this.props.onError&&this.props.onError(D.t("ra_invalidConfig"))}catch(c){this.props.onError&&this.props.onError(c==null?void 0:c.toString())}},o.readAsText(r)}else alert("Failed to open JSON File")};download(){const e={_id:`system.adapter.${this.props.common.name}.${this.props.instance}`,common:JSON.parse(JSON.stringify(this.props.common)),native:this.props.native};e.common.news&&delete e.common.news,e.common.titleLang&&delete e.common.titleLang,e.common.desc&&delete e.common.desc,eg.generateFile(`${e._id}.json`,e)}upload(){const e=window.document.createElement("input");e.setAttribute("type","file"),e.setAttribute("id","files"),e.setAttribute("opacity","0"),e.addEventListener("change",this.handleFileSelect,!1),e.click()}render(){return a.createElement("div",{className:this.props.className,style:this.props.style},this.props.common.icon?a.createElement(be,{src:this.props.common.icon,style:{padding:8,width:64},alt:"logo"}):null,this.props.common.readme?a.createElement(bt,{size:"small",color:"primary","aria-label":"Help",style:{marginRight:5,marginTop:5,float:"right"},onClick:()=>{const e=window.open(this.props.common.readme,"_blank");e==null||e.focus()}},a.createElement(Ej,null)):null,a.createElement(bt,{size:"small",color:"primary","aria-label":"Load config",style:{marginRight:5,marginTop:5,float:"right"},title:D.t("ra_Load configuration from file"),onClick:()=>this.upload()},a.createElement(Dy,null)),a.createElement(bt,{size:"small",color:"primary","aria-label":"Save config",style:{marginRight:5,marginTop:5,float:"right"},title:D.t("ra_Save configuration to file"),onClick:()=>this.download()},a.createElement(Ty,null)))}}class tg{static text2link(e){const t=e.match(/\d+\.\)\s/);return t&&(e=e.replace(t[0],t[0].replace(/\s/," "))),e.replace(/[^a-zA-Zа-яА-Я0-9]/g,"").trim().replace(/\s/g,"").toLowerCase()}static openLink(e,t){e=e.replace(/\/\/([0-9a-f]*:[0-9a-f]*:[0-9a-f]*:[0-9a-f]*:[0-9a-f]*:[0-9a-f]*)(:\d+)?\//i,"//[$1]$2/"),t==="this"?window.location.href=e:window.open(e,t||"_blank")}static getTitle(e){const t=tg.extractHeader(e);let i=t.body;const r=t.header;if(!r.title){i=i.replace(/{[^}]*}/g,""),i=i.trim();const o=i.replace(/\r/g,"").split(` `);for(let n=0;n{if(!n.trim())return;const M=n.indexOf(":");if(M!==-1){const c=n.substring(0,M).trim();let l=n.substring(M+1).trim();l=l.replace(/^['"]|['"]$/g,""),l==="true"?t[c]=!0:l==="false"?t[c]=!1:parseFloat(l).toString()===l?t[c]=parseFloat(l):t[c]=l}else t[n.trim()]=!0}),e=e.substring(i+7))}return{header:t,body:e}}static removeDocsify(e){const t=e.match(/{docsify-[^}]*}/g);return t&&t.forEach(i=>e=e.replace(i,"")),e}static onCopy(e,t){E4(t),e&&e.stopPropagation(),e&&e.preventDefault()}}function A5e(s){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:e=>s.onClick&&s.onClick(e),viewBox:"0 0 512 512",width:s.width||(s.fontSize==="small"?16:20),height:s.height||s.width||(s.fontSize==="small"?16:20),className:s.className,style:s.style},a.createElement("path",{fill:"currentColor",d:"M448 0L320 96v62.06l-83.03 83.03c6.79 4.25 13.27 9.06 19.07 14.87 5.8 5.8 10.62 12.28 14.87 19.07L353.94 192H416l96-128-64-64zM128 278.59L10.92 395.67c-14.55 14.55-14.55 38.15 0 52.71l52.7 52.7c14.56 14.56 38.15 14.56 52.71 0L233.41 384c29.11-29.11 29.11-76.3 0-105.41s-76.3-29.11-105.41 0z"}))}function sg(s){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:e=>s.onClick&&s.onClick(e),viewBox:"0 0 320 320",width:s.width||(s.fontSize==="small"?16:20),height:s.height||s.width||(s.fontSize==="small"?16:20),className:s.className,style:s.style},a.createElement("g",{fill:"currentColor"},a.createElement("rect",{rx:"32",height:"272",width:"267",y:"25",x:"25",strokeWidth:"15",stroke:"currentColor",fill:"none"}),a.createElement("ellipse",{stroke:"currentColor",ry:"26",rx:"26",cy:"248",cx:"160",fill:"none",strokeWidth:"15"}),a.createElement("line",{y2:"201.94531",x2:"159.5",y1:"46.94531",x1:"159.5",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",stroke:"currentColor",fill:"none"}),a.createElement("rect",{height:"27",width:"50",y:"79.7979",x:"133.5",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",stroke:"currentColor",fill:"#fff"})))}function Bs(s){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:e=>s.onClick&&s.onClick(e),viewBox:"0 0 512 512",width:s.width||(s.fontSize==="small"?16:20),height:s.height||s.width||(s.fontSize==="small"?16:20),className:s.className,style:s.style},a.createElement("path",{fill:"currentColor",d:"M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z"}))}function ig(s){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:e=>s.onClick&&s.onClick(e),viewBox:"0 0 320 320",width:s.width||(s.fontSize==="small"?16:20),height:s.height||s.width||(s.fontSize==="small"?16:20),className:s.className,style:s.style},a.createElement("g",{fill:"currentColor"},a.createElement("rect",{rx:"32",height:"272",width:"267",y:"25",x:"25",strokeWidth:"15",stroke:"currentColor",fill:"none"}),a.createElement("ellipse",{stroke:"currentColor",ry:"26",rx:"26",cy:"252",cx:"160",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",fill:"#fff"}),a.createElement("line",{y2:"201.94531",x2:"159.5",y1:"46.94531",x1:"159.5",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",stroke:"currentColor",fill:"none"}),a.createElement("rect",{height:"27",width:"50",y:"140.83068",x:"133.5",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",stroke:"currentColor",fill:"#fff"}),a.createElement("ellipse",{stroke:"currentColor",ry:"26",rx:"26",cy:"251",cx:"241",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",fill:"#fff"}),a.createElement("line",{y2:"200.94531",x2:"240.5",y1:"45.94531",x1:"240.5",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",stroke:"currentColor",fill:"none"}),a.createElement("rect",{height:"27",width:"50",y:"78.7979",x:"214.5",strokeWidth:"15",stroke:"currentColor",fill:"#fff"}),a.createElement("ellipse",{stroke:"currentColor",ry:"26",rx:"26",cy:"252",cx:"84",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",fill:"#fff"}),a.createElement("line",{y2:"201.94531",x2:"83.5",y1:"46.94531",x1:"83.5",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",stroke:"currentColor",fill:"none"}),a.createElement("rect",{height:"27",width:"50",y:"79.7979",x:"57.5",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",stroke:"currentColor",fill:"#fff"})))}function m5e(s){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",onClick:e=>s.onClick&&s.onClick(e),width:s.width||(s.fontSize==="small"?16:20),height:s.height||s.width||(s.fontSize==="small"?16:20),className:s.className,style:s.style},a.createElement("path",{fill:"currentColor",d:"M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48z"}))}function f5e(s){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:e=>s.onClick&&s.onClick(e),viewBox:"0 0 512 512",width:s.width||(s.fontSize==="small"?16:20),height:s.height||s.width||(s.fontSize==="small"?16:20),className:s.className,style:s.style},a.createElement("path",{fill:"currentColor",d:"M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48z"}),a.createElement("path",{fill:"currentColor",stroke:"null",d:"m261,270l-12,0l0,-24c0,-33.12 -26.88,-60 -60,-60s-60,26.88 -60,60l0,24l-12,0c-13.2,0 -24,10.8 -24,24l0,120c0,13.2 10.8,24 24,24l144,0c13.2,0 24,-10.8 24,-24l0,-120c0,-13.2 -10.8,-24 -24,-24zm-72,108c-13.2,0 -24,-10.8 -24,-24s10.8,-24 24,-24s24,10.8 24,24s-10.8,24 -24,24zm37.2,-108l-74.4,0l0,-24c0,-20.52 16.68,-37.2 37.2,-37.2c20.52,0 37.2,16.68 37.2,37.2l0,24z"}))}function O5e(s){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:e=>s.onClick&&s.onClick(e),viewBox:"0 0 512 512",width:s.width||(s.fontSize==="small"?16:20),height:s.height||s.width||(s.fontSize==="small"?16:20),className:s.className,style:s.style},a.createElement("path",{fill:"currentColor",d:"M448 0L320 96v62.06l-83.03 83.03c6.79 4.25 13.27 9.06 19.07 14.87 5.8 5.8 10.62 12.28 14.87 19.07L353.94 192H416l96-128-64-64zM128 278.59L10.92 395.67c-14.55 14.55-14.55 38.15 0 52.71l52.7 52.7c14.56 14.56 38.15 14.56 52.71 0L233.41 384c29.11-29.11 29.11-76.3 0-105.41s-76.3-29.11-105.41 0z"}))}function rr(s){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:e=>s.onClick&&s.onClick(e),viewBox:"0 0 320 320",width:s.width||(s.fontSize==="small"?16:20),height:s.height||s.width||(s.fontSize==="small"?16:20),className:s.className,style:s.style},a.createElement("rect",{fill:"none",rx:"32",height:"272",width:"267",y:"25",x:"25",strokeWidth:"15",stroke:"currentColor"}),a.createElement("ellipse",{fill:"none",ry:"54",rx:"54",cy:"160",cx:"160",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",stroke:"currentColor"}))}function E5e(s){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:e=>s.onClick&&s.onClick(e),viewBox:"0 0 24 24",width:s.width||(s.fontSize==="small"?16:20),height:s.height||s.width||(s.fontSize==="small"?16:20),className:s.className,style:s.style},a.createElement("path",{fill:"currentColor",stroke:"currentColor",d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39A.998.998 0 0 0 18.95 4H5.04c-.83 0-1.3.95-.79 1.61z"}))}const $n={root:{width:"100%",height:"100%"},overflowHidden:{overflow:"hidden"},container:{height:"100%"}};function _5e(s){var e;return a.createElement(AN,{elevation:Number.isNaN(s.elevation)?1:s.elevation,style:{...$n.root,...((e=s.styles)==null?void 0:e.root)||void 0,...s.overflow!=="visible"?$n.overflowHidden:void 0},onKeyDown:s.onKeyDown,tabIndex:s.tabIndex},a.createElement(ts,{container:!0,direction:"column",wrap:"nowrap",sx:$n.container},s.children))}const B0={root:{height:"100%",overflow:"hidden"},overflowAuto:{overflow:"auto"}},x5e=a.forwardRef(function(e,t){return a.createElement(ts,{sx:{...B0.root,...(e==null?void 0:e.style)||void 0,...e.overflow==="auto"?B0.overflowAuto:void 0},ref:t},e.children)});function S5e(s){return a.createElement(ts,{container:!0,alignItems:"center"},s.children)}const Li=24,$e=32,rg=s=>s==="dark"?"#62ff25":"#37c400",og=s=>s==="dark"?"#ee56ff":"#a204b4",k5e=s=>s==="dark"?"#fff46e":"#b89101",ng=s=>"#ff6d69",ag=s=>"#5773ff",v5e=["0_userdata.0.","alias.0."],ss={headerCellInput:{width:"calc(100% - 5px)",height:$e,pt:0,"& .itemIcon":{verticalAlign:"middle",width:Li,height:Li,display:"inline-block"}},headerCellSelectItem:{"& .itemIcon":{width:Li,height:Li,mr:"5px",display:"inline-block"}},selectNone:{opacity:.5},selectClearButton:{position:"absolute",top:0,right:0,borderRadius:5,backgroundColor:"background.default"},cellIdTooltipLink:{color:"#7ec2fd","&:hover":{color:"#7ec2fd"},"&:visited":{color:"#7ec2fd"}},cellIdTooltip:{fontSize:14}};function Y5e(s){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 436 436",style:s==null?void 0:s.style,width:"24",height:"24",className:"admin-button"},a.createElement("g",{fill:"currentColor"},a.createElement("path",{d:"m195.23077,24.30769c-36,3 -67,12 -96,26c-49,24 -82,61 -93,104l-3,11l-1,50c0,46 0,49 2,59l5,20c21,58 84,103 165,116c16,3 53,4 70,2c60,-6 111,-28 147,-64c21,-21 36,-49 40,-74a866,866 0 0 0 1,-104c-3,-18 -6,-28 -13,-43c-26,-52 -87,-90 -162,-101c-16,-2 -48,-3 -63,-2l1,0zm60,23c36,5 70,18 95,35c31,20 51,47 59,77c2,7 2,11 2,25c1,15 0,18 -2,26c-19,69 -104,117 -200,114c-47,-2 -90,-15 -124,-38c-31,-20 -51,-47 -59,-77c-3,-11 -4,-32 -2,-43c8,-42 41,-78 91,-101a260,260 0 0 1 140,-19l0,1zm-221,222c21,26 57,49 95,62c81,27 174,14 239,-32c14,-10 31,-27 41,-41c2,-2 2,-2 2,7c-1,23 -16,50 -38,72c-78,74 -233,74 -311,-1a121,121 0 0 1 -39,-76l0,-6l3,4l8,11z"}),a.createElement("path",{d:"m201.23077,47.30769c-40,3 -79,19 -104,44c-55,55 -38,133 37,171c52,26 122,24 172,-5c30,-17 51,-42 58,-71c3,-11 3,-34 0,-45c-6,-23 -21,-44 -40,-60l-27,-16a184,184 0 0 0 -96,-18zm30,21c56,5 100,35 112,75c4,11 4,30 0,41c-8,25 -26,45 -54,59a166,166 0 0 1 -160,-8a98,98 0 0 1 -41,-53c-5,-18 -2,-39 8,-57c23,-39 79,-62 135,-57z"})))}function R0(s){s=(s||"").toString();const e=s[0]==="*",t=s[s.length-1]==="*";return s=s.replace(/[-/\\^$+?.()|[\]{}]/g,"\\$&").replace(/\*/g,".*"),(e?"":"^")+s+(t?"":"$")}function Q5e(s,e){const t=[];for(let i=0;i{if(r==null)return;const n=typeof r=="object";if(t&&n&&typeof r.en=="string"&&typeof r.de=="string"){i[o]=r.en;return}i[o]=n?_a(r,e,t):r}):b5e(s,(i,r,o)=>{if(r==null||e.includes(o))return;const n=typeof r=="object";if(t&&n&&typeof r.en=="string"&&typeof r.de=="string"){i[o]=r.en;return}i[o]=n?_a(r,e,t):r})}function F0(s,e,t){const i=document.createElement("a"),r=[];t.excludeSystemRepositories&&r.push("system.repositories");const o=r.length>0||t.excludeTranslations?_a(e,r,t.excludeTranslations):e,n=t.beautify?JSON.stringify(o,null,2):JSON.stringify(o);i.setAttribute("href",`data:application/json;charset=utf-8,${encodeURIComponent(n)}`),i.setAttribute("download",s),i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i)}class U5e extends De{hasIcons;timer=null;constructor(e){var t;super(e),this.state={value:e.initialValue||[]},this.hasIcons=!!((t=e.values)!=null&&t.find(i=>i.icon))}componentWillUnmount(){this.timer&&clearTimeout(this.timer)}render(){var e;return a.createElement("div",{style:{position:"relative"}},a.createElement(nt,{variant:"standard",key:this.props.name,sx:ss.headerCellInput,className:"no-underline",multiple:!0,renderValue:t=>t!=null&&t.length?t.map(i=>{const r=this.props.values.find(c=>typeof c=="object"?c.value===i:c===i);let o,n,M;return typeof r=="object"?(o=r.value,n=r.name,M=r.icon):(o=r,n=r),a.createElement(J,{component:"span",sx:ss.headerCellSelectItem,key:o},M||(this.hasIcons?a.createElement("div",{className:"itemIcon"}):null),n)}):this.props.name==="custom"?this.props.texts.showAll:this.props.texts[`filter_${this.props.name}`],value:this.state.value,onChange:t=>{let i=t.target.value;if(this.state.value[0]==="_"&&i.includes("_")&&i.length>1){const r=i.indexOf("_");r!==-1&&i.splice(r,1)}else this.state.value[0]!=="_"&&i.includes("_")&&(i=["_"]);i.includes("")&&(i=[]),this.setState({value:i},()=>{this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.timer=null,this.props.onChange(this.props.name,i)},400)})},onClose:()=>{this.timer&&(clearTimeout(this.timer),this.timer=null,this.props.onChange(this.props.name,this.state.value))},inputProps:{name:this.props.name,id:this.props.name},displayEmpty:!0},a.createElement(re,{key:"empty",value:""},a.createElement("span",{style:ss.selectNone},this.props.name==="custom"?this.props.texts.showAll:this.props.texts[`filter_${this.props.name}`])),(e=this.props.values)==null?void 0:e.map(t=>{let i,r,o;return typeof t=="object"?(i=t.value,r=t.name,o=t.icon):(i=t,r=t),a.createElement(re,{sx:ss.headerCellSelectItem,key:i,value:i},o||(this.hasIcons?a.createElement("div",{className:"itemIcon"}):null),r)})),this.state.value.length?a.createElement(J,{component:"div",sx:ss.selectClearButton},a.createElement(W,{size:"small",onClick:()=>{this.timer&&(clearTimeout(this.timer),this.timer=null),this.setState({value:[]},()=>this.props.onChange(this.props.name,void 0))}},a.createElement(we,null))):null)}}class $5e extends De{timer=null;constructor(e){super(e),this.state={value:e.initialValue||""}}componentWillUnmount(){this.timer&&clearTimeout(this.timer)}render(){return a.createElement(Qt,{sx:this.props.styles,key:this.props.name,title:this.props.t("ra_You can use * as wildcard"),margin:"dense"},a.createElement(qt,{classes:{underline:"no-underline"},id:this.props.name,placeholder:this.props.texts[`filter_${this.props.name}`],value:this.state.value,onChange:e=>{const t=e.target.value;this.setState({value:t},()=>{this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.timer=null,this.props.onChange(this.props.name,t)},400)})},onBlur:()=>{this.timer&&(clearTimeout(this.timer),this.timer=null,this.props.onChange(this.props.name,this.state.value))},autoComplete:"off"}),this.state.value?a.createElement("div",{style:{position:"absolute",right:0}},a.createElement(W,{size:"small",onClick:()=>{this.timer&&(clearTimeout(this.timer),this.timer=null),this.setState({value:""},()=>this.props.onChange(this.props.name,void 0))}},a.createElement(we,null))):null)}}function jr(s,e,t,i){if(t||=0,i===void 0&&(i=s.length-1,!i))return s[0]===e;const r=Math.floor((t+i)/2);return e===s[r]?!0:i-1===t?s[t]===e||s[i]===e:e>s[r]?jr(s,e,r,i):ex.toLowerCase())),(L=e.custom)!=null&&L.length&&(r.custom=e.custom.map(x=>x.toLowerCase())),(g=e.role)!=null&&g.length&&(r.role=e.role.map(x=>x.toLowerCase())),(j=e.room)!=null&&j.length&&(r.room=[],e.room.forEach(x=>{var S,R;r.room=r.room.concat(((R=(S=i[x])==null?void 0:S.common)==null?void 0:R.members)||[])})),(y=e.func)!=null&&y.length&&(r.func=[],e.func.forEach(x=>{var S,R;r.func=r.func.concat(((R=(S=i[x])==null?void 0:S.common)==null?void 0:R.members)||[])}))}const N=s.data;if(N!=null&&N.id){const x=(T=N.obj)==null?void 0:T.common;if(n){if(n.type&&(typeof n.type=="string"?(!N.obj||n.type!==N.obj.type)&&(l=!0):Array.isArray(n.type)&&(!N.obj||!n.type.includes(N.obj.type))&&(l=!0)),!l&&((d=n.common)!=null&&d.type)&&(x!=null&&x.type?typeof n.common.type=="string"?n.common.type!==x.type&&(l=!0):Array.isArray(n.common.type)&&(n.common.type.includes(x.type)||(l=!0)):l=!0),!l&&((I=n.common)!=null&&I.role)&&(x!=null&&x.role?typeof n.common.role=="string"?x.role.startsWith(n.common.role)&&(l=!0):Array.isArray(n.common.role)&&(n.common.role.find(S=>x.role.startsWith(S))||(l=!0)):l=!0),!l&&((w=n.common)==null?void 0:w.custom)==="_"&&(x!=null&&x.custom))l=!0;else if(!l&&((A=n.common)!=null&&A.custom)&&((p=n.common)==null?void 0:p.custom)!=="_"){const S=n.common.custom;if(!(x!=null&&x.custom))l=!0;else if(S==="_dataSources")Object.keys(x.custom).find(R=>R.startsWith("history.")||R.startsWith("sql.")||R.startsWith("influxdb."))||(l=!0);else if(Array.isArray(S)){const R=Object.keys(x.custom);S.find(he=>R.find(Xe=>Xe.startsWith(he)))&&(l=!0)}else S!==!0&&!Object.keys(x.custom).find(R=>R.startsWith(S))&&(l=!0)}}!l&&!e.expertMode&&(l=N.id==="system"||N.id==="enum"||N.id.startsWith("system.")||N.id.startsWith("enum.")||N.id.startsWith("_design/")||N.id.endsWith(".admin")||!!(x!=null&&x.expert)),!l&&r.id&&(N.fID===void 0&&(N.fID=N.id.toLowerCase()),l=!N.fID.includes(r.id)),!l&&r.idRx&&(l=!r.idRx.test(N.id)),!l&&r.name&&(x?(N.fName===void 0&&(N.fName=He(x.name,t)||"",N.fName=N.fName.toLowerCase()),l=!N.fName.includes(r.name)):l=!0),!l&&r.nameRx&&x&&(N.fName===void 0&&(N.fName=He(x.name,t)||"",N.fName=N.fName.toLowerCase()),l=!r.nameRx.test(N.fName)),!l&&((h=e.role)!=null&&h.length)&&x&&(l=!(typeof x.role=="string"&&r.role.find(S=>x.role.startsWith(S)))),!l&&((C=r.room)!=null&&C.length)&&(l=!r.room.find(S=>S===N.id||N.id.startsWith(`${S}.`))),!l&&((E=r.func)!=null&&E.length)&&(l=!r.func.find(S=>S===N.id||N.id.startsWith(`${S}.`))),!l&&((O=r.type)!=null&&O.length)&&(l=!((b=N.obj)!=null&&b.type&&r.type.includes(N.obj.type))),!l&&M&&(l=!((k=N.obj)!=null&&k.type&&M.includes(N.obj.type))),!l&&((K=r.custom)!=null&&K.length)&&(x?r.custom[0]==="_"?l=!!x.custom:x.custom?l=!r.custom.find(S=>x.custom[S]):l=!0:l=r.custom[0]!=="_")}return N.visible=!l,N.hasVisibleChildren=!1,s.children&&c<20&&s.children.forEach(x=>{xa(x,e,t,i,r,o,n,M,c+1)&&(N.hasVisibleChildren=!0)}),N.sumVisibility=N.visible||N.hasVisibleChildren,o&&N.sumVisibility&&o.count++,N.id&&N.sumVisibility&&s.children&&s.children.forEach(x=>x.data.hasVisibleParent=!0),N.visible||N.hasVisibleChildren}function Mg(s,e,t,i){var o;i||=[];const r=s.data;return r.sumVisibility&&(r.id&&t[r.id]&&t[r.id].type===e&&i.push(r.id),(o=s.children)==null||o.forEach(n=>Mg(n,e,t,i))),i}function G0(s,e,t,i,r,o){let n;return e==="alias"||e==="alias.0"?n=a.createElement(SN,{className:"iconOwn",style:{color:og(i)}}):e==="0_userdata"||e==="0_userdata.0"?n=a.createElement(Vj,{className:"iconOwn",style:{color:rg(i)}}):e.startsWith("_design/")||e==="system"?n=a.createElement(jo,{className:"iconOwn",style:{color:ng(i)}}):e==="system.adapter"?n=a.createElement(jo,{className:"iconOwn",style:{color:ag(i)}}):e==="system.group"?n=a.createElement(rM,{className:"iconOwn"}):e==="system.user"?n=a.createElement(sM,{className:"iconOwn"}):e==="system.host"?n=a.createElement(iM,{className:"iconOwn"}):e.endsWith(".connection")||e.endsWith(".connected")?n=a.createElement(li,{className:"iconOwn"}):e.endsWith(".info")?n=a.createElement(tM,{className:"iconOwn"}):s[e]&&s[e].type==="meta"?n=a.createElement(Yo,{className:"iconOwn"}):t<2&&s[`system.adapter.${e}`]&&(n=_o(s,`system.adapter.${e}`,r,o)),n||null}function cg(s,e){var t,i;return(i=(t=s==null?void 0:s.obj)==null?void 0:t.common)!=null&&i.desc&&He(s.obj.common.desc,e)||null}function P5e(s,e){const t=cg(s,e);return t!=null&&t.startsWith("http")?a.createElement(J,{component:"a",sx:ss.cellIdTooltipLink,href:t,target:"_blank",rel:"noreferrer"},t):a.createElement("span",{style:ss.cellIdTooltip},t||s.id||"")}function H0(s,e){var N,u,L,g,j,y,T,d,I,w;const t=e.imagePrefix||".";let i=Object.keys(s);i.sort((A,p)=>A===p?0:(A=A.replace(/\./g,"!!!"),p=p.replace(/\./g,"!!!"),A>p?1:-1)),e.root&&(i=i.filter(A=>A===e.root||A.startsWith(`${e.root}.`)));let r=[],o="",n=0;const M={data:{name:"",id:""},children:[]},c={funcEnums:[],roomEnums:[],roles:[],ids:[],types:[],objects:s,customs:["_"],enums:[],hasSomeCustoms:!1,aliasesMap:{}};let l=M;for(let A=0;Ak.role===b)?typeof b!="string"?console.warn(`Invalid role type "${typeof b}" in "${h._id}"`):c.roles.push({role:b,type:O.type}):p.startsWith("enum.rooms.")?(c.roomEnums.push(p),c.enums.push(p)):p.startsWith("enum.functions.")?(c.funcEnums.push(p),c.enums.push(p)):h.type==="enum"?c.enums.push(p):h.type==="instance"&&O&&(O.supportCustoms||(N=O.adminUI)!=null&&N.custom)&&(c.hasSomeCustoms=!0,c.customs.push(p.substring(15))),p.startsWith("alias.")&&((u=h.common.alias)!=null&&u.id))if(typeof h.common.alias.id=="string"){const k=h.common.alias.id;c.aliasesMap[k]?c.aliasesMap[k].includes(p)||c.aliasesMap[k].push(p):c.aliasesMap[k]=[p]}else{const k=h.common.alias.id.read;k&&(c.aliasesMap[k]?c.aliasesMap[k].includes(p)||c.aliasesMap[k].push(p):c.aliasesMap[k]=[p]);const K=h.common.alias.id.write;K&&(c.aliasesMap[K]?c.aliasesMap[K].includes(p)||c.aliasesMap[K].push(p):c.aliasesMap[K]=[p])}}c.ids.push(p);let E;do if(E=!1,!o||p.startsWith(`${o}.`)){if(C.length-n>1){let b=o;for(let k=n;kK.data.name===C[k]));else{const K={data:{name:C[k],parent:l,id:b,obj:s[b],level:k,icon:G0(s,b,k,e.themeType,e.lang,t),generated:!0}};l.children||=[],l.children.push(K),l=K,c.ids.push(b)}}const O={data:{name:C[C.length-1],title:He((L=h==null?void 0:h.common)==null?void 0:L.name,e.lang),obj:h,parent:l,icon:_o(s,p,e.lang,t)||G0(s,p,0,e.themeType,e.lang,t),id:p,hasCustoms:!!((g=h.common)!=null&&g.custom&&Object.keys(h.common.custom).length),level:C.length-1,generated:!1,button:h.type==="state"&&!!((j=h.common)!=null&&j.role)&&typeof h.common.role=="string"&&h.common.role.startsWith("button")&&((y=h.common)==null?void 0:y.write)!==!1,switch:h.type==="state"&&((T=h.common)==null?void 0:T.type)==="boolean"&&((d=h.common)==null?void 0:d.write)!==!1&&((I=h.common)==null?void 0:I.read)!==!1,url:!!((w=h.common)!=null&&w.role)&&typeof h.common.role=="string"&&h.common.role.startsWith("url")}};l.children||=[],l.children.push(O),l=O,n=C.length,r=C,o=p}else{let O=0;for(;r[O]===C[O];)O++;if(O>0){let b=r.length;for(r=r.splice(0,O),n=O,o=r.join(".");b>O;)l.data.parent?l=l.data.parent:console.error(`Parent is null for ${p} ${o} ${r.join(".")}`),b--}else l=M,r=[],o="",n=0;E=!0}while(E)}return c.roomEnums.sort((A,p)=>{var E,O,b,k;const h=He((O=(E=s[A])==null?void 0:E.common)==null?void 0:O.name,e.lang)||A.split(".").pop(),C=He((k=(b=s[p])==null?void 0:b.common)==null?void 0:k.name,e.lang)||p.split(".").pop();return h>C?1:h{var E,O,b,k;const h=He((O=(E=s[A])==null?void 0:E.common)==null?void 0:O.name,e.lang)||A.split(".").pop(),C=He((k=(b=s[p])==null?void 0:b.common)==null?void 0:k.name,e.lang)||p.split(".").pop();return h>C?1:hA.role.localeCompare(p.role)),c.types.sort(),{info:c,root:M}}function ug(s,e,t,i,r){if(s.data.id===e)return s;if(t||(t=e.split("."),r=0,i=t[r]),!s.children&&s.data.id!==e)return null;let o;if(s.children)for(let n=0;ni)break}return o?(r||=0,ug(o,e,t,`${i}.${t[r+1]}`,r+1)):null}function lg(s,e,t,i){var n,M;if(!e)return{rooms:[],per:!1};i||=[];for(const c of s.roomEnums){const l=(n=s.objects[c])==null?void 0:n.common;if(!l)continue;const N=He(l.name,t);(M=l.members)!=null&&M.includes(e)&&!i.includes(N)&&i.push(N)}let r;const o=e.split(".");return o.pop(),e=o.join("."),s.objects[e]&&(r=i.length,lg(s,e,t,i)),{rooms:i,per:!r}}function Rs(s,e,t,i){var r,o;if(!e)return[];i||=[];for(let n=0;n946681200&&l<9466812e5&&(l*=1e3),l=l&&new Date(l).toString();else if(M!=null&&M.role&&typeof M.role=="string"&&M.role.match(/^value\.duration/)){if(typeof l=="number"&&l>=0){const j=Math.floor(l/3600),y=Math.floor(l%3600/60),T=Math.floor(l%60);l=`${j.toString().padStart(2,"0")}:${y.toString().padStart(2,"0")}:${T.toString().padStart(2,"0")}`}else if(typeof l=="string"&&m.isStringInteger(l)){const j=parseInt(l,10);if(j>=0){const y=Math.floor(j/3600),T=Math.floor(j%3600/60),d=Math.floor(j%60);l=`${y.toString().padStart(2,"0")}:${T.toString().padStart(2,"0")}:${d.toString().padStart(2,"0")}`}}}else N==="number"?Number.isInteger(l)||(l=Math.round(l*1e8)/1e8,i&&(l=l.toString().replace(".",","))):N==="object"?l=JSON.stringify(l):N!=="string"?l=l.toString():l.startsWith("data:image/")&&(c="image"),typeof l!="string"&&(l=l.toString());const u={v:l};n&&n[l]!==void 0&&l!==n[l]&&(u.s=l,l=n[l],u.v=l),((g=u.v)==null?void 0:g.length)>40&&(u.c=u.v,u.v=`${u.v.substring(0,40)}...`),M!=null&&M.unit&&(u.u=M.unit);let L;if(s.full&&(typeof l=="string"&&l.length>100?L=[{t:r.value,v:`${l.substring(0,100)}...`}]:L=[{t:r.value,v:l}],t)){if(t.ack!==void 0&&t.ack!==null&&L.push({t:r.ack,v:t.ack.toString()}),t.ts&&L.push({t:r.ts,v:t.ts?m.formatDate(new Date(t.ts),e):""}),t.lc&&L.push({t:r.lc,v:t.lc?m.formatDate(new Date(t.lc),e):""}),t.from){let j=t.from.toString();j.startsWith("system.adapter.")&&(j=j.substring(15)),L.push({t:r.from,v:j})}if(t.user){let j=t.user.toString();j.startsWith("system.user.")&&(j=j.substring(12)),L.push({t:r.user,v:j})}t.c&&L.push({t:r.c,v:t.c}),L.push({t:r.quality,v:m.quality2text(t.q||0).join(", "),nbr:!0})}return{valText:u,valFull:L,fileViewer:c}}function W5e(s){const{state:e}=s;return{color:e!=null&&e.ack?e.q?"#ffa500":"":s.nonAckColor||"#ff2222c9"}}function J5e(s,e){let t=e,i=1;const r=[];for(;i=t)r.push(0);else if(i1){const i=e.path;let r;const o=s;if(o[i[0]]&&typeof o[i[0]]=="object")return i.length===2?r=o[i[0]][i[1]]:i.length===3?r=o[i[0]][i[1]]&&typeof o[i[0]][i[1]]=="object"?o[i[0]][i[1]][i[2]]:null:i.length===4?r=o[i[0]][i[1]]&&typeof o[i[0]][i[1]]=="object"&&o[i[0]][i[1]][i[2]]?o[i[0]][i[1]][i[2]][i[3]]:null:i.length===5?r=o[i[0]][i[1]]&&typeof o[i[0]][i[1]]=="object"&&o[i[0]][i[1]][i[2]]&&o[i[0]][i[1]][i[2]][i[3]]?o[i[0]][i[1]][i[2]][i[3]][i[4]]:null:i.length===6&&(r=o[i[0]][i[1]]&&typeof o[i[0]][i[1]]=="object"&&o[i[0]][i[1]][i[2]]&&o[i[0]][i[1]][i[2]][i[3]]&&o[i[0]][i[1]][i[2]][i[3]][i[4]]?o[i[0]][i[1]][i[2]][i[3]][i[4]][i[5]]:null),r??null}return null}function B5e(s,e,t){var i;if((i=s==null?void 0:s._id)!=null&&i.startsWith(`${e.adapter}.`)&&e.path.length>1){const r=e.path,o=s;if(o[r[0]]&&typeof o[r[0]]=="object"){if(r.length===2)return o[r[0]][r[1]]=t,!0;if(r.length===3){if(o[r[0]][r[1]]&&typeof o[r[0]][r[1]]=="object")return o[r[0]][r[1]][r[2]]=t,!0}else if(r.length===4){if(o[r[0]][r[1]]&&typeof o[r[0]][r[1]]=="object"&&o[r[0]][r[1]][r[2]]&&typeof o[r[0]][r[1]][r[2]]=="object")return o[r[0]][r[1]][r[2]][r[3]]=t,!0}else if(r.length===5){if(o[r[0]][r[1]]&&typeof o[r[0]][r[1]]=="object"&&o[r[0]][r[1]][r[2]]&&typeof o[r[0]][r[1]][r[2]]=="object"&&o[r[0]][r[1]][r[2]][r[3]]&&typeof o[r[0]][r[1]][r[2]][r[3]]=="object")return o[r[0]][r[1]][r[2]][r[3]][r[4]]=t,!0}else if(r.length===6&&o[r[0]][r[1]]&&typeof o[r[0]][r[1]]=="object"&&o[r[0]][r[1]][r[2]]&&typeof o[r[0]][r[1]][r[2]]=="object"&&o[r[0]][r[1]][r[2]][r[3]]&&typeof o[r[0]][r[1]][r[2]][r[3]]=="object"&&o[r[0]][r[1]][r[2]][r[3]][r[4]]&&typeof o[r[0]][r[1]][r[2]][r[3]][r[4]]=="object")return o[r[0]][r[1]][r[2]][r[3]][r[4]][r[5]]=t,!0}}return!1}function Z0(s){return!!v5e.find(e=>s.startsWith(e))}const R5e=16,Ie=20,Lg="#ff413c",gg="#86211f",Sa="#57ff45",ka="#098c04",va="#f3ad11",Ya="#6c5008",z={toolbar:{minHeight:38},toolbarButtons:{padding:4,marginLeft:4},switchColumnAuto:{marginLeft:16},dialogColumns:{transition:"opacity 1s"},dialogColumnsLabel:{fontSize:12,paddingTop:8},columnCustom:{width:"100%",display:"inline-block"},columnCustomEditable:{cursor:"text"},columnCustom_center:{textAlign:"center"},columnCustom_left:{textAlign:"left"},columnCustom_right:{textAlign:"right"},width100:{width:"100%"},transparent_10:{opacity:.1},transparent_20:{opacity:.2},transparent_30:{opacity:.3},transparent_40:{opacity:.4},transparent_50:{opacity:.5},transparent_60:{opacity:.6},transparent_70:{opacity:.7},transparent_80:{opacity:.8},transparent_90:{opacity:.9},transparent_100:{opacity:1},headerRow:{paddingLeft:8,height:38,whiteSpace:"nowrap",userSelect:"none"},buttonClearFilter:{position:"relative",float:"right",padding:0},buttonClearFilterIcon:{zIndex:2,position:"absolute",top:0,left:0,color:"#FF0000",opacity:.7},tableDiv:{paddingTop:0,paddingLeft:0,width:"calc(100% - 8px)",height:"calc(100% - 38px)",overflow:"auto"},tableRow:s=>({pl:1,height:$e,lineHeight:`${$e}px`,verticalAlign:"top",userSelect:"none",position:"relative",width:"100%","&:hover":{background:`${s.palette.mode==="dark"?s.palette.primary.dark:s.palette.primary.light} !important`,color:m.invertColor(s.palette.primary.main,!0)},whiteSpace:"nowrap",flexWrap:"nowrap"}),tableRowLines:s=>({borderBottom:`1px solid ${s.palette.mode==="dark","#8888882e"}`,"& > div":{borderRight:`1px solid ${s.palette.mode==="dark","#8888882e"}`}}),tableRowNoDragging:{cursor:"pointer"},tableRowAlias:{height:$e+10},tableRowAliasReadWrite:{height:$e+22},tableRowFocused:s=>({"&:after":{content:'""',position:"absolute",top:1,left:1,right:1,bottom:1,border:s.palette.mode?"1px dotted #000":"1px dotted #FFF"}}),checkBox:{padding:0},cellId:{position:"relative",fontSize:"1rem",overflow:"hidden",textOverflow:"ellipsis","& .copyButton":{display:"none"},"&:hover .copyButton":{display:"block"},"& .iconOwn":{display:"block",width:$e-4,height:$e-4,mt:"2px",float:"right"},"&:hover .iconOwn":{display:"none"},"& *":{width:"initial"}},cellIdSpan:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},cellIdIconFolder:s=>({marginRight:8,width:$e-4,height:$e-4,cursor:"pointer",color:s.palette.secondary.main||"#fbff7d",verticalAlign:"top"}),cellIdIconDocument:{verticalAlign:"middle",marginLeft:($e-Ie)/2,marginRight:8,width:Ie,height:Ie},cellIdIconOwn:{},cellCopyButton:{width:Ie,height:Ie,top:($e-Ie)/2,opacity:.8,position:"absolute",right:3},cellCopyButtonInDetails:{width:Ie,height:Ie,top:($e-Ie)/2,opacity:.8},cellEditButton:{width:Ie,height:Ie,color:"white",position:"absolute",top:($e-Ie)/2,right:Ie+3,opacity:.7,"&:hover":{opacity:1}},cellName:{display:"inline-block",verticalAlign:"top",fontSize:14,ml:"5px",overflow:"hidden",textOverflow:"ellipsis",position:"relative","& .copyButton":{display:"none"},"&:hover .copyButton":{display:"block"}},cellNameWithDesc:{lineHeight:"normal"},cellNameDivDiv:{},cellDescription:{fontSize:10,opacity:.5,fontStyle:"italic"},cellIdAlias:s=>({fontStyle:"italic",fontSize:12,opacity:.7,"&:hover":{color:s.palette.mode==="dark"?"#009900":"#007700"}}),cellIdAliasReadWriteDiv:{height:24,marginTop:-5},cellIdAliasAlone:{lineHeight:0},cellIdAliasReadWrite:{lineHeight:"12px"},cellType:{display:"inline-block",verticalAlign:"top","& .itemIcon":{verticalAlign:"middle",width:Li,height:Li,display:"inline-block"},"& .itemIconFolder":{marginLeft:3}},cellRole:{display:"inline-block",verticalAlign:"top",textOverflow:"ellipsis",overflow:"hidden"},cellRoom:{display:"inline-block",verticalAlign:"top",textOverflow:"ellipsis",overflow:"hidden"},cellEnumParent:{opacity:.4},cellFunc:{display:"inline-block",verticalAlign:"top",textOverflow:"ellipsis",overflow:"hidden"},cellValue:{display:"inline-block",verticalAlign:"top",textOverflow:"ellipsis",overflow:"hidden"},cellValueButton:{marginTop:5},cellValueButtonFalse:{opacity:.3},cellAdapter:{display:"inline-block",verticalAlign:"top"},cellValueTooltip:{fontSize:12},cellValueText:{width:"100%",height:$e,fontSize:16,display:"flex",overflow:"hidden",textOverflow:"ellipsis",position:"relative",verticalAlign:"top","& .copyButton":{display:"none"},"&:hover .copyButton":{display:"block"}},cellValueFile:{color:"#2837b9"},cellValueTooltipTitle:{fontStyle:"italic",width:100,display:"inline-block"},cellValueTooltipValue:{width:120,display:"inline-block",whiteSpace:"nowrap",textOverflow:"ellipsis"},cellValueTooltipImage:{width:100,height:"auto"},cellValueTooltipBoth:{width:220,display:"inline-block",whiteSpace:"nowrap"},cellValueTooltipBox:{width:250,overflow:"hidden",pointerEvents:"none"},tooltip:{pointerEvents:"none"},cellValueTextUnit:{marginLeft:4,opacity:.8,display:"inline-block"},cellValueTextState:{opacity:.7},cellValueTooltipCopy:{position:"absolute",bottom:3,right:3},cellValueTooltipEdit:{position:"absolute",bottom:3,right:15},cellButtons:{display:"inline-block",verticalAlign:"top"},cellButtonsButton:{display:"inline-block",opacity:.5,width:Ie+4,height:Ie+4,"&:hover":{opacity:1},p:0,mt:"-2px"},cellButtonsEmptyButton:{fontSize:12},cellButtonMinWidth:{minWidth:40},cellButtonsButtonAlone:{ml:`${Ie+6}px`,pt:0,mt:"-2px"},cellButtonsButtonWithCustoms:s=>({color:s.palette.mode==="dark"?s.palette.primary.main:s.palette.secondary.main}),cellButtonsButtonWithoutCustoms:{opacity:.2},cellButtonsValueButton:s=>({position:"absolute",top:Ie/2-2,opacity:.7,width:Ie-2,height:Ie-2,color:s.palette.action.active,"&:hover":{opacity:1}}),cellButtonsValueButtonCopy:{right:8,cursor:"pointer"},cellButtonsValueButtonEdit:{right:Ie/2+16},cellDetailsLine:{display:"flex",alignItems:"center",width:"100%",height:32,fontSize:16},cellDetailsName:{fontWeight:"bold",marginRight:8,minWidth:80},filteredOut:{opacity:.5},filteredParentOut:{opacity:.3},filterInput:{mt:0,mb:0},selectIcon:{width:24,height:24,marginRight:4},itemSelected:s=>({background:`${s.palette.primary.main} !important`,color:`${m.invertColor(s.palette.primary.main,!0)} !important`}),header:{width:"100%"},headerCell:{display:"inline-block",verticalAlign:"top"},headerCellValue:{paddingTop:4,fontSize:16},visibleButtons:{color:"#2196f3",opacity:.7},grow:{flexGrow:1},enumIconDiv:{marginRight:8,width:32,height:32,borderRadius:8,background:"#FFFFFF"},enumIcon:{marginTop:4,marginLeft:4,width:24,height:24},enumDialog:{overflow:"hidden"},enumList:{minWidth:250,height:"calc(100% - 50px)",overflow:"auto"},enumCheckbox:{minWidth:0},buttonDiv:{display:"flex",height:"100%",alignItems:"center"},aclText:{fontSize:13,marginTop:6},rightsObject:{color:"#55ff55",paddingLeft:3},rightsState:{color:"#86b6ff",paddingLeft:3},textCenter:{padding:12,textAlign:"center"},tooltipAccessControl:{display:"flex",flexDirection:"column"},fontSizeTitle:{"@media screen and (max-width: 465px)":{"& *":{fontSize:12}}},draggable:{cursor:"copy"},nonDraggable:{cursor:"no-drop"},iconDeviceConnected:s=>({color:s.palette.mode==="dark"?Sa:ka,opacity:.8,position:"absolute",top:4,right:32,width:20}),iconDeviceDisconnected:s=>({color:s.palette.mode==="dark"?va:Ya,opacity:.8,position:"absolute",top:4,right:32,width:20}),iconDeviceError:s=>({color:s.palette.mode==="dark"?Lg:gg,opacity:.8,position:"absolute",top:4,right:50,width:20}),resizeHandle:{display:"block",position:"absolute",cursor:"col-resize",width:7,top:2,bottom:2,zIndex:1},resizeHandleRight:{right:3,borderRight:"2px dotted #888","&:hover":{borderColor:"#ccc",borderRightStyle:"solid"},"&.active":{borderColor:"#517ea5",borderRightStyle:"solid"}},invertedBackground:s=>({backgroundColor:s.palette.mode==="dark"?"#9a9a9a":"#565656",padding:"0 3px",borderRadius:"2px 0 0 2px"}),invertedBackgroundFlex:s=>({backgroundColor:s.palette.mode==="dark"?"#9a9a9a":"#565656",borderRadius:"0 2px 2px 0"}),contextMenuEdit:s=>({color:s.palette.mode==="dark"?"#ffee48":"#cbb801"}),contextMenuEditValue:s=>({color:s.palette.mode==="dark"?"#5dff45":"#1cd301"}),contextMenuView:s=>({color:s.palette.mode==="dark"?"#FFF":"#000"}),contextMenuCustom:s=>({color:s.palette.mode==="dark"?"#42eaff":"#01bbc2"}),contextMenuACL:s=>({color:s.palette.mode==="dark"?"#e079ff":"#500070"}),contextMenuRoom:s=>({color:s.palette.mode==="dark"?"#ff9a33":"#642a00"}),contextMenuRole:s=>({color:s.palette.mode==="dark"?"#ffdb43":"#562d00"}),contextMenuDelete:s=>({color:s.palette.mode==="dark"?"#ff4f4f":"#cf0000"}),contextMenuKeys:{marginLeft:8,opacity:.7,fontSize:"smaller"},contextMenuWithSubMenu:{display:"flex"},...ss},X0={state:a.createElement(rr,{className:"itemIcon",style:{verticalAlign:"middle"}}),channel:a.createElement(sg,{className:"itemIcon",style:{verticalAlign:"middle"}}),device:a.createElement(ig,{className:"itemIcon",style:{verticalAlign:"middle"}}),adapter:a.createElement(A5e,{className:"itemIcon",style:{verticalAlign:"middle"}}),meta:a.createElement(Yo,{className:"itemIcon",style:{verticalAlign:"middle"}}),instance:a.createElement(O5e,{className:"itemIcon",style:{color:"#7da7ff",verticalAlign:"middle"}}),enum:a.createElement(ay,{className:"itemIcon",style:{verticalAlign:"middle"}}),chart:a.createElement(Ly,{className:"itemIcon",style:{verticalAlign:"middle"}}),config:a.createElement(qn,{className:"itemIcon",style:{verticalAlign:"middle"}}),group:a.createElement(rM,{className:"itemIcon",style:{verticalAlign:"middle"}}),user:a.createElement(sM,{className:"itemIcon",style:{verticalAlign:"middle"}}),host:a.createElement(iM,{className:"itemIcon",style:{verticalAlign:"middle"}}),schedule:a.createElement(Bj,{className:"itemIcon",style:{verticalAlign:"middle"}}),script:a.createElement(qa,{className:"itemIcon",style:{verticalAlign:"middle"}}),folder:a.createElement(Ti,{className:"itemIcon itemIconFolder",style:{verticalAlign:"middle"}})},ze={xs:{idWidth:"100%",fields:[],widths:{}},sm:{idWidth:300,fields:["room","val"],widths:{room:100,val:200}},md:{idWidth:300,fields:["room","func","val","buttons"],widths:{name:200,room:150,func:150,val:120,buttons:120}},lg:{idWidth:300,fields:["name","type","role","room","func","val","buttons","changedFrom","qualityCode","timestamp","lastChange"],widths:{name:300,type:80,role:120,room:180,func:180,val:140,buttons:120,changedFrom:120,qualityCode:100,timestamp:165,lastChange:165}},xl:{idWidth:550,fields:["name","type","role","room","func","val","buttons","changedFrom","qualityCode","timestamp","lastChange"],widths:{name:400,type:80,role:120,room:180,func:180,val:140,buttons:120,changedFrom:120,qualityCode:100,timestamp:170,lastChange:170}}};let K0=!1;const Fs={id:"",name:"",room:[],func:[],role:[],type:[],custom:[],expertMode:!1};class xo extends De{info={funcEnums:[],roomEnums:[],roles:[],ids:[],types:[],objects:{},customs:[],enums:[],hasSomeCustoms:!1,aliasesMap:{}};localStorage=window._localStorage||window.localStorage;tableRef;pausedSubscribes=!1;selectFirst;root=null;states={};subscribes=[];unsubscribeTimer=null;statesUpdateTimer=null;objectsUpdateTimer=null;visibleCols;texts;possibleCols;imagePrefix;adapterColumns=[];styleTheme="";edit={id:"",val:"",q:0,ack:!1};levelPadding;customWidth=!1;resizeTimeout=null;resizerNextName=null;resizerActiveName=null;resizerCurrentWidths={};resizeLeft=!1;resizerOldWidth=0;resizerMin=0;resizerNextMin=0;resizerOldWidthNext=0;resizerPosition=0;resizerActiveDiv=null;resizerNextDiv=null;storedWidths=null;systemConfig;objects;defaultHistory="";ctrlPressed=!1;columnsVisibility={};changedIds=null;contextMenu=null;recordStates=[];styles={};expertMode=!1;customColumnDialog=null;constructor(e){super(e);const t=this.localStorage.getItem(`${e.dialogName||"App"}.objectSelected`)||"";if(this.selectFirst="",this.expertMode=!!this.props.expertMode,t.startsWith("["))try{const T=JSON.parse(t);this.selectFirst=T[0]||""}catch{}else this.selectFirst=t;let i;const r=this.localStorage.getItem(`${e.dialogName||"App"}.objectExpanded`)||"[]";try{i=JSON.parse(r)}catch{i=[]}let o;const n=e.defaultFilters?"":this.localStorage.getItem(`${e.dialogName||"App"}.objectFilter`)||"";if(n)try{o=JSON.parse(n)}catch{o={...Fs}}else e.defaultFilters&&typeof e.defaultFilters=="object"?o={...e.defaultFilters}:o={...Fs};if(typeof o.room=="string"&&o.room&&(o.room=[o.room].filter(T=>T),o.room.length||delete o.room),typeof o.func=="string"&&o.func&&(o.func=[o.func].filter(T=>T),o.func.length||delete o.func),typeof o.role=="string"&&o.role&&(o.role=[o.role].filter(T=>T),o.role.length||delete o.role),typeof o.type=="string"&&(o.type=[o.type].filter(T=>T),o.type.length||delete o.type),typeof o.custom=="string"&&(o.custom=[o.custom].filter(T=>T),o.custom.length||delete o.custom),o.expertMode=e.expertMode!==void 0?e.expertMode:(window._sessionStorage||window.sessionStorage).getItem("App.expertMode")==="true",this.tableRef=IN(),this.visibleCols=e.columns||ze[e.width||"lg"].fields,e.types&&e.types.length===1){const T=this.visibleCols.indexOf("type");T!==-1&&this.visibleCols.splice(T,1)}this.possibleCols=ze.xl.fields;let M=null;if(e.router){const T=e.router.getLocation();T.id&&T.dialog==="customs"&&(M=[T.id],this.pauseSubscribe(!0))}let c;Array.isArray(e.selected)?c=e.selected:c=[e.selected||""],c=c.map(T=>T.replace(/["']/g,"")).filter(T=>T),this.selectFirst=c.length&&c[0]?c[0]:this.selectFirst;const l=this.localStorage.getItem(`${e.dialogName||"App"}.columns`);let N;try{N=l?JSON.parse(l):null}catch{N=null}let u=null;try{u=u?JSON.parse(u):{}}catch{u={}}this.imagePrefix=e.imagePrefix||".";let L;const g=this.localStorage.getItem(`${e.dialogName||"App"}.foldersFirst`);g==="false"?L=!1:g==="true"?L=!0:L=e.foldersFirst===void 0?!0:e.foldersFirst;let j=!1;try{j=this.props.objectStatesView&&JSON.parse(this.localStorage.getItem(`${e.dialogName||"App"}.objectStatesView`)||"")||!1}catch{}this.state={aliasMenu:"",beautifyJsonExport:!0,columns:N,columnsAuto:this.localStorage.getItem(`${e.dialogName||"App"}.columnsAuto`)!=="false",columnsDialogTransparent:100,columnsEditCustomDialog:null,columnsForAdmin:null,columnsSelectorShow:!1,columnsWidths:u,customColumnDialogValueChanged:!1,customDialog:M,depth:0,editObjectAlias:!1,editObjectDialog:"",enumDialog:null,excludeSystemRepositoriesFromExport:!0,excludeTranslations:!1,expandAllVisible:!1,expanded:i,filter:o,filterKey:0,focused:this.localStorage.getItem(`${e.dialogName||"App"}.focused`)||"",foldersFirst:L,linesEnabled:this.localStorage.getItem(`${e.dialogName||"App"}.lines`)==="true",loaded:!1,noStatesByExportImport:!1,roleDialog:null,scrollBarWidth:16,selected:c,selectedNonObject:this.localStorage.getItem(`${e.dialogName||"App"}.selectedNonObject`)||"",showAliasEditor:"",showAllExportOptions:!1,showContextMenu:null,showDescription:this.localStorage.getItem(`${e.dialogName||"App"}.desc`)!=="false",showExportDialog:!1,showImportDialog:!1,showImportMenu:null,showRenameDialog:null,statesView:j,toast:"",tooltipInfo:null,viewFileDialog:""},this.texts={name:e.t("ra_Name"),categories:e.t("ra_Categories"),value:e.t("ra_tooltip_value"),ack:e.t("ra_tooltip_ack"),ts:e.t("ra_tooltip_ts"),lc:e.t("ra_tooltip_lc"),from:e.t("ra_tooltip_from"),user:e.t("ra_tooltip_user"),c:e.t("ra_tooltip_comment"),quality:e.t("ra_tooltip_quality"),editObject:e.t("ra_tooltip_editObject"),deleteObject:e.t("ra_tooltip_deleteObject"),customConfig:e.t("ra_tooltip_customConfig"),copyState:e.t("ra_tooltip_copyState"),editState:e.t("ra_tooltip_editState"),ctrlForLink:e.t("ra_tooltip_ctrlForLink"),close:e.t("ra_Close"),filter_id:e.t("ra_filter_id"),filter_name:e.t("ra_filter_name"),filter_type:e.t("ra_filter_type"),filter_role:e.t("ra_filter_role"),filter_room:e.t("ra_filter_room"),filter_func:e.t("ra_filter_func"),filter_custom:e.t("ra_filter_customs"),filterCustomsWithout:e.t("ra_filter_customs_without"),objectChangedByUser:e.t("ra_object_changed_by_user"),objectChangedBy:e.t("ra_object_changed_by"),objectChangedFrom:e.t("ra_state_changed_from"),stateChangedBy:e.t("ra_state_changed_by"),stateChangedFrom:e.t("ra_state_changed_from"),ownerGroup:e.t("ra_Owner group"),ownerUser:e.t("ra_Owner user"),showAll:e.t("ra_show_all"),deviceError:e.t("ra_Error"),deviceDisconnected:e.t("ra_Disconnected"),deviceConnected:e.t("ra_Connected"),aclOwner_read_object:e.t("ra_aclOwner_read_object"),aclOwner_read_state:e.t("ra_aclOwner_read_state"),aclOwner_write_object:e.t("ra_aclOwner_write_object"),aclOwner_write_state:e.t("ra_aclOwner_write_state"),aclGroup_read_object:e.t("ra_aclGroup_read_object"),aclGroup_read_state:e.t("ra_aclGroup_read_state"),aclGroup_write_object:e.t("ra_aclGroup_write_object"),aclGroup_write_state:e.t("ra_aclGroup_write_state"),aclEveryone_read_object:e.t("ra_aclEveryone_read_object"),aclEveryone_read_state:e.t("ra_aclEveryone_read_state"),aclEveryone_write_object:e.t("ra_aclEveryone_write_object"),aclEveryone_write_state:e.t("ra_aclEveryone_write_state"),create:e.t("ra_Create"),createBooleanState:e.t("ra_create_boolean_state"),createNumberState:e.t("ra_create_number_state"),createStringState:e.t("ra_create_string_state"),createState:e.t("ra_create_state"),createChannel:e.t("ra_create_channel"),createDevice:e.t("ra_create_device"),createFolder:e.t("ra_Create folder")},this.levelPadding=e.levelPadding||R5e;const y=this.localStorage.getItem(`${this.props.dialogName||"App"}.table`);if(y)try{const T=JSON.parse(y),d=this.props.width||"lg";this.storedWidths=JSON.parse(JSON.stringify(ze[d])),Object.keys(T).forEach(I=>{I==="id"?ze[d].idWidth=T.id:I==="nameHeader"?ze[d].widths.name=T[I]:ze[d].widths[I]!==void 0&&(ze[d].widths[I]=T[I])}),this.customWidth=!0}catch{}this.calculateColumnsVisibility()}async loadAllObjects(e){var i;const t=this.props;try{await new Promise(l=>{this.setState({updating:!0},()=>l())});const r=(t.objectsWorker?await t.objectsWorker.getObjects(e):await t.socket.getObjects(e,!0))||{};if(t.types&&ke.isWeb())for(let l=0;l{try{if(l(r[N]))this.objects[N]=r[N];else{const u=r[N]&&r[N].type;u&&(u==="channel"||u==="device"||u==="folder"||u==="adapter"||u==="instance")&&(this.objects[N]=r[N])}}catch(u){console.log(`Error by filtering of "${N}": ${u}`)}})}else if(t.types){this.objects={};const l=t.types;Object.keys(r).forEach(N=>{var L;const u=(L=r[N])==null?void 0:L.type;u&&(u==="channel"||u==="device"||u==="enum"||u==="folder"||u==="adapter"||u==="instance"||l.includes(u))&&(this.objects[N]=r[N])})}else this.objects=r;t.setObjectsReference&&t.setObjectsReference(this.objects),this.defaultHistory=this.systemConfig.common.defaultHistory,this.defaultHistory&&t.socket.getState(`system.adapter.${this.defaultHistory}.alive`).then(l=>{l!=null&&l.val||(this.defaultHistory="")}).catch(l=>window.alert(`Cannot get state: ${l}`));const o=await this.getAdditionalColumns();this.calculateColumnsVisibility(null,null,o);const{info:n,root:M}=H0(this.objects,{imagePrefix:t.imagePrefix,root:t.root,lang:t.lang,themeType:t.themeType});this.root=M,this.info=n;const c=((i=this.state.selected)==null?void 0:i.length)&&ug(this.root,this.state.selected[0]);c&&!xa(c,this.state.filter,t.lang,this.objects,void 0,void 0,t.customFilter,t.types)?this.setState({filter:{...Fs},columnsForAdmin:o},()=>{this.doFilter(),this.setState({loaded:!0,updating:!1},()=>this.expandAllSelected(()=>this.onAfterSelect()))}):(this.doFilter(),this.setState({loaded:!0,updating:!1,columnsForAdmin:o},()=>this.expandAllSelected(()=>this.onAfterSelect())))}catch(r){this.showError(r)}}expandAllSelected(e){const t=[...this.state.expanded];let i=!1;this.state.selected.forEach(r=>{const o=r.split("."),n=[];for(let M=0;M!this.objects[N]))&&((c=(M=this.props).onSelect)==null||c.call(M,this.state.selected,null,e))}else this.localStorage.removeItem(`${this.props.dialogName||"App"}.objectSelected`),this.state.selected.length?this.setState({selected:[]},()=>{this.props.onSelect&&(this.state.focused&&this.props.allowNonObjects?(this.selectFirst&&this.selectFirst!==this.state.selected[0]&&(this.selectFirst=""),this.props.onSelect([this.state.focused],null,e)):this.props.onSelect([],""))}):this.props.onSelect&&(this.state.focused&&this.props.allowNonObjects?(this.selectFirst&&this.selectFirst!==this.state.selected[0]&&(this.selectFirst=""),this.props.onSelect([this.state.focused],null,e)):this.props.onSelect([],""))}static getDerivedStateFromProps(e,t){const i={};let r=!1;return e.expertMode!==void 0&&e.expertMode!==t.filter.expertMode&&(r=!0,i.filter={...t.filter},i.filter.expertMode=e.expertMode),r?i:null}async componentDidMount(){await this.loadAllObjects(!K0),this.props.objectsWorker?this.props.objectsWorker.registerHandler(this.onObjectChangeFromWorker):await this.props.socket.subscribeObject("*",this.onObjectChange),K0=!0,window.addEventListener("contextmenu",this.onContextMenu,!0),window.addEventListener("keydown",this.onKeyPress,!0),window.addEventListener("keyup",this.onKeyPress,!0),this.props.onAllLoaded&&setTimeout(()=>{var e,t;(t=(e=this.props).onAllLoaded)==null||t.call(e)},100)}onKeyPress=e=>{e.type==="keydown"&&e.ctrlKey&&!this.ctrlPressed?(this.ctrlPressed=!0,this.tableRef.current&&(this.tableRef.current.className="highlight-link")):e.type==="keyup"&&!e.ctrlKey&&this.ctrlPressed&&(this.ctrlPressed=!1,this.tableRef.current&&(this.tableRef.current.className=""))};componentWillUnmount(){window.removeEventListener("contextmenu",this.onContextMenu,!0),window.removeEventListener("keydown",this.onKeyPress,!0),window.removeEventListener("keyup",this.onKeyPress,!0),this.props.objectsWorker?this.props.objectsWorker.unregisterHandler(this.onObjectChangeFromWorker,!0):this.props.socket.unsubscribeObject("*",this.onObjectChange).catch(e=>console.error(`Cannot unsubscribe *: ${e}`)),this.subscribes.forEach(e=>{this.props.socket.unsubscribeState(e,this.onStateChange)}),this.subscribes=[],this.objects={}}showDeleteDialog(e){var c,l,N,u;const{id:t,obj:i,item:r}=e,o=Object.keys(this.objects);o.sort();let n=0;const M=`${t}.`;for(let L=0;LM)break;(u=(N=this.props).onObjectDelete)==null||u.call(N,t,!!((c=r.children)!=null&&c.length),!((l=i.common)!=null&&l.dontDelete),n+1)}onContextMenu=e=>{this.contextMenu&&Date.now()-this.contextMenu.ts<2e3?(e.preventDefault(),this.setState({showContextMenu:{item:this.contextMenu.item,position:{left:e.clientX+2,top:e.clientY-6}}})):this.state.showContextMenu&&(e.preventDefault(),this.setState({showContextMenu:null})),this.contextMenu=null};refreshComponent(){this.subscribes.forEach(e=>{this.props.socket.unsubscribeState(e,this.onStateChange)}),this.subscribes=[],this.loadAllObjects(!0).then(()=>console.log("updated!")).catch(e=>this.showError(e))}renderErrorDialog(){return this.state.error?a.createElement(Ae,{open:!0,maxWidth:"sm",fullWidth:!0,onClose:()=>this.setState({error:""}),"aria-labelledby":"error-dialog-title","aria-describedby":"error-dialog-description"},a.createElement(fe,{id:"alert-dialog-title"},this.props.t("ra_Error")),a.createElement(_e,null,a.createElement(as,{id:"alert-dialog-description"},this.state.error)),a.createElement(xe,null,a.createElement(q,{variant:"contained",onClick:()=>this.setState({error:""}),color:"primary",autoFocus:!0,startIcon:a.createElement(We,null)},this.props.t("ra_Ok")))):null}showError(e){this.setState({error:typeof e=="object"?e&&typeof e.toString=="function"?e.toString():JSON.stringify(e):e})}onSelect(e,t,i){if(this.localStorage.setItem(`${this.props.dialogName||"App"}.focused`,e),!this.props.multiSelect)this.objects[e]&&(!this.props.types||this.props.types.includes(this.objects[e].type))?(this.localStorage.removeItem(`${this.props.dialogName||"App"}.selectedNonObject`),this.state.selected[0]!==e?this.setState({selected:[e],selectedNonObject:"",focused:e},()=>{this.onAfterSelect(t),i&&i()}):t&&this.props.onSelect&&this.onAfterSelect(t)):(this.localStorage.setItem(`${this.props.dialogName||"App"}.selectedNonObject`,e),this.setState({selected:[],selectedNonObject:e,focused:e},()=>{this.onAfterSelect(),i&&i()}));else if(this.objects[e]&&(!this.props.types||this.props.types.includes(this.objects[e].type))){this.localStorage.removeItem(`${this.props.dialogName||"App"}.selectedNonObject`);const r=[...this.state.selected],o=r.indexOf(e);o===-1?(r.push(e),r.sort()):t||r.splice(o,1),this.setState({selected:r,selectedNonObject:"",focused:e},()=>{this.onAfterSelect(t),i&&i()})}}_renderDefinedList(e){const t=[...this.possibleCols];if(t.unshift("id"),this.props.columns&&!this.props.columns.includes("buttons")){const i=t.indexOf("buttons");i!==-1&&t.splice(i,1)}return t.filter(i=>e&&(i==="val"||i==="buttons")||!e&&i!=="val"&&i!=="buttons").map(i=>{var r;return a.createElement(_c,{onClick:()=>{if(!this.state.columnsAuto&&i!=="id"){const o=[...this.state.columns||[]],n=o.indexOf(i);n===-1?(o.push(i),o.sort()):o.splice(n,1),this.localStorage.setItem(`${this.props.dialogName||"App"}.columns`,JSON.stringify(o)),this.calculateColumnsVisibility(null,o),this.setState({columns:o})}},key:i},a.createElement(ue,{edge:"start",disabled:i==="id"||this.state.columnsAuto,checked:i==="id"||!!(this.state.columnsAuto?this.visibleCols.includes(i):(r=this.state.columns)!=null&&r.includes(i)),disableRipple:!0}),a.createElement(dt,{primary:this.texts[`filter_${i}`]||this.props.t(`ra_${i}`)}))})}renderColumnsSelectorDialog(){return this.state.columnsSelectorShow?a.createElement(Ae,{onClose:()=>this.setState({columnsSelectorShow:!1}),open:!0,sx:{"& .MuiPaper-root":m.getStyle(this.props.theme,z.dialogColumns,z[`transparent_${this.state.columnsDialogTransparent}`])}},a.createElement(fe,{sx:z.fontSizeTitle},this.props.t("ra_Configure")),a.createElement(_e,{sx:z.fontSizeTitle},a.createElement(V,{style:z.switchColumnAuto,control:a.createElement(br,{checked:this.state.foldersFirst,onChange:()=>{this.localStorage.setItem(`${this.props.dialogName||"App"}.foldersFirst`,this.state.foldersFirst?"false":"true"),this.setState({foldersFirst:!this.state.foldersFirst})}}),label:this.props.t("ra_Folders always first")}),a.createElement(V,{style:z.switchColumnAuto,control:a.createElement(br,{checked:this.state.linesEnabled,onChange:()=>{this.localStorage.setItem(`${this.props.dialogName||"App"}.lines`,this.state.linesEnabled?"false":"true"),this.setState({linesEnabled:!this.state.linesEnabled})}}),label:this.props.t("ra_Show lines between rows")}),a.createElement(V,{style:z.switchColumnAuto,control:a.createElement(br,{checked:this.state.columnsAuto,onChange:()=>{this.localStorage.setItem(`${this.props.dialogName||"App"}.columnsAuto`,this.state.columnsAuto?"false":"true"),this.state.columnsAuto?this.state.columns?(this.calculateColumnsVisibility(!1),this.setState({columnsAuto:!1})):(this.calculateColumnsVisibility(!1,[...this.visibleCols]),this.setState({columnsAuto:!1,columns:[...this.visibleCols]})):(this.calculateColumnsVisibility(!0),this.setState({columnsAuto:!0}))}}),label:this.props.t("ra_Auto (no custom columns)")}),a.createElement(xc,null,this._renderDefinedList(!1),this.state.columnsForAdmin&&Object.keys(this.state.columnsForAdmin).sort().map(e=>{var t;return(t=this.state.columnsForAdmin)==null?void 0:t[e].map(i=>{var r;return a.createElement(_c,{onClick:()=>{if(!this.state.columnsAuto){const o=[...this.state.columns||[]],n=`_${e}_${i.path}`,M=o.indexOf(n);M===-1?(o.push(n),o.sort()):o.splice(M,1),this.calculateColumnsVisibility(null,o),this.localStorage.setItem(`${this.props.dialogName||"App"}.columns`,JSON.stringify(o)),this.setState({columns:o})}},key:`${e}_${i.name}`},a.createElement(Xt,null,a.createElement(ue,{disabled:this.state.columnsAuto,edge:"start",checked:!this.state.columnsAuto&&((r=this.state.columns)==null?void 0:r.includes(`_${e}_${i.path}`)),disableRipple:!0})),a.createElement(dt,{primary:`${i.name} (${e})`}))})}),this._renderDefinedList(!0))),a.createElement(xe,null,a.createElement(q,{variant:"contained",onClick:()=>this.setState({columnsSelectorShow:!1}),color:"primary",startIcon:a.createElement(we,null)},this.texts.close))):null}async getAdditionalColumns(){try{const e=await this.props.socket.getAdapters();let t=null;return e.forEach(i=>t=this.parseObjectForAdmins(t,i)),t}catch(e){return console.error(`Cannot get adapters: ${e}`),null}}checkUnsubscribes(){for(let e=this.subscribes.length-1;e>=0;e--)this.recordStates.includes(this.subscribes[e])||this.unsubscribe(this.subscribes[e]);this.recordStates=[]}findItem(e,t,i,r){if(t||=e.split("."),i||=this.root,!i||!t.length)return null;if(r=(r?`${r}.`:"")+t.shift(),i.children){const o=i.children.find(n=>n.data.id===r);if(o){if(o.data.id===e)return o;if(t.length)return this.findItem(e,t,o,r)}else return null}return null}onStateChange=(e,t)=>{if(this.states[e]){const i=this.findItem(e);i!=null&&i.data.state&&(i.data.state=void 0)}t?this.states[e]=t:delete this.states[e],this.pausedSubscribes?this.statesUpdateTimer&&(clearTimeout(this.statesUpdateTimer),this.statesUpdateTimer=null):this.statesUpdateTimer||(this.statesUpdateTimer=setTimeout(()=>{this.statesUpdateTimer=null,this.forceUpdate()},300))};parseObjectForAdmins(e,t){var i;if((i=t.common)!=null&&i.adminColumns&&t.common.name){const r=t.common.adminColumns;let o;r&&typeof r!="object"?o=[r]:r&&(o=r);let n;r?n=o.map(M=>{if(typeof M!="object")return{path:M,name:M.split(".").pop()};const c=M;return c.objTypes&&typeof c.objTypes!="object"?c.objTypes=[c.objTypes]:c.objTypes||(c.objTypes=void 0),!c.name&&c.path?{path:c.path,name:c.path.split(".").pop(),width:c.width,edit:!!c.edit,type:c.type,objTypes:c.objTypes}:c.path?{path:c.path,name:He(c.name||"",this.props.lang),width:c.width,edit:!!c.edit,type:c.type,objTypes:c.objTypes}:(console.warn(`Admin columns for ${t._id} ignored, because path not found`),null)}).filter(M=>M):n=null,n!=null&&n.length&&(e||={},e[t.common.name]=n.sort((M,c)=>M.path>c.path?-1:M.path{if(Array.isArray(e)){let t=null;e.forEach(i=>{const{newInnerState:r,filtered:o}=this.processOnObjectChangeElement(i.id,i.obj);o||(r&&t?Object.assign(t,r):t=r)}),t&&this.setState(t),this.afterObjectUpdated()}};onObjectChange=(e,t)=>{const{newInnerState:i,filtered:r}=this.processOnObjectChangeElement(e,t);r||(i&&this.setState(i),this.afterObjectUpdated())};afterObjectUpdated(){!this.objectsUpdateTimer&&this.objects&&(this.objectsUpdateTimer=setTimeout(()=>{this.objectsUpdateTimer=null;const{info:e,root:t}=H0(this.objects,{imagePrefix:this.props.imagePrefix,root:this.props.root,lang:this.props.lang,themeType:this.props.themeType});this.root=t,this.info=e,this.pausedSubscribes||this.doFilter()},500))}updateAliases(e){var i,r,o;if(!this.objects||!((i=this.info)!=null&&i.aliasesMap)||!(e!=null&&e.startsWith("alias.")))return;const t=Object.keys(this.objects).filter(n=>n.startsWith("alias.0"));this.info.aliasesMap={};for(const n of t){const M=this.objects[n];if((o=(r=M==null?void 0:M.common)==null?void 0:r.alias)!=null&&o.id)if(typeof M.common.alias.id=="string"){const c=M.common.alias.id;this.info.aliasesMap[c]?this.info.aliasesMap[c].includes(n)||this.info.aliasesMap[c].push(n):this.info.aliasesMap[c]=[n]}else{const c=M.common.alias.id.read;c&&(this.info.aliasesMap[c]?this.info.aliasesMap[c].includes(n)||this.info.aliasesMap[c].push(n):this.info.aliasesMap[c]=[n]);const l=M.common.alias.id.write;l&&(this.info.aliasesMap[l]?this.info.aliasesMap[l].includes(n)||this.info.aliasesMap[l].push(n):this.info.aliasesMap[l]=[n])}}}processOnObjectChangeElement(e,t){const i=t==null?void 0:t.type;if(t&&typeof this.props.filterFunc=="function"&&!this.props.filterFunc(t)&&i!=="channel"&&i!=="device"&&i!=="folder"&&i!=="adapter"&&i!=="instance")return{newInnerState:null,filtered:!0};let r=null;if(e.startsWith("system.adapter.")&&(t==null?void 0:t.type)==="adapter"){const o=JSON.parse(JSON.stringify(this.state.columnsForAdmin));this.parseObjectForAdmins(o,t),JSON.stringify(this.state.columnsForAdmin)!==JSON.stringify(o)&&(r={columnsForAdmin:o})}return this.objects||={},t?this.objects[e]=t:this.objects[e]&&delete this.objects[e],this.updateAliases(e),{newInnerState:r,filtered:!1}}subscribe(e){this.subscribes.includes(e)||(this.subscribes.push(e),this.pausedSubscribes||this.props.socket.subscribeState(e,this.onStateChange).catch(t=>console.error(`Cannot subscribe on state ${e}: ${t}`)))}unsubscribe(e){const t=this.subscribes.indexOf(e);t!==-1&&(this.subscribes.splice(t,1),this.states[e]&&delete this.states[e],this.props.socket.unsubscribeState(e,this.onStateChange),this.pausedSubscribes&&console.warn("Unsubscribe during pause?"))}pauseSubscribe(e){!this.pausedSubscribes&&e?(this.pausedSubscribes=!0,this.subscribes.forEach(t=>this.props.socket.unsubscribeState(t,this.onStateChange))):this.pausedSubscribes&&!e&&(this.pausedSubscribes=!1,this.subscribes.forEach(t=>this.props.socket.subscribeState(t,this.onStateChange)))}clearFilter(){JSON.stringify(this.state.filter)!==JSON.stringify(Fs)&&this.setState({filter:{...Fs},filterKey:this.state.filterKey+1},()=>{var e,t;this.doFilter(),(t=(e=this.props).onFilterChanged)==null||t.call(e,{...Fs})})}isFilterEmpty(){var e,t,i,r,o;return!!this.state.filter.id||!!this.state.filter.name||!!((e=this.state.filter.room)!=null&&e.length)||!!((t=this.state.filter.func)!=null&&t.length)||!!((i=this.state.filter.role)!=null&&i.length)||!!((r=this.state.filter.type)!=null&&r.length)||!!((o=this.state.filter.custom)!=null&&o.length)}getFilterInput(e){return a.createElement($5e,{key:`${e}_${this.state.filterKey}`,styles:this.styles.filterInput,name:e,texts:this.texts,t:this.props.t,initialValue:this.state.filter[e],onChange:(t,i)=>{const r={...this.state.filter};i===void 0?delete r[t]:r[t]=i,this.setState({filter:r},()=>{var o,n;this.doFilter(),(n=(o=this.props).onFilterChanged)==null||n.call(o,r)})}})}getFilterSelect(e,t){return a.createElement(U5e,{key:`${e}_${this.state.filterKey}`,name:e,texts:this.texts,initialValue:this.state.filter[e]||[],values:t,onChange:(i,r)=>{const o={...this.state.filter};r===void 0?delete o[i]:o[i]=r,this.setState({filter:o},()=>{var n,M;this.doFilter(),(M=(n=this.props).onFilterChanged)==null||M.call(n,o)})}})}getFilterSelectRole(){return this.getFilterSelect("role",this.info.roles.map(e=>e.role))}getFilterSelectRoom(){const e=this.info.roomEnums.map(t=>{var i,r,o,n;return{name:He((r=(i=this.objects[t])==null?void 0:i.common)==null?void 0:r.name,this.props.lang)||t.split(".").pop(),value:t,icon:a.createElement(be,{src:((n=(o=this.objects[t])==null?void 0:o.common)==null?void 0:n.icon)||"",style:z.selectIcon})}});return this.getFilterSelect("room",e)}getFilterSelectFunction(){const e=this.info.funcEnums.map(t=>{var i,r,o,n;return{name:He((r=(i=this.objects[t])==null?void 0:i.common)==null?void 0:r.name,this.props.lang)||t.split(".").pop(),value:t,icon:a.createElement(be,{src:((n=(o=this.objects[t])==null?void 0:o.common)==null?void 0:n.icon)||"",style:z.selectIcon})}});return this.getFilterSelect("func",e)}getFilterSelectType(){const e=this.info.types.map(t=>({name:t,value:t,icon:X0[t]||null}));return this.getFilterSelect("type",e)}getFilterSelectCustoms(){if(this.info.customs.length>1){const e=this.info.customs.map(t=>({name:t==="_"?this.texts.filterCustomsWithout:t,value:t,icon:t==="_"?null:a.createElement(be,{src:_o(this.objects,t,this.props.lang,this.imagePrefix)||"",style:z.selectIcon})}));return this.getFilterSelect("custom",e)}return null}onExpandAll(e,t){var r;const i=e||this.root;t||=[],(r=i==null?void 0:i.children)==null||r.forEach(o=>{o.data.sumVisibility&&(t.push(o.data.id),this.onExpandAll(o,t))}),i===this.root&&(t.sort(),this.localStorage.setItem(`${this.props.dialogName||"App"}.objectExpanded`,JSON.stringify(t)),this.setState({expanded:t}))}onCollapseAll(){this.localStorage.setItem(`${this.props.dialogName||"App"}.objectExpanded`,JSON.stringify([])),this.localStorage.setItem(`${this.props.dialogName||"App"}.objectSelected`,"[]"),this.setState({expanded:[],depth:0,selected:[]},()=>this.onAfterSelect())}expandDepth(e,t,i){var r;e||=this.root,t>0&&((r=e.children)==null||r.forEach(o=>{o.data.sumVisibility&&(jr(i,o.data.id)||(i.push(o.data.id),i.sort()),t-1>0&&this.expandDepth(o,t-1,i))}))}static collapseDepth(e,t){return t.filter(i=>i.split(".").length<=e)}onExpandVisible(){if(this.state.depth<9){const e=this.state.depth+1,t=[...this.state.expanded];this.root&&this.expandDepth(this.root,e,t),this.localStorage.setItem(`${this.props.dialogName||"App"}.objectExpanded`,JSON.stringify(t)),this.setState({depth:e,expanded:t})}}onStatesViewVisible(){const e=!this.state.statesView;this.localStorage.setItem(`${this.props.dialogName||"App"}.objectStatesView`,JSON.stringify(e)),this.setState({statesView:e})}onCollapseVisible(){if(this.state.depth>0){const e=this.state.depth-1,t=xo.collapseDepth(e,this.state.expanded);this.localStorage.setItem(`${this.props.dialogName||"App"}.objectExpanded`,JSON.stringify(t)),this.setState({depth:e,expanded:t})}}getEnumsForId=e=>{const t=[];return this.info.enums.forEach(i=>{var r,o,n;if((n=(o=(r=this.objects[i])==null?void 0:r.common)==null?void 0:o.members)!=null&&n.includes(e)){const M={_id:this.objects[i]._id,common:JSON.parse(JSON.stringify(this.objects[i].common)),native:this.objects[i].native,type:"enum"};M.common&&(delete M.common.members,delete M.common.custom,delete M.common.mobile),t.push(M)}}),t.length?t:void 0};_createAllEnums=async(e,t)=>{var i,r;for(let o=0;or)break}return e}return[]}async _exportObjects(e){var o;if(e.isAll){F0("allObjects.json",this.objects,e);return}if(!(this.state.selected.length||this.state.selectedNonObject)){window.alert(this.props.t("ra_Save of objects-tree is not possible"));return}const t={},i=this.state.selected[0]||this.state.selectedNonObject,r=this._getSelectedIdsForExport();for(const n of r){if(t[n]=JSON.parse(JSON.stringify(this.objects[n])),((o=t[n])==null?void 0:o.type)==="state"&&!e.noStatesByExportImport){const M=await this.props.socket.getState(n);M&&(t[n].val=M.val,t[n].ack=M.ack)}if(t[n].common){const M=this.getEnumsForId(n);M&&(t[n].common.enums=M)}}F0(`${i}.json`,t,e)}renderExportDialog(){return this.state.showExportDialog===!1?null:a.createElement(Ae,{open:!0,maxWidth:"lg"},a.createElement(fe,null,this.props.t("ra_Select type of export")),a.createElement(_e,null,a.createElement(as,null,this.state.filter.expertMode||this.state.showAllExportOptions?a.createElement(a.Fragment,null,this.props.t("ra_You can export all objects or just the selected branch."),a.createElement("br",null),this.props.t("ra_Selected %s object(s)",this.state.showExportDialog),a.createElement("br",null),a.createElement(V,{control:a.createElement(ue,{checked:this.state.noStatesByExportImport,onChange:e=>this.setState({noStatesByExportImport:e.target.checked})}),label:this.props.t("ra_Do not export values of states")}),a.createElement("br",null),this.props.t("These options can reduce the size of the export file:"),a.createElement(V,{control:a.createElement(ue,{checked:this.state.beautifyJsonExport,onChange:e=>this.setState({beautifyJsonExport:e.target.checked})}),label:this.props.t("Beautify JSON output")}),a.createElement("br",null),a.createElement(V,{control:a.createElement(ue,{checked:this.state.excludeSystemRepositoriesFromExport,onChange:e=>this.setState({excludeSystemRepositoriesFromExport:e.target.checked})}),label:this.props.t("Exclude system repositories from export JSON")}),a.createElement(V,{control:a.createElement(ue,{checked:this.state.excludeTranslations,onChange:e=>this.setState({excludeTranslations:e.target.checked})}),label:this.props.t("Exclude translations (except english) from export JSON")})):null)),a.createElement(xe,null,this.state.filter.expertMode||this.state.showAllExportOptions?a.createElement(q,{color:"grey",variant:"outlined",onClick:()=>this.setState({showExportDialog:!1,showAllExportOptions:!1},()=>this._exportObjects({isAll:!0,noStatesByExportImport:this.state.noStatesByExportImport,beautify:this.state.beautifyJsonExport,excludeSystemRepositories:this.state.excludeSystemRepositoriesFromExport,excludeTranslations:this.state.excludeTranslations}))},a.createElement("span",{style:{marginRight:8}},this.props.t("ra_All objects")),"(",Object.keys(this.objects).length,")"):a.createElement(q,{color:"grey",variant:"outlined",startIcon:a.createElement(Oa,null),onClick:()=>this.setState({showAllExportOptions:!0})},this.props.t("ra_Advanced options")),a.createElement(q,{color:"primary",variant:"contained",autoFocus:!0,onClick:()=>this.setState({showExportDialog:!1,showAllExportOptions:!1},()=>this._exportObjects({isAll:!1,noStatesByExportImport:this.state.noStatesByExportImport,beautify:this.state.beautifyJsonExport,excludeSystemRepositories:this.state.excludeSystemRepositoriesFromExport,excludeTranslations:this.state.excludeTranslations}))},a.createElement("span",{style:{marginRight:8}},this.props.t("ra_Only selected")),"(",this.state.showExportDialog,")"),a.createElement(q,{color:"grey",variant:"contained",onClick:()=>this.setState({showExportDialog:!1,showAllExportOptions:!1}),startIcon:a.createElement(we,null)},this.props.t("ra_Cancel"))))}renderRenameDialog(){var t;if(!this.state.showRenameDialog)return null;const e=this.props.objectMoveRenameDialog;return a.createElement(e,{expertMode:this.props.expertMode,onClose:()=>this.setState({showRenameDialog:null}),id:this.state.showRenameDialog.id,childrenIds:this.state.showRenameDialog.childrenIds,theme:this.props.theme,socket:this.props.socket,t:this.props.t,objectType:(t=this.objects[this.state.showRenameDialog.id])==null?void 0:t.type})}async parseJsonFile(e){try{const t=JSON.parse(e),i=Object.keys(t).length,r=t._id;if(r===void 0&&i)await this.loadObjects(t),window.alert(this.props.t("ra_%s object(s) processed",i));else{if(!r)return window.alert(this.props.t("ra_Invalid structure"));try{let o,n,M;if(t.common.enums&&(o=t.common.enums,delete t.common.enums),t.val&&(n=t.val,delete t.val),t.ack!==void 0&&(M=t.ack,delete t.ack),await this.props.socket.setObject(t._id,t),t.type==="state")if(n!=null)await this.props.socket.setState(t._id,n,M===void 0?!0:M);else{const c=await this.props.socket.getState(t._id);(!c||c.val===null||c.val===void 0)&&await this.props.socket.setState(t._id,t.common.def===void 0?null:t.common.def,!0)}o&&await this._createAllEnums(o,t._id),window.alert(this.props.t("ra_%s was imported",t._id))}catch(o){window.alert(o)}}}catch(t){window.alert(t)}}handleJsonUpload(e){var r;const t=e.target,i=((r=t.files)==null?void 0:r.length)&&t.files[0];if(i){const o=new FileReader;o.onload=n=>{var M;return this.parseJsonFile((M=n.target)==null?void 0:M.result),null},o.readAsText(i)}else window.alert(this.props.t("ra_Failed to open JSON File"))}toolTipObjectCreating=()=>{var i,r;const{t:e}=this.props;let t=[a.createElement("div",{key:1},e("ra_Only following structures of objects are available:")),a.createElement("div",{key:2},e("ra_Folder → State")),a.createElement("div",{key:3},e("ra_Folder → Channel → State")),a.createElement("div",{key:4},e("ra_Folder → Device → Channel → State")),a.createElement("div",{key:5},e("ra_Device → Channel → State")),a.createElement("div",{key:6},e("ra_Channel → State")),a.createElement("div",{key:7,style:{height:10}}),a.createElement("div",{key:8},e('ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".')),a.createElement("div",{key:9},e('ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").'))];if(this.state.selected.length||this.state.selectedNonObject){const o=this.state.selected[0]||this.state.selectedNonObject;if(!(o.split(".").length<2||this.objects[o]&&((i=this.objects[o])==null?void 0:i.type)==="state"))if(this.state.filter.expertMode)switch((r=this.objects[o])==null?void 0:r.type){case"device":t=[a.createElement("div",{key:1},e("ra_Only following structures of objects are available:")),a.createElement("div",{key:5},e("ra_Device → Channel → State")),a.createElement("div",{key:7,style:{height:10}}),a.createElement("div",{key:8},e('ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".')),a.createElement("div",{key:9},e('ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").'))];break;case"folder":t=[a.createElement("div",{key:1},e("ra_Only following structures of objects are available:")),a.createElement("div",{key:2},e("ra_Folder → State")),a.createElement("div",{key:3},e("ra_Folder → Channel → State")),a.createElement("div",{key:4},e("ra_Folder → Device → Channel → State")),a.createElement("div",{key:7,style:{height:10}}),a.createElement("div",{key:8},e('ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".')),a.createElement("div",{key:9},e('ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").'))];break;case"channel":t=[a.createElement("div",{key:1},e("ra_Only following structures of objects are available:")),a.createElement("div",{key:1},e("ra_Channel → State")),a.createElement("div",{key:7,style:{height:10}}),a.createElement("div",{key:8},e('ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".')),a.createElement("div",{key:9},e('ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").'))];break}else(o.startsWith("alias.0")||o.startsWith("0_userdata"))&&(t=[a.createElement("div",{key:1},e("ra_Only following structures of objects are available:")),a.createElement("div",{key:2},e("ra_Folder → State")),a.createElement("div",{key:3},e("ra_Folder → Channel → State")),a.createElement("div",{key:4},e("ra_Folder → Device → Channel → State")),a.createElement("div",{key:5},e("ra_Device → Channel → State")),a.createElement("div",{key:6},e("ra_Channel → State")),a.createElement("div",{key:7,style:{height:10}}),a.createElement("div",{key:7},e('ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".')),a.createElement("div",{key:8},e('ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").'))])}return t.length?t:e("ra_Add new child object to selected parent")};onOpenFile(){const e=document.createElement("input");e.setAttribute("type","file"),e.setAttribute("id","files"),e.setAttribute("opacity","0"),e.addEventListener("change",t=>this.handleJsonUpload(t),!1),e.click()}renderInputJsonDialog(){const e=this.props.objectBrowserInsertJsonObjects;return this.state.showImportDialog?a.createElement(e,{onClose:t=>{this.setState({showImportDialog:!1}),t&&this.parseJsonFile(t)},themeName:this.props.themeName,themeType:this.props.themeType,t:this.props.t}):null}getToolbar(){let e=!1;if(this.state.selected.length||this.state.selectedNonObject){const t=this.state.selected[0]||this.state.selectedNonObject;t.split(".").length<2||this.objects[t]&&this.objects[t].type==="state"?e=!1:(this.state.filter.expertMode||t.startsWith("alias.0")||t.startsWith("0_userdata"))&&(e=!0)}return a.createElement("div",{style:{display:"flex",width:"100%",alignItems:"center",overflowX:"auto"}},a.createElement("div",{style:{display:"flex",width:"100%",alignItems:"center"}},a.createElement(Le,{title:this.props.t("ra_Refresh tree"),slotProps:{popper:{sx:z.tooltip}}},a.createElement("div",null,a.createElement(W,{onClick:()=>this.refreshComponent(),disabled:this.state.updating,size:"large"},a.createElement(_N,null)))),this.props.showExpertButton&&!this.props.expertMode&&a.createElement(Le,{title:this.props.t("ra_expertMode"),slotProps:{popper:{sx:z.tooltip}}},a.createElement(W,{key:"expertMode",color:this.state.filter.expertMode?"secondary":"default",onClick:()=>{const t={...this.state.filter};t.expertMode=!t.expertMode,this.localStorage.setItem(`${this.props.dialogName||"App"}.objectFilter`,JSON.stringify(t)),this.setState({filter:t})},size:"large"},a.createElement(Oa,null))),!this.props.disableColumnSelector&&this.props.width!=="xs"&&a.createElement(Le,{title:this.props.t("ra_Configure"),slotProps:{popper:{sx:z.tooltip}}},a.createElement(W,{key:"columnSelector",color:this.state.columnsAuto?"primary":"default",onClick:()=>this.setState({columnsSelectorShow:!0}),size:"large"},a.createElement(hy,null))),this.props.width!=="xs"&&this.state.expandAllVisible&&a.createElement(Le,{title:this.props.t("ra_Expand all nodes"),slotProps:{popper:{sx:z.tooltip}}},a.createElement(W,{key:"expandAll",onClick:()=>this.onExpandAll(),size:"large"},a.createElement(lo,null))),a.createElement(Le,{title:this.props.t("ra_Collapse all nodes"),slotProps:{popper:{sx:z.tooltip}}},a.createElement(W,{key:"collapseAll",onClick:()=>this.onCollapseAll(),size:"large"},a.createElement(Ti,null))),this.props.width!=="xs"&&a.createElement(Le,{title:this.props.t("ra_Expand one step node"),slotProps:{popper:{sx:z.tooltip}}},a.createElement(W,{key:"expandVisible",color:"primary",onClick:()=>this.onExpandVisible(),size:"large"},a.createElement(Sc,{badgeContent:this.state.depth,color:"secondary",sx:t=>({badge:{right:3,top:3,border:`2px solid ${t.palette.background.paper}`,padding:"0 4px"}})},a.createElement(lo,null)))),this.props.width!=="xs"&&a.createElement(Le,{title:this.props.t("ra_Collapse one step node"),slotProps:{popper:{sx:z.tooltip}}},a.createElement(W,{key:"collapseVisible",color:"primary",onClick:()=>this.onCollapseVisible(),size:"large"},a.createElement(Sc,{sx:t=>({badge:{right:3,top:3,border:`2px solid ${t.palette.background.paper}`,padding:"0 4px"}}),badgeContent:this.state.depth,color:"secondary"},a.createElement(Ti,null)))),this.props.objectStatesView&&a.createElement(Le,{title:this.props.t("ra_Toggle the states view"),slotProps:{popper:{sx:z.tooltip}}},a.createElement(W,{onClick:()=>this.onStatesViewVisible(),size:"large"},a.createElement(My,{color:this.state.statesView?"primary":"inherit"}))),a.createElement(Le,{title:this.props.t("ra_Show/Hide object descriptions"),slotProps:{popper:{sx:z.tooltip}}},a.createElement(W,{onClick:()=>{this.localStorage.setItem(`${this.props.dialogName||"App"}.desc`,this.state.showDescription?"false":"true"),this.setState({showDescription:!this.state.showDescription})},size:"large"},a.createElement(gy,{color:this.state.showDescription?"primary":"inherit"}))),this.props.objectAddBoolean?a.createElement(Le,{title:this.toolTipObjectCreating(),slotProps:{popper:{sx:z.tooltip}}},a.createElement("div",null,a.createElement(W,{disabled:!e,onClick:()=>this.setState({modalNewObj:{id:this.state.selected[0]||this.state.selectedNonObject}}),size:"large"},a.createElement(Kn,null)))):null,this.props.objectImportExport&&a.createElement(Le,{title:this.props.t("ra_Add objects tree from JSON file"),slotProps:{popper:{sx:z.tooltip}}},a.createElement(W,{onClick:t=>{this.props.objectBrowserInsertJsonObjects?this.setState({showImportMenu:t.currentTarget}):this.onOpenFile()},size:"large"},a.createElement(go,null))),this.props.objectBrowserInsertJsonObjects?a.createElement(ws,{anchorEl:this.state.showImportMenu,open:!!this.state.showImportMenu,onClose:()=>this.setState({showImportMenu:null})},a.createElement(re,{onClick:()=>this.setState({showImportMenu:null},()=>this.onOpenFile())},a.createElement(Xt,null,a.createElement(jy,null)),a.createElement(dt,null,this.props.t("ra_From file"))),a.createElement(re,{onClick:()=>this.setState({showImportMenu:null,showImportDialog:!0})},a.createElement(Xt,null,a.createElement(Gj,null)),a.createElement(dt,null,this.props.t("ra_From text")))):null,this.props.objectImportExport&&(!!this.state.selected.length||this.state.selectedNonObject)&&a.createElement(Le,{title:this.props.t("ra_Save objects tree as JSON file"),slotProps:{popper:{sx:z.tooltip}}},a.createElement(W,{onClick:()=>this.setState({showExportDialog:this._getSelectedIdsForExport().length}),size:"large"},a.createElement(go,{style:{transform:"rotate(180deg)"}})))),!!this.props.objectBrowserEditObject&&this.props.width!=="xs"&&a.createElement("div",{style:{display:"flex",whiteSpace:"nowrap"}},`${this.props.t("ra_Objects")}: ${Object.keys(this.info.objects).length}, ${this.props.t("ra_States")}: ${Object.keys(this.info.objects).filter(t=>this.info.objects[t].type==="state").length}`),this.props.objectEditBoolean&&a.createElement(Le,{title:this.props.t("ra_Edit custom config"),slotProps:{popper:{sx:z.tooltip}}},a.createElement(W,{onClick:()=>{var i;const t=this.root?Mg(this.root,"state",this.objects):[];t.length?(this.pauseSubscribe(!0),t.length===1&&(this.localStorage.setItem(`${this.props.dialogName||"App"}.objectSelected`,this.state.selected[0]),(i=this.props.router)==null||i.doNavigate(null,"custom",this.state.selected[0])),this.setState({customDialog:t,customDialogAll:!0})):this.setState({toast:this.props.t("ra_please select object")})},size:"large"},a.createElement(Jj,null))))}toggleExpanded(e){const t=JSON.parse(JSON.stringify(this.state.expanded)),i=t.indexOf(e);i===-1?(t.push(e),t.sort()):t.splice(i,1),this.localStorage.setItem(`${this.props.dialogName||"App"}.objectExpanded`,JSON.stringify(t)),this.setState({expanded:t})}onCopy(e,t){e.stopPropagation(),e.preventDefault(),t&&(m.copyToClipboard(t),t.length<50?this.setState({toast:this.props.t("ra_Copied %s",t)}):this.setState({toast:this.props.t("ra_Copied")}))}renderTooltipAccessControl=e=>{if(!e)return null;const t=[{value:"0x400",valueNum:1024,title:"read",group:"Owner"},{value:"0x200",valueNum:512,title:"write",group:"Owner"},{value:"0x40",valueNum:64,title:"read",group:"Group"},{value:"0x20",valueNum:32,title:"write",group:"Group"},{value:"0x4",valueNum:4,title:"read",group:"Everyone"},{value:"0x2",valueNum:2,title:"write",group:"Everyone"}],i=[],r=o=>{const n=e[o];t.forEach((M,c)=>{n&M.valueNum&&i.push(a.createElement("span",{key:o+c},this.texts[`acl${M.group}_${M.title}_${o}`],",",a.createElement("span",{style:o==="object"?z.rightsObject:z.rightsState},M.value)))})};return i.push(a.createElement("span",{key:"group"},`${this.texts.ownerGroup}: ${(e.ownerGroup||"").replace("system.group.","")}`)),i.push(a.createElement("span",{key:"owner"},`${this.texts.ownerUser}: ${(e.owner||"").replace("system.user.","")}`)),r("object"),e.state&&r("state"),i.length?a.createElement("span",{style:z.tooltipAccessControl},i.map(o=>o)):null};renderColumnButtons(e,t){var n,M,c,l;if(!t.data.obj)return this.props.onObjectDelete||this.props.objectEditOfAccessControl?a.createElement("div",{style:z.buttonDiv},this.state.filter.expertMode&&this.props.objectEditOfAccessControl?a.createElement(W,{sx:{...z.cellButtonsButton,...z.cellButtonsEmptyButton,...z.cellButtonMinWidth},onClick:()=>this.setState({modalEditOfAccess:!0,modalEditOfAccessObjData:t.data}),size:"large"},a.createElement("div",{style:{height:15}},"---")):null,this.props.onObjectDelete&&((n=t.children)!=null&&n.length)?a.createElement(W,{sx:{...z.cellButtonsButton,...z.cellButtonsButtonAlone},size:"small","aria-label":"delete",title:this.texts.deleteObject,onClick:()=>{var g;const N=Object.keys(this.objects);N.sort();let u=0;const L=`${e}.`;for(let j=0;jL)break;this.props.onObjectDelete&&this.props.onObjectDelete(e,!!((g=t.children)!=null&&g.length),!1,u+1)}},a.createElement(wt,{style:z.cellButtonsButtonIcon})):null):null;t.data.aclTooltip=t.data.aclTooltip||this.renderTooltipAccessControl(t.data.obj.acl);const i=t.data.obj.acl?t.data.obj.type==="state"?t.data.obj.acl.state:t.data.obj.acl.object:0,r=t.data.obj.acl&&(t.data.obj.type==="state"?this.systemConfig.common.defaultNewAcl.state:this.systemConfig.common.defaultNewAcl.object),o=this.state.filter.expertMode||Z0(t.data.id);return[this.state.filter.expertMode&&this.props.objectEditOfAccessControl?a.createElement(Le,{key:"acl",title:t.data.aclTooltip,slotProps:{popper:{sx:z.tooltip}}},a.createElement(W,{sx:{...z.cellButtonsButton,...z.cellButtonMinWidth,opacity:1},onClick:()=>this.setState({modalEditOfAccess:!0,modalEditOfAccessObjData:t.data}),size:"large"},a.createElement("div",{style:z.aclText},Number.isNaN(Number(i))?Number(r).toString(16):Number(i).toString(16)))):a.createElement("div",{key:"aclEmpty",style:z.cellButtonMinWidth}),o?a.createElement(W,{key:"edit",sx:{marginRight:"2px",...z.cellButtonsButton},size:"small","aria-label":"edit",title:this.texts.editObject,onClick:()=>{this.localStorage.setItem(`${this.props.dialogName||"App"}.objectSelected`,e),this.setState({editObjectDialog:e,editObjectAlias:!1})}},a.createElement(or,{style:z.cellButtonsButtonIcon})):a.createElement(J,{component:"div",key:"editDisabled",sx:z.cellButtonsButton}),this.props.onObjectDelete&&((M=t.children)!=null&&M.length||!((c=t.data.obj.common)!=null&&c.dontDelete))?a.createElement(W,{key:"delete",sx:z.cellButtonsButton,size:"small","aria-label":"delete",onClick:()=>{var g,j,y;const N=Object.keys(this.objects);N.sort();let u=0;const L=`${e}.`;for(let T=0;TL)break;this.props.onObjectDelete&&this.props.onObjectDelete(e,!!((g=t.children)!=null&&g.length),!((y=(j=t.data.obj)==null?void 0:j.common)!=null&&y.dontDelete),u)},title:this.texts.deleteObject},a.createElement(wt,{style:z.cellButtonsButtonIcon})):null,this.props.objectCustomDialog&&this.info.hasSomeCustoms&&t.data.obj.type==="state"&&((l=t.data.obj.common)==null?void 0:l.type)!=="file"?a.createElement(W,{sx:{...z.cellButtonsButton,...t.data.hasCustoms?this.styles.cellButtonsButtonWithCustoms:z.cellButtonsButtonWithoutCustoms},key:"custom",size:"small","aria-label":"config",title:this.texts.customConfig,onClick:()=>{var N;this.localStorage.setItem(`${this.props.dialogName||"App"}.objectSelected`,e),this.pauseSubscribe(!0),(N=this.props.router)==null||N.doNavigate(null,"customs",e),this.setState({customDialog:[e],customDialogAll:!1})}},a.createElement(qn,{style:z.cellButtonsButtonIcon})):null]}readHistory(e){var t,i;if(window.sparkline&&this.defaultHistory&&((i=(t=this.objects[e])==null?void 0:t.common)!=null&&i.custom)&&this.objects[e].common.custom[this.defaultHistory]){const r=new Date;r.setHours(r.getHours()-24),r.setMinutes(0),r.setSeconds(0),r.setMilliseconds(0);const o=r.getTime();this.props.socket.getHistory(e,{instance:this.defaultHistory,start:o,end:Date.now(),step:36e5,from:!1,ack:!1,q:!1,addId:!1,aggregate:"minmax"}).then(n=>{const M=window.document.getElementsByClassName("sparkline");for(let c=0;cconsole.warn(`Cannot read history: ${n}`))}}getTooltipInfo(e,t){var l,N,u;const i=this.objects[e],r=this.states[e],{valFull:o,fileViewer:n}=Pn({state:r,obj:i,texts:this.texts,dateFormat:this.props.dateFormat||this.systemConfig.common.dateFormat,isFloatComma:this.props.isFloatComma===void 0?this.systemConfig.common.isFloatComma:this.props.isFloatComma,full:!0}),M=[];o==null||o.forEach(L=>{L.t===this.texts.quality&&r.q?(M.push(a.createElement("div",{style:z.cellValueTooltipBoth,key:L.t},L.t,": ",L.v)),L.nbr||M.push(a.createElement("br",{key:`${L.t}_br`}))):(M.push(a.createElement("div",{style:z.cellValueTooltipTitle,key:L.t},L.t,": ")),M.push(a.createElement("div",{style:z.cellValueTooltipValue,key:`${L.t}_v`},L.v)),L.nbr||M.push(a.createElement("br",{key:`${L.t}_br`})))});const c=((l=i==null?void 0:i.common)==null?void 0:l.role)||"";n==="image"?M.push(a.createElement("img",{style:z.cellValueTooltipImage,src:r.val,alt:e})):c==="url"||i.common.role==="url.self"||i.common.role==="url.blank"?M.unshift(a.createElement("div",{key:"ctrl",style:{textDecoration:"underline",fontWeight:"bold"}},this.texts.ctrlForLink)):this.defaultHistory&&((u=(N=i==null?void 0:i.common)==null?void 0:N.custom)!=null&&u[this.defaultHistory])&&M.push(a.createElement("svg",{key:"sparkline",className:"sparkline","data-id":e,style:{fill:"#3d85de"},width:"200",height:"30",strokeWidth:"3"})),this.setState({tooltipInfo:{el:M,id:e}},()=>t&&t())}renderColumnValue(e,t,i){var c,l;const r=t.data.obj;if(!r||!this.states)return null;if(((c=r.common)==null?void 0:c.type)==="file")return a.createElement(J,{component:"div",sx:{...z.cellValueText,...z.cellValueFile}},"[file]");if(!this.states[e])return r.type==="state"&&(this.recordStates.includes(e)||this.recordStates.push(e),this.states[e]={val:null},this.subscribe(e)),null;this.recordStates.includes(e)||this.recordStates.push(e);const o=this.states[e];let n=t.data.state;if(!n){const{valText:N}=Pn({state:o,obj:r,texts:this.texts,dateFormat:this.props.dateFormat||this.systemConfig.common.dateFormat,isFloatComma:this.props.isFloatComma===void 0?this.systemConfig.common.isFloatComma:this.props.isFloatComma}),u=[];if(t.data.state={valTextRx:u},u.push(a.createElement("span",{className:`newValueBrowser-${this.props.themeType||"light"}`,key:`${N.v.toString()}valText`,style:{whiteSpace:"nowrap",display:"inline-block",overflow:"hidden",textOverflow:"ellipsis"}},N.v.toString())),N.u&&u.push(a.createElement("span",{className:`newValueBrowser-${this.props.themeType||"light"}`,style:z.cellValueTextUnit,key:`${N.v.toString()}unit`},N.u)),N.s!==void 0&&u.push(a.createElement("span",{style:z.cellValueTextState,className:`newValueBrowser-${this.props.themeType||"light"}`,key:`${N.v.toString()}states`},"(",N.s,")")),!i){const L=N.c!==void 0?N.c:N.v||"";u.push(a.createElement(Bs,{className:"copyButton",style:this.styles.iconCopy,onClick:g=>this.onCopy(g,L),key:"cc"}))}n=t.data.state}n.style=W5e({state:o,isExpertMode:this.state.filter.expertMode,isButton:t.data.button,nonAckColor:this.props.theme.palette.nonAck});let M=n.valTextRx;return this.state.filter.expertMode||(t.data.button?M=[a.createElement(Y5e,{key:"button",style:{color:n.style.color,...z.cellValueButton}})]:t.data.switch&&(M=[a.createElement(br,{key:"switch",sx:{"& .MuiSwitch-thumb":{color:n.style.color},"& .MuiSwitch-track":{backgroundColor:this.states[e].val&&this.state.selected.includes(e)?this.props.themeType==="dark"?"#FFF !important":"#111 !important":void 0}},checked:!!this.states[e].val})])),a.createElement(Le,{key:"value",title:(l=this.state.tooltipInfo)==null?void 0:l.el,slotProps:{popper:{sx:z.cellValueTooltipBox},tooltip:{sx:z.cellValueTooltip}},onOpen:()=>this.getTooltipInfo(e,()=>this.readHistory(e)),onClose:()=>{var N;return((N=this.state.tooltipInfo)==null?void 0:N.id)===e&&this.setState({tooltipInfo:null})}},a.createElement(J,{component:"div",style:n.style,className:t.data.url?"iob-link":void 0,sx:{...z.cellValueText,height:i?void 0:$e,"& .admin-button:active":{transform:"translate(0, 2px)"}}},M))}_syncEnum(e,t,i,r){var M,c,l;if(!(t!=null&&t.length)){r&&r();return}const o=t.pop()||"",n=[];if((M=this.info.objects[o])!=null&&M.common){if((c=this.info.objects[o].common.members)!=null&&c.length){const N=this.info.objects[o].common.members.indexOf(e);if(N!==-1&&!i.includes(o)){const u=JSON.parse(JSON.stringify(this.info.objects[o]));u.common.members.splice(N,1),n.push(this.props.socket.setObject(o,u).then(()=>this.info.objects[o]=u).catch(L=>this.showError(L)))}}if(i.includes(o)&&!((l=this.info.objects[o].common.members)!=null&&l.includes(e))){const N=JSON.parse(JSON.stringify(this.info.objects[o]));N.common.members||=[],N.common.members.push(e),N.common.members.sort(),n.push(this.props.socket.setObject(o,N).then(()=>this.info.objects[o]=N).catch(u=>this.showError(u)))}}Promise.all(n).then(()=>{setTimeout(()=>this._syncEnum(e,t,i,r),0)})}syncEnum(e,t,i){const r=[...this.info[t==="func"?"funcEnums":"roomEnums"]];return new Promise(o=>{this._syncEnum(e,r,i,()=>{o()})})}renderEnumDialog(){if(!this.state.enumDialog)return null;const e=this.state.enumDialog.type,t=this.state.enumDialog.item,i=this.state.enumDialogEnums,r=this.state.enumDialog.enumsOriginal,o=(e==="room"?this.info.roomEnums:this.info.funcEnums).map(n=>{var M,c;return{name:He(((c=(M=this.objects[n])==null?void 0:M.common)==null?void 0:c.name)||n.split(".").pop()||"",this.props.lang),value:n,icon:_o(this.objects,n,this.props.lang,this.imagePrefix)}}).sort((n,M)=>n.name>M.name?1:-1);return o.forEach(n=>{n.icon&&typeof n.icon=="string"&&(n.icon=a.createElement(J,{style:z.enumIconDiv},a.createElement("img",{src:n.icon,style:z.enumIcon,alt:n.name})))}),a.createElement(Ae,{sx:{"& .MuiPaper-root":z.enumDialog},onClose:()=>this.setState({enumDialog:null}),"aria-labelledby":"enum-dialog-title",open:!0},a.createElement(fe,{id:"enum-dialog-title",style:{display:"flex",justifyContent:"space-between",width:"100%",flexWrap:"nowrap",gap:8,paddingRight:12}},e==="func"?this.props.t("ra_Define functions"):this.props.t("ra_Define rooms"),a.createElement(bt,{color:"primary",disabled:r===JSON.stringify(i),size:"small",onClick:()=>this.syncEnum(t.data.id,e,i).then(()=>this.setState({enumDialog:null,enumDialogEnums:null}))},a.createElement(We,null))),a.createElement(xc,{sx:{"&.MuiList-root":z.enumList}},o.map(n=>{let M,c,l;typeof n=="object"?(M=n.value,c=n.name,l=n.icon):(M=n,c=n);const N=`checkbox-list-label-${M}`;return a.createElement(Hg,{sx:z.headerCellSelectItem,key:M,onClick:()=>{const u=i.indexOf(M),L=JSON.parse(JSON.stringify(this.state.enumDialogEnums));u===-1?(L.push(M),L.sort()):L.splice(u,1),this.setState({enumDialogEnums:L})},secondaryAction:l},a.createElement(Xt,{sx:{"&.MuiListItemIcon-root":z.enumCheckbox}},a.createElement(ue,{edge:"start",checked:i.includes(M),tabIndex:-1,disableRipple:!0,slotProps:{input:{"aria-labelledby":N}}})),a.createElement(dt,{id:N},c))})))}renderEditRoleDialog(){var e,t;if(!this.state.roleDialog||!this.props.objectBrowserEditRole)return null;if(this.state.roleDialog&&this.props.objectBrowserEditRole){const i=this.props.objectBrowserEditRole;return a.createElement(i,{key:"objectBrowserEditRole",id:this.state.roleDialog,socket:this.props.socket,t:this.props.t,roleArray:this.info.roles,commonType:(t=(e=this.info.objects[this.state.roleDialog])==null?void 0:e.common)==null?void 0:t.type,onClose:r=>{r&&(this.info.objects[this.state.roleDialog]=r),this.setState({roleDialog:null})}})}return null}onColumnsEditCustomDialogClose(e){var i,r;const t=this.customColumnDialog;if(e){let o=t.value;t.type==="boolean"?o=o==="true"||o===!0:t.type==="number"&&(o=parseFloat(o)),this.customColumnDialog=null,this.props.socket.getObject(((r=(i=this.state.columnsEditCustomDialog)==null?void 0:i.obj)==null?void 0:r._id)||"").then(n=>{var M;if(n&&B5e(n,(M=this.state.columnsEditCustomDialog)==null?void 0:M.it,o))return this.props.socket.setObject(n._id,n);throw new Error(this.props.t("ra_Cannot update attribute, because not found in the object"))}).then(()=>this.setState({columnsEditCustomDialog:null})).catch(n=>this.showError(n))}else this.customColumnDialog=null,this.setState({columnsEditCustomDialog:null})}renderColumnsEditCustomDialog(){if(!this.state.columnsEditCustomDialog)return null;if(!this.customColumnDialog){const e=V0(this.state.columnsEditCustomDialog.obj,this.state.columnsEditCustomDialog.it);this.customColumnDialog={type:this.state.columnsEditCustomDialog.it.type||typeof e,initValue:(e??"").toString(),value:(e??"").toString()}}return a.createElement(Ae,{onClose:()=>this.setState({columnsEditCustomDialog:null}),maxWidth:"md","aria-labelledby":"custom-dialog-title",open:!0},a.createElement(fe,{id:"custom-dialog-title"},`${this.props.t("ra_Edit object field")}: ${this.state.columnsEditCustomDialog.obj._id}`),a.createElement(_e,null,a.createElement(as,{id:"alert-dialog-description"},this.customColumnDialog.type==="boolean"?a.createElement(V,{control:a.createElement(ue,{onKeyUp:e=>e.key==="Enter"&&this.onColumnsEditCustomDialogClose(!0),defaultChecked:this.customColumnDialog.value==="true",onChange:e=>{const t=this.customColumnDialog;t.value=e.target.checked.toString();const i=t.value!==t.initValue;i===!this.state.customColumnDialogValueChanged&&this.setState({customColumnDialogValueChanged:i})}}),label:`${this.state.columnsEditCustomDialog.it.name} (${this.state.columnsEditCustomDialog.it.pathText})`}):a.createElement(Te,{variant:"standard",defaultValue:this.customColumnDialog.value,fullWidth:!0,onKeyUp:e=>e.key==="Enter"&&this.onColumnsEditCustomDialogClose(!0),label:`${this.state.columnsEditCustomDialog.it.name} (${this.state.columnsEditCustomDialog.it.pathText})`,onChange:e=>{const t=this.customColumnDialog;t.value=e.target.value;const i=t.value!==t.initValue;i===!this.state.customColumnDialogValueChanged&&this.setState({customColumnDialogValueChanged:i})},autoFocus:!0}))),a.createElement(xe,null,a.createElement(q,{variant:"contained",onClick:()=>this.onColumnsEditCustomDialogClose(!0),disabled:!this.state.customColumnDialogValueChanged,color:"primary",startIcon:a.createElement(We,null)},this.props.t("ra_Update")),a.createElement(q,{color:"grey",variant:"contained",onClick:()=>this.onColumnsEditCustomDialogClose(),startIcon:a.createElement(we,null)},this.props.t("ra_Cancel"))))}renderCustomValue(e,t,i){const r=V0(e,t);return r!=null?t.edit&&!this.props.notEditable&&(!t.objTypes||t.objTypes.includes(e.type))?a.createElement(J,{component:"div",style:{...z.columnCustom,...z.columnCustomEditable,...z[`columnCustom_${t.align}`]},onClick:()=>this.setState({columnsEditCustomDialog:{item:i,it:t,obj:e},customColumnDialogValueChanged:!1})},r):a.createElement(J,{component:"div",style:{...z.columnCustom,...z[`columnCustom_${t.align}`]}},r):null}renderAliasLink(e,t,i){const r=t||0,o=this.objects[this.info.aliasesMap[e][r]].common.alias.id;return o?a.createElement(J,{component:"div",onClick:n=>{n.stopPropagation(),n.preventDefault();const M=this.info.aliasesMap[e][r];this.info.aliasesMap[e].length>1&&this.setState({aliasMenu:""}),this.onSelect(M),setTimeout(()=>this.expandAllSelected(()=>this.scrollToItem(M)),100)},sx:i||this.styles.aliasAlone},a.createElement("span",{className:"admin-browser-arrow"},typeof o=="string"||o.read===e&&o.write===e?"↔":o.read===e?"→":"←"),this.info.aliasesMap[e][r]):null}renderLeaf(e,t,i){var bi,Ui,$i,Yr,Qr,dc,hc,zc,wc,Ic,Cc,pc,Ac,mc;const r=e.data.id;i.count++,t=t===void 0?this.state.expanded.includes(r):t;let o;const n=e.data.obj,M=n==null?void 0:n.type;e.children||M==="folder"||M==="device"||M==="channel"||M==="meta"?o=t?a.createElement(lo,{style:this.styles.cellIdIconFolder,onClick:()=>this.toggleExpanded(r)}):a.createElement(Ti,{style:this.styles.cellIdIconFolder,onClick:()=>this.toggleExpanded(r)}):n&&n.common&&n.common.write===!1&&n.type==="state"?o=a.createElement(f5e,{style:this.styles.cellIdIconDocument}):o=a.createElement(m5e,{style:this.styles.cellIdIconDocument});let c=null;e.data.icon&&(typeof e.data.icon=="string"?e.data.icon.length<3?c=a.createElement("span",{className:"iconOwn",style:z.cellIdIconOwn},e.data.icon):c=a.createElement(be,{style:z.cellIdIconOwn,className:"iconOwn",src:e.data.icon,alt:""}):c=e.data.icon);const l=n==null?void 0:n.common,N=(n==null?void 0:n.type)&&X0[n.type]||a.createElement("div",{className:"itemIcon"}),u=this.levelPadding*(e.data.level||0);if(e.data.lang!==this.props.lang){const{rooms:v,per:ie}=lg(this.info,r,this.props.lang);e.data.rooms=v.join(", "),e.data.per=ie;const{funcs:Je,pef:Oe}=Ng(this.info,r,this.props.lang);e.data.funcs=Je.join(", "),e.data.pef=Oe,e.data.lang=this.props.lang}const L=this.props.multiSelect&&this.objects[r]&&(!this.props.types||this.props.types.includes(this.objects[r].type))?a.createElement(ue,{style:z.checkBox,checked:this.state.selected.includes(r)}):null;let g=!this.props.notEditable&&M==="state"&&(this.state.filter.expertMode||(l==null?void 0:l.write)!==!1);this.props.objectBrowserViewFile&&(l==null?void 0:l.type)==="file"&&(g=!0);const j=!this.props.notEditable&&this.objects[r]&&(this.state.filter.expertMode||M==="state"||M==="channel"||M==="device"),y=this.state.statesView&&(M==="state"||M==="channel"||M==="device");let T="";const d=[];if(y&&(T=(bi=this.states[r])==null?void 0:bi.from,T===void 0?T=" ":(T=T?T.replace(/^system\.adapter\.|^system\./,""):"",d.push(`${this.texts.stateChangedFrom} ${T}`)),n!=null&&n.user)){const v=n.user.replace("system.user.","");T+=`/${v}`,d.push(`${this.texts.stateChangedBy} ${v}`)}n&&(n.from&&d.push(`${this.texts.objectChangedFrom} ${n.from.replace(/^system\.adapter\.|^system\./,"")}`),n.user&&d.push(`${this.texts.objectChangedBy} ${n.user.replace(/^system\.user\./,"")}`),n.ts&&d.push(`${this.texts.objectChangedByUser} ${m.formatDate(new Date(n.ts),this.props.dateFormat||this.systemConfig.common.dateFormat)}`));let I=!1,w=null;r.startsWith("alias.")&&((Ui=l==null?void 0:l.alias)!=null&&Ui.id)?(I=typeof l.alias.id=="object",I?w=a.createElement("div",{style:z.cellIdAliasReadWriteDiv},l.alias.id.read?a.createElement(J,{component:"div",onClick:v=>{v.stopPropagation(),v.preventDefault(),this.onSelect(l.alias.id.read),setTimeout(()=>this.expandAllSelected(()=>this.scrollToItem(l.alias.id.read)),100)},sx:this.styles.aliasReadWrite},"←",l.alias.id.read):null,l.alias.id.write?a.createElement(J,{component:"div",onClick:v=>{v.stopPropagation(),v.preventDefault(),this.onSelect(l.alias.id.write),setTimeout(()=>this.expandAllSelected(()=>this.scrollToItem(l.alias.id.write)),100)},sx:this.styles.aliasReadWrite},"→",l.alias.id.write):null):w=a.createElement(J,{component:"div",onClick:v=>{v.stopPropagation(),v.preventDefault(),this.onSelect(l.alias.id),setTimeout(()=>this.expandAllSelected(()=>this.scrollToItem(l.alias.id)),100)},sx:this.styles.aliasAlone},"→",l.alias.id)):this.info.aliasesMap[r]&&(this.info.aliasesMap[r].length>1?w=a.createElement(J,{component:"div",id:`alias_${r}`,onClick:v=>{v.stopPropagation(),v.preventDefault(),this.setState({aliasMenu:r})},sx:this.styles.aliasAlone},this.props.t("ra_%s links from aliases",this.info.aliasesMap[r].length)):w=this.renderAliasLink(r,0));let A=l==null?void 0:l.color,p;if(A&&!this.state.selected.includes(r)){const v=this.props.themeName==="dark"?"#1f1f1f":this.props.themeName==="blue"?"#222a2e":"#FFFFFF";m.colorDistance(A,v)<1e3&&(p=this.props.themeType==="dark"?"#9a9a9a":"#565656")}let h=!1;r==="0_userdata"?(A=rg(this.props.themeType),h=!0):r==="alias"?(A=og(this.props.themeType),h=!0):r==="javascript"?(A=k5e(this.props.themeType),h=!0):r==="system"?(A=ng(this.props.themeType),h=!0):r==="system.adapter"?A=ag(this.props.themeType):(!A||this.state.selected.includes(r))&&(A="inherit");const C=[];if(l!=null&&l.statusStates){const v={};Object.keys(l.statusStates).forEach(Je=>{var Tt;let Oe=l.statusStates[Je];Oe.split(".").length<3&&(Oe=`${r}.${Oe}`),v[Je]=Oe,this.states[Oe]?this.recordStates.includes(Oe)||this.recordStates.push(Oe):((Tt=this.objects[Oe])==null?void 0:Tt.type)==="state"&&(this.recordStates.includes(Oe)||this.recordStates.push(Oe),this.states[Oe]={val:null},this.subscribe(Oe))});let ie=!1;l.statusStates.errorId&&this.states[v.errorId]&&this.states[v.errorId].val&&(A=this.props.themeType==="dark"?Lg:gg,ie=!0,C.push(a.createElement(Xj,{key:"error",style:this.styles.iconDeviceError}))),v.onlineId&&this.states[v.onlineId]?ie?this.states[v.onlineId].val?C.push(a.createElement(li,{key:"conn",style:this.styles.iconDeviceConnected})):C.push(a.createElement($r,{key:"disc",style:this.styles.iconDeviceDisconnected})):this.states[v.onlineId].val?(A=this.props.themeType==="dark"?Sa:ka,C.push(a.createElement(li,{key:"conn",style:this.styles.iconDeviceConnected}))):(A=this.props.themeType==="dark"?va:Ya,C.push(a.createElement($r,{key:"disc",style:this.styles.iconDeviceDisconnected}))):v.offlineId&&this.states[v.offlineId]&&(ie?this.states[v.offlineId].val?C.push(a.createElement($r,{key:"disc",style:this.styles.iconDeviceDisconnected})):C.push(a.createElement(li,{key:"conn",style:this.styles.iconDeviceConnected})):this.states[v.offlineId].val?(A=this.props.themeType==="dark"?va:Ya,C.push(a.createElement($r,{key:"disc",style:this.styles.iconDeviceDisconnected}))):(A=this.props.themeType==="dark"?Sa:ka,C.push(a.createElement(li,{key:"conn",style:this.styles.iconDeviceConnected}))))}const E=y?m.quality2text((($i=this.states[r])==null?void 0:$i.q)||0).join(", "):null;let O=((Yr=e.data)==null?void 0:Yr.title)||"",b=!1;if(this.state.showDescription){const v=cg(e.data,this.props.lang);v&&(O=[a.createElement("div",{key:"name",style:z.cellNameDivDiv},O),a.createElement("div",{key:"desc",style:z.cellDescription},v)],b=!!v)}const k=this.props.width==="xs"&&this.state.focused===r,K=a.createElement(ts,{container:!0,wrap:"nowrap",direction:"row",sx:z.cellId,style:{width:this.columnsVisibility.id,paddingLeft:u}},a.createElement(ts,{container:!0,alignItems:"center"},L,o),a.createElement(ts,{style:{...z.cellIdSpan,...p?this.styles.invertedBackground:void 0,color:A,fontWeight:h?"bold":void 0}},a.createElement(Le,{title:P5e(e.data,this.props.lang),slotProps:{popper:{sx:z.tooltip}}},a.createElement("div",null,e.data.name)),w,C),a.createElement("div",{style:{...z.grow,...p?this.styles.invertedBackgroundFlex:{}}}),a.createElement(ts,{container:!0,alignItems:"center"},c),this.props.width!=="xs"?a.createElement("div",null,a.createElement(Bs,{className:k?"":"copyButton",style:z.cellCopyButton,onClick:v=>this.onCopy(v,r)})):null);let x=k&&O||this.columnsVisibility.name?a.createElement(J,{component:"div",sx:{...z.cellName,...b?z.cellNameWithDesc:void 0,width:this.props.width!=="xs"?this.columnsVisibility.name:void 0,ml:k?0:"5px"}},O,!k&&((Qr=e.data)!=null&&Qr.title)?a.createElement(J,{style:{color:A}},a.createElement(Bs,{className:"copyButton",style:z.cellCopyButton,onClick:v=>{var ie;return this.onCopy(v,(ie=e.data)==null?void 0:ie.title)}})):null):null,S;this.state.statesView?S=[k&&y&&((dc=this.states[r])!=null&&dc.from)||this.columnsVisibility.changedFrom?{el:a.createElement("div",{key:"from",style:{...z.cellRole,width:this.props.width!=="xs"?this.columnsVisibility.changedFrom:void 0},title:d.join(` +`).forEach(n=>{if(!n.trim())return;const M=n.indexOf(":");if(M!==-1){const c=n.substring(0,M).trim();let l=n.substring(M+1).trim();l=l.replace(/^['"]|['"]$/g,""),l==="true"?t[c]=!0:l==="false"?t[c]=!1:parseFloat(l).toString()===l?t[c]=parseFloat(l):t[c]=l}else t[n.trim()]=!0}),e=e.substring(i+7))}return{header:t,body:e}}static removeDocsify(e){const t=e.match(/{docsify-[^}]*}/g);return t&&t.forEach(i=>e=e.replace(i,"")),e}static onCopy(e,t){E4(t),e&&e.stopPropagation(),e&&e.preventDefault()}}function A5e(s){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:e=>s.onClick&&s.onClick(e),viewBox:"0 0 512 512",width:s.width||(s.fontSize==="small"?16:20),height:s.height||s.width||(s.fontSize==="small"?16:20),className:s.className,style:s.style},a.createElement("path",{fill:"currentColor",d:"M448 0L320 96v62.06l-83.03 83.03c6.79 4.25 13.27 9.06 19.07 14.87 5.8 5.8 10.62 12.28 14.87 19.07L353.94 192H416l96-128-64-64zM128 278.59L10.92 395.67c-14.55 14.55-14.55 38.15 0 52.71l52.7 52.7c14.56 14.56 38.15 14.56 52.71 0L233.41 384c29.11-29.11 29.11-76.3 0-105.41s-76.3-29.11-105.41 0z"}))}function sg(s){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:e=>s.onClick&&s.onClick(e),viewBox:"0 0 320 320",width:s.width||(s.fontSize==="small"?16:20),height:s.height||s.width||(s.fontSize==="small"?16:20),className:s.className,style:s.style},a.createElement("g",{fill:"currentColor"},a.createElement("rect",{rx:"32",height:"272",width:"267",y:"25",x:"25",strokeWidth:"15",stroke:"currentColor",fill:"none"}),a.createElement("ellipse",{stroke:"currentColor",ry:"26",rx:"26",cy:"248",cx:"160",fill:"none",strokeWidth:"15"}),a.createElement("line",{y2:"201.94531",x2:"159.5",y1:"46.94531",x1:"159.5",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",stroke:"currentColor",fill:"none"}),a.createElement("rect",{height:"27",width:"50",y:"79.7979",x:"133.5",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",stroke:"currentColor",fill:"#fff"})))}function Bs(s){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:e=>s.onClick&&s.onClick(e),viewBox:"0 0 512 512",width:s.width||(s.fontSize==="small"?16:20),height:s.height||s.width||(s.fontSize==="small"?16:20),className:s.className,style:s.style},a.createElement("path",{fill:"currentColor",d:"M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z"}))}function ig(s){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:e=>s.onClick&&s.onClick(e),viewBox:"0 0 320 320",width:s.width||(s.fontSize==="small"?16:20),height:s.height||s.width||(s.fontSize==="small"?16:20),className:s.className,style:s.style},a.createElement("g",{fill:"currentColor"},a.createElement("rect",{rx:"32",height:"272",width:"267",y:"25",x:"25",strokeWidth:"15",stroke:"currentColor",fill:"none"}),a.createElement("ellipse",{stroke:"currentColor",ry:"26",rx:"26",cy:"252",cx:"160",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",fill:"#fff"}),a.createElement("line",{y2:"201.94531",x2:"159.5",y1:"46.94531",x1:"159.5",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",stroke:"currentColor",fill:"none"}),a.createElement("rect",{height:"27",width:"50",y:"140.83068",x:"133.5",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",stroke:"currentColor",fill:"#fff"}),a.createElement("ellipse",{stroke:"currentColor",ry:"26",rx:"26",cy:"251",cx:"241",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",fill:"#fff"}),a.createElement("line",{y2:"200.94531",x2:"240.5",y1:"45.94531",x1:"240.5",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",stroke:"currentColor",fill:"none"}),a.createElement("rect",{height:"27",width:"50",y:"78.7979",x:"214.5",strokeWidth:"15",stroke:"currentColor",fill:"#fff"}),a.createElement("ellipse",{stroke:"currentColor",ry:"26",rx:"26",cy:"252",cx:"84",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",fill:"#fff"}),a.createElement("line",{y2:"201.94531",x2:"83.5",y1:"46.94531",x1:"83.5",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",stroke:"currentColor",fill:"none"}),a.createElement("rect",{height:"27",width:"50",y:"79.7979",x:"57.5",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",stroke:"currentColor",fill:"#fff"})))}function m5e(s){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",onClick:e=>s.onClick&&s.onClick(e),width:s.width||(s.fontSize==="small"?16:20),height:s.height||s.width||(s.fontSize==="small"?16:20),className:s.className,style:s.style},a.createElement("path",{fill:"currentColor",d:"M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48z"}))}function f5e(s){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:e=>s.onClick&&s.onClick(e),viewBox:"0 0 512 512",width:s.width||(s.fontSize==="small"?16:20),height:s.height||s.width||(s.fontSize==="small"?16:20),className:s.className,style:s.style},a.createElement("path",{fill:"currentColor",d:"M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48z"}),a.createElement("path",{fill:"currentColor",stroke:"null",d:"m261,270l-12,0l0,-24c0,-33.12 -26.88,-60 -60,-60s-60,26.88 -60,60l0,24l-12,0c-13.2,0 -24,10.8 -24,24l0,120c0,13.2 10.8,24 24,24l144,0c13.2,0 24,-10.8 24,-24l0,-120c0,-13.2 -10.8,-24 -24,-24zm-72,108c-13.2,0 -24,-10.8 -24,-24s10.8,-24 24,-24s24,10.8 24,24s-10.8,24 -24,24zm37.2,-108l-74.4,0l0,-24c0,-20.52 16.68,-37.2 37.2,-37.2c20.52,0 37.2,16.68 37.2,37.2l0,24z"}))}function O5e(s){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:e=>s.onClick&&s.onClick(e),viewBox:"0 0 512 512",width:s.width||(s.fontSize==="small"?16:20),height:s.height||s.width||(s.fontSize==="small"?16:20),className:s.className,style:s.style},a.createElement("path",{fill:"currentColor",d:"M448 0L320 96v62.06l-83.03 83.03c6.79 4.25 13.27 9.06 19.07 14.87 5.8 5.8 10.62 12.28 14.87 19.07L353.94 192H416l96-128-64-64zM128 278.59L10.92 395.67c-14.55 14.55-14.55 38.15 0 52.71l52.7 52.7c14.56 14.56 38.15 14.56 52.71 0L233.41 384c29.11-29.11 29.11-76.3 0-105.41s-76.3-29.11-105.41 0z"}))}function rr(s){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:e=>s.onClick&&s.onClick(e),viewBox:"0 0 320 320",width:s.width||(s.fontSize==="small"?16:20),height:s.height||s.width||(s.fontSize==="small"?16:20),className:s.className,style:s.style},a.createElement("rect",{fill:"none",rx:"32",height:"272",width:"267",y:"25",x:"25",strokeWidth:"15",stroke:"currentColor"}),a.createElement("ellipse",{fill:"none",ry:"54",rx:"54",cy:"160",cx:"160",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",stroke:"currentColor"}))}function E5e(s){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:e=>s.onClick&&s.onClick(e),viewBox:"0 0 24 24",width:s.width||(s.fontSize==="small"?16:20),height:s.height||s.width||(s.fontSize==="small"?16:20),className:s.className,style:s.style},a.createElement("path",{fill:"currentColor",stroke:"currentColor",d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39A.998.998 0 0 0 18.95 4H5.04c-.83 0-1.3.95-.79 1.61z"}))}const $n={root:{width:"100%",height:"100%"},overflowHidden:{overflow:"hidden"},container:{height:"100%"}};function _5e(s){var e;return a.createElement(AN,{elevation:Number.isNaN(s.elevation)?1:s.elevation,style:{...$n.root,...((e=s.styles)==null?void 0:e.root)||void 0,...s.overflow!=="visible"?$n.overflowHidden:void 0},onKeyDown:s.onKeyDown,tabIndex:s.tabIndex},a.createElement(ts,{container:!0,direction:"column",wrap:"nowrap",sx:$n.container},s.children))}const B0={root:{height:"100%",overflow:"hidden"},overflowAuto:{overflow:"auto"}},x5e=a.forwardRef(function(e,t){return a.createElement(ts,{sx:{...B0.root,...(e==null?void 0:e.style)||void 0,...e.overflow==="auto"?B0.overflowAuto:void 0},ref:t},e.children)});function S5e(s){return a.createElement(ts,{container:!0,alignItems:"center"},s.children)}const Li=24,$e=32,rg=s=>s==="dark"?"#62ff25":"#37c400",og=s=>s==="dark"?"#ee56ff":"#a204b4",k5e=s=>s==="dark"?"#fff46e":"#b89101",ng=s=>"#ff6d69",ag=s=>"#5773ff",v5e=["0_userdata.0.","alias.0."],ss={headerCellInput:{width:"calc(100% - 5px)",height:$e,pt:0,"& .itemIcon":{verticalAlign:"middle",width:Li,height:Li,display:"inline-block"}},headerCellSelectItem:{"& .itemIcon":{width:Li,height:Li,mr:"5px",display:"inline-block"}},selectNone:{opacity:.5},selectClearButton:{position:"absolute",top:0,right:0,borderRadius:5,backgroundColor:"background.default"},cellIdTooltipLink:{color:"#7ec2fd","&:hover":{color:"#7ec2fd"},"&:visited":{color:"#7ec2fd"}},cellIdTooltip:{fontSize:14}};function Y5e(s){return a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 436 436",style:s==null?void 0:s.style,width:"24",height:"24",className:"admin-button"},a.createElement("g",{fill:"currentColor"},a.createElement("path",{d:"m195.23077,24.30769c-36,3 -67,12 -96,26c-49,24 -82,61 -93,104l-3,11l-1,50c0,46 0,49 2,59l5,20c21,58 84,103 165,116c16,3 53,4 70,2c60,-6 111,-28 147,-64c21,-21 36,-49 40,-74a866,866 0 0 0 1,-104c-3,-18 -6,-28 -13,-43c-26,-52 -87,-90 -162,-101c-16,-2 -48,-3 -63,-2l1,0zm60,23c36,5 70,18 95,35c31,20 51,47 59,77c2,7 2,11 2,25c1,15 0,18 -2,26c-19,69 -104,117 -200,114c-47,-2 -90,-15 -124,-38c-31,-20 -51,-47 -59,-77c-3,-11 -4,-32 -2,-43c8,-42 41,-78 91,-101a260,260 0 0 1 140,-19l0,1zm-221,222c21,26 57,49 95,62c81,27 174,14 239,-32c14,-10 31,-27 41,-41c2,-2 2,-2 2,7c-1,23 -16,50 -38,72c-78,74 -233,74 -311,-1a121,121 0 0 1 -39,-76l0,-6l3,4l8,11z"}),a.createElement("path",{d:"m201.23077,47.30769c-40,3 -79,19 -104,44c-55,55 -38,133 37,171c52,26 122,24 172,-5c30,-17 51,-42 58,-71c3,-11 3,-34 0,-45c-6,-23 -21,-44 -40,-60l-27,-16a184,184 0 0 0 -96,-18zm30,21c56,5 100,35 112,75c4,11 4,30 0,41c-8,25 -26,45 -54,59a166,166 0 0 1 -160,-8a98,98 0 0 1 -41,-53c-5,-18 -2,-39 8,-57c23,-39 79,-62 135,-57z"})))}function R0(s){s=(s||"").toString();const e=s[0]==="*",t=s[s.length-1]==="*";return s=s.replace(/[-/\\^$+?.()|[\]{}]/g,"\\$&").replace(/\*/g,".*"),(e?"":"^")+s+(t?"":"$")}function Q5e(s,e){const t=[];for(let i=0;i{if(r==null)return;const n=typeof r=="object";if(t&&n&&typeof r.en=="string"&&typeof r.de=="string"){i[o]=r.en;return}i[o]=n?_a(r,e,t):r}):b5e(s,(i,r,o)=>{if(r==null||e.includes(o))return;const n=typeof r=="object";if(t&&n&&typeof r.en=="string"&&typeof r.de=="string"){i[o]=r.en;return}i[o]=n?_a(r,e,t):r})}function F0(s,e,t){const i=document.createElement("a"),r=[];t.excludeSystemRepositories&&r.push("system.repositories");const o=r.length>0||t.excludeTranslations?_a(e,r,t.excludeTranslations):e,n=t.beautify?JSON.stringify(o,null,2):JSON.stringify(o);i.setAttribute("href",`data:application/json;charset=utf-8,${encodeURIComponent(n)}`),i.setAttribute("download",s),i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i)}class U5e extends De{hasIcons;timer=null;constructor(e){var t;super(e),this.state={value:e.initialValue||[]},this.hasIcons=!!((t=e.values)!=null&&t.find(i=>i.icon))}componentWillUnmount(){this.timer&&clearTimeout(this.timer)}render(){var e;return a.createElement("div",{style:{position:"relative"}},a.createElement(nt,{variant:"standard",key:this.props.name,sx:ss.headerCellInput,className:"no-underline",multiple:!0,renderValue:t=>t!=null&&t.length?t.map(i=>{const r=this.props.values.find(c=>typeof c=="object"?c.value===i:c===i);let o,n,M;return typeof r=="object"?(o=r.value,n=r.name,M=r.icon):(o=r,n=r),a.createElement(J,{component:"span",sx:ss.headerCellSelectItem,key:o},M||(this.hasIcons?a.createElement("div",{className:"itemIcon"}):null),n)}):this.props.name==="custom"?this.props.texts.showAll:this.props.texts[`filter_${this.props.name}`],value:this.state.value,onChange:t=>{let i=t.target.value;if(this.state.value[0]==="_"&&i.includes("_")&&i.length>1){const r=i.indexOf("_");r!==-1&&i.splice(r,1)}else this.state.value[0]!=="_"&&i.includes("_")&&(i=["_"]);i.includes("")&&(i=[]),this.setState({value:i},()=>{this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.timer=null,this.props.onChange(this.props.name,i)},400)})},onClose:()=>{this.timer&&(clearTimeout(this.timer),this.timer=null,this.props.onChange(this.props.name,this.state.value))},inputProps:{name:this.props.name,id:this.props.name},displayEmpty:!0},a.createElement(re,{key:"empty",value:""},a.createElement("span",{style:ss.selectNone},this.props.name==="custom"?this.props.texts.showAll:this.props.texts[`filter_${this.props.name}`])),(e=this.props.values)==null?void 0:e.map(t=>{let i,r,o;return typeof t=="object"?(i=t.value,r=t.name,o=t.icon):(i=t,r=t),a.createElement(re,{sx:ss.headerCellSelectItem,key:i,value:i},o||(this.hasIcons?a.createElement("div",{className:"itemIcon"}):null),r)})),this.state.value.length?a.createElement(J,{component:"div",sx:ss.selectClearButton},a.createElement(W,{size:"small",onClick:()=>{this.timer&&(clearTimeout(this.timer),this.timer=null),this.setState({value:[]},()=>this.props.onChange(this.props.name,void 0))}},a.createElement(we,null))):null)}}class $5e extends De{timer=null;constructor(e){super(e),this.state={value:e.initialValue||""}}componentWillUnmount(){this.timer&&clearTimeout(this.timer)}render(){return a.createElement(Qt,{sx:this.props.styles,key:this.props.name,title:this.props.t("ra_You can use * as wildcard"),margin:"dense"},a.createElement(qt,{classes:{underline:"no-underline"},id:this.props.name,placeholder:this.props.texts[`filter_${this.props.name}`],value:this.state.value,onChange:e=>{const t=e.target.value;this.setState({value:t},()=>{this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.timer=null,this.props.onChange(this.props.name,t)},400)})},onBlur:()=>{this.timer&&(clearTimeout(this.timer),this.timer=null,this.props.onChange(this.props.name,this.state.value))},autoComplete:"off"}),this.state.value?a.createElement("div",{style:{position:"absolute",right:0}},a.createElement(W,{size:"small",onClick:()=>{this.timer&&(clearTimeout(this.timer),this.timer=null),this.setState({value:""},()=>this.props.onChange(this.props.name,void 0))}},a.createElement(we,null))):null)}}function jr(s,e,t,i){if(t||=0,i===void 0&&(i=s.length-1,!i))return s[0]===e;const r=Math.floor((t+i)/2);return e===s[r]?!0:i-1===t?s[t]===e||s[i]===e:e>s[r]?jr(s,e,r,i):ex.toLowerCase())),(L=e.custom)!=null&&L.length&&(r.custom=e.custom.map(x=>x.toLowerCase())),(g=e.role)!=null&&g.length&&(r.role=e.role.map(x=>x.toLowerCase())),(j=e.room)!=null&&j.length&&(r.room=[],e.room.forEach(x=>{var S,R;r.room=r.room.concat(((R=(S=i[x])==null?void 0:S.common)==null?void 0:R.members)||[])})),(y=e.func)!=null&&y.length&&(r.func=[],e.func.forEach(x=>{var S,R;r.func=r.func.concat(((R=(S=i[x])==null?void 0:S.common)==null?void 0:R.members)||[])}))}const N=s.data;if(N!=null&&N.id){const x=(T=N.obj)==null?void 0:T.common;if(n){if(n.type&&(typeof n.type=="string"?(!N.obj||n.type!==N.obj.type)&&(l=!0):Array.isArray(n.type)&&(!N.obj||!n.type.includes(N.obj.type))&&(l=!0)),!l&&((d=n.common)!=null&&d.type)&&(x!=null&&x.type?typeof n.common.type=="string"?n.common.type!==x.type&&(l=!0):Array.isArray(n.common.type)&&(n.common.type.includes(x.type)||(l=!0)):l=!0),!l&&((I=n.common)!=null&&I.role)&&(x!=null&&x.role?typeof n.common.role=="string"?x.role.startsWith(n.common.role)&&(l=!0):Array.isArray(n.common.role)&&(n.common.role.find(S=>x.role.startsWith(S))||(l=!0)):l=!0),!l&&((w=n.common)==null?void 0:w.custom)==="_"&&(x!=null&&x.custom))l=!0;else if(!l&&((A=n.common)!=null&&A.custom)&&((p=n.common)==null?void 0:p.custom)!=="_"){const S=n.common.custom;if(!(x!=null&&x.custom))l=!0;else if(S==="_dataSources")Object.keys(x.custom).find(R=>R.startsWith("history.")||R.startsWith("sql.")||R.startsWith("influxdb."))||(l=!0);else if(Array.isArray(S)){const R=Object.keys(x.custom);S.find(he=>R.find(Xe=>Xe.startsWith(he)))&&(l=!0)}else S!==!0&&!Object.keys(x.custom).find(R=>R.startsWith(S))&&(l=!0)}}!l&&!e.expertMode&&(l=N.id==="system"||N.id==="enum"||N.id.startsWith("system.")||N.id.startsWith("enum.")||N.id.startsWith("_design/")||N.id.endsWith(".admin")||!!(x!=null&&x.expert)),!l&&r.id&&(N.fID===void 0&&(N.fID=N.id.toLowerCase()),l=!N.fID.includes(r.id)),!l&&r.idRx&&(l=!r.idRx.test(N.id)),!l&&r.name&&(x?(N.fName===void 0&&(N.fName=He(x.name,t)||"",N.fName=N.fName.toLowerCase()),l=!N.fName.includes(r.name)):l=!0),!l&&r.nameRx&&x&&(N.fName===void 0&&(N.fName=He(x.name,t)||"",N.fName=N.fName.toLowerCase()),l=!r.nameRx.test(N.fName)),!l&&((h=e.role)!=null&&h.length)&&x&&(l=!(typeof x.role=="string"&&r.role.find(S=>x.role.startsWith(S)))),!l&&((C=r.room)!=null&&C.length)&&(l=!r.room.find(S=>S===N.id||N.id.startsWith(`${S}.`))),!l&&((E=r.func)!=null&&E.length)&&(l=!r.func.find(S=>S===N.id||N.id.startsWith(`${S}.`))),!l&&((O=r.type)!=null&&O.length)&&(l=!((b=N.obj)!=null&&b.type&&r.type.includes(N.obj.type))),!l&&M&&(l=!((k=N.obj)!=null&&k.type&&M.includes(N.obj.type))),!l&&((K=r.custom)!=null&&K.length)&&(x?r.custom[0]==="_"?l=!!x.custom:x.custom?l=!r.custom.find(S=>x.custom[S]):l=!0:l=r.custom[0]!=="_")}return N.visible=!l,N.hasVisibleChildren=!1,s.children&&c<20&&s.children.forEach(x=>{xa(x,e,t,i,r,o,n,M,c+1)&&(N.hasVisibleChildren=!0)}),N.sumVisibility=N.visible||N.hasVisibleChildren,o&&N.sumVisibility&&o.count++,N.id&&N.sumVisibility&&s.children&&s.children.forEach(x=>x.data.hasVisibleParent=!0),N.visible||N.hasVisibleChildren}function Mg(s,e,t,i){var o;i||=[];const r=s.data;return r.sumVisibility&&(r.id&&t[r.id]&&t[r.id].type===e&&i.push(r.id),(o=s.children)==null||o.forEach(n=>Mg(n,e,t,i))),i}function G0(s,e,t,i,r,o){let n;return e==="alias"||e==="alias.0"?n=a.createElement(SN,{className:"iconOwn",style:{color:og(i)}}):e==="0_userdata"||e==="0_userdata.0"?n=a.createElement(Vj,{className:"iconOwn",style:{color:rg(i)}}):e.startsWith("_design/")||e==="system"?n=a.createElement(jo,{className:"iconOwn",style:{color:ng(i)}}):e==="system.adapter"?n=a.createElement(jo,{className:"iconOwn",style:{color:ag(i)}}):e==="system.group"?n=a.createElement(rM,{className:"iconOwn"}):e==="system.user"?n=a.createElement(sM,{className:"iconOwn"}):e==="system.host"?n=a.createElement(iM,{className:"iconOwn"}):e.endsWith(".connection")||e.endsWith(".connected")?n=a.createElement(li,{className:"iconOwn"}):e.endsWith(".info")?n=a.createElement(tM,{className:"iconOwn"}):s[e]&&s[e].type==="meta"?n=a.createElement(Yo,{className:"iconOwn"}):t<2&&s[`system.adapter.${e}`]&&(n=_o(s,`system.adapter.${e}`,r,o)),n||null}function cg(s,e){var t,i;return(i=(t=s==null?void 0:s.obj)==null?void 0:t.common)!=null&&i.desc&&He(s.obj.common.desc,e)||null}function P5e(s,e){const t=cg(s,e);return t!=null&&t.startsWith("http")?a.createElement(J,{component:"a",sx:ss.cellIdTooltipLink,href:t,target:"_blank",rel:"noreferrer"},t):a.createElement("span",{style:ss.cellIdTooltip},t||s.id||"")}function H0(s,e){var N,u,L,g,j,y,T,d,I,w;const t=e.imagePrefix||".";let i=Object.keys(s);i.sort((A,p)=>A===p?0:(A=A.replace(/\./g,"!!!"),p=p.replace(/\./g,"!!!"),A>p?1:-1)),e.root&&(i=i.filter(A=>A===e.root||A.startsWith(`${e.root}.`)));let r=[],o="",n=0;const M={data:{name:"",id:""},children:[]},c={funcEnums:[],roomEnums:[],roles:[],ids:[],types:[],objects:s,customs:["_"],enums:[],hasSomeCustoms:!1,aliasesMap:{}};let l=M;for(let A=0;Ak.role===b)?typeof b!="string"?console.warn(`Invalid role type "${typeof b}" in "${h._id}"`):c.roles.push({role:b,type:O.type}):p.startsWith("enum.rooms.")?(c.roomEnums.push(p),c.enums.push(p)):p.startsWith("enum.functions.")?(c.funcEnums.push(p),c.enums.push(p)):h.type==="enum"?c.enums.push(p):h.type==="instance"&&O&&(O.supportCustoms||(N=O.adminUI)!=null&&N.custom)&&(c.hasSomeCustoms=!0,c.customs.push(p.substring(15))),p.startsWith("alias.")&&((u=h.common.alias)!=null&&u.id))if(typeof h.common.alias.id=="string"){const k=h.common.alias.id;c.aliasesMap[k]?c.aliasesMap[k].includes(p)||c.aliasesMap[k].push(p):c.aliasesMap[k]=[p]}else{const k=h.common.alias.id.read;k&&(c.aliasesMap[k]?c.aliasesMap[k].includes(p)||c.aliasesMap[k].push(p):c.aliasesMap[k]=[p]);const K=h.common.alias.id.write;K&&(c.aliasesMap[K]?c.aliasesMap[K].includes(p)||c.aliasesMap[K].push(p):c.aliasesMap[K]=[p])}}c.ids.push(p);let E;do if(E=!1,!o||p.startsWith(`${o}.`)){if(C.length-n>1){let b=o;for(let k=n;kK.data.name===C[k]));else{const K={data:{name:C[k],parent:l,id:b,obj:s[b],level:k,icon:G0(s,b,k,e.themeType,e.lang,t),generated:!0}};l.children||=[],l.children.push(K),l=K,c.ids.push(b)}}const O={data:{name:C[C.length-1],title:He((L=h==null?void 0:h.common)==null?void 0:L.name,e.lang),obj:h,parent:l,icon:_o(s,p,e.lang,t)||G0(s,p,0,e.themeType,e.lang,t),id:p,hasCustoms:!!((g=h.common)!=null&&g.custom&&Object.keys(h.common.custom).length),level:C.length-1,generated:!1,button:h.type==="state"&&!!((j=h.common)!=null&&j.role)&&typeof h.common.role=="string"&&h.common.role.startsWith("button")&&((y=h.common)==null?void 0:y.write)!==!1,switch:h.type==="state"&&((T=h.common)==null?void 0:T.type)==="boolean"&&((d=h.common)==null?void 0:d.write)!==!1&&((I=h.common)==null?void 0:I.read)!==!1,url:!!((w=h.common)!=null&&w.role)&&typeof h.common.role=="string"&&h.common.role.startsWith("url")}};l.children||=[],l.children.push(O),l=O,n=C.length,r=C,o=p}else{let O=0;for(;r[O]===C[O];)O++;if(O>0){let b=r.length;for(r=r.splice(0,O),n=O,o=r.join(".");b>O;)l.data.parent?l=l.data.parent:console.error(`Parent is null for ${p} ${o} ${r.join(".")}`),b--}else l=M,r=[],o="",n=0;E=!0}while(E)}return c.roomEnums.sort((A,p)=>{var E,O,b,k;const h=He((O=(E=s[A])==null?void 0:E.common)==null?void 0:O.name,e.lang)||A.split(".").pop(),C=He((k=(b=s[p])==null?void 0:b.common)==null?void 0:k.name,e.lang)||p.split(".").pop();return h>C?1:h{var E,O,b,k;const h=He((O=(E=s[A])==null?void 0:E.common)==null?void 0:O.name,e.lang)||A.split(".").pop(),C=He((k=(b=s[p])==null?void 0:b.common)==null?void 0:k.name,e.lang)||p.split(".").pop();return h>C?1:hA.role.localeCompare(p.role)),c.types.sort(),{info:c,root:M}}function ug(s,e,t,i,r){if(s.data.id===e)return s;if(t||(t=e.split("."),r=0,i=t[r]),!s.children&&s.data.id!==e)return null;let o;if(s.children)for(let n=0;ni)break}return o?(r||=0,ug(o,e,t,`${i}.${t[r+1]}`,r+1)):null}function lg(s,e,t,i){var n,M;if(!e)return{rooms:[],per:!1};i||=[];for(const c of s.roomEnums){const l=(n=s.objects[c])==null?void 0:n.common;if(!l)continue;const N=He(l.name,t);(M=l.members)!=null&&M.includes(e)&&!i.includes(N)&&i.push(N)}let r;const o=e.split(".");return o.pop(),e=o.join("."),s.objects[e]&&(r=i.length,lg(s,e,t,i)),{rooms:i,per:!r}}function Rs(s,e,t,i){var r,o;if(!e)return[];i||=[];for(let n=0;n946681200&&l<9466812e5&&(l*=1e3),l=l&&new Date(l).toString();else if(M!=null&&M.role&&typeof M.role=="string"&&M.role.match(/^value\.duration/)){if(typeof l=="number"&&l>=0){const j=Math.floor(l/3600),y=Math.floor(l%3600/60),T=Math.floor(l%60);l=`${j.toString().padStart(2,"0")}:${y.toString().padStart(2,"0")}:${T.toString().padStart(2,"0")}`}else if(typeof l=="string"&&m.isStringInteger(l)){const j=parseInt(l,10);if(j>=0){const y=Math.floor(j/3600),T=Math.floor(j%3600/60),d=Math.floor(j%60);l=`${y.toString().padStart(2,"0")}:${T.toString().padStart(2,"0")}:${d.toString().padStart(2,"0")}`}}}else N==="number"?Number.isInteger(l)||(l=Math.round(l*1e8)/1e8,i&&(l=l.toString().replace(".",","))):N==="object"?l=JSON.stringify(l):N!=="string"?l=l.toString():l.startsWith("data:image/")&&(c="image"),typeof l!="string"&&(l=l.toString());const u={v:l};n&&n[l]!==void 0&&l!==n[l]&&(u.s=l,l=n[l],u.v=l),((g=u.v)==null?void 0:g.length)>40&&(u.c=u.v,u.v=`${u.v.substring(0,40)}...`),M!=null&&M.unit&&(u.u=M.unit);let L;if(s.full&&(typeof l=="string"&&l.length>100?L=[{t:r.value,v:`${l.substring(0,100)}...`}]:L=[{t:r.value,v:l}],t)){if(t.ack!==void 0&&t.ack!==null&&L.push({t:r.ack,v:t.ack.toString()}),t.ts&&L.push({t:r.ts,v:t.ts?m.formatDate(new Date(t.ts),e):""}),t.lc&&L.push({t:r.lc,v:t.lc?m.formatDate(new Date(t.lc),e):""}),t.from){let j=t.from.toString();j.startsWith("system.adapter.")&&(j=j.substring(15)),L.push({t:r.from,v:j})}if(t.user){let j=t.user.toString();j.startsWith("system.user.")&&(j=j.substring(12)),L.push({t:r.user,v:j})}t.c&&L.push({t:r.c,v:t.c}),L.push({t:r.quality,v:m.quality2text(t.q||0).join(", "),nbr:!0})}return{valText:u,valFull:L,fileViewer:c}}function W5e(s){const{state:e}=s;return{color:e!=null&&e.ack?e.q?"#ffa500":"":s.nonAckColor||"#ff2222c9"}}function J5e(s,e){let t=e,i=1;const r=[];for(;i=t)r.push(0);else if(i1){const i=e.path;let r;const o=s;if(o[i[0]]&&typeof o[i[0]]=="object")return i.length===2?r=o[i[0]][i[1]]:i.length===3?r=o[i[0]][i[1]]&&typeof o[i[0]][i[1]]=="object"?o[i[0]][i[1]][i[2]]:null:i.length===4?r=o[i[0]][i[1]]&&typeof o[i[0]][i[1]]=="object"&&o[i[0]][i[1]][i[2]]?o[i[0]][i[1]][i[2]][i[3]]:null:i.length===5?r=o[i[0]][i[1]]&&typeof o[i[0]][i[1]]=="object"&&o[i[0]][i[1]][i[2]]&&o[i[0]][i[1]][i[2]][i[3]]?o[i[0]][i[1]][i[2]][i[3]][i[4]]:null:i.length===6&&(r=o[i[0]][i[1]]&&typeof o[i[0]][i[1]]=="object"&&o[i[0]][i[1]][i[2]]&&o[i[0]][i[1]][i[2]][i[3]]&&o[i[0]][i[1]][i[2]][i[3]][i[4]]?o[i[0]][i[1]][i[2]][i[3]][i[4]][i[5]]:null),r??null}return null}function B5e(s,e,t){var i;if((i=s==null?void 0:s._id)!=null&&i.startsWith(`${e.adapter}.`)&&e.path.length>1){const r=e.path,o=s;if(o[r[0]]&&typeof o[r[0]]=="object"){if(r.length===2)return o[r[0]][r[1]]=t,!0;if(r.length===3){if(o[r[0]][r[1]]&&typeof o[r[0]][r[1]]=="object")return o[r[0]][r[1]][r[2]]=t,!0}else if(r.length===4){if(o[r[0]][r[1]]&&typeof o[r[0]][r[1]]=="object"&&o[r[0]][r[1]][r[2]]&&typeof o[r[0]][r[1]][r[2]]=="object")return o[r[0]][r[1]][r[2]][r[3]]=t,!0}else if(r.length===5){if(o[r[0]][r[1]]&&typeof o[r[0]][r[1]]=="object"&&o[r[0]][r[1]][r[2]]&&typeof o[r[0]][r[1]][r[2]]=="object"&&o[r[0]][r[1]][r[2]][r[3]]&&typeof o[r[0]][r[1]][r[2]][r[3]]=="object")return o[r[0]][r[1]][r[2]][r[3]][r[4]]=t,!0}else if(r.length===6&&o[r[0]][r[1]]&&typeof o[r[0]][r[1]]=="object"&&o[r[0]][r[1]][r[2]]&&typeof o[r[0]][r[1]][r[2]]=="object"&&o[r[0]][r[1]][r[2]][r[3]]&&typeof o[r[0]][r[1]][r[2]][r[3]]=="object"&&o[r[0]][r[1]][r[2]][r[3]][r[4]]&&typeof o[r[0]][r[1]][r[2]][r[3]][r[4]]=="object")return o[r[0]][r[1]][r[2]][r[3]][r[4]][r[5]]=t,!0}}return!1}function Z0(s){return!!v5e.find(e=>s.startsWith(e))}const R5e=16,Ie=20,Lg="#ff413c",gg="#86211f",Sa="#57ff45",ka="#098c04",va="#f3ad11",Ya="#6c5008",z={toolbar:{minHeight:38},toolbarButtons:{padding:4,marginLeft:4},switchColumnAuto:{marginLeft:16},dialogColumns:{transition:"opacity 1s"},dialogColumnsLabel:{fontSize:12,paddingTop:8},columnCustom:{width:"100%",display:"inline-block"},columnCustomEditable:{cursor:"text"},columnCustom_center:{textAlign:"center"},columnCustom_left:{textAlign:"left"},columnCustom_right:{textAlign:"right"},width100:{width:"100%"},transparent_10:{opacity:.1},transparent_20:{opacity:.2},transparent_30:{opacity:.3},transparent_40:{opacity:.4},transparent_50:{opacity:.5},transparent_60:{opacity:.6},transparent_70:{opacity:.7},transparent_80:{opacity:.8},transparent_90:{opacity:.9},transparent_100:{opacity:1},headerRow:{paddingLeft:8,height:38,whiteSpace:"nowrap",userSelect:"none"},buttonClearFilter:{position:"relative",float:"right",padding:0},buttonClearFilterIcon:{zIndex:2,position:"absolute",top:0,left:0,color:"#FF0000",opacity:.7},tableDiv:{paddingTop:0,paddingLeft:0,width:"calc(100% - 8px)",height:"calc(100% - 38px)",overflow:"auto"},tableRow:s=>({pl:1,height:$e,lineHeight:`${$e}px`,verticalAlign:"top",userSelect:"none",position:"relative",width:"100%","&:hover":{background:`${s.palette.mode==="dark"?s.palette.primary.dark:s.palette.primary.light} !important`,color:m.invertColor(s.palette.primary.main,!0)},whiteSpace:"nowrap",flexWrap:"nowrap"}),tableRowLines:s=>({borderBottom:`1px solid ${s.palette.mode==="dark","#8888882e"}`,"& > div":{borderRight:`1px solid ${s.palette.mode==="dark","#8888882e"}`}}),tableRowNoDragging:{cursor:"pointer"},tableRowAlias:{height:$e+10},tableRowAliasReadWrite:{height:$e+22},tableRowFocused:s=>({"&:after":{content:'""',position:"absolute",top:1,left:1,right:1,bottom:1,border:s.palette.mode?"1px dotted #000":"1px dotted #FFF"}}),checkBox:{padding:0},cellId:{position:"relative",fontSize:"1rem",overflow:"hidden",textOverflow:"ellipsis","& .copyButton":{display:"none"},"&:hover .copyButton":{display:"block"},"& .iconOwn":{display:"block",width:$e-4,height:$e-4,mt:"2px",float:"right"},"&:hover .iconOwn":{display:"none"},"& *":{width:"initial"}},cellIdSpan:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},cellIdIconFolder:s=>({marginRight:8,width:$e-4,height:$e-4,cursor:"pointer",color:s.palette.secondary.main||"#fbff7d",verticalAlign:"top"}),cellIdIconDocument:{verticalAlign:"middle",marginLeft:($e-Ie)/2,marginRight:8,width:Ie,height:Ie},cellIdIconOwn:{},cellCopyButton:{width:Ie,height:Ie,top:($e-Ie)/2,opacity:.8,position:"absolute",right:3},cellCopyButtonInDetails:{width:Ie,height:Ie,top:($e-Ie)/2,opacity:.8},cellEditButton:{width:Ie,height:Ie,color:"white",position:"absolute",top:($e-Ie)/2,right:Ie+3,opacity:.7,"&:hover":{opacity:1}},cellName:{display:"inline-block",verticalAlign:"top",fontSize:14,ml:"5px",overflow:"hidden",textOverflow:"ellipsis",position:"relative","& .copyButton":{display:"none"},"&:hover .copyButton":{display:"block"}},cellNameWithDesc:{lineHeight:"normal"},cellNameDivDiv:{},cellDescription:{fontSize:10,opacity:.5,fontStyle:"italic"},cellIdAlias:s=>({fontStyle:"italic",fontSize:12,opacity:.7,"&:hover":{color:s.palette.mode==="dark"?"#009900":"#007700"}}),cellIdAliasReadWriteDiv:{height:24,marginTop:-5},cellIdAliasAlone:{lineHeight:0},cellIdAliasReadWrite:{lineHeight:"12px"},cellType:{display:"inline-block",verticalAlign:"top","& .itemIcon":{verticalAlign:"middle",width:Li,height:Li,display:"inline-block"},"& .itemIconFolder":{marginLeft:3}},cellRole:{display:"inline-block",verticalAlign:"top",textOverflow:"ellipsis",overflow:"hidden"},cellRoom:{display:"inline-block",verticalAlign:"top",textOverflow:"ellipsis",overflow:"hidden"},cellEnumParent:{opacity:.4},cellFunc:{display:"inline-block",verticalAlign:"top",textOverflow:"ellipsis",overflow:"hidden"},cellValue:{display:"inline-block",verticalAlign:"top",textOverflow:"ellipsis",overflow:"hidden"},cellValueButton:{marginTop:5},cellValueButtonFalse:{opacity:.3},cellAdapter:{display:"inline-block",verticalAlign:"top"},cellValueTooltip:{fontSize:12},cellValueText:{width:"100%",height:$e,fontSize:16,display:"flex",overflow:"hidden",textOverflow:"ellipsis",position:"relative",verticalAlign:"top","& .copyButton":{display:"none"},"&:hover .copyButton":{display:"block"}},cellValueFile:{color:"#2837b9"},cellValueTooltipTitle:{fontStyle:"italic",width:100,display:"inline-block"},cellValueTooltipValue:{width:120,display:"inline-block",whiteSpace:"nowrap",textOverflow:"ellipsis"},cellValueTooltipImage:{width:100,height:"auto"},cellValueTooltipBoth:{width:220,display:"inline-block",whiteSpace:"nowrap"},cellValueTooltipBox:{width:250,overflow:"hidden",pointerEvents:"none"},tooltip:{pointerEvents:"none"},cellValueTextUnit:{marginLeft:4,opacity:.8,display:"inline-block"},cellValueTextState:{opacity:.7},cellValueTooltipCopy:{position:"absolute",bottom:3,right:3},cellValueTooltipEdit:{position:"absolute",bottom:3,right:15},cellButtons:{display:"inline-block",verticalAlign:"top"},cellButtonsButton:{display:"inline-block",opacity:.5,width:Ie+4,height:Ie+4,"&:hover":{opacity:1},p:0,mt:"-2px"},cellButtonsEmptyButton:{fontSize:12},cellButtonMinWidth:{minWidth:40},cellButtonsButtonAlone:{ml:`${Ie+6}px`,pt:0,mt:"-2px"},cellButtonsButtonWithCustoms:s=>({color:s.palette.mode==="dark"?s.palette.primary.main:s.palette.secondary.main}),cellButtonsButtonWithoutCustoms:{opacity:.2},cellButtonsValueButton:s=>({position:"absolute",top:Ie/2-2,opacity:.7,width:Ie-2,height:Ie-2,color:s.palette.action.active,"&:hover":{opacity:1}}),cellButtonsValueButtonCopy:{right:8,cursor:"pointer"},cellButtonsValueButtonEdit:{right:Ie/2+16},cellDetailsLine:{display:"flex",alignItems:"center",width:"100%",height:32,fontSize:16},cellDetailsName:{fontWeight:"bold",marginRight:8,minWidth:80},filteredOut:{opacity:.5},filteredParentOut:{opacity:.3},filterInput:{mt:0,mb:0},selectIcon:{width:24,height:24,marginRight:4},itemSelected:s=>({background:`${s.palette.primary.main} !important`,color:`${m.invertColor(s.palette.primary.main,!0)} !important`}),header:{width:"100%"},headerCell:{display:"inline-block",verticalAlign:"top"},headerCellValue:{paddingTop:4,fontSize:16},visibleButtons:{color:"#2196f3",opacity:.7},grow:{flexGrow:1},enumIconDiv:{marginRight:8,width:32,height:32,borderRadius:8,background:"#FFFFFF"},enumIcon:{marginTop:4,marginLeft:4,width:24,height:24},enumDialog:{overflow:"hidden"},enumList:{minWidth:250,height:"calc(100% - 50px)",overflow:"auto"},enumCheckbox:{minWidth:0},buttonDiv:{display:"flex",height:"100%",alignItems:"center"},aclText:{fontSize:13,marginTop:6},rightsObject:{color:"#55ff55",paddingLeft:3},rightsState:{color:"#86b6ff",paddingLeft:3},textCenter:{padding:12,textAlign:"center"},tooltipAccessControl:{display:"flex",flexDirection:"column"},fontSizeTitle:{"@media screen and (max-width: 465px)":{"& *":{fontSize:12}}},draggable:{cursor:"copy"},nonDraggable:{cursor:"no-drop"},iconDeviceConnected:s=>({color:s.palette.mode==="dark"?Sa:ka,opacity:.8,position:"absolute",top:4,right:32,width:20}),iconDeviceDisconnected:s=>({color:s.palette.mode==="dark"?va:Ya,opacity:.8,position:"absolute",top:4,right:32,width:20}),iconDeviceError:s=>({color:s.palette.mode==="dark"?Lg:gg,opacity:.8,position:"absolute",top:4,right:50,width:20}),resizeHandle:{display:"block",position:"absolute",cursor:"col-resize",width:7,top:2,bottom:2,zIndex:1},resizeHandleRight:{right:3,borderRight:"2px dotted #888","&:hover":{borderColor:"#ccc",borderRightStyle:"solid"},"&.active":{borderColor:"#517ea5",borderRightStyle:"solid"}},invertedBackground:s=>({backgroundColor:s.palette.mode==="dark"?"#9a9a9a":"#565656",padding:"0 3px",borderRadius:"2px 0 0 2px"}),invertedBackgroundFlex:s=>({backgroundColor:s.palette.mode==="dark"?"#9a9a9a":"#565656",borderRadius:"0 2px 2px 0"}),contextMenuEdit:s=>({color:s.palette.mode==="dark"?"#ffee48":"#cbb801"}),contextMenuEditValue:s=>({color:s.palette.mode==="dark"?"#5dff45":"#1cd301"}),contextMenuView:s=>({color:s.palette.mode==="dark"?"#FFF":"#000"}),contextMenuCustom:s=>({color:s.palette.mode==="dark"?"#42eaff":"#01bbc2"}),contextMenuACL:s=>({color:s.palette.mode==="dark"?"#e079ff":"#500070"}),contextMenuRoom:s=>({color:s.palette.mode==="dark"?"#ff9a33":"#642a00"}),contextMenuRole:s=>({color:s.palette.mode==="dark"?"#ffdb43":"#562d00"}),contextMenuDelete:s=>({color:s.palette.mode==="dark"?"#ff4f4f":"#cf0000"}),contextMenuKeys:{marginLeft:8,opacity:.7,fontSize:"smaller"},contextMenuWithSubMenu:{display:"flex"},...ss},X0={state:a.createElement(rr,{className:"itemIcon",style:{verticalAlign:"middle"}}),channel:a.createElement(sg,{className:"itemIcon",style:{verticalAlign:"middle"}}),device:a.createElement(ig,{className:"itemIcon",style:{verticalAlign:"middle"}}),adapter:a.createElement(A5e,{className:"itemIcon",style:{verticalAlign:"middle"}}),meta:a.createElement(Yo,{className:"itemIcon",style:{verticalAlign:"middle"}}),instance:a.createElement(O5e,{className:"itemIcon",style:{color:"#7da7ff",verticalAlign:"middle"}}),enum:a.createElement(ay,{className:"itemIcon",style:{verticalAlign:"middle"}}),chart:a.createElement(Ly,{className:"itemIcon",style:{verticalAlign:"middle"}}),config:a.createElement(qn,{className:"itemIcon",style:{verticalAlign:"middle"}}),group:a.createElement(rM,{className:"itemIcon",style:{verticalAlign:"middle"}}),user:a.createElement(sM,{className:"itemIcon",style:{verticalAlign:"middle"}}),host:a.createElement(iM,{className:"itemIcon",style:{verticalAlign:"middle"}}),schedule:a.createElement(Bj,{className:"itemIcon",style:{verticalAlign:"middle"}}),script:a.createElement(qa,{className:"itemIcon",style:{verticalAlign:"middle"}}),folder:a.createElement(Ti,{className:"itemIcon itemIconFolder",style:{verticalAlign:"middle"}})},ze={xs:{idWidth:"100%",fields:[],widths:{}},sm:{idWidth:300,fields:["room","val"],widths:{room:100,val:200}},md:{idWidth:300,fields:["room","func","val","buttons"],widths:{name:200,room:150,func:150,val:120,buttons:120}},lg:{idWidth:300,fields:["name","type","role","room","func","val","buttons","changedFrom","qualityCode","timestamp","lastChange"],widths:{name:300,type:80,role:120,room:180,func:180,val:140,buttons:120,changedFrom:120,qualityCode:100,timestamp:165,lastChange:165}},xl:{idWidth:550,fields:["name","type","role","room","func","val","buttons","changedFrom","qualityCode","timestamp","lastChange"],widths:{name:400,type:80,role:120,room:180,func:180,val:140,buttons:120,changedFrom:120,qualityCode:100,timestamp:170,lastChange:170}}};let K0=!1;const Fs={id:"",name:"",room:[],func:[],role:[],type:[],custom:[],expertMode:!1};class xo extends De{info={funcEnums:[],roomEnums:[],roles:[],ids:[],types:[],objects:{},customs:[],enums:[],hasSomeCustoms:!1,aliasesMap:{}};localStorage=window._localStorage||window.localStorage;tableRef;pausedSubscribes=!1;selectFirst;root=null;states={};subscribes=[];unsubscribeTimer=null;statesUpdateTimer=null;objectsUpdateTimer=null;visibleCols;texts;possibleCols;imagePrefix;adapterColumns=[];styleTheme="";edit={id:"",val:"",q:0,ack:!1};levelPadding;customWidth=!1;resizeTimeout=null;resizerNextName=null;resizerActiveName=null;resizerCurrentWidths={};resizeLeft=!1;resizerOldWidth=0;resizerMin=0;resizerNextMin=0;resizerOldWidthNext=0;resizerPosition=0;resizerActiveDiv=null;resizerNextDiv=null;storedWidths=null;systemConfig;objects;defaultHistory="";ctrlPressed=!1;columnsVisibility={};changedIds=null;contextMenu=null;recordStates=[];styles={};expertMode=!1;customColumnDialog=null;constructor(e){super(e);const t=this.localStorage.getItem(`${e.dialogName||"App"}.objectSelected`)||"";if(this.selectFirst="",this.expertMode=!!this.props.expertMode,t.startsWith("["))try{const T=JSON.parse(t);this.selectFirst=T[0]||""}catch{}else this.selectFirst=t;let i;const r=this.localStorage.getItem(`${e.dialogName||"App"}.objectExpanded`)||"[]";try{i=JSON.parse(r)}catch{i=[]}let o;const n=e.defaultFilters?"":this.localStorage.getItem(`${e.dialogName||"App"}.objectFilter`)||"";if(n)try{o=JSON.parse(n)}catch{o={...Fs}}else e.defaultFilters&&typeof e.defaultFilters=="object"?o={...e.defaultFilters}:o={...Fs};if(typeof o.room=="string"&&o.room&&(o.room=[o.room].filter(T=>T),o.room.length||delete o.room),typeof o.func=="string"&&o.func&&(o.func=[o.func].filter(T=>T),o.func.length||delete o.func),typeof o.role=="string"&&o.role&&(o.role=[o.role].filter(T=>T),o.role.length||delete o.role),typeof o.type=="string"&&(o.type=[o.type].filter(T=>T),o.type.length||delete o.type),typeof o.custom=="string"&&(o.custom=[o.custom].filter(T=>T),o.custom.length||delete o.custom),o.expertMode=e.expertMode!==void 0?e.expertMode:(window._sessionStorage||window.sessionStorage).getItem("App.expertMode")==="true",this.tableRef=IN(),this.visibleCols=e.columns||ze[e.width||"lg"].fields,e.types&&e.types.length===1){const T=this.visibleCols.indexOf("type");T!==-1&&this.visibleCols.splice(T,1)}this.possibleCols=ze.xl.fields;let M=null;if(e.router){const T=e.router.getLocation();T.id&&T.dialog==="customs"&&(M=[T.id],this.pauseSubscribe(!0))}let c;Array.isArray(e.selected)?c=e.selected:c=[e.selected||""],c=c.map(T=>T.replace(/["']/g,"")).filter(T=>T),this.selectFirst=c.length&&c[0]?c[0]:this.selectFirst;const l=this.localStorage.getItem(`${e.dialogName||"App"}.columns`);let N;try{N=l?JSON.parse(l):null}catch{N=null}let u=null;try{u=u?JSON.parse(u):{}}catch{u={}}this.imagePrefix=e.imagePrefix||".";let L;const g=this.localStorage.getItem(`${e.dialogName||"App"}.foldersFirst`);g==="false"?L=!1:g==="true"?L=!0:L=e.foldersFirst===void 0?!0:e.foldersFirst;let j=!1;try{j=this.props.objectStatesView&&JSON.parse(this.localStorage.getItem(`${e.dialogName||"App"}.objectStatesView`)||"")||!1}catch{}this.state={aliasMenu:"",beautifyJsonExport:!0,columns:N,columnsAuto:this.localStorage.getItem(`${e.dialogName||"App"}.columnsAuto`)!=="false",columnsDialogTransparent:100,columnsEditCustomDialog:null,columnsForAdmin:null,columnsSelectorShow:!1,columnsWidths:u,customColumnDialogValueChanged:!1,customDialog:M,depth:0,editObjectAlias:!1,editObjectDialog:"",enumDialog:null,excludeSystemRepositoriesFromExport:!0,excludeTranslations:!1,expandAllVisible:!1,expanded:i,filter:o,filterKey:0,focused:this.localStorage.getItem(`${e.dialogName||"App"}.focused`)||"",foldersFirst:L,linesEnabled:this.localStorage.getItem(`${e.dialogName||"App"}.lines`)==="true",loaded:!1,noStatesByExportImport:!1,roleDialog:null,scrollBarWidth:16,selected:c,selectedNonObject:this.localStorage.getItem(`${e.dialogName||"App"}.selectedNonObject`)||"",showAliasEditor:"",showAllExportOptions:!1,showContextMenu:null,showDescription:this.localStorage.getItem(`${e.dialogName||"App"}.desc`)!=="false",showExportDialog:!1,showImportDialog:!1,showImportMenu:null,showRenameDialog:null,statesView:j,toast:"",tooltipInfo:null,viewFileDialog:""},this.texts={name:e.t("ra_Name"),categories:e.t("ra_Categories"),value:e.t("ra_tooltip_value"),ack:e.t("ra_tooltip_ack"),ts:e.t("ra_tooltip_ts"),lc:e.t("ra_tooltip_lc"),from:e.t("ra_tooltip_from"),user:e.t("ra_tooltip_user"),c:e.t("ra_tooltip_comment"),quality:e.t("ra_tooltip_quality"),editObject:e.t("ra_tooltip_editObject"),deleteObject:e.t("ra_tooltip_deleteObject"),customConfig:e.t("ra_tooltip_customConfig"),copyState:e.t("ra_tooltip_copyState"),editState:e.t("ra_tooltip_editState"),ctrlForLink:e.t("ra_tooltip_ctrlForLink"),close:e.t("ra_Close"),filter_id:e.t("ra_filter_id"),filter_name:e.t("ra_filter_name"),filter_type:e.t("ra_filter_type"),filter_role:e.t("ra_filter_role"),filter_room:e.t("ra_filter_room"),filter_func:e.t("ra_filter_func"),filter_custom:e.t("ra_filter_customs"),filterCustomsWithout:e.t("ra_filter_customs_without"),objectChangedByUser:e.t("ra_object_changed_by_user"),objectChangedBy:e.t("ra_object_changed_by"),objectChangedFrom:e.t("ra_state_changed_from"),stateChangedBy:e.t("ra_state_changed_by"),stateChangedFrom:e.t("ra_state_changed_from"),ownerGroup:e.t("ra_Owner group"),ownerUser:e.t("ra_Owner user"),showAll:e.t("ra_show_all"),deviceError:e.t("ra_Error"),deviceDisconnected:e.t("ra_Disconnected"),deviceConnected:e.t("ra_Connected"),aclOwner_read_object:e.t("ra_aclOwner_read_object"),aclOwner_read_state:e.t("ra_aclOwner_read_state"),aclOwner_write_object:e.t("ra_aclOwner_write_object"),aclOwner_write_state:e.t("ra_aclOwner_write_state"),aclGroup_read_object:e.t("ra_aclGroup_read_object"),aclGroup_read_state:e.t("ra_aclGroup_read_state"),aclGroup_write_object:e.t("ra_aclGroup_write_object"),aclGroup_write_state:e.t("ra_aclGroup_write_state"),aclEveryone_read_object:e.t("ra_aclEveryone_read_object"),aclEveryone_read_state:e.t("ra_aclEveryone_read_state"),aclEveryone_write_object:e.t("ra_aclEveryone_write_object"),aclEveryone_write_state:e.t("ra_aclEveryone_write_state"),create:e.t("ra_Create"),createBooleanState:e.t("ra_create_boolean_state"),createNumberState:e.t("ra_create_number_state"),createStringState:e.t("ra_create_string_state"),createState:e.t("ra_create_state"),createChannel:e.t("ra_create_channel"),createDevice:e.t("ra_create_device"),createFolder:e.t("ra_Create folder")},this.levelPadding=e.levelPadding||R5e;const y=this.localStorage.getItem(`${this.props.dialogName||"App"}.table`);if(y)try{const T=JSON.parse(y),d=this.props.width||"lg";this.storedWidths=JSON.parse(JSON.stringify(ze[d])),Object.keys(T).forEach(I=>{I==="id"?ze[d].idWidth=T.id:I==="nameHeader"?ze[d].widths.name=T[I]:ze[d].widths[I]!==void 0&&(ze[d].widths[I]=T[I])}),this.customWidth=!0}catch{}this.calculateColumnsVisibility()}async loadAllObjects(e){var i;const t=this.props;try{await new Promise(l=>{this.setState({updating:!0},()=>l())});const r=(t.objectsWorker?await t.objectsWorker.getObjects(e):await t.socket.getObjects(e,!0))||{};if(t.types&&ke.isWeb())for(let l=0;l{try{if(l(r[N]))this.objects[N]=r[N];else{const u=r[N]&&r[N].type;u&&(u==="channel"||u==="device"||u==="folder"||u==="adapter"||u==="instance")&&(this.objects[N]=r[N])}}catch(u){console.log(`Error by filtering of "${N}": ${u}`)}})}else if(t.types){this.objects={};const l=t.types;Object.keys(r).forEach(N=>{var L;const u=(L=r[N])==null?void 0:L.type;u&&(u==="channel"||u==="device"||u==="enum"||u==="folder"||u==="adapter"||u==="instance"||l.includes(u))&&(this.objects[N]=r[N])})}else this.objects=r;t.setObjectsReference&&t.setObjectsReference(this.objects),this.defaultHistory=this.systemConfig.common.defaultHistory,this.defaultHistory&&t.socket.getState(`system.adapter.${this.defaultHistory}.alive`).then(l=>{l!=null&&l.val||(this.defaultHistory="")}).catch(l=>window.alert(`Cannot get state: ${l}`));const o=await this.getAdditionalColumns();this.calculateColumnsVisibility(null,null,o);const{info:n,root:M}=H0(this.objects,{imagePrefix:t.imagePrefix,root:t.root,lang:t.lang,themeType:t.themeType});this.root=M,this.info=n;const c=((i=this.state.selected)==null?void 0:i.length)&&ug(this.root,this.state.selected[0]);c&&!xa(c,this.state.filter,t.lang,this.objects,void 0,void 0,t.customFilter,t.types)?this.setState({filter:{...Fs},columnsForAdmin:o},()=>{this.doFilter(),this.setState({loaded:!0,updating:!1},()=>this.expandAllSelected(()=>this.onAfterSelect()))}):(this.doFilter(),this.setState({loaded:!0,updating:!1,columnsForAdmin:o},()=>this.expandAllSelected(()=>this.onAfterSelect())))}catch(r){this.showError(r)}}expandAllSelected(e){const t=[...this.state.expanded];let i=!1;this.state.selected.forEach(r=>{const o=r.split("."),n=[];for(let M=0;M!this.objects[N]))&&((c=(M=this.props).onSelect)==null||c.call(M,this.state.selected,null,e))}else this.localStorage.removeItem(`${this.props.dialogName||"App"}.objectSelected`),this.state.selected.length?this.setState({selected:[]},()=>{this.props.onSelect&&(this.state.focused&&this.props.allowNonObjects?(this.selectFirst&&this.selectFirst!==this.state.selected[0]&&(this.selectFirst=""),this.props.onSelect([this.state.focused],null,e)):this.props.onSelect([],""))}):this.props.onSelect&&(this.state.focused&&this.props.allowNonObjects?(this.selectFirst&&this.selectFirst!==this.state.selected[0]&&(this.selectFirst=""),this.props.onSelect([this.state.focused],null,e)):this.props.onSelect([],""))}static getDerivedStateFromProps(e,t){const i={};let r=!1;return e.expertMode!==void 0&&e.expertMode!==t.filter.expertMode&&(r=!0,i.filter={...t.filter},i.filter.expertMode=e.expertMode),r?i:null}async componentDidMount(){await this.loadAllObjects(!K0),this.props.objectsWorker?this.props.objectsWorker.registerHandler(this.onObjectChangeFromWorker):await this.props.socket.subscribeObject("*",this.onObjectChange),K0=!0,window.addEventListener("contextmenu",this.onContextMenu,!0),window.addEventListener("keydown",this.onKeyPress,!0),window.addEventListener("keyup",this.onKeyPress,!0),this.props.onAllLoaded&&setTimeout(()=>{var e,t;(t=(e=this.props).onAllLoaded)==null||t.call(e)},100)}onKeyPress=e=>{e.type==="keydown"&&e.ctrlKey&&!this.ctrlPressed?(this.ctrlPressed=!0,this.tableRef.current&&(this.tableRef.current.className="highlight-link")):e.type==="keyup"&&!e.ctrlKey&&this.ctrlPressed&&(this.ctrlPressed=!1,this.tableRef.current&&(this.tableRef.current.className=""))};componentWillUnmount(){window.removeEventListener("contextmenu",this.onContextMenu,!0),window.removeEventListener("keydown",this.onKeyPress,!0),window.removeEventListener("keyup",this.onKeyPress,!0),this.props.objectsWorker?this.props.objectsWorker.unregisterHandler(this.onObjectChangeFromWorker,!0):this.props.socket.unsubscribeObject("*",this.onObjectChange).catch(e=>console.error(`Cannot unsubscribe *: ${e}`)),this.subscribes.forEach(e=>{this.props.socket.unsubscribeState(e,this.onStateChange)}),this.subscribes=[],this.objects={}}showDeleteDialog(e){var c,l,N,u;const{id:t,obj:i,item:r}=e,o=Object.keys(this.objects);o.sort();let n=0;const M=`${t}.`;for(let L=0;LM)break;(u=(N=this.props).onObjectDelete)==null||u.call(N,t,!!((c=r.children)!=null&&c.length),!((l=i.common)!=null&&l.dontDelete),n+1)}onContextMenu=e=>{this.contextMenu&&Date.now()-this.contextMenu.ts<2e3?(e.preventDefault(),this.setState({showContextMenu:{item:this.contextMenu.item,position:{left:e.clientX+2,top:e.clientY-6}}})):this.state.showContextMenu&&(e.preventDefault(),this.setState({showContextMenu:null})),this.contextMenu=null};refreshComponent(){this.subscribes.forEach(e=>{this.props.socket.unsubscribeState(e,this.onStateChange)}),this.subscribes=[],this.loadAllObjects(!0).then(()=>console.log("updated!")).catch(e=>this.showError(e))}renderErrorDialog(){return this.state.error?a.createElement(Ae,{open:!0,maxWidth:"sm",fullWidth:!0,onClose:()=>this.setState({error:""}),"aria-labelledby":"error-dialog-title","aria-describedby":"error-dialog-description"},a.createElement(fe,{id:"alert-dialog-title"},this.props.t("ra_Error")),a.createElement(_e,null,a.createElement(as,{id:"alert-dialog-description"},this.state.error)),a.createElement(xe,null,a.createElement(q,{variant:"contained",onClick:()=>this.setState({error:""}),color:"primary",autoFocus:!0,startIcon:a.createElement(We,null)},this.props.t("ra_Ok")))):null}showError(e){this.setState({error:typeof e=="object"?e&&typeof e.toString=="function"?e.toString():JSON.stringify(e):e})}onSelect(e,t,i){if(this.localStorage.setItem(`${this.props.dialogName||"App"}.focused`,e),!this.props.multiSelect)this.objects[e]&&(!this.props.types||this.props.types.includes(this.objects[e].type))?(this.localStorage.removeItem(`${this.props.dialogName||"App"}.selectedNonObject`),this.state.selected[0]!==e?this.setState({selected:[e],selectedNonObject:"",focused:e},()=>{this.onAfterSelect(t),i&&i()}):t&&this.props.onSelect&&this.onAfterSelect(t)):(this.localStorage.setItem(`${this.props.dialogName||"App"}.selectedNonObject`,e),this.setState({selected:[],selectedNonObject:e,focused:e},()=>{this.onAfterSelect(),i&&i()}));else if(this.objects[e]&&(!this.props.types||this.props.types.includes(this.objects[e].type))){this.localStorage.removeItem(`${this.props.dialogName||"App"}.selectedNonObject`);const r=[...this.state.selected],o=r.indexOf(e);o===-1?(r.push(e),r.sort()):t||r.splice(o,1),this.setState({selected:r,selectedNonObject:"",focused:e},()=>{this.onAfterSelect(t),i&&i()})}}_renderDefinedList(e){const t=[...this.possibleCols];if(t.unshift("id"),this.props.columns&&!this.props.columns.includes("buttons")){const i=t.indexOf("buttons");i!==-1&&t.splice(i,1)}return t.filter(i=>e&&(i==="val"||i==="buttons")||!e&&i!=="val"&&i!=="buttons").map(i=>{var r;return a.createElement(_c,{onClick:()=>{if(!this.state.columnsAuto&&i!=="id"){const o=[...this.state.columns||[]],n=o.indexOf(i);n===-1?(o.push(i),o.sort()):o.splice(n,1),this.localStorage.setItem(`${this.props.dialogName||"App"}.columns`,JSON.stringify(o)),this.calculateColumnsVisibility(null,o),this.setState({columns:o})}},key:i},a.createElement(ue,{edge:"start",disabled:i==="id"||this.state.columnsAuto,checked:i==="id"||!!(this.state.columnsAuto?this.visibleCols.includes(i):(r=this.state.columns)!=null&&r.includes(i)),disableRipple:!0}),a.createElement(dt,{primary:this.texts[`filter_${i}`]||this.props.t(`ra_${i}`)}))})}renderColumnsSelectorDialog(){return this.state.columnsSelectorShow?a.createElement(Ae,{onClose:()=>this.setState({columnsSelectorShow:!1}),open:!0,sx:{"& .MuiPaper-root":m.getStyle(this.props.theme,z.dialogColumns,z[`transparent_${this.state.columnsDialogTransparent}`])}},a.createElement(fe,{sx:z.fontSizeTitle},this.props.t("ra_Configure")),a.createElement(_e,{sx:z.fontSizeTitle},a.createElement(V,{style:z.switchColumnAuto,control:a.createElement(br,{checked:this.state.foldersFirst,onChange:()=>{this.localStorage.setItem(`${this.props.dialogName||"App"}.foldersFirst`,this.state.foldersFirst?"false":"true"),this.setState({foldersFirst:!this.state.foldersFirst})}}),label:this.props.t("ra_Folders always first")}),a.createElement(V,{style:z.switchColumnAuto,control:a.createElement(br,{checked:this.state.linesEnabled,onChange:()=>{this.localStorage.setItem(`${this.props.dialogName||"App"}.lines`,this.state.linesEnabled?"false":"true"),this.setState({linesEnabled:!this.state.linesEnabled})}}),label:this.props.t("ra_Show lines between rows")}),a.createElement(V,{style:z.switchColumnAuto,control:a.createElement(br,{checked:this.state.columnsAuto,onChange:()=>{this.localStorage.setItem(`${this.props.dialogName||"App"}.columnsAuto`,this.state.columnsAuto?"false":"true"),this.state.columnsAuto?this.state.columns?(this.calculateColumnsVisibility(!1),this.setState({columnsAuto:!1})):(this.calculateColumnsVisibility(!1,[...this.visibleCols]),this.setState({columnsAuto:!1,columns:[...this.visibleCols]})):(this.calculateColumnsVisibility(!0),this.setState({columnsAuto:!0}))}}),label:this.props.t("ra_Auto (no custom columns)")}),a.createElement(xc,null,this._renderDefinedList(!1),this.state.columnsForAdmin&&Object.keys(this.state.columnsForAdmin).sort().map(e=>{var t;return(t=this.state.columnsForAdmin)==null?void 0:t[e].map(i=>{var r;return a.createElement(_c,{onClick:()=>{if(!this.state.columnsAuto){const o=[...this.state.columns||[]],n=`_${e}_${i.path}`,M=o.indexOf(n);M===-1?(o.push(n),o.sort()):o.splice(M,1),this.calculateColumnsVisibility(null,o),this.localStorage.setItem(`${this.props.dialogName||"App"}.columns`,JSON.stringify(o)),this.setState({columns:o})}},key:`${e}_${i.name}`},a.createElement(Xt,null,a.createElement(ue,{disabled:this.state.columnsAuto,edge:"start",checked:!this.state.columnsAuto&&((r=this.state.columns)==null?void 0:r.includes(`_${e}_${i.path}`)),disableRipple:!0})),a.createElement(dt,{primary:`${i.name} (${e})`}))})}),this._renderDefinedList(!0))),a.createElement(xe,null,a.createElement(q,{variant:"contained",onClick:()=>this.setState({columnsSelectorShow:!1}),color:"primary",startIcon:a.createElement(we,null)},this.texts.close))):null}async getAdditionalColumns(){try{const e=await this.props.socket.getAdapters();let t=null;return e.forEach(i=>t=this.parseObjectForAdmins(t,i)),t}catch(e){return console.error(`Cannot get adapters: ${e}`),null}}checkUnsubscribes(){for(let e=this.subscribes.length-1;e>=0;e--)this.recordStates.includes(this.subscribes[e])||this.unsubscribe(this.subscribes[e]);this.recordStates=[]}findItem(e,t,i,r){if(t||=e.split("."),i||=this.root,!i||!t.length)return null;if(r=(r?`${r}.`:"")+t.shift(),i.children){const o=i.children.find(n=>n.data.id===r);if(o){if(o.data.id===e)return o;if(t.length)return this.findItem(e,t,o,r)}else return null}return null}onStateChange=(e,t)=>{if(this.states[e]){const i=this.findItem(e);i!=null&&i.data.state&&(i.data.state=void 0)}t?this.states[e]=t:delete this.states[e],this.pausedSubscribes?this.statesUpdateTimer&&(clearTimeout(this.statesUpdateTimer),this.statesUpdateTimer=null):this.statesUpdateTimer||(this.statesUpdateTimer=setTimeout(()=>{this.statesUpdateTimer=null,this.forceUpdate()},300))};parseObjectForAdmins(e,t){var i;if((i=t.common)!=null&&i.adminColumns&&t.common.name){const r=t.common.adminColumns;let o;r&&typeof r!="object"?o=[r]:r&&(o=r);let n;r?n=o.map(M=>{if(typeof M!="object")return{path:M,name:M.split(".").pop()};const c=M;return c.objTypes&&typeof c.objTypes!="object"?c.objTypes=[c.objTypes]:c.objTypes||(c.objTypes=void 0),!c.name&&c.path?{path:c.path,name:c.path.split(".").pop(),width:c.width,edit:!!c.edit,type:c.type,objTypes:c.objTypes}:c.path?{path:c.path,name:He(c.name||"",this.props.lang),width:c.width,edit:!!c.edit,type:c.type,objTypes:c.objTypes}:(console.warn(`Admin columns for ${t._id} ignored, because path not found`),null)}).filter(M=>M):n=null,n!=null&&n.length&&(e||={},e[t.common.name]=n.sort((M,c)=>M.path>c.path?-1:M.path{if(Array.isArray(e)){let t=null;e.forEach(i=>{const{newInnerState:r,filtered:o}=this.processOnObjectChangeElement(i.id,i.obj);o||(r&&t?Object.assign(t,r):t=r)}),t&&this.setState(t),this.afterObjectUpdated()}};onObjectChange=(e,t)=>{const{newInnerState:i,filtered:r}=this.processOnObjectChangeElement(e,t);r||(i&&this.setState(i),this.afterObjectUpdated())};afterObjectUpdated(){!this.objectsUpdateTimer&&this.objects&&(this.objectsUpdateTimer=setTimeout(()=>{this.objectsUpdateTimer=null;const{info:e,root:t}=H0(this.objects,{imagePrefix:this.props.imagePrefix,root:this.props.root,lang:this.props.lang,themeType:this.props.themeType});this.root=t,this.info=e,this.pausedSubscribes||this.doFilter()},500))}updateAliases(e){var i,r,o;if(!this.objects||!((i=this.info)!=null&&i.aliasesMap)||!(e!=null&&e.startsWith("alias.")))return;const t=Object.keys(this.objects).filter(n=>n.startsWith("alias.0"));this.info.aliasesMap={};for(const n of t){const M=this.objects[n];if((o=(r=M==null?void 0:M.common)==null?void 0:r.alias)!=null&&o.id)if(typeof M.common.alias.id=="string"){const c=M.common.alias.id;this.info.aliasesMap[c]?this.info.aliasesMap[c].includes(n)||this.info.aliasesMap[c].push(n):this.info.aliasesMap[c]=[n]}else{const c=M.common.alias.id.read;c&&(this.info.aliasesMap[c]?this.info.aliasesMap[c].includes(n)||this.info.aliasesMap[c].push(n):this.info.aliasesMap[c]=[n]);const l=M.common.alias.id.write;l&&(this.info.aliasesMap[l]?this.info.aliasesMap[l].includes(n)||this.info.aliasesMap[l].push(n):this.info.aliasesMap[l]=[n])}}}processOnObjectChangeElement(e,t){const i=t==null?void 0:t.type;if(t&&typeof this.props.filterFunc=="function"&&!this.props.filterFunc(t)&&i!=="channel"&&i!=="device"&&i!=="folder"&&i!=="adapter"&&i!=="instance")return{newInnerState:null,filtered:!0};let r=null;if(e.startsWith("system.adapter.")&&(t==null?void 0:t.type)==="adapter"){const o=JSON.parse(JSON.stringify(this.state.columnsForAdmin));this.parseObjectForAdmins(o,t),JSON.stringify(this.state.columnsForAdmin)!==JSON.stringify(o)&&(r={columnsForAdmin:o})}return this.objects||={},t?this.objects[e]=t:this.objects[e]&&delete this.objects[e],this.updateAliases(e),{newInnerState:r,filtered:!1}}subscribe(e){this.subscribes.includes(e)||(this.subscribes.push(e),this.pausedSubscribes||this.props.socket.subscribeState(e,this.onStateChange).catch(t=>console.error(`Cannot subscribe on state ${e}: ${t}`)))}unsubscribe(e){const t=this.subscribes.indexOf(e);t!==-1&&(this.subscribes.splice(t,1),this.states[e]&&delete this.states[e],this.props.socket.unsubscribeState(e,this.onStateChange),this.pausedSubscribes&&console.warn("Unsubscribe during pause?"))}pauseSubscribe(e){!this.pausedSubscribes&&e?(this.pausedSubscribes=!0,this.subscribes.forEach(t=>this.props.socket.unsubscribeState(t,this.onStateChange))):this.pausedSubscribes&&!e&&(this.pausedSubscribes=!1,this.subscribes.forEach(t=>this.props.socket.subscribeState(t,this.onStateChange)))}clearFilter(){JSON.stringify(this.state.filter)!==JSON.stringify(Fs)&&this.setState({filter:{...Fs},filterKey:this.state.filterKey+1},()=>{var e,t;this.doFilter(),(t=(e=this.props).onFilterChanged)==null||t.call(e,{...Fs})})}isFilterEmpty(){var e,t,i,r,o;return!!this.state.filter.id||!!this.state.filter.name||!!((e=this.state.filter.room)!=null&&e.length)||!!((t=this.state.filter.func)!=null&&t.length)||!!((i=this.state.filter.role)!=null&&i.length)||!!((r=this.state.filter.type)!=null&&r.length)||!!((o=this.state.filter.custom)!=null&&o.length)}getFilterInput(e){return a.createElement($5e,{key:`${e}_${this.state.filterKey}`,styles:this.styles.filterInput,name:e,texts:this.texts,t:this.props.t,initialValue:this.state.filter[e],onChange:(t,i)=>{const r={...this.state.filter};i===void 0?delete r[t]:r[t]=i,this.setState({filter:r},()=>{var o,n;this.doFilter(),(n=(o=this.props).onFilterChanged)==null||n.call(o,r)})}})}getFilterSelect(e,t){return a.createElement(U5e,{key:`${e}_${this.state.filterKey}`,name:e,texts:this.texts,initialValue:this.state.filter[e]||[],values:t,onChange:(i,r)=>{const o={...this.state.filter};r===void 0?delete o[i]:o[i]=r,this.setState({filter:o},()=>{var n,M;this.doFilter(),(M=(n=this.props).onFilterChanged)==null||M.call(n,o)})}})}getFilterSelectRole(){return this.getFilterSelect("role",this.info.roles.map(e=>e.role))}getFilterSelectRoom(){const e=this.info.roomEnums.map(t=>{var i,r,o,n;return{name:He((r=(i=this.objects[t])==null?void 0:i.common)==null?void 0:r.name,this.props.lang)||t.split(".").pop(),value:t,icon:a.createElement(be,{src:((n=(o=this.objects[t])==null?void 0:o.common)==null?void 0:n.icon)||"",style:z.selectIcon})}});return this.getFilterSelect("room",e)}getFilterSelectFunction(){const e=this.info.funcEnums.map(t=>{var i,r,o,n;return{name:He((r=(i=this.objects[t])==null?void 0:i.common)==null?void 0:r.name,this.props.lang)||t.split(".").pop(),value:t,icon:a.createElement(be,{src:((n=(o=this.objects[t])==null?void 0:o.common)==null?void 0:n.icon)||"",style:z.selectIcon})}});return this.getFilterSelect("func",e)}getFilterSelectType(){const e=this.info.types.map(t=>({name:t,value:t,icon:X0[t]||null}));return this.getFilterSelect("type",e)}getFilterSelectCustoms(){if(this.info.customs.length>1){const e=this.info.customs.map(t=>({name:t==="_"?this.texts.filterCustomsWithout:t,value:t,icon:t==="_"?null:a.createElement(be,{src:_o(this.objects,t,this.props.lang,this.imagePrefix)||"",style:z.selectIcon})}));return this.getFilterSelect("custom",e)}return null}onExpandAll(e,t){var r;const i=e||this.root;t||=[],(r=i==null?void 0:i.children)==null||r.forEach(o=>{o.data.sumVisibility&&(t.push(o.data.id),this.onExpandAll(o,t))}),i===this.root&&(t.sort(),this.localStorage.setItem(`${this.props.dialogName||"App"}.objectExpanded`,JSON.stringify(t)),this.setState({expanded:t}))}onCollapseAll(){this.localStorage.setItem(`${this.props.dialogName||"App"}.objectExpanded`,JSON.stringify([])),this.localStorage.setItem(`${this.props.dialogName||"App"}.objectSelected`,"[]"),this.setState({expanded:[],depth:0,selected:[]},()=>this.onAfterSelect())}expandDepth(e,t,i){var r;e||=this.root,t>0&&((r=e.children)==null||r.forEach(o=>{o.data.sumVisibility&&(jr(i,o.data.id)||(i.push(o.data.id),i.sort()),t-1>0&&this.expandDepth(o,t-1,i))}))}static collapseDepth(e,t){return t.filter(i=>i.split(".").length<=e)}onExpandVisible(){if(this.state.depth<9){const e=this.state.depth+1,t=[...this.state.expanded];this.root&&this.expandDepth(this.root,e,t),this.localStorage.setItem(`${this.props.dialogName||"App"}.objectExpanded`,JSON.stringify(t)),this.setState({depth:e,expanded:t})}}onStatesViewVisible(){const e=!this.state.statesView;this.localStorage.setItem(`${this.props.dialogName||"App"}.objectStatesView`,JSON.stringify(e)),this.setState({statesView:e})}onCollapseVisible(){if(this.state.depth>0){const e=this.state.depth-1,t=xo.collapseDepth(e,this.state.expanded);this.localStorage.setItem(`${this.props.dialogName||"App"}.objectExpanded`,JSON.stringify(t)),this.setState({depth:e,expanded:t})}}getEnumsForId=e=>{const t=[];return this.info.enums.forEach(i=>{var r,o,n;if((n=(o=(r=this.objects[i])==null?void 0:r.common)==null?void 0:o.members)!=null&&n.includes(e)){const M={_id:this.objects[i]._id,common:JSON.parse(JSON.stringify(this.objects[i].common)),native:this.objects[i].native,type:"enum"};M.common&&(delete M.common.members,delete M.common.custom,delete M.common.mobile),t.push(M)}}),t.length?t:void 0};_createAllEnums=async(e,t)=>{var i,r;for(let o=0;or)break}return e}return[]}async _exportObjects(e){var o;if(e.isAll){F0("allObjects.json",this.objects,e);return}if(!(this.state.selected.length||this.state.selectedNonObject)){window.alert(this.props.t("ra_Save of objects-tree is not possible"));return}const t={},i=this.state.selected[0]||this.state.selectedNonObject,r=this._getSelectedIdsForExport();for(const n of r){if(t[n]=JSON.parse(JSON.stringify(this.objects[n])),((o=t[n])==null?void 0:o.type)==="state"&&!e.noStatesByExportImport){const M=await this.props.socket.getState(n);M&&(t[n].val=M.val,t[n].ack=M.ack)}if(t[n].common){const M=this.getEnumsForId(n);M&&(t[n].common.enums=M)}}F0(`${i}.json`,t,e)}renderExportDialog(){return this.state.showExportDialog===!1?null:a.createElement(Ae,{open:!0,maxWidth:"lg"},a.createElement(fe,null,this.props.t("ra_Select type of export")),a.createElement(_e,null,a.createElement(as,null,this.state.filter.expertMode||this.state.showAllExportOptions?a.createElement(a.Fragment,null,this.props.t("ra_You can export all objects or just the selected branch."),a.createElement("br",null),this.props.t("ra_Selected %s object(s)",this.state.showExportDialog),a.createElement("br",null),a.createElement(V,{control:a.createElement(ue,{checked:this.state.noStatesByExportImport,onChange:e=>this.setState({noStatesByExportImport:e.target.checked})}),label:this.props.t("ra_Do not export values of states")}),a.createElement("br",null),this.props.t("These options can reduce the size of the export file:"),a.createElement(V,{control:a.createElement(ue,{checked:this.state.beautifyJsonExport,onChange:e=>this.setState({beautifyJsonExport:e.target.checked})}),label:this.props.t("Beautify JSON output")}),a.createElement("br",null),a.createElement(V,{control:a.createElement(ue,{checked:this.state.excludeSystemRepositoriesFromExport,onChange:e=>this.setState({excludeSystemRepositoriesFromExport:e.target.checked})}),label:this.props.t("Exclude system repositories from export JSON")}),a.createElement(V,{control:a.createElement(ue,{checked:this.state.excludeTranslations,onChange:e=>this.setState({excludeTranslations:e.target.checked})}),label:this.props.t("Exclude translations (except english) from export JSON")})):null)),a.createElement(xe,null,this.state.filter.expertMode||this.state.showAllExportOptions?a.createElement(q,{color:"grey",variant:"outlined",onClick:()=>this.setState({showExportDialog:!1,showAllExportOptions:!1},()=>this._exportObjects({isAll:!0,noStatesByExportImport:this.state.noStatesByExportImport,beautify:this.state.beautifyJsonExport,excludeSystemRepositories:this.state.excludeSystemRepositoriesFromExport,excludeTranslations:this.state.excludeTranslations}))},a.createElement("span",{style:{marginRight:8}},this.props.t("ra_All objects")),"(",Object.keys(this.objects).length,")"):a.createElement(q,{color:"grey",variant:"outlined",startIcon:a.createElement(Oa,null),onClick:()=>this.setState({showAllExportOptions:!0})},this.props.t("ra_Advanced options")),a.createElement(q,{color:"primary",variant:"contained",autoFocus:!0,onClick:()=>this.setState({showExportDialog:!1,showAllExportOptions:!1},()=>this._exportObjects({isAll:!1,noStatesByExportImport:this.state.noStatesByExportImport,beautify:this.state.beautifyJsonExport,excludeSystemRepositories:this.state.excludeSystemRepositoriesFromExport,excludeTranslations:this.state.excludeTranslations}))},a.createElement("span",{style:{marginRight:8}},this.props.t("ra_Only selected")),"(",this.state.showExportDialog,")"),a.createElement(q,{color:"grey",variant:"contained",onClick:()=>this.setState({showExportDialog:!1,showAllExportOptions:!1}),startIcon:a.createElement(we,null)},this.props.t("ra_Cancel"))))}renderRenameDialog(){var t;if(!this.state.showRenameDialog)return null;const e=this.props.objectMoveRenameDialog;return a.createElement(e,{expertMode:this.props.expertMode,onClose:()=>this.setState({showRenameDialog:null}),id:this.state.showRenameDialog.id,childrenIds:this.state.showRenameDialog.childrenIds,theme:this.props.theme,socket:this.props.socket,t:this.props.t,objectType:(t=this.objects[this.state.showRenameDialog.id])==null?void 0:t.type})}async parseJsonFile(e){try{const t=JSON.parse(e),i=Object.keys(t).length,r=t._id;if(r===void 0&&i)await this.loadObjects(t),window.alert(this.props.t("ra_%s object(s) processed",i));else{if(!r)return window.alert(this.props.t("ra_Invalid structure"));try{let o,n,M;if(t.common.enums&&(o=t.common.enums,delete t.common.enums),t.val&&(n=t.val,delete t.val),t.ack!==void 0&&(M=t.ack,delete t.ack),await this.props.socket.setObject(t._id,t),t.type==="state")if(n!=null)await this.props.socket.setState(t._id,n,M===void 0?!0:M);else{const c=await this.props.socket.getState(t._id);(!c||c.val===null||c.val===void 0)&&await this.props.socket.setState(t._id,t.common.def===void 0?null:t.common.def,!0)}o&&await this._createAllEnums(o,t._id),window.alert(this.props.t("ra_%s was imported",t._id))}catch(o){window.alert(o)}}}catch(t){window.alert(t)}}handleJsonUpload(e){var r;const t=e.target,i=((r=t.files)==null?void 0:r.length)&&t.files[0];if(i){const o=new FileReader;o.onload=n=>{var M;return this.parseJsonFile((M=n.target)==null?void 0:M.result),null},o.readAsText(i)}else window.alert(this.props.t("ra_Failed to open JSON File"))}toolTipObjectCreating=()=>{var i,r;const{t:e}=this.props;let t=[a.createElement("div",{key:1},e("ra_Only following structures of objects are available:")),a.createElement("div",{key:2},e("ra_Folder → State")),a.createElement("div",{key:3},e("ra_Folder → Channel → State")),a.createElement("div",{key:4},e("ra_Folder → Device → Channel → State")),a.createElement("div",{key:5},e("ra_Device → Channel → State")),a.createElement("div",{key:6},e("ra_Channel → State")),a.createElement("div",{key:7,style:{height:10}}),a.createElement("div",{key:8},e('ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".')),a.createElement("div",{key:9},e('ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").'))];if(this.state.selected.length||this.state.selectedNonObject){const o=this.state.selected[0]||this.state.selectedNonObject;if(!(o.split(".").length<2||this.objects[o]&&((i=this.objects[o])==null?void 0:i.type)==="state"))if(this.state.filter.expertMode)switch((r=this.objects[o])==null?void 0:r.type){case"device":t=[a.createElement("div",{key:1},e("ra_Only following structures of objects are available:")),a.createElement("div",{key:5},e("ra_Device → Channel → State")),a.createElement("div",{key:7,style:{height:10}}),a.createElement("div",{key:8},e('ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".')),a.createElement("div",{key:9},e('ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").'))];break;case"folder":t=[a.createElement("div",{key:1},e("ra_Only following structures of objects are available:")),a.createElement("div",{key:2},e("ra_Folder → State")),a.createElement("div",{key:3},e("ra_Folder → Channel → State")),a.createElement("div",{key:4},e("ra_Folder → Device → Channel → State")),a.createElement("div",{key:7,style:{height:10}}),a.createElement("div",{key:8},e('ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".')),a.createElement("div",{key:9},e('ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").'))];break;case"channel":t=[a.createElement("div",{key:1},e("ra_Only following structures of objects are available:")),a.createElement("div",{key:1},e("ra_Channel → State")),a.createElement("div",{key:7,style:{height:10}}),a.createElement("div",{key:8},e('ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".')),a.createElement("div",{key:9},e('ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").'))];break}else(o.startsWith("alias.0")||o.startsWith("0_userdata"))&&(t=[a.createElement("div",{key:1},e("ra_Only following structures of objects are available:")),a.createElement("div",{key:2},e("ra_Folder → State")),a.createElement("div",{key:3},e("ra_Folder → Channel → State")),a.createElement("div",{key:4},e("ra_Folder → Device → Channel → State")),a.createElement("div",{key:5},e("ra_Device → Channel → State")),a.createElement("div",{key:6},e("ra_Channel → State")),a.createElement("div",{key:7,style:{height:10}}),a.createElement("div",{key:7},e('ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".')),a.createElement("div",{key:8},e('ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").'))])}return t.length?t:e("ra_Add new child object to selected parent")};onOpenFile(){const e=document.createElement("input");e.setAttribute("type","file"),e.setAttribute("id","files"),e.setAttribute("opacity","0"),e.addEventListener("change",t=>this.handleJsonUpload(t),!1),e.click()}renderInputJsonDialog(){const e=this.props.objectBrowserInsertJsonObjects;return this.state.showImportDialog?a.createElement(e,{onClose:t=>{this.setState({showImportDialog:!1}),t&&this.parseJsonFile(t)},themeName:this.props.themeName,themeType:this.props.themeType,t:this.props.t}):null}getToolbar(){let e=!1;if(this.state.selected.length||this.state.selectedNonObject){const t=this.state.selected[0]||this.state.selectedNonObject;t.split(".").length<2||this.objects[t]&&this.objects[t].type==="state"?e=!1:(this.state.filter.expertMode||t.startsWith("alias.0")||t.startsWith("0_userdata"))&&(e=!0)}return a.createElement("div",{style:{display:"flex",width:"100%",alignItems:"center",overflowX:"auto"}},a.createElement("div",{style:{display:"flex",width:"100%",alignItems:"center"}},a.createElement(Le,{title:this.props.t("ra_Refresh tree"),slotProps:{popper:{sx:z.tooltip}}},a.createElement("div",null,a.createElement(W,{onClick:()=>this.refreshComponent(),disabled:this.state.updating,size:"large"},a.createElement(_N,null)))),this.props.showExpertButton&&!this.props.expertMode&&a.createElement(Le,{title:this.props.t("ra_expertMode"),slotProps:{popper:{sx:z.tooltip}}},a.createElement(W,{key:"expertMode",color:this.state.filter.expertMode?"secondary":"default",onClick:()=>{const t={...this.state.filter};t.expertMode=!t.expertMode,this.localStorage.setItem(`${this.props.dialogName||"App"}.objectFilter`,JSON.stringify(t)),this.setState({filter:t})},size:"large"},a.createElement(Oa,null))),!this.props.disableColumnSelector&&this.props.width!=="xs"&&a.createElement(Le,{title:this.props.t("ra_Configure"),slotProps:{popper:{sx:z.tooltip}}},a.createElement(W,{key:"columnSelector",color:this.state.columnsAuto?"primary":"default",onClick:()=>this.setState({columnsSelectorShow:!0}),size:"large"},a.createElement(hy,null))),this.props.width!=="xs"&&this.state.expandAllVisible&&a.createElement(Le,{title:this.props.t("ra_Expand all nodes"),slotProps:{popper:{sx:z.tooltip}}},a.createElement(W,{key:"expandAll",onClick:()=>this.onExpandAll(),size:"large"},a.createElement(lo,null))),a.createElement(Le,{title:this.props.t("ra_Collapse all nodes"),slotProps:{popper:{sx:z.tooltip}}},a.createElement(W,{key:"collapseAll",onClick:()=>this.onCollapseAll(),size:"large"},a.createElement(Ti,null))),this.props.width!=="xs"&&a.createElement(Le,{title:this.props.t("ra_Expand one step node"),slotProps:{popper:{sx:z.tooltip}}},a.createElement(W,{key:"expandVisible",color:"primary",onClick:()=>this.onExpandVisible(),size:"large"},a.createElement(Sc,{badgeContent:this.state.depth,color:"secondary",sx:t=>({badge:{right:3,top:3,border:`2px solid ${t.palette.background.paper}`,padding:"0 4px"}})},a.createElement(lo,null)))),this.props.width!=="xs"&&a.createElement(Le,{title:this.props.t("ra_Collapse one step node"),slotProps:{popper:{sx:z.tooltip}}},a.createElement(W,{key:"collapseVisible",color:"primary",onClick:()=>this.onCollapseVisible(),size:"large"},a.createElement(Sc,{sx:t=>({badge:{right:3,top:3,border:`2px solid ${t.palette.background.paper}`,padding:"0 4px"}}),badgeContent:this.state.depth,color:"secondary"},a.createElement(Ti,null)))),this.props.objectStatesView&&a.createElement(Le,{title:this.props.t("ra_Toggle the states view"),slotProps:{popper:{sx:z.tooltip}}},a.createElement(W,{onClick:()=>this.onStatesViewVisible(),size:"large"},a.createElement(My,{color:this.state.statesView?"primary":"inherit"}))),a.createElement(Le,{title:this.props.t("ra_Show/Hide object descriptions"),slotProps:{popper:{sx:z.tooltip}}},a.createElement(W,{onClick:()=>{this.localStorage.setItem(`${this.props.dialogName||"App"}.desc`,this.state.showDescription?"false":"true"),this.setState({showDescription:!this.state.showDescription})},size:"large"},a.createElement(gy,{color:this.state.showDescription?"primary":"inherit"}))),this.props.objectAddBoolean?a.createElement(Le,{title:this.toolTipObjectCreating(),slotProps:{popper:{sx:z.tooltip}}},a.createElement("div",null,a.createElement(W,{disabled:!e,onClick:()=>this.setState({modalNewObj:{id:this.state.selected[0]||this.state.selectedNonObject}}),size:"large"},a.createElement(Kn,null)))):null,this.props.objectImportExport&&a.createElement(Le,{title:this.props.t("ra_Add objects tree from JSON file"),slotProps:{popper:{sx:z.tooltip}}},a.createElement(W,{onClick:t=>{this.props.objectBrowserInsertJsonObjects?this.setState({showImportMenu:t.currentTarget}):this.onOpenFile()},size:"large"},a.createElement(go,null))),this.props.objectBrowserInsertJsonObjects?a.createElement(ws,{anchorEl:this.state.showImportMenu,open:!!this.state.showImportMenu,onClose:()=>this.setState({showImportMenu:null})},a.createElement(re,{onClick:()=>this.setState({showImportMenu:null},()=>this.onOpenFile())},a.createElement(Xt,null,a.createElement(jy,null)),a.createElement(dt,null,this.props.t("ra_From file"))),a.createElement(re,{onClick:()=>this.setState({showImportMenu:null,showImportDialog:!0})},a.createElement(Xt,null,a.createElement(Gj,null)),a.createElement(dt,null,this.props.t("ra_From text")))):null,this.props.objectImportExport&&(!!this.state.selected.length||this.state.selectedNonObject)&&a.createElement(Le,{title:this.props.t("ra_Save objects tree as JSON file"),slotProps:{popper:{sx:z.tooltip}}},a.createElement(W,{onClick:()=>this.setState({showExportDialog:this._getSelectedIdsForExport().length}),size:"large"},a.createElement(go,{style:{transform:"rotate(180deg)"}})))),!!this.props.objectBrowserEditObject&&this.props.width!=="xs"&&a.createElement("div",{style:{display:"flex",whiteSpace:"nowrap"}},`${this.props.t("ra_Objects")}: ${Object.keys(this.info.objects).length}, ${this.props.t("ra_States")}: ${Object.keys(this.info.objects).filter(t=>this.info.objects[t].type==="state").length}`),this.props.objectEditBoolean&&a.createElement(Le,{title:this.props.t("ra_Edit custom config"),slotProps:{popper:{sx:z.tooltip}}},a.createElement(W,{onClick:()=>{var i;const t=this.root?Mg(this.root,"state",this.objects):[];t.length?(this.pauseSubscribe(!0),t.length===1&&(this.localStorage.setItem(`${this.props.dialogName||"App"}.objectSelected`,this.state.selected[0]),(i=this.props.router)==null||i.doNavigate(null,"custom",this.state.selected[0])),this.setState({customDialog:t,customDialogAll:!0})):this.setState({toast:this.props.t("ra_please select object")})},size:"large"},a.createElement(Jj,null))))}toggleExpanded(e){const t=JSON.parse(JSON.stringify(this.state.expanded)),i=t.indexOf(e);i===-1?(t.push(e),t.sort()):t.splice(i,1),this.localStorage.setItem(`${this.props.dialogName||"App"}.objectExpanded`,JSON.stringify(t)),this.setState({expanded:t})}onCopy(e,t){e.stopPropagation(),e.preventDefault(),t&&(m.copyToClipboard(t),t.length<50?this.setState({toast:this.props.t("ra_Copied %s",t)}):this.setState({toast:this.props.t("ra_Copied")}))}renderTooltipAccessControl=e=>{if(!e)return null;const t=[{value:"0x400",valueNum:1024,title:"read",group:"Owner"},{value:"0x200",valueNum:512,title:"write",group:"Owner"},{value:"0x40",valueNum:64,title:"read",group:"Group"},{value:"0x20",valueNum:32,title:"write",group:"Group"},{value:"0x4",valueNum:4,title:"read",group:"Everyone"},{value:"0x2",valueNum:2,title:"write",group:"Everyone"}],i=[],r=o=>{const n=e[o];t.forEach((M,c)=>{n&M.valueNum&&i.push(a.createElement("span",{key:o+c},this.texts[`acl${M.group}_${M.title}_${o}`],",",a.createElement("span",{style:o==="object"?z.rightsObject:z.rightsState},M.value)))})};return i.push(a.createElement("span",{key:"group"},`${this.texts.ownerGroup}: ${(e.ownerGroup||"").replace("system.group.","")}`)),i.push(a.createElement("span",{key:"owner"},`${this.texts.ownerUser}: ${(e.owner||"").replace("system.user.","")}`)),r("object"),e.state&&r("state"),i.length?a.createElement("span",{style:z.tooltipAccessControl},i.map(o=>o)):null};renderColumnButtons(e,t){var n,M,c,l;if(!t.data.obj)return this.props.onObjectDelete||this.props.objectEditOfAccessControl?a.createElement("div",{style:z.buttonDiv},this.state.filter.expertMode&&this.props.objectEditOfAccessControl?a.createElement(W,{sx:{...z.cellButtonsButton,...z.cellButtonsEmptyButton,...z.cellButtonMinWidth},onClick:()=>this.setState({modalEditOfAccess:!0,modalEditOfAccessObjData:t.data}),size:"large"},a.createElement("div",{style:{height:15}},"---")):null,this.props.onObjectDelete&&((n=t.children)!=null&&n.length)?a.createElement(W,{sx:{...z.cellButtonsButton,...z.cellButtonsButtonAlone},size:"small","aria-label":"delete",title:this.texts.deleteObject,onClick:()=>{var g;const N=Object.keys(this.objects);N.sort();let u=0;const L=`${e}.`;for(let j=0;jL)break;this.props.onObjectDelete&&this.props.onObjectDelete(e,!!((g=t.children)!=null&&g.length),!1,u+1)}},a.createElement(wt,{style:z.cellButtonsButtonIcon})):null):null;t.data.aclTooltip=t.data.aclTooltip||this.renderTooltipAccessControl(t.data.obj.acl);const i=t.data.obj.acl?t.data.obj.type==="state"?t.data.obj.acl.state:t.data.obj.acl.object:0,r=t.data.obj.acl&&(t.data.obj.type==="state"?this.systemConfig.common.defaultNewAcl.state:this.systemConfig.common.defaultNewAcl.object),o=this.state.filter.expertMode||Z0(t.data.id);return[this.state.filter.expertMode&&this.props.objectEditOfAccessControl?a.createElement(Le,{key:"acl",title:t.data.aclTooltip,slotProps:{popper:{sx:z.tooltip}}},a.createElement(W,{sx:{...z.cellButtonsButton,...z.cellButtonMinWidth,opacity:1},onClick:()=>this.setState({modalEditOfAccess:!0,modalEditOfAccessObjData:t.data}),size:"large"},a.createElement("div",{style:z.aclText},Number.isNaN(Number(i))?Number(r).toString(16):Number(i).toString(16)))):a.createElement("div",{key:"aclEmpty",style:z.cellButtonMinWidth}),o?a.createElement(W,{key:"edit",sx:{marginRight:"2px",...z.cellButtonsButton},size:"small","aria-label":"edit",title:this.texts.editObject,onClick:()=>{this.localStorage.setItem(`${this.props.dialogName||"App"}.objectSelected`,e),this.setState({editObjectDialog:e,editObjectAlias:!1})}},a.createElement(or,{style:z.cellButtonsButtonIcon})):a.createElement(J,{component:"div",key:"editDisabled",sx:z.cellButtonsButton}),this.props.onObjectDelete&&((M=t.children)!=null&&M.length||!((c=t.data.obj.common)!=null&&c.dontDelete))?a.createElement(W,{key:"delete",sx:z.cellButtonsButton,size:"small","aria-label":"delete",onClick:()=>{var g,j,y;const N=Object.keys(this.objects);N.sort();let u=0;const L=`${e}.`;for(let T=0;TL)break;this.props.onObjectDelete&&this.props.onObjectDelete(e,!!((g=t.children)!=null&&g.length),!((y=(j=t.data.obj)==null?void 0:j.common)!=null&&y.dontDelete),u)},title:this.texts.deleteObject},a.createElement(wt,{style:z.cellButtonsButtonIcon})):null,this.props.objectCustomDialog&&this.info.hasSomeCustoms&&t.data.obj.type==="state"&&((l=t.data.obj.common)==null?void 0:l.type)!=="file"?a.createElement(W,{sx:{...z.cellButtonsButton,...t.data.hasCustoms?this.styles.cellButtonsButtonWithCustoms:z.cellButtonsButtonWithoutCustoms},key:"custom",size:"small","aria-label":"config",title:this.texts.customConfig,onClick:()=>{var N;this.localStorage.setItem(`${this.props.dialogName||"App"}.objectSelected`,e),this.pauseSubscribe(!0),(N=this.props.router)==null||N.doNavigate(null,"customs",e),this.setState({customDialog:[e],customDialogAll:!1})}},a.createElement(qn,{style:z.cellButtonsButtonIcon})):null]}readHistory(e){var t,i;if(window.sparkline&&this.defaultHistory&&((i=(t=this.objects[e])==null?void 0:t.common)!=null&&i.custom)&&this.objects[e].common.custom[this.defaultHistory]){const r=new Date;r.setHours(r.getHours()-24),r.setMinutes(0),r.setSeconds(0),r.setMilliseconds(0);const o=r.getTime();this.props.socket.getHistory(e,{instance:this.defaultHistory,start:o,end:Date.now(),step:36e5,from:!1,ack:!1,q:!1,addId:!1,aggregate:"minmax"}).then(n=>{const M=window.document.getElementsByClassName("sparkline");for(let c=0;cconsole.warn(`Cannot read history: ${n}`))}}getTooltipInfo(e,t){var l,N,u;const i=this.objects[e],r=this.states[e],{valFull:o,fileViewer:n}=Pn({state:r,obj:i,texts:this.texts,dateFormat:this.props.dateFormat||this.systemConfig.common.dateFormat,isFloatComma:this.props.isFloatComma===void 0?this.systemConfig.common.isFloatComma:this.props.isFloatComma,full:!0}),M=[];o==null||o.forEach(L=>{L.t===this.texts.quality&&r.q?(M.push(a.createElement("div",{style:z.cellValueTooltipBoth,key:L.t},L.t,": ",L.v)),L.nbr||M.push(a.createElement("br",{key:`${L.t}_br`}))):(M.push(a.createElement("div",{style:z.cellValueTooltipTitle,key:L.t},L.t,": ")),M.push(a.createElement("div",{style:z.cellValueTooltipValue,key:`${L.t}_v`},L.v)),L.nbr||M.push(a.createElement("br",{key:`${L.t}_br`})))});const c=((l=i==null?void 0:i.common)==null?void 0:l.role)||"";n==="image"?M.push(a.createElement("img",{style:z.cellValueTooltipImage,src:r.val,alt:e})):c==="url"||i.common.role==="url.self"||i.common.role==="url.blank"?M.unshift(a.createElement("div",{key:"ctrl",style:{textDecoration:"underline",fontWeight:"bold"}},this.texts.ctrlForLink)):this.defaultHistory&&((u=(N=i==null?void 0:i.common)==null?void 0:N.custom)!=null&&u[this.defaultHistory])&&M.push(a.createElement("svg",{key:"sparkline",className:"sparkline","data-id":e,style:{fill:"#3d85de"},width:"200",height:"30",strokeWidth:"3"})),this.setState({tooltipInfo:{el:M,id:e}},()=>t&&t())}renderColumnValue(e,t,i){var c,l;const r=t.data.obj;if(!r||!this.states)return null;if(((c=r.common)==null?void 0:c.type)==="file")return a.createElement(J,{component:"div",sx:{...z.cellValueText,...z.cellValueFile}},"[file]");if(!this.states[e])return r.type==="state"&&(this.recordStates.includes(e)||this.recordStates.push(e),this.states[e]={val:null},this.subscribe(e)),null;this.recordStates.includes(e)||this.recordStates.push(e);const o=this.states[e];let n=t.data.state;if(!n){const{valText:N}=Pn({state:o,obj:r,texts:this.texts,dateFormat:this.props.dateFormat||this.systemConfig.common.dateFormat,isFloatComma:this.props.isFloatComma===void 0?this.systemConfig.common.isFloatComma:this.props.isFloatComma}),u=[];if(t.data.state={valTextRx:u},u.push(a.createElement("span",{className:`newValueBrowser-${this.props.themeType||"light"}`,key:`${N.v.toString()}valText`,style:{whiteSpace:"nowrap",display:"inline-block",overflow:"hidden",textOverflow:"ellipsis"}},N.v.toString())),N.u&&u.push(a.createElement("span",{className:`newValueBrowser-${this.props.themeType||"light"}`,style:z.cellValueTextUnit,key:`${N.v.toString()}unit`},N.u)),N.s!==void 0&&u.push(a.createElement("span",{style:z.cellValueTextState,className:`newValueBrowser-${this.props.themeType||"light"}`,key:`${N.v.toString()}states`},"(",N.s,")")),!i){const L=N.c!==void 0?N.c:N.v||"";u.push(a.createElement(Bs,{className:"copyButton",style:this.styles.iconCopy,onClick:g=>this.onCopy(g,L),key:"cc"}))}n=t.data.state}n.style=W5e({state:o,isExpertMode:this.state.filter.expertMode,isButton:t.data.button,nonAckColor:this.props.theme.palette.nonAck});let M=n.valTextRx;return this.state.filter.expertMode||(t.data.button?M=[a.createElement(Y5e,{key:"button",style:{color:n.style.color,...z.cellValueButton}})]:t.data.switch&&(M=[a.createElement(br,{key:"switch",sx:{"& .MuiSwitch-thumb":{color:n.style.color},"& .MuiSwitch-track":{backgroundColor:this.states[e].val&&this.state.selected.includes(e)?this.props.themeType==="dark"?"#FFF !important":"#111 !important":void 0}},checked:!!this.states[e].val})])),a.createElement(Le,{key:"value",title:(l=this.state.tooltipInfo)==null?void 0:l.el,slotProps:{popper:{sx:z.cellValueTooltipBox},tooltip:{sx:z.cellValueTooltip}},onOpen:()=>this.getTooltipInfo(e,()=>this.readHistory(e)),onClose:()=>{var N;return((N=this.state.tooltipInfo)==null?void 0:N.id)===e&&this.setState({tooltipInfo:null})}},a.createElement(J,{component:"div",style:n.style,className:t.data.url?"iob-link":void 0,sx:{...z.cellValueText,height:i?void 0:$e,"& .admin-button:active":{transform:"translate(0, 2px)"}}},M))}_syncEnum(e,t,i,r){var M,c,l;if(!(t!=null&&t.length)){r&&r();return}const o=t.pop()||"",n=[];if((M=this.info.objects[o])!=null&&M.common){if((c=this.info.objects[o].common.members)!=null&&c.length){const N=this.info.objects[o].common.members.indexOf(e);if(N!==-1&&!i.includes(o)){const u=JSON.parse(JSON.stringify(this.info.objects[o]));u.common.members.splice(N,1),n.push(this.props.socket.setObject(o,u).then(()=>this.info.objects[o]=u).catch(L=>this.showError(L)))}}if(i.includes(o)&&!((l=this.info.objects[o].common.members)!=null&&l.includes(e))){const N=JSON.parse(JSON.stringify(this.info.objects[o]));N.common.members||=[],N.common.members.push(e),N.common.members.sort(),n.push(this.props.socket.setObject(o,N).then(()=>this.info.objects[o]=N).catch(u=>this.showError(u)))}}Promise.all(n).then(()=>{setTimeout(()=>this._syncEnum(e,t,i,r),0)})}syncEnum(e,t,i){const r=[...this.info[t==="func"?"funcEnums":"roomEnums"]];return new Promise(o=>{this._syncEnum(e,r,i,()=>{o()})})}renderEnumDialog(){if(!this.state.enumDialog)return null;const e=this.state.enumDialog.type,t=this.state.enumDialog.item,i=this.state.enumDialogEnums,r=this.state.enumDialog.enumsOriginal,o=(e==="room"?this.info.roomEnums:this.info.funcEnums).map(n=>{var M,c;return{name:He(((c=(M=this.objects[n])==null?void 0:M.common)==null?void 0:c.name)||n.split(".").pop()||"",this.props.lang),value:n,icon:_o(this.objects,n,this.props.lang,this.imagePrefix)}}).sort((n,M)=>n.name>M.name?1:-1);return o.forEach(n=>{n.icon&&typeof n.icon=="string"&&(n.icon=a.createElement(J,{style:z.enumIconDiv},a.createElement("img",{src:n.icon,style:z.enumIcon,alt:n.name})))}),a.createElement(Ae,{sx:{"& .MuiPaper-root":z.enumDialog},onClose:()=>this.setState({enumDialog:null}),"aria-labelledby":"enum-dialog-title",open:!0},a.createElement(fe,{id:"enum-dialog-title",style:{display:"flex",justifyContent:"space-between",width:"100%",flexWrap:"nowrap",gap:8,paddingRight:12}},e==="func"?this.props.t("ra_Define functions"):this.props.t("ra_Define rooms"),a.createElement(bt,{color:"primary",disabled:r===JSON.stringify(i),size:"small",onClick:()=>this.syncEnum(t.data.id,e,i).then(()=>this.setState({enumDialog:null,enumDialogEnums:null}))},a.createElement(We,null))),a.createElement(xc,{sx:{"&.MuiList-root":z.enumList}},o.map(n=>{let M,c,l;typeof n=="object"?(M=n.value,c=n.name,l=n.icon):(M=n,c=n);const N=`checkbox-list-label-${M}`;return a.createElement(Hg,{sx:z.headerCellSelectItem,key:M,onClick:()=>{const u=i.indexOf(M),L=JSON.parse(JSON.stringify(this.state.enumDialogEnums));u===-1?(L.push(M),L.sort()):L.splice(u,1),this.setState({enumDialogEnums:L})},secondaryAction:l},a.createElement(Xt,{sx:{"&.MuiListItemIcon-root":z.enumCheckbox}},a.createElement(ue,{edge:"start",checked:i.includes(M),tabIndex:-1,disableRipple:!0,slotProps:{input:{"aria-labelledby":N}}})),a.createElement(dt,{id:N},c))})))}renderEditRoleDialog(){var e,t;if(!this.state.roleDialog||!this.props.objectBrowserEditRole)return null;if(this.state.roleDialog&&this.props.objectBrowserEditRole){const i=this.props.objectBrowserEditRole;return a.createElement(i,{key:"objectBrowserEditRole",id:this.state.roleDialog,socket:this.props.socket,t:this.props.t,roleArray:this.info.roles,commonType:(t=(e=this.info.objects[this.state.roleDialog])==null?void 0:e.common)==null?void 0:t.type,onClose:r=>{r&&(this.info.objects[this.state.roleDialog]=r),this.setState({roleDialog:null})}})}return null}onColumnsEditCustomDialogClose(e){var i,r;const t=this.customColumnDialog;if(e){let o=t.value;t.type==="boolean"?o=o==="true"||o===!0:t.type==="number"&&(o=parseFloat(o)),this.customColumnDialog=null,this.props.socket.getObject(((r=(i=this.state.columnsEditCustomDialog)==null?void 0:i.obj)==null?void 0:r._id)||"").then(n=>{var M;if(n&&B5e(n,(M=this.state.columnsEditCustomDialog)==null?void 0:M.it,o))return this.props.socket.setObject(n._id,n);throw new Error(this.props.t("ra_Cannot update attribute, because not found in the object"))}).then(()=>this.setState({columnsEditCustomDialog:null})).catch(n=>this.showError(n))}else this.customColumnDialog=null,this.setState({columnsEditCustomDialog:null})}renderColumnsEditCustomDialog(){if(!this.state.columnsEditCustomDialog)return null;if(!this.customColumnDialog){const e=V0(this.state.columnsEditCustomDialog.obj,this.state.columnsEditCustomDialog.it);this.customColumnDialog={type:this.state.columnsEditCustomDialog.it.type||typeof e,initValue:(e??"").toString(),value:(e??"").toString()}}return a.createElement(Ae,{onClose:()=>this.setState({columnsEditCustomDialog:null}),maxWidth:"md","aria-labelledby":"custom-dialog-title",open:!0},a.createElement(fe,{id:"custom-dialog-title"},`${this.props.t("ra_Edit object field")}: ${this.state.columnsEditCustomDialog.obj._id}`),a.createElement(_e,null,a.createElement(as,{id:"alert-dialog-description"},this.customColumnDialog.type==="boolean"?a.createElement(V,{control:a.createElement(ue,{onKeyUp:e=>e.key==="Enter"&&this.onColumnsEditCustomDialogClose(!0),defaultChecked:this.customColumnDialog.value==="true",onChange:e=>{const t=this.customColumnDialog;t.value=e.target.checked.toString();const i=t.value!==t.initValue;i===!this.state.customColumnDialogValueChanged&&this.setState({customColumnDialogValueChanged:i})}}),label:`${this.state.columnsEditCustomDialog.it.name} (${this.state.columnsEditCustomDialog.it.pathText})`}):a.createElement(Te,{variant:"standard",defaultValue:this.customColumnDialog.value,fullWidth:!0,onKeyUp:e=>e.key==="Enter"&&this.onColumnsEditCustomDialogClose(!0),label:`${this.state.columnsEditCustomDialog.it.name} (${this.state.columnsEditCustomDialog.it.pathText})`,onChange:e=>{const t=this.customColumnDialog;t.value=e.target.value;const i=t.value!==t.initValue;i===!this.state.customColumnDialogValueChanged&&this.setState({customColumnDialogValueChanged:i})},autoFocus:!0}))),a.createElement(xe,null,a.createElement(q,{variant:"contained",onClick:()=>this.onColumnsEditCustomDialogClose(!0),disabled:!this.state.customColumnDialogValueChanged,color:"primary",startIcon:a.createElement(We,null)},this.props.t("ra_Update")),a.createElement(q,{color:"grey",variant:"contained",onClick:()=>this.onColumnsEditCustomDialogClose(),startIcon:a.createElement(we,null)},this.props.t("ra_Cancel"))))}renderCustomValue(e,t,i){const r=V0(e,t);return r!=null?t.edit&&!this.props.notEditable&&(!t.objTypes||t.objTypes.includes(e.type))?a.createElement(J,{component:"div",style:{...z.columnCustom,...z.columnCustomEditable,...z[`columnCustom_${t.align}`]},onClick:()=>this.setState({columnsEditCustomDialog:{item:i,it:t,obj:e},customColumnDialogValueChanged:!1})},r):a.createElement(J,{component:"div",style:{...z.columnCustom,...z[`columnCustom_${t.align}`]}},r):null}renderAliasLink(e,t,i){const r=t||0,o=this.objects[this.info.aliasesMap[e][r]].common.alias.id;return o?a.createElement(J,{component:"div",onClick:n=>{n.stopPropagation(),n.preventDefault();const M=this.info.aliasesMap[e][r];this.info.aliasesMap[e].length>1&&this.setState({aliasMenu:""}),this.onSelect(M),setTimeout(()=>this.expandAllSelected(()=>this.scrollToItem(M)),100)},sx:i||this.styles.aliasAlone},a.createElement("span",{className:"admin-browser-arrow"},typeof o=="string"||o.read===e&&o.write===e?"↔":o.read===e?"→":"←"),this.info.aliasesMap[e][r]):null}renderLeaf(e,t,i){var bi,Ui,$i,Yr,Qr,dc,hc,zc,wc,Ic,Cc,pc,Ac,mc;const r=e.data.id;i.count++,t=t===void 0?this.state.expanded.includes(r):t;let o;const n=e.data.obj,M=n==null?void 0:n.type;e.children||M==="folder"||M==="device"||M==="channel"||M==="meta"?o=t?a.createElement(lo,{style:this.styles.cellIdIconFolder,onClick:()=>this.toggleExpanded(r)}):a.createElement(Ti,{style:this.styles.cellIdIconFolder,onClick:()=>this.toggleExpanded(r)}):n&&n.common&&n.common.write===!1&&n.type==="state"?o=a.createElement(f5e,{style:this.styles.cellIdIconDocument}):o=a.createElement(m5e,{style:this.styles.cellIdIconDocument});let c=null;e.data.icon&&(typeof e.data.icon=="string"?e.data.icon.length<3?c=a.createElement("span",{className:"iconOwn",style:z.cellIdIconOwn},e.data.icon):c=a.createElement(be,{style:z.cellIdIconOwn,className:"iconOwn",src:e.data.icon,alt:""}):c=e.data.icon);const l=n==null?void 0:n.common,N=(n==null?void 0:n.type)&&X0[n.type]||a.createElement("div",{className:"itemIcon"}),u=this.levelPadding*(e.data.level||0);if(e.data.lang!==this.props.lang){const{rooms:v,per:ie}=lg(this.info,r,this.props.lang);e.data.rooms=v.join(", "),e.data.per=ie;const{funcs:Je,pef:Oe}=Ng(this.info,r,this.props.lang);e.data.funcs=Je.join(", "),e.data.pef=Oe,e.data.lang=this.props.lang}const L=this.props.multiSelect&&this.objects[r]&&(!this.props.types||this.props.types.includes(this.objects[r].type))?a.createElement(ue,{style:z.checkBox,checked:this.state.selected.includes(r)}):null;let g=!this.props.notEditable&&M==="state"&&(this.state.filter.expertMode||(l==null?void 0:l.write)!==!1);this.props.objectBrowserViewFile&&(l==null?void 0:l.type)==="file"&&(g=!0);const j=!this.props.notEditable&&this.objects[r]&&(this.state.filter.expertMode||M==="state"||M==="channel"||M==="device"),y=this.state.statesView&&(M==="state"||M==="channel"||M==="device");let T="";const d=[];if(y&&(T=(bi=this.states[r])==null?void 0:bi.from,T===void 0?T=" ":(T=T?T.replace(/^system\.adapter\.|^system\./,""):"",d.push(`${this.texts.stateChangedFrom} ${T}`)),n!=null&&n.user)){const v=n.user.replace("system.user.","");T+=`/${v}`,d.push(`${this.texts.stateChangedBy} ${v}`)}n&&(n.from&&d.push(`${this.texts.objectChangedFrom} ${n.from.replace(/^system\.adapter\.|^system\./,"")}`),n.user&&d.push(`${this.texts.objectChangedBy} ${n.user.replace(/^system\.user\./,"")}`),n.ts&&d.push(`${this.texts.objectChangedByUser} ${m.formatDate(new Date(n.ts),this.props.dateFormat||this.systemConfig.common.dateFormat)}`));let I=!1,w=null;r.startsWith("alias.")&&((Ui=l==null?void 0:l.alias)!=null&&Ui.id)?(I=typeof l.alias.id=="object",I?w=a.createElement("div",{style:z.cellIdAliasReadWriteDiv},l.alias.id.read?a.createElement(J,{component:"div",onClick:v=>{v.stopPropagation(),v.preventDefault(),this.onSelect(l.alias.id.read),setTimeout(()=>this.expandAllSelected(()=>this.scrollToItem(l.alias.id.read)),100)},sx:this.styles.aliasReadWrite},"←",l.alias.id.read):null,l.alias.id.write?a.createElement(J,{component:"div",onClick:v=>{v.stopPropagation(),v.preventDefault(),this.onSelect(l.alias.id.write),setTimeout(()=>this.expandAllSelected(()=>this.scrollToItem(l.alias.id.write)),100)},sx:this.styles.aliasReadWrite},"→",l.alias.id.write):null):w=a.createElement(J,{component:"div",onClick:v=>{v.stopPropagation(),v.preventDefault(),this.onSelect(l.alias.id),setTimeout(()=>this.expandAllSelected(()=>this.scrollToItem(l.alias.id)),100)},sx:this.styles.aliasAlone},"→",l.alias.id)):this.info.aliasesMap[r]&&(this.info.aliasesMap[r].length>1?w=a.createElement(J,{component:"div",id:`alias_${r}`,onClick:v=>{v.stopPropagation(),v.preventDefault(),this.setState({aliasMenu:r})},sx:this.styles.aliasAlone},this.props.t("ra_%s links from aliases",this.info.aliasesMap[r].length)):w=this.renderAliasLink(r,0));let A=l==null?void 0:l.color,p;if(A&&!this.state.selected.includes(r)){const v=this.props.themeName==="dark"?"#1f1f1f":this.props.themeName==="blue"?"#222a2e":"#FFFFFF";m.colorDistance(A,v)<1e3&&(p=this.props.themeType==="dark"?"#9a9a9a":"#565656")}let h=!1;r==="0_userdata"?(A=rg(this.props.themeType),h=!0):r==="alias"?(A=og(this.props.themeType),h=!0):r==="javascript"?(A=k5e(this.props.themeType),h=!0):r==="system"?(A=ng(this.props.themeType),h=!0):r==="system.adapter"?A=ag(this.props.themeType):(!A||this.state.selected.includes(r))&&(A="inherit");const C=[];if(l!=null&&l.statusStates){const v={};Object.keys(l.statusStates).forEach(Je=>{var Tt;let Oe=l.statusStates[Je];Oe.split(".").length<3&&(Oe=`${r}.${Oe}`),v[Je]=Oe,this.states[Oe]?this.recordStates.includes(Oe)||this.recordStates.push(Oe):((Tt=this.objects[Oe])==null?void 0:Tt.type)==="state"&&(this.recordStates.includes(Oe)||this.recordStates.push(Oe),this.states[Oe]={val:null},this.subscribe(Oe))});let ie=!1;l.statusStates.errorId&&this.states[v.errorId]&&this.states[v.errorId].val&&(A=this.props.themeType==="dark"?Lg:gg,ie=!0,C.push(a.createElement(Xj,{key:"error",style:this.styles.iconDeviceError}))),v.onlineId&&this.states[v.onlineId]?ie?this.states[v.onlineId].val?C.push(a.createElement(li,{key:"conn",style:this.styles.iconDeviceConnected})):C.push(a.createElement($r,{key:"disc",style:this.styles.iconDeviceDisconnected})):this.states[v.onlineId].val?(A=this.props.themeType==="dark"?Sa:ka,C.push(a.createElement(li,{key:"conn",style:this.styles.iconDeviceConnected}))):(A=this.props.themeType==="dark"?va:Ya,C.push(a.createElement($r,{key:"disc",style:this.styles.iconDeviceDisconnected}))):v.offlineId&&this.states[v.offlineId]&&(ie?this.states[v.offlineId].val?C.push(a.createElement($r,{key:"disc",style:this.styles.iconDeviceDisconnected})):C.push(a.createElement(li,{key:"conn",style:this.styles.iconDeviceConnected})):this.states[v.offlineId].val?(A=this.props.themeType==="dark"?va:Ya,C.push(a.createElement($r,{key:"disc",style:this.styles.iconDeviceDisconnected}))):(A=this.props.themeType==="dark"?Sa:ka,C.push(a.createElement(li,{key:"conn",style:this.styles.iconDeviceConnected}))))}const E=y?m.quality2text((($i=this.states[r])==null?void 0:$i.q)||0).join(", "):null;let O=((Yr=e.data)==null?void 0:Yr.title)||"",b=!1;if(this.state.showDescription){const v=cg(e.data,this.props.lang);v&&(O=[a.createElement("div",{key:"name",style:z.cellNameDivDiv},O),a.createElement("div",{key:"desc",style:z.cellDescription},v)],b=!!v)}const k=this.props.width==="xs"&&this.state.focused===r,K=a.createElement(ts,{container:!0,wrap:"nowrap",direction:"row",sx:z.cellId,style:{width:this.columnsVisibility.id,paddingLeft:u}},a.createElement(ts,{container:!0,alignItems:"center"},L,o),a.createElement(ts,{style:{...z.cellIdSpan,...p?this.styles.invertedBackground:void 0,color:A,fontWeight:h?"bold":void 0}},a.createElement(Le,{title:P5e(e.data,this.props.lang),slotProps:{popper:{sx:z.tooltip}}},a.createElement("div",null,e.data.name)),w,C),a.createElement("div",{style:{...z.grow,...p?this.styles.invertedBackgroundFlex:{}}}),a.createElement(ts,{container:!0,alignItems:"center"},c),this.props.width!=="xs"?a.createElement("div",null,a.createElement(Bs,{className:k?"":"copyButton",style:z.cellCopyButton,onClick:v=>this.onCopy(v,r)})):null);let x=k&&O||this.columnsVisibility.name?a.createElement(J,{component:"div",sx:{...z.cellName,...b?z.cellNameWithDesc:void 0,width:this.props.width!=="xs"?this.columnsVisibility.name:void 0,ml:k?0:"5px"}},O,!k&&((Qr=e.data)!=null&&Qr.title)?a.createElement(J,{style:{color:A}},a.createElement(Bs,{className:"copyButton",style:z.cellCopyButton,onClick:v=>{var ie;return this.onCopy(v,(ie=e.data)==null?void 0:ie.title)}})):null):null,S;this.state.statesView?S=[k&&y&&((dc=this.states[r])!=null&&dc.from)||this.columnsVisibility.changedFrom?{el:a.createElement("div",{key:"from",style:{...z.cellRole,width:this.props.width!=="xs"?this.columnsVisibility.changedFrom:void 0},title:d.join(` `)},y&&((hc=this.states[r])!=null&&hc.from)?T:null),type:"from"}:null,k&&E||this.columnsVisibility.qualityCode?{el:a.createElement("div",{key:"q",style:{...z.cellRole,width:this.props.width!=="xs"?this.columnsVisibility.qualityCode:void 0},title:E||""},E),type:"quality"}:null,k&&y&&((zc=this.states[r])!=null&&zc.ts)||this.columnsVisibility.timestamp?{el:a.createElement("div",{key:"ts",style:{...z.cellRole,width:this.props.width!=="xs"?this.columnsVisibility.timestamp:void 0}},y&&((wc=this.states[r])!=null&&wc.ts)?m.formatDate(new Date(this.states[r].ts),this.props.dateFormat||this.systemConfig.common.dateFormat):null),type:"ts"}:null,k&&y&&((Ic=this.states[r])!=null&&Ic.lc)||this.columnsVisibility.lastChange?{el:a.createElement("div",{key:"lc",style:{...z.cellRole,width:this.props.width!=="xs"?this.columnsVisibility.lastChange:void 0}},y&&((Cc=this.states[r])!=null&&Cc.lc)?m.formatDate(new Date(this.states[r].lc),this.props.dateFormat||this.systemConfig.common.dateFormat):null),type:"lc"}:null]:S=[k&&(n!=null&&n.type)||this.columnsVisibility.type?{el:a.createElement("div",{key:"type",style:{...z.cellType,width:this.props.width!=="xs"?this.columnsVisibility.type:void 0}},N," ",n==null?void 0:n.type),type:"filter_type"}:null,k&&l||this.columnsVisibility.role?{el:a.createElement("div",{key:"role",style:{...z.cellRole,width:this.props.width!=="xs"?this.columnsVisibility.role:"100%",cursor:this.state.filter.expertMode&&j&&this.props.objectBrowserEditRole?"text":"default"},onClick:!k&&this.state.filter.expertMode&&j&&this.props.objectBrowserEditRole?()=>this.setState({roleDialog:e.data.id}):void 0},l==null?void 0:l.role),type:"filter_role",onClick:k&&this.state.filter.expertMode&&j&&this.props.objectBrowserEditRole?()=>this.setState({roleDialog:e.data.id}):void 0}:null,k&&l||this.columnsVisibility.room?{el:a.createElement("div",{key:"room",style:{...z.cellRoom,...e.data.per?z.cellEnumParent:{},width:this.props.width!=="xs"?this.columnsVisibility.room:"100%",cursor:j?"text":"default"},onClick:!k&&j?()=>{const v=Rs(this.info,e.data.id,"roomEnums");this.setState({enumDialogEnums:v,enumDialog:{item:e,type:"room",enumsOriginal:JSON.stringify(v)}})}:void 0},e.data.rooms),type:"filter_room",onClick:k&&j?()=>{const v=Rs(this.info,e.data.id,"roomEnums");this.setState({enumDialogEnums:v,enumDialog:{item:e,type:"room",enumsOriginal:JSON.stringify(v)}})}:void 0}:null,k&&l||this.columnsVisibility.func?{el:a.createElement("div",{key:"func",style:{...z.cellFunc,...e.data.pef?z.cellEnumParent:{},width:this.props.width!=="xs"?this.columnsVisibility.func:"100%",cursor:j?"text":"default"},onClick:!k&&j?()=>{const v=Rs(this.info,e.data.id,"funcEnums");this.setState({enumDialogEnums:v,enumDialog:{item:e,type:"func",enumsOriginal:JSON.stringify(v)}})}:void 0},e.data.funcs),type:"filter_func",onClick:k&&j?()=>{const v=Rs(this.info,e.data.id,"funcEnums");this.setState({enumDialogEnums:v,enumDialog:{item:e,type:"func",enumsOriginal:JSON.stringify(v)}})}:void 0}:null];let R=((pc=this.adapterColumns)==null?void 0:pc.map(v=>a.createElement("div",{style:{...z.cellAdapter,width:this.props.width!=="xs"?this.columnsVisibility[v.id]:void 0},key:v.id,title:`${v.adapter} => ${v.pathText}`},n?this.renderCustomValue(n,v,e):null)))||null;const he=k||this.columnsVisibility.val?this.renderColumnValue(r,e,k):null;let Xe=k&&he||this.columnsVisibility.val?a.createElement("div",{style:{...z.cellValue,width:this.props.width!=="xs"?this.columnsVisibility.val:"calc(100% - 100px)",cursor:g?(l==null?void 0:l.type)==="file"?"zoom-in":e.data.button?"grab":"text":"default"},onClick:v=>{var ie,Je,Oe;if(g){if(!(!n||!this.states))if((l==null?void 0:l.type)==="file")this.setState({viewFileDialog:r});else if(e.data.url&&v.ctrlKey){if((ie=this.states[r])!=null&&ie.val&&typeof this.states[r].val=="string")if((l==null?void 0:l.role)==="url.self")window.location.href=this.states[r].val;else{const Tt=window.open(this.states[r].val,"_blank");Tt==null||Tt.focus()}}else!this.state.filter.expertMode&&e.data.button?this.props.socket.setState(r,!0).catch(Tt=>window.alert(`Cannot write state "${r}": ${Tt}`)):!this.state.filter.expertMode&&e.data.switch?this.props.socket.setState(r,!this.states[r].val).catch(Tt=>window.alert(`Cannot write state "${r}": ${Tt}`)):(this.edit={val:this.states[r]?this.states[r].val:"",q:this.states[r]&&this.states[r].q||0,ack:!1,id:r},this.setState({updateOpened:!0}))}else(l==null?void 0:l.role)==="url"||(l==null?void 0:l.role)==="url.blank"&&v.ctrlKey?(Je=this.states[r])!=null&&Je.val&&typeof this.states[r].val=="string"&&window.open(this.states[r].val,"_blank"):(l==null?void 0:l.role)==="url.self"&&v.ctrlKey&&(Oe=this.states[r])!=null&&Oe.val&&typeof this.states[r].val=="string"&&(window.location.href=this.states[r].val)}},he):null,ct=k||this.columnsVisibility.buttons?a.createElement("div",{style:{...z.cellButtons,width:this.props.width!=="xs"?this.columnsVisibility.buttons:void 0}},this.renderColumnButtons(r,e)):null,bs=null;if(this.props.width==="xs"&&this.state.focused===r){S=S.filter(ie=>ie);let v;S.length?v=S.map(ie=>ie?a.createElement("div",{key:ie.type,style:z.cellDetailsLine},a.createElement("span",{style:z.cellDetailsName},this.texts[ie.type],":"),ie.el,a.createElement("div",{style:{flexGrow:1}}),ie.onClick?a.createElement(or,{style:z.cellCopyButtonInDetails,onClick:()=>{ie!=null&&ie.onClick&&ie.onClick()}}):null):null):v=null,R.length||(R=null),bs=a.createElement(AN,{style:{width:"100%",display:"flex",flexDirection:"column",padding:10,backgroundColor:this.props.theme.palette.mode==="dark"?"#333":"#ccc"}},a.createElement("div",{style:z.cellDetailsLine},a.createElement("div",{style:{flexGrow:1}}),a.createElement(Bs,{style:z.cellCopyButtonInDetails,onClick:ie=>this.onCopy(ie,r)})),x&&a.createElement("div",{style:z.cellDetailsLine},a.createElement("span",{style:z.cellDetailsName},this.texts.name,":"),x,a.createElement("div",{style:{flexGrow:1}}),(Ac=e.data)!=null&&Ac.title?a.createElement(Bs,{className:"copyButton",style:z.cellCopyButtonInDetails,onClick:ie=>{var Je;return this.onCopy(ie,(Je=e.data)==null?void 0:Je.title)}}):null),v,R&&a.createElement("div",{style:z.cellDetailsLine},R),((mc=this.objects[r])==null?void 0:mc.type)==="state"&&a.createElement("div",{style:z.cellDetailsLine},a.createElement("span",{style:z.cellDetailsName},this.texts.value,":"),Xe,a.createElement("div",{style:{flexGrow:1}}),a.createElement(Bs,{className:"copyButton",style:z.cellCopyButtonInDetails,onClick:ie=>{const{valText:Je}=Pn({state:this.states[r],obj:this.objects[r],texts:this.texts,dateFormat:this.props.dateFormat||this.systemConfig.common.dateFormat,isFloatComma:this.props.isFloatComma===void 0?this.systemConfig.common.isFloatComma:this.props.isFloatComma});this.onCopy(ie,Je.c!==void 0?Je.c:Je.v.toString())},key:"cc"})),ct&&a.createElement("div",{style:{...z.cellDetailsLine,justifyContent:"right"}},ct)),x=null,S=null,R=null,Xe=null,ct=null}return{row:a.createElement(ts,{container:!0,direction:"row",wrap:"nowrap",sx:m.getStyle(this.props.theme,z.tableRow,this.state.linesEnabled&&z.tableRowLines,!this.props.dragEnabled&&z.tableRowNoDragging,w&&z.tableRowAlias,I&&z.tableRowAliasReadWrite,this.state.focused===r&&this.props.multiSelect&&z.tableRowFocused,!e.data.visible&&z.filteredOut,e.data.hasVisibleParent&&!e.data.visible&&!e.data.hasVisibleChildren&&z.filteredParentOut,this.state.selected.includes(r)&&z.itemSelected,this.state.selectedNonObject===r&&z.itemSelected),key:r,id:r,onMouseDown:v=>{this.onSelect(r);let ie;"which"in v?ie=v.which===3:"button"in v&&(ie=v.button===2),ie?this.contextMenu={item:e,ts:Date.now()}:this.contextMenu=null},onDoubleClick:()=>{e.children?this.toggleExpanded(r):this.onSelect(r,!0)}},K,x,S==null?void 0:S.map(v=>v==null?void 0:v.el),R,Xe,ct),details:bs}}renderItem(e,t,i){const r=[];i=i||{count:0};const o=this.renderLeaf(e,t,i);let n;const M=this.props.DragWrapper;return this.props.dragEnabled&&M?e.data.sumVisibility?n=a.createElement(M,{key:e.data.id,item:e,style:z.draggable},o.row):n=a.createElement("div",{key:e.data.id,style:z.nonDraggable},o.row):n=o.row,e.data.id&&n&&r.push(n),o.details&&r.push(o.details),t=t===void 0?jr(this.state.expanded,e.data.id):t,(!e.data.id||t)&&(this.state.foldersFirst?e.children&&(r.push(e.children.map(c=>c.children&&(!this.state.columnsSelectorShow||i.count<15)&&c.data.sumVisibility?this.renderItem(c,void 0,i):null)),r.push(e.children.map(c=>!c.children&&(!this.state.columnsSelectorShow||i.count<15)&&c.data.sumVisibility?this.renderItem(c,void 0,i):null))):e.children&&r.push(e.children.map(c=>(!this.state.columnsSelectorShow||i.count<15)&&c.data.sumVisibility?this.renderItem(c,void 0,i):null))),r}calculateColumnsVisibility(e,t,i,r){let o=r||this.state.columnsWidths;const n=i||this.state.columnsForAdmin,M=t||this.state.columns||[],c=typeof e!="boolean"?this.state.columnsAuto:e;o=JSON.parse(JSON.stringify(o)),Object.keys(o).forEach(N=>{o[N]&&(o[N]=parseInt(o[N],10)||0)}),this.adapterColumns=[];const l=ze[this.props.width||"lg"].widths;if(c){if(this.columnsVisibility={id:ze[this.props.width||"lg"].idWidth,name:this.visibleCols.includes("name")&&l.name||0,nameHeader:this.visibleCols.includes("name")&&l.name||0,type:this.visibleCols.includes("type")&&l.type||0,role:this.visibleCols.includes("role")&&l.role||0,room:this.visibleCols.includes("room")&&l.room||0,func:this.visibleCols.includes("func")&&l.func||0,changedFrom:this.visibleCols.includes("changedFrom")&&l.changedFrom||0,qualityCode:this.visibleCols.includes("qualityCode")&&l.qualityCode||0,timestamp:this.visibleCols.includes("timestamp")&&l.timestamp||0,lastChange:this.visibleCols.includes("lastChange")&&l.lastChange||0,val:this.visibleCols.includes("val")&&l.val||0,buttons:this.visibleCols.includes("buttons")&&l.buttons||0},this.columnsVisibility.name&&!this.customWidth){let N=this.columnsVisibility.id||0;this.state.statesView?(N+=this.columnsVisibility.changedFrom||0,N+=this.columnsVisibility.qualityCode||0,N+=this.columnsVisibility.timestamp||0,N+=this.columnsVisibility.lastChange||0):(N+=this.columnsVisibility.type||0,N+=this.columnsVisibility.role||0,N+=this.columnsVisibility.room||0,N+=this.columnsVisibility.func||0),N+=this.columnsVisibility.val||0,N+=this.columnsVisibility.buttons||0,this.columnsVisibility.name=`calc(100% - ${N+5}px)`,this.columnsVisibility.nameHeader=`calc(100% - ${N+5+this.state.scrollBarWidth}px)`}else if(!this.customWidth){let N=0;this.state.statesView?(N+=this.columnsVisibility.changedFrom||0,N+=this.columnsVisibility.qualityCode||0,N+=this.columnsVisibility.timestamp||0,N+=this.columnsVisibility.lastChange||0):(N+=this.columnsVisibility.type||0,N+=this.columnsVisibility.role||0,N+=this.columnsVisibility.room||0,N+=this.columnsVisibility.func||0),N+=this.columnsVisibility.val||0,N+=this.columnsVisibility.buttons||0,this.columnsVisibility.id=`calc(100% - ${N+5}px)`}}else{const N=this.props.width||"lg";this.columnsVisibility={id:o.id||ze[N].idWidth,name:M.includes("name")&&(o.name||l.name||ze[N].widths.name)||0,type:M.includes("type")&&(o.type||l.type||ze[N].widths.type)||0,role:M.includes("role")&&(o.role||l.role||ze[N].widths.role)||0,room:M.includes("room")&&(o.room||l.room||ze[N].widths.room)||0,func:M.includes("func")&&(o.func||l.func||ze[N].widths.func)||0};let u=this.columnsVisibility.id;if(this.columnsVisibility.name&&(u+=this.columnsVisibility.type||0,u+=this.columnsVisibility.role||0,u+=this.columnsVisibility.room||0,u+=this.columnsVisibility.func||0),n&&M&&Object.keys(n).sort().forEach(L=>n[L].forEach(g=>{const j=`_${L}_${g.path}`;if(M.includes(j)){const y={adapter:L,id:`_${L}_${g.path}`,name:g.name,path:g.path.split("."),pathText:g.path};g.edit&&(y.edit=!0,g.type&&(y.type=g.type),g.objTypes&&(y.objTypes=g.objTypes)),this.adapterColumns.push(y),this.columnsVisibility[j]=o[y.id]||g.width||ze[N].widths.func||ze.xl.widths.func||0,u+=this.columnsVisibility[j]}else this.columnsVisibility[j]=0})),this.adapterColumns.sort((L,g)=>L.id>g.id?-1:L.idj==="id"||typeof this.columnsVisibility[j]=="string"||!this.columnsVisibility[j]?g:g+this.columnsVisibility[j],0);this.columnsVisibility.id=`calc(100% - ${L}px)`}}}resizerMouseMove=e=>{if(this.resizerActiveDiv){let t,i;this.resizeLeft?(t=this.resizerOldWidth-e.clientX+this.resizerPosition,i=this.resizerOldWidthNext+e.clientX-this.resizerPosition):(t=this.resizerOldWidth+e.clientX-this.resizerPosition,i=this.resizerOldWidthNext-e.clientX+this.resizerPosition),this.resizerActiveName&&this.resizerNextName&&(!this.resizerMin||t>this.resizerMin)&&(!this.resizerNextMin||i>this.resizerNextMin)&&(this.resizerCurrentWidths[this.resizerActiveName]=t,this.resizerCurrentWidths[this.resizerNextName]=i,this.resizerActiveDiv.style.width=`${t}px`,this.resizerNextDiv&&(this.resizerNextDiv.style.width=`${i}px`),this.columnsVisibility[this.resizerActiveName]=t,this.columnsVisibility[this.resizerNextName]=i,this.resizerNextName==="nameHeader"?(this.columnsVisibility.name=i-this.state.scrollBarWidth,this.resizerCurrentWidths.name=i-this.state.scrollBarWidth):this.resizerActiveName==="nameHeader"&&(this.columnsVisibility.name=t-this.state.scrollBarWidth,this.resizerCurrentWidths.name=t-this.state.scrollBarWidth),this.customWidth=!0,this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=null,this.forceUpdate()},200))}};resizerMouseUp=()=>{this.localStorage.setItem(`${this.props.dialogName||"App"}.table`,JSON.stringify(this.resizerCurrentWidths)),this.resizerActiveName=null,this.resizerNextName=null,this.resizerActiveDiv=null,this.resizerNextDiv=null,window.removeEventListener("mousemove",this.resizerMouseMove),window.removeEventListener("mouseup",this.resizerMouseUp)};resizerMouseDown=e=>{if(this.storedWidths||=JSON.parse(JSON.stringify(ze[this.props.width||"lg"])),this.resizerCurrentWidths||={},this.resizerActiveDiv=e.target.parentNode,this.resizerActiveName=this.resizerActiveDiv.dataset.name||null,this.resizerActiveName){let t=0;if(e.target.dataset.left==="true"){this.resizeLeft=!0,this.resizerNextDiv=this.resizerActiveDiv.previousElementSibling;let i=this.resizerNextDiv.querySelector(".iob-ob-resize-handler");for(;this.resizerNextDiv&&!i&&t<10;)this.resizerNextDiv=this.resizerNextDiv.previousElementSibling,i=this.resizerNextDiv.querySelector(".iob-ob-resize-handler"),t++;(i==null?void 0:i.dataset.left)!=="true"&&(this.resizerNextDiv=this.resizerNextDiv.nextElementSibling)}else this.resizeLeft=!1,this.resizerNextDiv=this.resizerActiveDiv.nextElementSibling;this.resizerNextName=this.resizerNextDiv.dataset.name||null,this.resizerMin=parseInt(this.resizerActiveDiv.dataset.min,10)||0,this.resizerNextMin=parseInt(this.resizerNextDiv.dataset.min,10)||0,this.resizerPosition=e.clientX,this.resizerCurrentWidths[this.resizerActiveName]=this.resizerActiveDiv.offsetWidth,this.resizerOldWidth=this.resizerCurrentWidths[this.resizerActiveName],this.resizerNextName&&(this.resizerCurrentWidths[this.resizerNextName]=this.resizerNextDiv.offsetWidth,this.resizerOldWidthNext=this.resizerCurrentWidths[this.resizerNextName]),window.addEventListener("mousemove",this.resizerMouseMove),window.addEventListener("mouseup",this.resizerMouseUp)}};navigateKeyPress(e){var i,r;const t=this.state.selectedNonObject||this.state.selected[0];if(t){if(e.code==="ArrowUp"||e.code==="ArrowDown"){e.preventDefault();const o=[];(i=this.tableRef.current)==null||i.childNodes.forEach(l=>o.push(l.id));const n=o.indexOf(t),M=e.code==="ArrowDown"?n+1:n-1,c=o[M]||t;this.onSelect(c),this.scrollToItem(c)}if((e.code==="ArrowRight"||e.code==="ArrowLeft")&&this.toggleExpanded(t),e.code==="Delete"&&this.root&&t){const o=xo.getItemFromRoot(this.root,t);if(o){const{obj:n}=o.data;n&&!((r=n.common)!=null&&r.dontDelete)&&this.showDeleteDialog({id:t,obj:n,item:o})}}}}static getItemFromRoot(e,t){const i=t.split(".");let r="",o=e;for(let n=0;n{this.customWidth=!1,ze[this.props.width||"lg"]=JSON.parse(JSON.stringify(this.storedWidths)),this.calculateColumnsVisibility(),this.localStorage.removeItem(`${this.props.dialogName||"App"}.table`),this.forceUpdate()};renderHandleRight(){return a.createElement(J,{component:"div",className:"iob-ob-resize-handler",sx:{...z.resizeHandle,...z.resizeHandleRight},onMouseDown:this.resizerMouseDown,onDoubleClick:this.resizerReset,title:this.props.t("ra_Double click to reset table layout")})}renderHeader(){let e=null;return!this.columnsVisibility.buttons&&!this.isFilterEmpty()&&(e=a.createElement(W,{onClick:()=>this.clearFilter(),style:z.buttonClearFilter,title:this.props.t("ra_Clear filter"),size:"large"},a.createElement(E5e,null),a.createElement(we,{style:z.buttonClearFilterIcon}))),this.props.width==="xs"?a.createElement("div",{style:z.headerRow},a.createElement("div",{style:{...z.headerCell,width:"100%"}},this.getFilterInput("id"))):a.createElement("div",{style:z.headerRow},a.createElement("div",{style:{...z.headerCell,width:this.columnsVisibility.id,position:"relative"},"data-min":240,"data-name":"id"},this.getFilterInput("id"),this.renderHandleRight()),this.columnsVisibility.name?a.createElement("div",{style:{...z.headerCell,width:this.columnsVisibility.nameHeader,position:"relative"},"data-min":100,"data-name":"nameHeader"},this.getFilterInput("name"),this.renderHandleRight()):null,!this.state.statesView&&a.createElement(a.Fragment,null,this.columnsVisibility.type?a.createElement("div",{style:{...z.headerCell,width:this.columnsVisibility.type,position:"relative"},"data-min":100,"data-name":"type"},this.getFilterSelectType(),this.renderHandleRight()):null,this.columnsVisibility.role?a.createElement("div",{style:{...z.headerCell,width:this.columnsVisibility.role,position:"relative"},"data-min":100,"data-name":"role"},this.getFilterSelectRole(),this.renderHandleRight()):null,this.columnsVisibility.room?a.createElement("div",{style:{...z.headerCell,width:this.columnsVisibility.room,position:"relative"},"data-min":100,"data-name":"room"},this.getFilterSelectRoom(),this.renderHandleRight()):null,this.columnsVisibility.func?a.createElement("div",{style:{...z.headerCell,width:this.columnsVisibility.func,position:"relative"},"data-min":100,"data-name":"func"},this.getFilterSelectFunction(),this.renderHandleRight()):null),this.state.statesView&&a.createElement(a.Fragment,null,a.createElement("div",{style:{...z.headerCell,...z.headerCellValue,width:this.columnsVisibility.changedFrom,position:"relative"},"data-min":100,"data-name":"changedFrom"},this.props.t("ra_Changed from"),this.renderHandleRight()),a.createElement("div",{style:{...z.headerCell,...z.headerCellValue,width:this.columnsVisibility.qualityCode,position:"relative"},"data-min":100,"data-name":"qualityCode"},this.props.t("ra_Quality code"),this.renderHandleRight()),a.createElement("div",{style:{...z.headerCell,...z.headerCellValue,width:this.columnsVisibility.timestamp,position:"relative"},"data-min":100,"data-name":"timestamp"},this.props.t("ra_Timestamp"),this.renderHandleRight()),a.createElement("div",{style:{...z.headerCell,...z.headerCellValue,width:this.columnsVisibility.lastChange,position:"relative"},"data-min":100,"data-name":"lastChange"},this.props.t("ra_Last change"),this.renderHandleRight())),this.adapterColumns.map(t=>a.createElement("div",{style:{...z.headerCell,...z.headerCellValue,width:this.columnsVisibility[t.id]},title:t.adapter,key:t.id,"data-min":100,"data-name":t.id},t.name)),this.columnsVisibility.val?a.createElement("div",{style:{...z.headerCell,...z.headerCellValue,width:this.columnsVisibility.val,position:"relative"},"data-min":120,"data-name":"val"},this.props.t("ra_Value"),e):null,this.columnsVisibility.buttons?a.createElement("div",{title:this.texts.filter_custom,style:{...z.headerCell,width:this.columnsVisibility.buttons}}," ",this.getFilterSelectCustoms()):null)}renderToast(){return a.createElement(Zn,{open:!!this.state.toast,autoHideDuration:3e3,onClick:()=>this.setState({toast:""}),onClose:()=>this.setState({toast:""}),message:this.state.toast,action:a.createElement(W,{size:"small","aria-label":"close",color:"inherit",onClick:()=>this.setState({toast:""})},a.createElement(we,{fontSize:"small"}))})}componentDidUpdate(){if(this.tableRef.current){const e=this.tableRef.current.offsetWidth-this.tableRef.current.clientWidth;this.state.scrollBarWidth!==e?setTimeout(()=>this.setState({scrollBarWidth:e}),100):this.selectFirst&&this.scrollToItem(this.selectFirst)}}scrollToItem(e){this.selectFirst="";const t=window.document.getElementById(e);t==null||t.scrollIntoView({behavior:"auto",block:"center",inline:"center"})}renderCustomDialog(){if(this.state.customDialog&&this.props.objectCustomDialog){const e=this.props.objectCustomDialog;return a.createElement(e,{reportChangedIds:t=>this.changedIds=[...t],objectIDs:this.state.customDialog,allVisibleObjects:!!this.state.customDialogAll,expertMode:this.state.filter.expertMode,isFloatComma:this.props.isFloatComma===void 0?this.systemConfig.common.isFloatComma:this.props.isFloatComma,t:this.props.t,lang:this.props.lang,socket:this.props.socket,themeName:this.props.themeName,themeType:this.props.themeType,theme:this.props.theme,objects:this.objects,customsInstances:this.info.customs,onClose:()=>{var t;this.pauseSubscribe(!1),this.setState({customDialog:null}),this.changedIds&&(this.changedIds=null,this.forceUpdate()),(t=this.props.router)==null||t.doNavigate("tab-objects")},systemConfig:this.systemConfig})}return null}onUpdate(e){this.props.socket.setState(this.edit.id,{val:e.val,ack:e.ack,q:e.q||0,expire:e.expire||void 0}).catch(t=>this.showError(`Cannot write value: ${t}`))}renderEditObjectDialog(){if(!this.state.editObjectDialog||!this.props.objectBrowserEditObject)return null;const e=this.props.objectBrowserEditObject;return a.createElement(e,{key:this.state.editObjectDialog,obj:this.objects[this.state.editObjectDialog],roleArray:this.info.roles,objects:this.objects,dateFormat:this.props.dateFormat||this.systemConfig.common.dateFormat,isFloatComma:this.props.isFloatComma===void 0?this.systemConfig.common.isFloatComma:this.props.isFloatComma,themeType:this.props.themeType,theme:this.props.theme,socket:this.props.socket,dialogName:this.props.dialogName,aliasTab:this.state.editObjectAlias,t:this.props.t,expertMode:!!this.state.filter.expertMode,onNewObject:t=>this.props.socket.setObject(t._id,t).then(()=>this.setState({editObjectDialog:t._id,editObjectAlias:!1},()=>this.onSelect(t._id))).catch(i=>this.showError(`Cannot write object: ${i}`)),onClose:t=>{var i,r;if(t){let o;this.state.editObjectDialog.startsWith("alias.")&&JSON.stringify((i=this.objects[this.state.editObjectDialog].common)==null?void 0:i.alias)!==JSON.stringify((r=t.common)==null?void 0:r.alias)&&(o=this.state.editObjectDialog),this.props.socket.setObject(t._id,t).then(()=>{o&&this.subscribes.includes(o)&&(this.unsubscribe(o),setTimeout(()=>this.subscribe(o),100))}).catch(n=>this.showError(`Cannot write object: ${n}`))}this.setState({editObjectDialog:"",editObjectAlias:!1})},width:this.props.width})}renderViewObjectFileDialog(){if(!this.state.viewFileDialog||!this.props.objectBrowserViewFile)return null;const e=this.props.objectBrowserViewFile;return a.createElement(e,{key:"viewFile",obj:this.objects[this.state.viewFileDialog],socket:this.props.socket,t:this.props.t,onClose:()=>this.setState({viewFileDialog:""})})}renderAliasEditorDialog(){if(!this.props.objectBrowserAliasEditor||!this.state.showAliasEditor)return null;const e=this.props.objectBrowserAliasEditor;return a.createElement(e,{key:"editAlias",obj:this.objects[this.state.showAliasEditor],roleArray:this.info.roles,objects:this.objects,socket:this.props.socket,t:this.props.t,onClose:()=>this.setState({showAliasEditor:""}),onRedirect:(t,i)=>setTimeout(()=>this.onSelect(t,!1,()=>this.expandAllSelected(()=>{this.scrollToItem(t),setTimeout(()=>this.setState({editObjectDialog:t,showAliasEditor:"",editObjectAlias:!0}),300)})),i||0)})}showAddDataPointDialog(e,t,i){this.setState({showContextMenu:null,modalNewObj:{id:e,initialType:t,initialStateType:i}})}renderAliasMenu(){return this.state.aliasMenu?a.createElement(ws,{key:"aliasmenu",open:!0,anchorEl:window.document.getElementById(`alias_${this.state.aliasMenu}`),onClose:()=>this.setState({aliasMenu:""})},this.info.aliasesMap[this.state.aliasMenu].map((e,t)=>a.createElement(re,{key:e,onClick:()=>this.onSelect(e)},a.createElement(dt,null,this.renderAliasLink(this.state.aliasMenu,t,{"& .admin-browser-arrow":{mr:"8px"}}))))):null}renderContextMenu(){var L,g,j,y,T,d,I;if(!this.state.showContextMenu)return null;const e=this.state.showContextMenu.item,t=e.data.id,i=[],r=e.data.obj;let o="";if(this.props.objectEditOfAccessControl&&this.state.filter.expertMode)if(!r)o="---";else{const w=r.acl?r.type==="state"?r.acl.state:r.acl.object:0,A=r.acl&&(r.type==="state"?this.systemConfig.common.defaultNewAcl.state:this.systemConfig.common.defaultNewAcl.object);o=Number.isNaN(Number(w))?Number(A).toString(16):Number(w).toString(16)}const n=!this.props.notEditable&&r&&(this.state.filter.expertMode||r.type==="state"||r.type==="channel"||r.type==="device"),M=!e.data.obj||e.data.obj.type==="folder"||e.data.obj.type==="channel"||e.data.obj.type==="device"||e.data.id==="0_userdata.0"||e.data.obj.type==="meta",c=!e.data.obj||e.data.obj.type==="folder"||e.data.obj.type==="device"||e.data.id==="0_userdata.0"||e.data.obj.type==="meta",l=!e.data.obj||e.data.obj.type==="folder"||e.data.id==="0_userdata.0"||e.data.obj.type==="meta",N=!e.data.obj||e.data.obj.type==="folder"||e.data.id==="0_userdata.0"||e.data.obj.type==="meta",u={EDIT:{key:"0",visibility:!!(this.props.objectBrowserEditObject&&r&&(this.state.filter.expertMode||Z0(t))),icon:a.createElement(or,{fontSize:"small",style:this.styles.contextMenuEdit}),label:this.texts.editObject,onClick:()=>this.setState({editObjectDialog:e.data.id,showContextMenu:null,editObjectAlias:!1})},EDIT_VALUE:{key:"1",visibility:!!(this.states&&!this.props.notEditable&&r&&r.type==="state"&&((L=r.common)==null?void 0:L.type)!=="file"&&(this.state.filter.expertMode||r.common.write!==!1)),icon:a.createElement(iy,{fontSize:"small",style:this.styles.contextMenuEditValue}),label:this.props.t("ra_Edit value"),onClick:()=>{var w;this.edit={val:this.states[t]?this.states[t].val:"",q:((w=this.states[t])==null?void 0:w.q)||0,ack:!1,id:t},this.setState({updateOpened:!0,showContextMenu:null})}},VIEW:{visibility:!!this.props.objectBrowserViewFile&&(r==null?void 0:r.type)==="state"&&((g=r.common)==null?void 0:g.type)==="file",icon:a.createElement(qj,{fontSize:"small",style:this.styles.contextMenuView}),label:this.props.t("ra_View file"),onClick:()=>this.setState({viewFileDialog:(r==null?void 0:r._id)||"",showContextMenu:null})},CUSTOM:{key:"2",visibility:!(this.props.objectCustomDialog&&this.info.hasSomeCustoms&&r&&r.type==="state"&&((j=r.common)==null?void 0:j.type)!=="file"),icon:a.createElement(qn,{fontSize:"small",style:e.data.hasCustoms?this.styles.cellButtonsButtonWithCustoms:z.cellButtonsButtonWithoutCustoms}),style:this.styles.contextMenuCustom,label:this.texts.customConfig,onClick:()=>{var w;this.pauseSubscribe(!0),(w=this.props.router)==null||w.doNavigate(null,"customs",t),this.setState({customDialog:[t],showContextMenu:null})}},ACL:{key:"3",visibility:!!o,icon:o,iconStyle:{fontSize:"smaller"},listItemIconStyle:this.styles.contextMenuACL,style:this.styles.contextMenuACL,label:this.props.t("ra_Edit ACL"),onClick:()=>this.setState({showContextMenu:null,modalEditOfAccess:!0,modalEditOfAccessObjData:e.data})},ROLE:{key:"4",visibility:!!(this.state.filter.expertMode&&n&&this.props.objectBrowserEditRole),icon:a.createElement(Uj,{fontSize:"small",style:this.styles.contextMenuRole}),label:this.props.t("ra_Edit role"),onClick:()=>this.setState({roleDialog:e.data.id,showContextMenu:null})},FUNCTION:{key:"5",visibility:!!n,icon:a.createElement(Yj,{fontSize:"small",style:this.styles.contextMenuRole}),label:this.props.t("ra_Edit function"),onClick:()=>{const w=Rs(this.info,e.data.id,"funcEnums");this.setState({enumDialogEnums:w,enumDialog:{item:e,type:"func",enumsOriginal:JSON.stringify(w)},showContextMenu:null})}},ROOM:{key:"6",visibility:!!n,icon:a.createElement(Fj,{fontSize:"small",style:this.styles.contextMenuRoom}),label:this.props.t("ra_Edit room"),onClick:()=>{const w=Rs(this.info,e.data.id,"roomEnums");this.setState({enumDialogEnums:w,enumDialog:{item:e,type:"room",enumsOriginal:JSON.stringify(w)},showContextMenu:null})}},ALIAS:{key:"7",visibility:!!(!this.props.notEditable&&this.props.objectBrowserAliasEditor&&this.props.objectBrowserEditObject&&(r==null?void 0:r.type)==="state"&&((y=r.common)==null?void 0:y.type)!=="file"),icon:a.createElement(SN,{style:(T=r==null?void 0:r.common)!=null&&T.alias?this.styles.cellButtonsButtonWithCustoms:z.cellButtonsButtonWithoutCustoms}),label:this.info.aliasesMap[e.data.id]||e.data.id.startsWith("alias.0.")?this.props.t("ra_Edit alias"):this.props.t("ra_Create alias"),onClick:()=>{var w;(w=r==null?void 0:r.common)!=null&&w.alias?this.setState({showContextMenu:null,editObjectDialog:e.data.id,editObjectAlias:!0}):this.setState({showContextMenu:null,showAliasEditor:e.data.id})}},CREATE:{key:"+",visibility:(e.data.id.startsWith("0_userdata.0")||e.data.id.startsWith("javascript."))&&(M||c||l||N),icon:a.createElement(Kn,{fontSize:"small",style:this.styles.cellButtonsButtonWithCustoms}),style:z.contextMenuWithSubMenu,label:this.texts.create,subMenu:[{label:this.texts.createBooleanState,visibility:M,icon:a.createElement(rr,{fontSize:"small"}),onClick:()=>this.showAddDataPointDialog(e.data.id,"state","boolean")},{label:this.texts.createNumberState,visibility:M,icon:a.createElement(rr,{fontSize:"small"}),onClick:()=>this.showAddDataPointDialog(e.data.id,"state","number")},{label:this.texts.createStringState,visibility:M,icon:a.createElement(rr,{fontSize:"small"}),onClick:()=>this.showAddDataPointDialog(e.data.id,"state","string")},{label:this.texts.createState,visibility:M,icon:a.createElement(rr,{fontSize:"small"}),onClick:()=>this.showAddDataPointDialog(e.data.id,"state")},{label:this.texts.createChannel,visibility:c,icon:a.createElement(sg,{fontSize:"small"}),onClick:()=>this.showAddDataPointDialog(e.data.id,"channel")},{label:this.texts.createDevice,visibility:l,icon:a.createElement(ig,{fontSize:"small"}),onClick:()=>this.showAddDataPointDialog(e.data.id,"device")},{label:this.texts.createFolder,icon:a.createElement(fN,{fontSize:"small"}),visibility:N,onClick:()=>this.showAddDataPointDialog(e.data.id,"folder")}]},RENAME:{key:"8",visibility:!!(!this.props.notEditable&&this.props.objectMoveRenameDialog&&!e.data.id.startsWith("system.")&&e.data.id.split(".").length>2&&(this.props.expertMode||e.data.id.startsWith("javascript.0.")||e.data.id.startsWith("0_userdata.0."))),icon:a.createElement(Zj,null),label:this.props.t("ra_Rename_Move_Copy"),onClick:()=>{const w=Object.keys(this.objects),A=`${e.data.id}.`;this.setState({showContextMenu:null,showRenameDialog:{id:e.data.id,childrenIds:w.filter(p=>p.startsWith(A))}})}},DELETE:{key:"Delete",visibility:!!(this.props.onObjectDelete&&((d=e.children)!=null&&d.length||r&&!((I=r.common)!=null&&I.dontDelete))),icon:a.createElement(wt,{fontSize:"small",style:this.styles.contextMenuDelete}),style:this.styles.contextMenuDelete,label:this.texts.deleteObject,onClick:()=>this.setState({showContextMenu:null},()=>this.showDeleteDialog({id:t,obj:r||{},item:e}))}};return Object.keys(u).forEach(w=>{var A,p;u[w].visibility&&(u[w].subMenu?(i.push(a.createElement(re,{key:w,href:"",onClick:h=>this.state.showContextMenu&&this.setState({showContextMenu:{item:this.state.showContextMenu.item,position:this.state.showContextMenu.position,subItem:w,subAnchor:h.target}}),style:u[w].style},a.createElement(Xt,{style:{...u[w].iconStyle,...u[w].listItemIconStyle}},u[w].icon),a.createElement(dt,null,u[w].label,"..."),a.createElement("div",{style:{...z.contextMenuKeys,opacity:1}},a.createElement(kj,null)))),((A=this.state.showContextMenu)==null?void 0:A.subItem)===w&&i.push(a.createElement(ws,{key:"subContextMenu",open:!0,anchorEl:this.state.showContextMenu.subAnchor,onClose:()=>{this.state.showContextMenu&&this.setState({showContextMenu:{item:this.state.showContextMenu.item,position:this.state.showContextMenu.position}}),this.contextMenu=null}},(p=u[w].subMenu)==null?void 0:p.map(h=>h.visibility?a.createElement(re,{key:h.label,onClick:h.onClick,style:h.style},a.createElement(Xt,{style:{...h.iconStyle,...h.listItemIconStyle||void 0}},h.icon),a.createElement(dt,null,h.label)):null)))):i.push(a.createElement(re,{key:w,onClick:u[w].onClick,sx:u[w].style},a.createElement(Xt,{style:{...u[w].iconStyle,...u[w].listItemIconStyle}},u[w].icon),a.createElement(dt,null,u[w].label),u[w].key?a.createElement("div",{style:z.contextMenuKeys},`Alt+${u[w].key==="Delete"?this.props.t("ra_Del"):u[w].key}`):null)))}),i.length?a.createElement(ws,{key:"contextMenu",open:!0,onKeyUp:w=>{w.preventDefault(),w.altKey&&Object.keys(u).forEach(A=>{w.key===u[A].key&&u[A].onClick&&u[A].onClick()})},anchorReference:"anchorPosition",anchorPosition:this.state.showContextMenu.position,onClose:()=>{this.setState({showContextMenu:null}),this.contextMenu=null}},i):(setTimeout(()=>this.setState({showContextMenu:null}),100),null)}renderEditValueDialog(){var r;if(!this.state.updateOpened||!this.props.objectBrowserValue)return null;if(!this.edit.id)return console.error(`Invalid ID for edit: ${JSON.stringify(this.edit)}`),null;if(!this.objects[this.edit.id])return console.error(`Something went wrong. Possibly the object ${this.edit.id} was deleted.`),null;const e=(r=this.objects[this.edit.id].common)!=null&&r.type?this.objects[this.edit.id].common.type:typeof this.edit.val,t=this.objects[this.edit.id].common.role,i=this.props.objectBrowserValue;return a.createElement(i,{t:this.props.t,lang:this.props.lang,type:e,role:t||"",states:m.getStates(this.objects[this.edit.id]),themeType:this.props.themeType,theme:this.props.theme,expertMode:!!this.state.filter.expertMode,value:this.edit.val,socket:this.props.socket,object:this.objects[this.edit.id],defaultHistory:this.defaultHistory,dateFormat:this.props.dateFormat||this.systemConfig.common.dateFormat,isFloatComma:this.props.isFloatComma===void 0?this.systemConfig.common.isFloatComma:this.props.isFloatComma,onClose:o=>{this.setState({updateOpened:!1}),o&&this.onUpdate(o)},width:this.props.width})}doFilter(e){if(!this.objects||!this.root)return;e||this.localStorage.setItem(`${this.props.dialogName||"App"}.objectFilter`,JSON.stringify(this.state.filter));const t={count:0};xa(this.root,this.state.filter,this.props.lang,this.objects,void 0,t,this.props.customFilter,this.props.types),t.count<500&&!this.state.expandAllVisible?setTimeout(()=>this.setState({expandAllVisible:!0})):t.count>=500&&this.state.expandAllVisible?setTimeout(()=>this.setState({expandAllVisible:!1})):this.forceUpdate()}render(){if(this.recordStates=[],this.unsubscribeTimer&&clearTimeout(this.unsubscribeTimer),this.styleTheme!==this.props.themeType&&(this.styles={cellIdIconFolder:m.getStyle(this.props.theme,z.cellIdIconFolder),cellIdIconDocument:m.getStyle(this.props.theme,z.cellIdIconDocument),iconDeviceError:m.getStyle(this.props.theme,z.iconDeviceError),iconDeviceConnected:m.getStyle(this.props.theme,z.iconDeviceConnected),iconDeviceDisconnected:m.getStyle(this.props.theme,z.iconDeviceDisconnected),cellButtonsButtonWithCustoms:m.getStyle(this.props.theme,z.cellButtonsButtonWithCustoms),invertedBackground:m.getStyle(this.props.theme,z.invertedBackground),invertedBackgroundFlex:m.getStyle(this.props.theme,z.invertedBackgroundFlex),contextMenuEdit:m.getStyle(this.props.theme,z.contextMenuEdit),contextMenuEditValue:m.getStyle(this.props.theme,z.contextMenuEditValue),contextMenuView:m.getStyle(this.props.theme,z.contextMenuView),contextMenuCustom:m.getStyle(this.props.theme,z.contextMenuCustom),contextMenuACL:m.getStyle(this.props.theme,z.contextMenuACL),contextMenuRoom:m.getStyle(this.props.theme,z.contextMenuRoom),contextMenuRole:m.getStyle(this.props.theme,z.contextMenuRole),contextMenuDelete:m.getStyle(this.props.theme,z.contextMenuDelete),filterInput:m.getStyle(this.props.theme,z.headerCellInput,z.filterInput),iconCopy:m.getStyle(this.props.theme,z.cellButtonsValueButton,z.cellButtonsValueButtonCopy),aliasReadWrite:m.getStyle(this.props.theme,z.cellIdAlias,z.cellIdAliasReadWrite),aliasAlone:m.getStyle(this.props.theme,z.cellIdAlias,z.cellIdAliasAlone)},this.styleTheme=this.props.themeType),this.unsubscribeTimer=setTimeout(()=>{this.unsubscribeTimer=null,this.checkUnsubscribes()},200),this.expertMode!==!!this.state.filter.expertMode&&(this.expertMode=!!this.state.filter.expertMode,this.doFilter(!0)),!this.state.loaded)return a.createElement(ko,{key:`${this.props.dialogName}_c`});const e=this.root?this.renderItem(this.root,void 0):null;return a.createElement(_5e,{key:this.props.dialogName},a.createElement("style",null,` @keyframes newValueAnimation-light { 0% { diff --git a/admin/assets/index-CyhJmDLi.js b/admin/assets/index-Blu2oA9H.js similarity index 99% rename from admin/assets/index-CyhJmDLi.js rename to admin/assets/index-Blu2oA9H.js index c702348ba..a9234d1ce 100644 --- a/admin/assets/index-CyhJmDLi.js +++ b/admin/assets/index-Blu2oA9H.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-8lzQwHHF.js","./createSvgIcon-DYs_tNrE.js","./iobroker_javascript__loadShare__react__loadShare__.mjs-CTZOFJS2.js","./iobroker_javascript__loadShare__react__loadShare__.mjs_commonjs-proxy-CE9lvhW8.js","./iobroker_javascript__loadShare__prop_mf_2_types__loadShare__.mjs-BCtSFofY.js","./iobroker_javascript__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.mjs-DkBjPSMw.js","./iobroker_javascript__loadShare___mf_0_mui_mf_1_material__loadShare__.mjs-CV1_X-Lf.js","./index-wHNMOf-c.js","./virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-DiXVqr03.js","./preload-helper-BDBacUwf.js","./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-RQRRZMX5.js","./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs-DeVAS-oa.js","./inheritsLoose-CIXm_zPk.js","./index-BCK6q-N6.css","./index-Ci9KPmcb.js","./ScriptEditorVanillaMonaco-ColXheQH.js","./ScriptEditor--krhY3GB.js","./Save-CkuNSiWL.js","./AiChatPanel-gzZ2JXbv.js","./index-45IwpC7_.js","./AiDiffView-RPozjjHf.js"])))=>i.map(i=>d[i]); -import{d as Dw}from"./virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-DiXVqr03.js";import{j as m,c as vt,g as nk,r as rk,_ as Qg}from"./createSvgIcon-DYs_tNrE.js";import{r as ET}from"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-RQRRZMX5.js";import{a as pe,_ as xT,b as ji,c as Ft,d as DT,e as ak,f as em,g as Fm,h as zm,i as lk,j as St,k as zn,l as gs,m as AT,n as ck,o as tm,p as RT,q as OT,r as uk,s as MT,t as Zo}from"./iobroker_javascript__loadShare__react__loadShare__.mjs-CTZOFJS2.js";import{_ as zt,a as ts,b as Yt,c as Oo,d as Ui,e as sm,f as Hi,g as et,h as Ut,i as je,j as bc,k as yc,l as vc,m as wc,n as _c,o as We,p as dk,q as Ni,r as om,s as Aw,t as im,u as nm,v as Jn,w as hk,x as NT,y as Vc,z as bt,A as LT,B as rm,C as PT,D as fg,E as ua,F as BT,G as jT,H as FT,I as zT,J as pk,K as UT,L as HT,M as Rw,N as Mn,O as WT,P as GT,Q as VT,R as KT,S as YT,T as gk,U as JT,V as am,W as mk,X as qT}from"./iobroker_javascript__loadShare___mf_0_mui_mf_1_material__loadShare__.mjs-CV1_X-Lf.js";import{_ as x}from"./iobroker_javascript__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.mjs-DkBjPSMw.js";import{I as ni,a as ao,b as Nc,C as XT,c as fk,F as ZT,d as QT,e as Kc,f as lm,g as eI,h as tI,i as sI,j as oI,M as iI,k as nI,l as rI,m as aI,_ as lI,n as kc,o as cI,p as uI,q as Cc,r as Ow,s as dI,t as hI,u as pI,v as gI,w as Mw,x as bu,y as mI,z as fI,A as $I,B as bI,D as yI,E as vI,G as wI,H as _I,J as kI,K as $k,L as bk,N as yk,O as CI,P as SI,Q as TI,R as II,S as EI,T as xI}from"./index-wHNMOf-c.js";import{y as DI,_ as AI,a as RI,S as Nw,T as Lw}from"./inheritsLoose-CIXm_zPk.js";import{c as ro}from"./iobroker_javascript__loadShare__react__loadShare__.mjs_commonjs-proxy-CE9lvhW8.js";function ri(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}import{_ as Ki}from"./preload-helper-BDBacUwf.js";import{P as ve}from"./iobroker_javascript__loadShare__prop_mf_2_types__loadShare__.mjs-BCtSFofY.js";import{_ as OI}from"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs-DeVAS-oa.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const c of l)if(c.type==="childList")for(const h of c.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function i(l){const c={};return l.integrity&&(c.integrity=l.integrity),l.referrerPolicy&&(c.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?c.credentials="include":l.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function r(l){if(l.ep)return;l.ep=!0;const c=i(l);fetch(l.href,c)}})();var vk,Pw=ET;vk=Pw.createRoot,Pw.hydrateRoot;var wk={exports:{}},ht={};var yu=60103,vu=60106,Sa=60107,Ta=60108,Ia=60114,Ea=60109,xa=60110,Da=60112,Aa=60113,Um=60120,Ra=60115,Oa=60116,_k=60121,kk=60122,Ck=60117,Sk=60129,Tk=60131;if(typeof Symbol=="function"&&Symbol.for){var Bt=Symbol.for;yu=Bt("react.element"),vu=Bt("react.portal"),Sa=Bt("react.fragment"),Ta=Bt("react.strict_mode"),Ia=Bt("react.profiler"),Ea=Bt("react.provider"),xa=Bt("react.context"),Da=Bt("react.forward_ref"),Aa=Bt("react.suspense"),Um=Bt("react.suspense_list"),Ra=Bt("react.memo"),Oa=Bt("react.lazy"),_k=Bt("react.block"),kk=Bt("react.server.block"),Ck=Bt("react.fundamental"),Sk=Bt("react.debug_trace_mode"),Tk=Bt("react.legacy_hidden")}function js(a){if(typeof a=="object"&&a!==null){var s=a.$$typeof;switch(s){case yu:switch(a=a.type,a){case Sa:case Ia:case Ta:case Aa:case Um:return a;default:switch(a=a&&a.$$typeof,a){case xa:case Da:case Oa:case Ra:case Ea:return a;default:return s}}case vu:return s}}}var MI=Ea,NI=yu,LI=Da,PI=Sa,BI=Oa,jI=Ra,FI=vu,zI=Ia,UI=Ta,HI=Aa;ht.ContextConsumer=xa;ht.ContextProvider=MI;ht.Element=NI;ht.ForwardRef=LI;ht.Fragment=PI;ht.Lazy=BI;ht.Memo=jI;ht.Portal=FI;ht.Profiler=zI;ht.StrictMode=UI;ht.Suspense=HI;ht.isAsyncMode=function(){return!1};ht.isConcurrentMode=function(){return!1};ht.isContextConsumer=function(a){return js(a)===xa};ht.isContextProvider=function(a){return js(a)===Ea};ht.isElement=function(a){return typeof a=="object"&&a!==null&&a.$$typeof===yu};ht.isForwardRef=function(a){return js(a)===Da};ht.isFragment=function(a){return js(a)===Sa};ht.isLazy=function(a){return js(a)===Oa};ht.isMemo=function(a){return js(a)===Ra};ht.isPortal=function(a){return js(a)===vu};ht.isProfiler=function(a){return js(a)===Ia};ht.isStrictMode=function(a){return js(a)===Ta};ht.isSuspense=function(a){return js(a)===Aa};ht.isValidElementType=function(a){return typeof a=="string"||typeof a=="function"||a===Sa||a===Ia||a===Sk||a===Ta||a===Aa||a===Um||a===Tk||typeof a=="object"&&a!==null&&(a.$$typeof===Oa||a.$$typeof===Ra||a.$$typeof===Ea||a.$$typeof===xa||a.$$typeof===Da||a.$$typeof===Ck||a.$$typeof===_k||a[0]===kk)};ht.typeOf=js;wk.exports=ht;var WI=wk.exports;function Yc(a,s){const i=getComputedStyle(s);if(!i)return;let r=a===mt.Horizontal?s.clientWidth:s.clientHeight;return r!==0?(a===mt.Horizontal?r-=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight):r-=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),r):void 0}function Sc(a,s,i=[],r={condition:!0}){const{condition:l}=r,c=(function(h,d){var p={};for(var g in h)Object.prototype.hasOwnProperty.call(h,g)&&d.indexOf(g)<0&&(p[g]=h[g]);if(h!=null&&typeof Object.getOwnPropertySymbols=="function"){var $=0;for(g=Object.getOwnPropertySymbols(h);$(l&&window.addEventListener(a,s,c),()=>{l&&window.removeEventListener(a,s)})),[a,s,l,...i])}(function(a,s){s===void 0&&(s={});var i=s.insertAt;if(typeof document<"u"){var r=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css",i==="top"&&r.firstChild?r.insertBefore(l,r.firstChild):r.appendChild(l),l.styleSheet?l.styleSheet.cssText=a:l.appendChild(document.createTextNode(a))}})(`/* === Main Container === */ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-CtxgOnw1.js","./createSvgIcon-DYs_tNrE.js","./iobroker_javascript__loadShare__react__loadShare__.mjs-CTZOFJS2.js","./iobroker_javascript__loadShare__react__loadShare__.mjs_commonjs-proxy-CE9lvhW8.js","./iobroker_javascript__loadShare__prop_mf_2_types__loadShare__.mjs-BCtSFofY.js","./iobroker_javascript__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.mjs-DkBjPSMw.js","./iobroker_javascript__loadShare___mf_0_mui_mf_1_material__loadShare__.mjs-CV1_X-Lf.js","./index-wHNMOf-c.js","./virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-Dus28I2g.js","./preload-helper-BDBacUwf.js","./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-RQRRZMX5.js","./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs-DeVAS-oa.js","./inheritsLoose-CIXm_zPk.js","./index-BCK6q-N6.css","./index-B0Khg-uY.js","./ScriptEditorVanillaMonaco-CKnJEdpA.js","./ScriptEditor-B5mD7l8c.js","./Save-CkuNSiWL.js","./AiChatPanel-CZ2o6xnT.js","./index-45IwpC7_.js","./AiDiffView-RPozjjHf.js"])))=>i.map(i=>d[i]); +import{d as Dw}from"./virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-Dus28I2g.js";import{j as m,c as vt,g as nk,r as rk,_ as Qg}from"./createSvgIcon-DYs_tNrE.js";import{r as ET}from"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-RQRRZMX5.js";import{a as pe,_ as xT,b as ji,c as Ft,d as DT,e as ak,f as em,g as Fm,h as zm,i as lk,j as St,k as zn,l as gs,m as AT,n as ck,o as tm,p as RT,q as OT,r as uk,s as MT,t as Zo}from"./iobroker_javascript__loadShare__react__loadShare__.mjs-CTZOFJS2.js";import{_ as zt,a as ts,b as Yt,c as Oo,d as Ui,e as sm,f as Hi,g as et,h as Ut,i as je,j as bc,k as yc,l as vc,m as wc,n as _c,o as We,p as dk,q as Ni,r as om,s as Aw,t as im,u as nm,v as Jn,w as hk,x as NT,y as Vc,z as bt,A as LT,B as rm,C as PT,D as fg,E as ua,F as BT,G as jT,H as FT,I as zT,J as pk,K as UT,L as HT,M as Rw,N as Mn,O as WT,P as GT,Q as VT,R as KT,S as YT,T as gk,U as JT,V as am,W as mk,X as qT}from"./iobroker_javascript__loadShare___mf_0_mui_mf_1_material__loadShare__.mjs-CV1_X-Lf.js";import{_ as x}from"./iobroker_javascript__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.mjs-DkBjPSMw.js";import{I as ni,a as ao,b as Nc,C as XT,c as fk,F as ZT,d as QT,e as Kc,f as lm,g as eI,h as tI,i as sI,j as oI,M as iI,k as nI,l as rI,m as aI,_ as lI,n as kc,o as cI,p as uI,q as Cc,r as Ow,s as dI,t as hI,u as pI,v as gI,w as Mw,x as bu,y as mI,z as fI,A as $I,B as bI,D as yI,E as vI,G as wI,H as _I,J as kI,K as $k,L as bk,N as yk,O as CI,P as SI,Q as TI,R as II,S as EI,T as xI}from"./index-wHNMOf-c.js";import{y as DI,_ as AI,a as RI,S as Nw,T as Lw}from"./inheritsLoose-CIXm_zPk.js";import{c as ro}from"./iobroker_javascript__loadShare__react__loadShare__.mjs_commonjs-proxy-CE9lvhW8.js";function ri(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}import{_ as Ki}from"./preload-helper-BDBacUwf.js";import{P as ve}from"./iobroker_javascript__loadShare__prop_mf_2_types__loadShare__.mjs-BCtSFofY.js";import{_ as OI}from"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs-DeVAS-oa.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const c of l)if(c.type==="childList")for(const h of c.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function i(l){const c={};return l.integrity&&(c.integrity=l.integrity),l.referrerPolicy&&(c.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?c.credentials="include":l.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function r(l){if(l.ep)return;l.ep=!0;const c=i(l);fetch(l.href,c)}})();var vk,Pw=ET;vk=Pw.createRoot,Pw.hydrateRoot;var wk={exports:{}},ht={};var yu=60103,vu=60106,Sa=60107,Ta=60108,Ia=60114,Ea=60109,xa=60110,Da=60112,Aa=60113,Um=60120,Ra=60115,Oa=60116,_k=60121,kk=60122,Ck=60117,Sk=60129,Tk=60131;if(typeof Symbol=="function"&&Symbol.for){var Bt=Symbol.for;yu=Bt("react.element"),vu=Bt("react.portal"),Sa=Bt("react.fragment"),Ta=Bt("react.strict_mode"),Ia=Bt("react.profiler"),Ea=Bt("react.provider"),xa=Bt("react.context"),Da=Bt("react.forward_ref"),Aa=Bt("react.suspense"),Um=Bt("react.suspense_list"),Ra=Bt("react.memo"),Oa=Bt("react.lazy"),_k=Bt("react.block"),kk=Bt("react.server.block"),Ck=Bt("react.fundamental"),Sk=Bt("react.debug_trace_mode"),Tk=Bt("react.legacy_hidden")}function js(a){if(typeof a=="object"&&a!==null){var s=a.$$typeof;switch(s){case yu:switch(a=a.type,a){case Sa:case Ia:case Ta:case Aa:case Um:return a;default:switch(a=a&&a.$$typeof,a){case xa:case Da:case Oa:case Ra:case Ea:return a;default:return s}}case vu:return s}}}var MI=Ea,NI=yu,LI=Da,PI=Sa,BI=Oa,jI=Ra,FI=vu,zI=Ia,UI=Ta,HI=Aa;ht.ContextConsumer=xa;ht.ContextProvider=MI;ht.Element=NI;ht.ForwardRef=LI;ht.Fragment=PI;ht.Lazy=BI;ht.Memo=jI;ht.Portal=FI;ht.Profiler=zI;ht.StrictMode=UI;ht.Suspense=HI;ht.isAsyncMode=function(){return!1};ht.isConcurrentMode=function(){return!1};ht.isContextConsumer=function(a){return js(a)===xa};ht.isContextProvider=function(a){return js(a)===Ea};ht.isElement=function(a){return typeof a=="object"&&a!==null&&a.$$typeof===yu};ht.isForwardRef=function(a){return js(a)===Da};ht.isFragment=function(a){return js(a)===Sa};ht.isLazy=function(a){return js(a)===Oa};ht.isMemo=function(a){return js(a)===Ra};ht.isPortal=function(a){return js(a)===vu};ht.isProfiler=function(a){return js(a)===Ia};ht.isStrictMode=function(a){return js(a)===Ta};ht.isSuspense=function(a){return js(a)===Aa};ht.isValidElementType=function(a){return typeof a=="string"||typeof a=="function"||a===Sa||a===Ia||a===Sk||a===Ta||a===Aa||a===Um||a===Tk||typeof a=="object"&&a!==null&&(a.$$typeof===Oa||a.$$typeof===Ra||a.$$typeof===Ea||a.$$typeof===xa||a.$$typeof===Da||a.$$typeof===Ck||a.$$typeof===_k||a[0]===kk)};ht.typeOf=js;wk.exports=ht;var WI=wk.exports;function Yc(a,s){const i=getComputedStyle(s);if(!i)return;let r=a===mt.Horizontal?s.clientWidth:s.clientHeight;return r!==0?(a===mt.Horizontal?r-=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight):r-=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),r):void 0}function Sc(a,s,i=[],r={condition:!0}){const{condition:l}=r,c=(function(h,d){var p={};for(var g in h)Object.prototype.hasOwnProperty.call(h,g)&&d.indexOf(g)<0&&(p[g]=h[g]);if(h!=null&&typeof Object.getOwnPropertySymbols=="function"){var $=0;for(g=Object.getOwnPropertySymbols(h);$(l&&window.addEventListener(a,s,c),()=>{l&&window.removeEventListener(a,s)})),[a,s,l,...i])}(function(a,s){s===void 0&&(s={});var i=s.insertAt;if(typeof document<"u"){var r=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css",i==="top"&&r.firstChild?r.insertBefore(l,r.firstChild):r.appendChild(l),l.styleSheet?l.styleSheet.cssText=a:l.appendChild(document.createTextNode(a))}})(`/* === Main Container === */ .__dbk__container { height: 100%; width: 100%; @@ -295,7 +295,7 @@ Note: Some script sources were omitted due to size. The user can ask about speci `);if(r.length<2||l.length<2)return null;const c=new Set;for(const b of r){const T=b.trim();AO(T)&&c.add(T)}if(c.size<2)return null;const h=r.length,d=Math.ceil(h*1.5),p=Math.max(2,Math.floor(h*.5));let g=-1,$=-1,y=0;const w=new Uint8Array(l.length);for(let b=0;by&&(y=C,g=b,$=T)}if(g<0||yg+1&&!w[$-1];)$--;for(;g<$-1&&!w[g];)g++;const _=l[$-1]??"";return{range:{startLine:g+1,startColumn:1,endLine:$,endColumn:_.length+1},confidence:y,method:"similarity"}}function OO(a){const s=a.split(` `).map(i=>i.trim()).filter(i=>i.length>0);return s.length===0?!1:s.every(i=>i.startsWith("//")||i.startsWith("/*")||i.startsWith("*")||i.endsWith("*/"))}function MO(a){const s=[];let i=!1,r=null,l=0;for(let c=0;c0?(s.push({startLine:l,endLine:c}),i=!1,r=null):h.length===0&&(s.push({startLine:l,endLine:c}),i=!1,r=null)):h.startsWith("/*")?(i=!0,r="jsdoc",l=c+1,h.includes("*/")&&(s.push({startLine:l,endLine:c+1}),i=!1,r=null)):h.startsWith("//")&&(i=!0,r="line",l=c+1)}return i&&l>0&&s.push({startLine:l,endLine:a.length}),s}function NO(a,s,i=.2){if(!OO(a)||!s)return null;const r=s.split(` `),l=MO(r);if(!l.length)return null;const c=new Set;for(const g of a.split(` -`)){const y=g.trim().replace(/^\/\*+/,"").replace(/\*+\/$/,"").replace(/^\/\//,"").replace(/^\*+/,"").trim();y.length>=3&&c.add(y.toLowerCase())}if(c.size===0){if(l.length===1){const g=l[0],$=r[g.endLine-1]??"";return{range:{startLine:g.startLine,startColumn:1,endLine:g.endLine,endColumn:$.length+1},confidence:.5,method:"similarity"}}return null}let h=l[0],d=0;for(const g of l){let $=0;for(let w=g.startLine-1;wd&&(d=y,h=g)}if(dKi(()=>Promise.resolve().then(()=>g1),void 0,import.meta.url)),BO=pe.lazy(()=>Ki(()=>import("./index-8lzQwHHF.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]),import.meta.url)),jO=pe.lazy(()=>Ki(()=>import("./index-Ci9KPmcb.js"),__vite__mapDeps([14,1,2,3,4,6,7,5,15,9,8,10,11,12]),import.meta.url)),FO=pe.lazy(()=>Ki(()=>import("./ScriptEditorVanillaMonaco-ColXheQH.js"),__vite__mapDeps([15,9,1,2,3,4,6,7,5,8,10,11,12]),import.meta.url)),zO=pe.lazy(()=>Ki(()=>import("./ScriptEditor--krhY3GB.js"),__vite__mapDeps([16,1,2,3,4,6,5,15,9,7,8,10,11,12,17]),import.meta.url)),U_=pe.lazy(()=>Ki(()=>import("./AiChatPanel-gzZ2JXbv.js"),__vite__mapDeps([18,1,2,3,4,6,5,9,19,7,8,10,11,12]),import.meta.url)),UO=pe.lazy(()=>Ki(()=>import("./AiDiffView-RPozjjHf.js"),__vite__mapDeps([20,1,2,3,4,6,5,7]),import.meta.url)),H_={Blockly:Jk,"Javascript/js":qc,Rules:Xk,def:qc,"TypeScript/ts":qk},HO=48,W_="#02a102",Hg="#70aae9",WO=nk[400],GO=rk[400],Me={toolbar:a=>({minHeight:38,boxShadow:"0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12)",backgroundColor:a.palette.mode==="dark"?"#1e1e1e":"#E2E2E2"}),toolbarButtons:{padding:4,marginLeft:4},toolbarButtonsDisabled:{filter:"grayscale(100%)",opacity:.5},editorDiv:a=>({height:`calc(100% - ${(parseInt(a.toolbar.height,10)||48)+38+10}px)`,width:"100%",overflow:"hidden",position:"relative"}),textButton:{marginRight:10,minHeight:24,padding:"6px 16px",height:32},saveButton:{background:"#ff9900"},tabIcon:{width:24,height:24,verticalAlign:"middle",marginBottom:2,marginRight:2,borderRadius:3},hintIcon:{padding:"0 8px 0 8px"},hintButton:{marginTop:8,marginLeft:20},tabMenuButton:{position:"absolute",top:0,right:0},tabChanged:a=>({color:a.palette.secondary.main}),tabText:{maxWidth:130,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",display:"inline-block",verticalAlign:"middle"},tabChangedIcon:{color:"#FF0000",fontSize:16,marginLeft:5},closeButton:{marginLeft:5},notRunning:{color:"#ffbc00",marginRight:8,marginLeft:8},tabButton:{minHeight:48},tabButtonWrapper:{display:"inline-block"},menuIcon:{width:18,height:18,borderRadius:2,marginRight:5}};class Hn extends pe.Component{getSelect=null;changedMirror={};cron={initValue:null,callback:null};scriptDialog={initValue:null,callback:null,args:null,isReturn:!1};objects;scripts;selectId={initValue:null,callback:null};confirmCallback=null;blocklyEditorRef=pe.createRef();scriptEditorRef=pe.createRef();lastKnownTs={};constructor(s){var c,h;super(s);let i=window.localStorage.getItem("Editor.selected")||"";const r=window.localStorage.getItem("Editor.editing")||"[]";let l;try{l=JSON.parse(r)}catch{l=[]}i&&!l.includes(i)&&l.push(i),i&&!this.props.password&&((h=(c=this.props.objects[i])==null?void 0:c.native)!=null&&h.protected)&&(i=l.find(d=>{var p,g;return!((g=(p=this.props.objects[d])==null?void 0:p.native)!=null&&g.protected)})||""),!i&&l.length&&(this.props.password?i=l[0]:i=l.find(d=>{var p,g;return!((g=(p=this.props.objects[d])==null?void 0:p.native)!=null&&g.protected)})||""),this.state={askAboutDebug:!1,astroEvents:null,blockly:null,changed:{},cmdToBlockly:"",cmdToRules:"",confirm:"",debugEnabled:!1,editing:l,insert:"",instancesLoaded:!1,isTourOpen:window.localStorage.getItem("tour")!=="true",menuDebugAnchorEl:null,menuOidDisplayAnchorEl:null,oidDisplayMode:parseInt(window.localStorage.getItem("Blockly.FieldOID.displayMode")||"0",10)||0,oidShowIcon:window.localStorage.getItem("Blockly.FieldOID.showIcon")==="true",menuOpened:!!this.props.menuOpened,menuTabsOpened:!1,aiChatOpen:window.localStorage.getItem("Editor.aiChatOpen")==="true",aiDiffView:null,aiActionRequest:null,inlineAskHandler:null,aiCompletionsEnabled:window.localStorage.getItem("Editor.aiCompletions")!=="false",triggerPrettier:1,scriptConflict:"",rules:null,runningInstances:this.props.runningInstances||{},searchText:"",selected:i,showAdapterDebug:!1,showAstro:!1,showCompiledCode:!1,showCron:!1,showDebugMenu:!1,showScript:!1,showSelectId:!1,themeType:this.props.themeType,toast:"",tourStep:Ps.selectTriggers,verboseEnabled:!1,visible:s.visible},this.setChangedInAdmin(),window.systemLang=x.I18n.getLanguage(),window.main={objects:{},getObject:(d,p)=>this.props.socket.getObject(d).then(g=>p==null?void 0:p(null,g)).catch(g=>p==null?void 0:p(g)),getState:(d,p)=>this.props.socket.getState(d).then(g=>p==null?void 0:p(null,g)).catch(g=>p==null?void 0:p(g)),instances:[],selectIdDialog:(d,p,g)=>{typeof p=="function"&&(g=p,p=null),this.selectId.callback=g,this.selectId.initValue=d,this.selectId.type=p,this.setState({showSelectId:!0})},cronDialog:(d,p)=>{this.cron.callback=p,this.cron.initValue=d,this.setState({showCron:!0})},showScriptDialog:(d,p,g,$)=>{this.scriptDialog.callback=$,this.scriptDialog.initValue=d,this.scriptDialog.args=p,this.scriptDialog.isReturn=g||!1,this.setState({showScript:!0})}},this.objects=s.objects,this.scripts={},this.getAllAdapterInstances().then(()=>{this.props.onSelectedChange&&this.state.selected&&setTimeout(()=>this.props.onSelectedChange(this.state.selected,this.state.editing),100)})}async getAllAdapterInstances(){const s=await this.props.socket.getAdapterInstances(!0),i={},r=s.map(l=>(i[l._id]=l,l._id));window.main.objects=i,window.main.instances=r,this.setState({instancesLoaded:!0})}static onInstanceChanged(s,i){if(s)if(!i&&window.main.instances.includes(s)){delete window.main.objects[s];const r=window.main.instances.indexOf(s);window.main.instances.splice(r,1)}else(i==null?void 0:i.type)==="instance"&&(window.main.instances.includes(s)||(window.main.instances.push(s),window.main.instances.sort()),window.main.objects[s]=i)}setChangedInAdmin(){const s=Object.keys(this.state.changed).find(i=>this.state.changed[i]);Object.keys(this.state.changed).forEach(i=>{this.changedMirror[i]=this.state.changed[i]}),Object.keys(this.changedMirror).forEach(i=>{this.state.changed[i]===void 0&&delete this.changedMirror[i]}),this.props.onChangedChanged(this.changedMirror),typeof window.parent<"u"&&window.parent&&(window.parent.configNotSaved=!!s)}componentDidMount(){window.addEventListener("beforeunload",this.onBrowserClose,!1),this.props.socket.subscribeObject("system.adapter.*",Hn.onInstanceChanged)}componentWillUnmount(){window.removeEventListener("beforeunload",this.onBrowserClose),this.props.socket.unsubscribeObject("system.adapter.*",Hn.onInstanceChanged)}componentDidUpdate(s){if(s.scriptsHash!==this.props.scriptsHash)for(const i of this.state.editing){const r=this.props.objects[i];if(!r||r.type!=="script")continue;const l=r.ts||0,c=this.lastKnownTs[i];c!==void 0&&l!==c&&(this.state.changed[i]?this.state.scriptConflict||this.setState({scriptConflict:i}):(this.scripts[i]=this.getScriptFromObject(i),this.lastKnownTs[i]=l))}}onBrowserClose=s=>{const i=Object.keys(this.scripts).find(r=>JSON.stringify(this.scripts[r])!==JSON.stringify(this.getScriptFromObject(r)));if(i){console.log(`Script ${JSON.stringify(this.scripts[i])}`);const r=x.I18n.t("Configuration not saved.");return s=s||window.event,s&&(s.returnValue=r),r}};removeNonExistingScripts(s,i){s=s||this.props,i=i||{};let r=!1;if(this.state.editing&&this.state.editing.find(c=>s&&!s.objects[c])){const c=[...this.state.editing];for(let h=c.length-1;h>=0;h--)this.objects[c[h]]||(r=!0,c.splice(h,1));r&&(i.editing=c),this.state.selected&&!this.objects[this.state.selected]&&(r=!0,i.selected=c[0]||"",i.selected&&this.scripts[i.selected]&&(this.state.blockly!==(this.scripts[i.selected].engineType==="Blockly")&&(i.blockly=this.scripts[i.selected].engineType==="Blockly",r=!0),this.state.rules!==(this.scripts[i.selected].engineType==="Rules")&&(i.rules=this.scripts[i.selected].engineType==="Rules",r=!0),this.state.verboseEnabled!==this.scripts[i.selected].verbose&&(i.verboseEnabled=this.scripts[i.selected].verbose,r=!0),this.state.debugEnabled!==this.scripts[i.selected].debug&&(i.debugEnabled=this.scripts[i.selected].debug,r=!0)))}return r}UNSAFE_componentWillReceiveProps(s){var l,c,h;const i={};let r=!1;if(JSON.stringify(s.runningInstances)!==JSON.stringify(this.state.runningInstances)&&(r=!0,i.runningInstances=s.runningInstances),this.state.menuOpened!==s.menuOpened&&(i.menuOpened=s.menuOpened,r=!0),this.state.themeType!==s.themeType&&(i.themeType=s.themeType,r=!0),this.removeNonExistingScripts(s,i)&&(r=!0),this.state.searchText!==s.searchText&&(i.searchText=s.searchText,r=!0),this.objects!==s.objects){this.objects=s.objects,window.main.objects=s.objects,Object.keys(this.scripts).forEach(p=>{const g=this.scripts[p].source;this.scripts[p]=JSON.parse(JSON.stringify(this.objects[p].common)),this.scripts[p].source=g}),this.state.selected&&this.objects[this.state.selected]&&(this.scripts[this.state.selected]||=JSON.parse(JSON.stringify(this.objects[this.state.selected].common)),this.state.blockly!==(this.scripts[this.state.selected].engineType==="Blockly")&&(i.blockly=this.scripts[this.state.selected].engineType==="Blockly",r=!0),this.state.rules!==(this.scripts[this.state.selected].engineType==="Rules")&&(i.rules=this.scripts[this.state.selected].engineType==="Rules",r=!0),this.state.verboseEnabled!==this.scripts[this.state.selected].verbose&&(i.verboseEnabled=this.scripts[this.state.selected].verbose,r=!0),this.state.debugEnabled!==this.scripts[this.state.selected].debug&&(i.debugEnabled=this.scripts[this.state.selected].debug,r=!0));const d=[...this.state.editing];for(let p=d.length-1;p>=0;p--)this.objects[d[p]]||(r=!0,d.splice(p,1),this.state.changed[d[p]]!==void 0&&(i.changed||={...this.state.changed},i.changed&&delete i.changed[d[p]]));this.state.selected&&!this.objects[this.state.selected]&&(i.selected=d[0]||""),r&&(i.editing=d)}else for(const d in this.scripts)if(Object.prototype.hasOwnProperty.call(this.scripts,d)){if((l=this.objects[d])!=null&&l.common){if(this.objects[d].type==="script"){const p=this.scripts[d].source,g=JSON.parse(JSON.stringify(this.scripts[d]));g.source=this.objects[d].common.source,JSON.stringify(g)!==JSON.stringify(this.objects[d].common)&&(this.scripts[d]=JSON.parse(JSON.stringify(this.objects[d].common)),this.scripts[d].source=p),p!==this.objects[d].common.source?this.state.changed[d]?(h=this.objects[d].from)!=null&&h.startsWith("system.adapter.javascript.")&&(this.objects[d].from="system.adapter.admin.0",this.setState({toast:x.I18n.t("Script %s was modified on disk.",d.split(".").pop())})):this.props.password&&((c=this.objects[d].native)!=null&&c.protected)?this.scripts[d].source=bm(this.props.password,this.objects[d].common.source):this.scripts[d].source=this.objects[d].common.source:this.state.changed[d]&&(i.changed||={...this.state.changed},i.changed&&(i.changed[d]=!1),r=!0)}}else if(this.scripts[d]&&(delete this.scripts[d],this.state.selected===d)){if(this.state.editing.indexOf(d)!==-1){const p=[...this.state.editing],g=p.indexOf(d);g!==-1&&(p.splice(g,1),i.editing=p,r=!0)}i.selected=this.state.editing[0]||"",r=!0}}if(s.selected&&this.state.selected!==s.selected){const d=this.getScriptFromObject(s.selected);this.scripts[s.selected]||=d;const p=d&&JSON.stringify(this.scripts[s.selected])!==JSON.stringify(d),g=[...this.state.editing];s.selected&&!g.includes(s.selected)&&(g.push(s.selected),this.props.onSelectedChange(s.selected,g),window.localStorage.setItem("Editor.editing",JSON.stringify(g))),r=!0,i.changed||={...this.state.changed},i.changed[s.selected]=!!p,i.editing=g,i.selected=s.selected,i.blockly=this.scripts[s.selected].engineType==="Blockly",i.rules=this.scripts[s.selected].engineType==="Rules",i.verboseEnabled=this.scripts[s.selected].verbose,i.debugEnabled=this.scripts[s.selected].debug,i.showCompiledCode=!1}this.state.visible!==s.visible&&(r=!0,i.visible=s.visible),r&&this.setState(i,()=>this.setChangedInAdmin())}onRestart(){var s,i;(i=(s=this.props).onRestart)==null||i.call(s,this.state.selected)}onStartStop(){var i,r,l;const s=JSON.parse(JSON.stringify(this.scripts[this.state.selected]));s.enabled=!s.enabled,this.props.password&&((i=this.props.objects[this.state.selected].native)!=null&&i.protected)&&(s.source=jc(this.props.password,s.source)),(l=(r=this.props).onChange)==null||l.call(r,this.state.selected,s)}onSave(){if(this.state.isTourOpen&&this.state.tourStep===Ps.saveTheScript&&(this.setState({isTourOpen:!1}),window.localStorage.setItem("tour","true")),this.state.changed[this.state.selected]){const s={...this.state.changed};s[this.state.selected]=!1,this.setState({changed:s},()=>{var r,l,c;this.setChangedInAdmin();const i=JSON.parse(JSON.stringify(this.scripts[this.state.selected]));this.props.password&&((r=this.props.objects[this.state.selected].native)!=null&&r.protected)&&(i.source=jc(this.props.password,i.source)),(c=(l=this.props).onChange)==null||c.call(l,this.state.selected,i)})}}onSaveAll(){const s={...this.state.changed};Object.keys(s).forEach(i=>{var r,l,c;if(s[i]){s[i]=!1;const h=JSON.parse(JSON.stringify(this.scripts[i]));this.props.password&&((r=this.props.objects[i].native)!=null&&r.protected)&&(h.source=jc(this.props.password,h.source)),(c=(l=this.props).onChange)==null||c.call(l,i,h)}}),this.setState({changed:s},()=>this.setChangedInAdmin())}onCancel(){var i;this.scripts[this.state.selected]=this.getScriptFromObject(this.state.selected),this.lastKnownTs[this.state.selected]=((i=this.props.objects[this.state.selected])==null?void 0:i.ts)||0;const s={...this.state.changed};s[this.state.selected]=!1,this.setState({changed:s},()=>this.setChangedInAdmin())}onRegisterSelect(s){this.getSelect=s}handleAiAction(s){const i={aiActionRequest:s};this.state.aiChatOpen||(window.localStorage.setItem("Editor.aiChatOpen","true"),i.aiChatOpen=!0),this.setState(i)}getEditorApi(){const s=()=>this.scriptEditorRef.current;return{getSelection:()=>{var i,r;return((r=(i=s())==null?void 0:i.getEditorSelection)==null?void 0:r.call(i))??null},getContent:()=>{var i,r;return((r=(i=s())==null?void 0:i.getEditorContent)==null?void 0:r.call(i))??""},getCursorPosition:()=>{var i,r;return((r=(i=s())==null?void 0:i.getCursorPosition)==null?void 0:r.call(i))??null},highlightText:i=>{var r,l;return((l=(r=s())==null?void 0:r.highlightText)==null?void 0:l.call(r,i))??0},highlightLineRange:(i,r)=>{var l,c;return((c=(l=s())==null?void 0:l.highlightLineRange)==null?void 0:c.call(l,i,r))??!1},goToLine:(i,r)=>{var l,c;return((c=(l=s())==null?void 0:l.goToLine)==null?void 0:c.call(l,i,r))??!1},insertTextAtCursor:i=>{const r=s();return r!=null&&r.insertTextIntoEditor?(r.insertTextIntoEditor(i),!0):!1},replaceSelection:i=>{var r,l;return((l=(r=s())==null?void 0:r.replaceSelection)==null?void 0:l.call(r,i))??!1},getDiagnostics:()=>{var i,r;return((r=(i=s())==null?void 0:i.getDiagnostics)==null?void 0:r.call(i))??[]},getSymbols:async()=>{var i,r;return((r=(i=s())==null?void 0:i.getDocumentSymbols)==null?void 0:r.call(i))??[]}}}onConvertBlockly2JS(){this.showConfirmDialog(x.I18n.t("It will not be possible to revert this operation."),s=>{if(s){this.scripts[this.state.selected].engineType="Javascript/js";const r=this.scripts[this.state.selected].source.split(` +`)){const y=g.trim().replace(/^\/\*+/,"").replace(/\*+\/$/,"").replace(/^\/\//,"").replace(/^\*+/,"").trim();y.length>=3&&c.add(y.toLowerCase())}if(c.size===0){if(l.length===1){const g=l[0],$=r[g.endLine-1]??"";return{range:{startLine:g.startLine,startColumn:1,endLine:g.endLine,endColumn:$.length+1},confidence:.5,method:"similarity"}}return null}let h=l[0],d=0;for(const g of l){let $=0;for(let w=g.startLine-1;wd&&(d=y,h=g)}if(dKi(()=>Promise.resolve().then(()=>g1),void 0,import.meta.url)),BO=pe.lazy(()=>Ki(()=>import("./index-CtxgOnw1.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]),import.meta.url)),jO=pe.lazy(()=>Ki(()=>import("./index-B0Khg-uY.js"),__vite__mapDeps([14,1,2,3,4,6,7,5,15,9,8,10,11,12]),import.meta.url)),FO=pe.lazy(()=>Ki(()=>import("./ScriptEditorVanillaMonaco-CKnJEdpA.js"),__vite__mapDeps([15,9,1,2,3,4,6,7,5,8,10,11,12]),import.meta.url)),zO=pe.lazy(()=>Ki(()=>import("./ScriptEditor-B5mD7l8c.js"),__vite__mapDeps([16,1,2,3,4,6,5,15,9,7,8,10,11,12,17]),import.meta.url)),U_=pe.lazy(()=>Ki(()=>import("./AiChatPanel-CZ2o6xnT.js"),__vite__mapDeps([18,1,2,3,4,6,5,9,19,7,8,10,11,12]),import.meta.url)),UO=pe.lazy(()=>Ki(()=>import("./AiDiffView-RPozjjHf.js"),__vite__mapDeps([20,1,2,3,4,6,5,7]),import.meta.url)),H_={Blockly:Jk,"Javascript/js":qc,Rules:Xk,def:qc,"TypeScript/ts":qk},HO=48,W_="#02a102",Hg="#70aae9",WO=nk[400],GO=rk[400],Me={toolbar:a=>({minHeight:38,boxShadow:"0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12)",backgroundColor:a.palette.mode==="dark"?"#1e1e1e":"#E2E2E2"}),toolbarButtons:{padding:4,marginLeft:4},toolbarButtonsDisabled:{filter:"grayscale(100%)",opacity:.5},editorDiv:a=>({height:`calc(100% - ${(parseInt(a.toolbar.height,10)||48)+38+10}px)`,width:"100%",overflow:"hidden",position:"relative"}),textButton:{marginRight:10,minHeight:24,padding:"6px 16px",height:32},saveButton:{background:"#ff9900"},tabIcon:{width:24,height:24,verticalAlign:"middle",marginBottom:2,marginRight:2,borderRadius:3},hintIcon:{padding:"0 8px 0 8px"},hintButton:{marginTop:8,marginLeft:20},tabMenuButton:{position:"absolute",top:0,right:0},tabChanged:a=>({color:a.palette.secondary.main}),tabText:{maxWidth:130,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",display:"inline-block",verticalAlign:"middle"},tabChangedIcon:{color:"#FF0000",fontSize:16,marginLeft:5},closeButton:{marginLeft:5},notRunning:{color:"#ffbc00",marginRight:8,marginLeft:8},tabButton:{minHeight:48},tabButtonWrapper:{display:"inline-block"},menuIcon:{width:18,height:18,borderRadius:2,marginRight:5}};class Hn extends pe.Component{getSelect=null;changedMirror={};cron={initValue:null,callback:null};scriptDialog={initValue:null,callback:null,args:null,isReturn:!1};objects;scripts;selectId={initValue:null,callback:null};confirmCallback=null;blocklyEditorRef=pe.createRef();scriptEditorRef=pe.createRef();lastKnownTs={};constructor(s){var c,h;super(s);let i=window.localStorage.getItem("Editor.selected")||"";const r=window.localStorage.getItem("Editor.editing")||"[]";let l;try{l=JSON.parse(r)}catch{l=[]}i&&!l.includes(i)&&l.push(i),i&&!this.props.password&&((h=(c=this.props.objects[i])==null?void 0:c.native)!=null&&h.protected)&&(i=l.find(d=>{var p,g;return!((g=(p=this.props.objects[d])==null?void 0:p.native)!=null&&g.protected)})||""),!i&&l.length&&(this.props.password?i=l[0]:i=l.find(d=>{var p,g;return!((g=(p=this.props.objects[d])==null?void 0:p.native)!=null&&g.protected)})||""),this.state={askAboutDebug:!1,astroEvents:null,blockly:null,changed:{},cmdToBlockly:"",cmdToRules:"",confirm:"",debugEnabled:!1,editing:l,insert:"",instancesLoaded:!1,isTourOpen:window.localStorage.getItem("tour")!=="true",menuDebugAnchorEl:null,menuOidDisplayAnchorEl:null,oidDisplayMode:parseInt(window.localStorage.getItem("Blockly.FieldOID.displayMode")||"0",10)||0,oidShowIcon:window.localStorage.getItem("Blockly.FieldOID.showIcon")==="true",menuOpened:!!this.props.menuOpened,menuTabsOpened:!1,aiChatOpen:window.localStorage.getItem("Editor.aiChatOpen")==="true",aiDiffView:null,aiActionRequest:null,inlineAskHandler:null,aiCompletionsEnabled:window.localStorage.getItem("Editor.aiCompletions")!=="false",triggerPrettier:1,scriptConflict:"",rules:null,runningInstances:this.props.runningInstances||{},searchText:"",selected:i,showAdapterDebug:!1,showAstro:!1,showCompiledCode:!1,showCron:!1,showDebugMenu:!1,showScript:!1,showSelectId:!1,themeType:this.props.themeType,toast:"",tourStep:Ps.selectTriggers,verboseEnabled:!1,visible:s.visible},this.setChangedInAdmin(),window.systemLang=x.I18n.getLanguage(),window.main={objects:{},getObject:(d,p)=>this.props.socket.getObject(d).then(g=>p==null?void 0:p(null,g)).catch(g=>p==null?void 0:p(g)),getState:(d,p)=>this.props.socket.getState(d).then(g=>p==null?void 0:p(null,g)).catch(g=>p==null?void 0:p(g)),instances:[],selectIdDialog:(d,p,g)=>{typeof p=="function"&&(g=p,p=null),this.selectId.callback=g,this.selectId.initValue=d,this.selectId.type=p,this.setState({showSelectId:!0})},cronDialog:(d,p)=>{this.cron.callback=p,this.cron.initValue=d,this.setState({showCron:!0})},showScriptDialog:(d,p,g,$)=>{this.scriptDialog.callback=$,this.scriptDialog.initValue=d,this.scriptDialog.args=p,this.scriptDialog.isReturn=g||!1,this.setState({showScript:!0})}},this.objects=s.objects,this.scripts={},this.getAllAdapterInstances().then(()=>{this.props.onSelectedChange&&this.state.selected&&setTimeout(()=>this.props.onSelectedChange(this.state.selected,this.state.editing),100)})}async getAllAdapterInstances(){const s=await this.props.socket.getAdapterInstances(!0),i={},r=s.map(l=>(i[l._id]=l,l._id));window.main.objects=i,window.main.instances=r,this.setState({instancesLoaded:!0})}static onInstanceChanged(s,i){if(s)if(!i&&window.main.instances.includes(s)){delete window.main.objects[s];const r=window.main.instances.indexOf(s);window.main.instances.splice(r,1)}else(i==null?void 0:i.type)==="instance"&&(window.main.instances.includes(s)||(window.main.instances.push(s),window.main.instances.sort()),window.main.objects[s]=i)}setChangedInAdmin(){const s=Object.keys(this.state.changed).find(i=>this.state.changed[i]);Object.keys(this.state.changed).forEach(i=>{this.changedMirror[i]=this.state.changed[i]}),Object.keys(this.changedMirror).forEach(i=>{this.state.changed[i]===void 0&&delete this.changedMirror[i]}),this.props.onChangedChanged(this.changedMirror),typeof window.parent<"u"&&window.parent&&(window.parent.configNotSaved=!!s)}componentDidMount(){window.addEventListener("beforeunload",this.onBrowserClose,!1),this.props.socket.subscribeObject("system.adapter.*",Hn.onInstanceChanged)}componentWillUnmount(){window.removeEventListener("beforeunload",this.onBrowserClose),this.props.socket.unsubscribeObject("system.adapter.*",Hn.onInstanceChanged)}componentDidUpdate(s){if(s.scriptsHash!==this.props.scriptsHash)for(const i of this.state.editing){const r=this.props.objects[i];if(!r||r.type!=="script")continue;const l=r.ts||0,c=this.lastKnownTs[i];c!==void 0&&l!==c&&(this.state.changed[i]?this.state.scriptConflict||this.setState({scriptConflict:i}):(this.scripts[i]=this.getScriptFromObject(i),this.lastKnownTs[i]=l))}}onBrowserClose=s=>{const i=Object.keys(this.scripts).find(r=>JSON.stringify(this.scripts[r])!==JSON.stringify(this.getScriptFromObject(r)));if(i){console.log(`Script ${JSON.stringify(this.scripts[i])}`);const r=x.I18n.t("Configuration not saved.");return s=s||window.event,s&&(s.returnValue=r),r}};removeNonExistingScripts(s,i){s=s||this.props,i=i||{};let r=!1;if(this.state.editing&&this.state.editing.find(c=>s&&!s.objects[c])){const c=[...this.state.editing];for(let h=c.length-1;h>=0;h--)this.objects[c[h]]||(r=!0,c.splice(h,1));r&&(i.editing=c),this.state.selected&&!this.objects[this.state.selected]&&(r=!0,i.selected=c[0]||"",i.selected&&this.scripts[i.selected]&&(this.state.blockly!==(this.scripts[i.selected].engineType==="Blockly")&&(i.blockly=this.scripts[i.selected].engineType==="Blockly",r=!0),this.state.rules!==(this.scripts[i.selected].engineType==="Rules")&&(i.rules=this.scripts[i.selected].engineType==="Rules",r=!0),this.state.verboseEnabled!==this.scripts[i.selected].verbose&&(i.verboseEnabled=this.scripts[i.selected].verbose,r=!0),this.state.debugEnabled!==this.scripts[i.selected].debug&&(i.debugEnabled=this.scripts[i.selected].debug,r=!0)))}return r}UNSAFE_componentWillReceiveProps(s){var l,c,h;const i={};let r=!1;if(JSON.stringify(s.runningInstances)!==JSON.stringify(this.state.runningInstances)&&(r=!0,i.runningInstances=s.runningInstances),this.state.menuOpened!==s.menuOpened&&(i.menuOpened=s.menuOpened,r=!0),this.state.themeType!==s.themeType&&(i.themeType=s.themeType,r=!0),this.removeNonExistingScripts(s,i)&&(r=!0),this.state.searchText!==s.searchText&&(i.searchText=s.searchText,r=!0),this.objects!==s.objects){this.objects=s.objects,window.main.objects=s.objects,Object.keys(this.scripts).forEach(p=>{const g=this.scripts[p].source;this.scripts[p]=JSON.parse(JSON.stringify(this.objects[p].common)),this.scripts[p].source=g}),this.state.selected&&this.objects[this.state.selected]&&(this.scripts[this.state.selected]||=JSON.parse(JSON.stringify(this.objects[this.state.selected].common)),this.state.blockly!==(this.scripts[this.state.selected].engineType==="Blockly")&&(i.blockly=this.scripts[this.state.selected].engineType==="Blockly",r=!0),this.state.rules!==(this.scripts[this.state.selected].engineType==="Rules")&&(i.rules=this.scripts[this.state.selected].engineType==="Rules",r=!0),this.state.verboseEnabled!==this.scripts[this.state.selected].verbose&&(i.verboseEnabled=this.scripts[this.state.selected].verbose,r=!0),this.state.debugEnabled!==this.scripts[this.state.selected].debug&&(i.debugEnabled=this.scripts[this.state.selected].debug,r=!0));const d=[...this.state.editing];for(let p=d.length-1;p>=0;p--)this.objects[d[p]]||(r=!0,d.splice(p,1),this.state.changed[d[p]]!==void 0&&(i.changed||={...this.state.changed},i.changed&&delete i.changed[d[p]]));this.state.selected&&!this.objects[this.state.selected]&&(i.selected=d[0]||""),r&&(i.editing=d)}else for(const d in this.scripts)if(Object.prototype.hasOwnProperty.call(this.scripts,d)){if((l=this.objects[d])!=null&&l.common){if(this.objects[d].type==="script"){const p=this.scripts[d].source,g=JSON.parse(JSON.stringify(this.scripts[d]));g.source=this.objects[d].common.source,JSON.stringify(g)!==JSON.stringify(this.objects[d].common)&&(this.scripts[d]=JSON.parse(JSON.stringify(this.objects[d].common)),this.scripts[d].source=p),p!==this.objects[d].common.source?this.state.changed[d]?(h=this.objects[d].from)!=null&&h.startsWith("system.adapter.javascript.")&&(this.objects[d].from="system.adapter.admin.0",this.setState({toast:x.I18n.t("Script %s was modified on disk.",d.split(".").pop())})):this.props.password&&((c=this.objects[d].native)!=null&&c.protected)?this.scripts[d].source=bm(this.props.password,this.objects[d].common.source):this.scripts[d].source=this.objects[d].common.source:this.state.changed[d]&&(i.changed||={...this.state.changed},i.changed&&(i.changed[d]=!1),r=!0)}}else if(this.scripts[d]&&(delete this.scripts[d],this.state.selected===d)){if(this.state.editing.indexOf(d)!==-1){const p=[...this.state.editing],g=p.indexOf(d);g!==-1&&(p.splice(g,1),i.editing=p,r=!0)}i.selected=this.state.editing[0]||"",r=!0}}if(s.selected&&this.state.selected!==s.selected){const d=this.getScriptFromObject(s.selected);this.scripts[s.selected]||=d;const p=d&&JSON.stringify(this.scripts[s.selected])!==JSON.stringify(d),g=[...this.state.editing];s.selected&&!g.includes(s.selected)&&(g.push(s.selected),this.props.onSelectedChange(s.selected,g),window.localStorage.setItem("Editor.editing",JSON.stringify(g))),r=!0,i.changed||={...this.state.changed},i.changed[s.selected]=!!p,i.editing=g,i.selected=s.selected,i.blockly=this.scripts[s.selected].engineType==="Blockly",i.rules=this.scripts[s.selected].engineType==="Rules",i.verboseEnabled=this.scripts[s.selected].verbose,i.debugEnabled=this.scripts[s.selected].debug,i.showCompiledCode=!1}this.state.visible!==s.visible&&(r=!0,i.visible=s.visible),r&&this.setState(i,()=>this.setChangedInAdmin())}onRestart(){var s,i;(i=(s=this.props).onRestart)==null||i.call(s,this.state.selected)}onStartStop(){var i,r,l;const s=JSON.parse(JSON.stringify(this.scripts[this.state.selected]));s.enabled=!s.enabled,this.props.password&&((i=this.props.objects[this.state.selected].native)!=null&&i.protected)&&(s.source=jc(this.props.password,s.source)),(l=(r=this.props).onChange)==null||l.call(r,this.state.selected,s)}onSave(){if(this.state.isTourOpen&&this.state.tourStep===Ps.saveTheScript&&(this.setState({isTourOpen:!1}),window.localStorage.setItem("tour","true")),this.state.changed[this.state.selected]){const s={...this.state.changed};s[this.state.selected]=!1,this.setState({changed:s},()=>{var r,l,c;this.setChangedInAdmin();const i=JSON.parse(JSON.stringify(this.scripts[this.state.selected]));this.props.password&&((r=this.props.objects[this.state.selected].native)!=null&&r.protected)&&(i.source=jc(this.props.password,i.source)),(c=(l=this.props).onChange)==null||c.call(l,this.state.selected,i)})}}onSaveAll(){const s={...this.state.changed};Object.keys(s).forEach(i=>{var r,l,c;if(s[i]){s[i]=!1;const h=JSON.parse(JSON.stringify(this.scripts[i]));this.props.password&&((r=this.props.objects[i].native)!=null&&r.protected)&&(h.source=jc(this.props.password,h.source)),(c=(l=this.props).onChange)==null||c.call(l,i,h)}}),this.setState({changed:s},()=>this.setChangedInAdmin())}onCancel(){var i;this.scripts[this.state.selected]=this.getScriptFromObject(this.state.selected),this.lastKnownTs[this.state.selected]=((i=this.props.objects[this.state.selected])==null?void 0:i.ts)||0;const s={...this.state.changed};s[this.state.selected]=!1,this.setState({changed:s},()=>this.setChangedInAdmin())}onRegisterSelect(s){this.getSelect=s}handleAiAction(s){const i={aiActionRequest:s};this.state.aiChatOpen||(window.localStorage.setItem("Editor.aiChatOpen","true"),i.aiChatOpen=!0),this.setState(i)}getEditorApi(){const s=()=>this.scriptEditorRef.current;return{getSelection:()=>{var i,r;return((r=(i=s())==null?void 0:i.getEditorSelection)==null?void 0:r.call(i))??null},getContent:()=>{var i,r;return((r=(i=s())==null?void 0:i.getEditorContent)==null?void 0:r.call(i))??""},getCursorPosition:()=>{var i,r;return((r=(i=s())==null?void 0:i.getCursorPosition)==null?void 0:r.call(i))??null},highlightText:i=>{var r,l;return((l=(r=s())==null?void 0:r.highlightText)==null?void 0:l.call(r,i))??0},highlightLineRange:(i,r)=>{var l,c;return((c=(l=s())==null?void 0:l.highlightLineRange)==null?void 0:c.call(l,i,r))??!1},goToLine:(i,r)=>{var l,c;return((c=(l=s())==null?void 0:l.goToLine)==null?void 0:c.call(l,i,r))??!1},insertTextAtCursor:i=>{const r=s();return r!=null&&r.insertTextIntoEditor?(r.insertTextIntoEditor(i),!0):!1},replaceSelection:i=>{var r,l;return((l=(r=s())==null?void 0:r.replaceSelection)==null?void 0:l.call(r,i))??!1},getDiagnostics:()=>{var i,r;return((r=(i=s())==null?void 0:i.getDiagnostics)==null?void 0:r.call(i))??[]},getSymbols:async()=>{var i,r;return((r=(i=s())==null?void 0:i.getDocumentSymbols)==null?void 0:r.call(i))??[]}}}onConvertBlockly2JS(){this.showConfirmDialog(x.I18n.t("It will not be possible to revert this operation."),s=>{if(s){this.scripts[this.state.selected].engineType="Javascript/js";const r=this.scripts[this.state.selected].source.split(` `);r.pop(),this.scripts[this.state.selected].source=r.join(` `);const l=this.state.selected,c={...this.state.changed};c[this.state.selected]=!0,this.setState({changed:c,blockly:!1,selected:""},()=>{this.setChangedInAdmin(),setTimeout(()=>this.setState({selected:l}),100)})}})}onChange(s){if(s.script!==void 0){if(s.script===this.scripts[this.state.selected].source)return;this.scripts[this.state.selected].source=s.script}s.debug!==void 0&&(this.scripts[this.state.selected].debug=s.debug),s.verbose!==void 0&&(this.scripts[this.state.selected].verbose=s.verbose);const i=JSON.stringify(this.scripts[this.state.selected])!==JSON.stringify(this.getScriptFromObject(this.state.selected));if(i!==!!this.state.changed[this.state.selected]){const r={...this.state.changed};r[this.state.selected]=i,this.objects[this.state.selected].from="system.adapter.admin.0",this.setState({changed:r},()=>this.setChangedInAdmin())}}onTabChange(s){var r,l;if(this.props.debugMode)return;window.localStorage.setItem("Editor.selected",s);const i=this.scripts[s]||this.getScriptFromObject(s);this.scripts[s]||(this.scripts[s]=i),this.lastKnownTs[s]===void 0&&this.props.objects[s]&&(this.lastKnownTs[s]=this.props.objects[s].ts||0),this.setState({selected:s,rules:i.engineType==="Rules",blockly:i.engineType==="Blockly",showCompiledCode:!1,verboseEnabled:i.verbose,debugEnabled:i.debug}),(l=(r=this.props).onSelectedChange)==null||l.call(r,s,this.state.editing)}isScriptChanged(s){return!!(this.scripts[s]&&this.props.objects[s]&&JSON.stringify(this.scripts[s])!==JSON.stringify(this.getScriptFromObject(s)))}onTabClose(s,i){i==null||i.stopPropagation();const r=this.state.editing.indexOf(s);if(this.state.editing.includes(s))if(this.isScriptChanged(s))this.showConfirmDialog(x.I18n.t("Discard changes for %s",this.props.objects[s].common.name),l=>{l&&(delete this.scripts[s],delete this.lastKnownTs[s],this.onTabClose(s))});else{const l=[...this.state.editing];l.splice(r,1);const c={editing:l};if(s===this.state.selected?l.length?r===0||l.length===1?c.selected=l[0]:c.selected=l[r-1]:c.selected="":this.state.selected&&!l.length&&(c.selected=""),window.localStorage.setItem("Editor.editing",JSON.stringify(l)),c.selected!==void 0){c.changed||={...this.state.changed},c.changed[c.selected]=this.isScriptChanged(c.selected);const h=c.selected?this.scripts[c.selected]||this.getScriptFromObject(c.selected):void 0;c.blockly=(h==null?void 0:h.engineType)==="Blockly",c.rules=(h==null?void 0:h.engineType)==="Rules",c.verboseEnabled=!!(h!=null&&h.verbose),c.debugEnabled=!!(h!=null&&h.debug),c.showCompiledCode=!1}this.setState(c,()=>{var h,d,p,g;this.setChangedInAdmin(),c.selected!==void 0?((d=(h=this.props).onSelectedChange)==null||d.call(h,c.selected,this.state.editing),window.localStorage.setItem("Editor.selected",c.selected)):(g=(p=this.props).onSelectedChange)==null||g.call(p,this.state.selected,this.state.editing)})}}showConfirmDialog(s,i){this.confirmCallback=i,this.setState({confirm:s})}sendCommandToBlockly(s){this.setState({cmdToBlockly:s},()=>setTimeout(()=>this.setState({cmdToBlockly:""}),200))}sendCommandToRules(s){this.setState({cmdToRules:s},()=>setTimeout(()=>this.setState({cmdToRules:""}),200))}static getText(s){return typeof s=="object"?s[x.I18n.getLanguage()]||s.en:s}getScriptFullName(s){var c;const i=s.split(".");i.shift(),i.shift();const r=[];let l="script.js";for(let h=0;hthis.onTabChange(i),indicatorColor:"primary",style:{position:"relative",marginLeft:10,width:this.state.editing.length>1?"calc(100% - 50px)":"100%",display:"inline-block"},textColor:"primary",variant:"scrollable",scrollButtons:"auto",allowScrollButtonsMobile:!0,children:[this.state.editing.map(s=>{var d,p;if(!this.props.objects[s]){const g=[m.jsx(bt,{sx:this.isScriptChanged(s)?Me.tabChanged:void 0,style:Me.tabText,children:s.split(".").pop()},"text"),m.jsx(We,{onClick:$=>this.onTabClose(s,$),style:Me.closeButton,size:"small",component:"span",children:m.jsx(kc,{})},"icon")];return m.jsx(fg,{wrapped:!0,href:`#${s}`,label:g,value:s,sx:{"& .MuiTab-wrapper":Me.tabButtonWrapper}},s)}if(!this.props.password&&((d=this.props.objects[s].native)!=null&&d.protected))return null;let i=Hn.getText(this.props.objects[s].common.name)||"";const r=this.getScriptFullName(s);i.length>18&&(i=`${i.substring(0,15)}...`);const l=(p=this.getScriptFromObject(s))==null?void 0:p.source,c=this.scripts[s]&&l!==this.scripts[s].source,h=[m.jsx(bt,{sx:this.isScriptChanged(s)?Me.tabChanged:void 0,style:Me.tabText,children:i},"text"),c?m.jsx("span",{style:Me.tabChangedIcon,children:"▣"},"changedSign"):null,!this.props.debugInstance&&(!this.props.debugMode||this.state.selected!==s)&&m.jsx(We,{onClick:g=>this.onTabClose(s,g),style:Me.closeButton,size:"small",component:"span",children:m.jsx(kc,{})},"icon")];return m.jsx(fg,{disabled:!!this.props.debugInstance||this.state.selected!==s&&this.props.debugMode,wrapped:!0,iconPosition:"start",icon:m.jsx("img",{alt:"",src:H_[this.props.objects[s].common.engineType]||H_.def,style:Me.tabIcon},"icon"),href:`#${s}`,label:h,style:Me.tabButton,value:s,title:r,sx:{"& .MuiTab-wrapper":Me.tabButtonWrapper}},s)}),this.props.debugInstance?m.jsx(fg,{disabled:!1,wrapped:!0,href:`#${this.props.debugInstance.adapter}`,label:this.props.debugInstance.adapter,style:Me.tabButton,value:this.props.debugInstance.adapter,title:this.props.debugInstance.adapter,sx:{"& .MuiTab-wrapper":Me.tabButtonWrapper}},this.props.debugInstance.adapter):""]},"tabs1"),this.state.editing.length>1?m.jsx(We,{href:"#","aria-label":"Close all but current",style:Me.tabMenuButton,title:x.I18n.t("Close all but current"),"aria-haspopup":"false",onClick:s=>{const i=[this.state.selected];Object.keys(this.scripts).forEach(r=>r!==this.state.selected&&JSON.stringify(this.scripts[r])!==JSON.stringify(this.getScriptFromObject(r))&&i.push(r)),window.localStorage.setItem("Editor.editing",JSON.stringify(i)),this.setState({menuTabsOpened:!1,editing:i})},size:"medium",children:m.jsx(cI,{})},"menuButton"):null]:m.jsx(bt,{sx:Me.toolbar,children:m.jsxs(je,{color:"grey",disabled:!0,style:Me.hintButton,href:"",children:[m.jsx("span",{children:x.I18n.t("Click on this icon")},"select2"),m.jsx(uI,{style:Me.hintIcon},"select3"),m.jsx("span",{children:x.I18n.t("for edit or create script")},"select4")]},"select1")},"tabs2")}getDebugMenu(){return this.state.showDebugMenu?m.jsxs(Vc,{id:"menu-debug",anchorEl:this.state.menuDebugAnchorEl,open:this.state.showDebugMenu,onClose:()=>this.setState({showDebugMenu:!1,menuDebugAnchorEl:null}),slotProps:{root:{style:{maxHeight:HO*7.5}}},children:[m.jsxs(et,{title:x.I18n.t("debug_help"),onClick:s=>{s.stopPropagation(),s.preventDefault(),this.setState({showDebugMenu:!1,menuDebugAnchorEl:null,debugEnabled:!this.state.debugEnabled},()=>this.onChange({debug:this.state.debugEnabled}))},children:[m.jsx(ua,{checked:this.state.debugEnabled}),m.jsx(Cc,{style:{...Me.menuIcon,color:W_}}),x.I18n.t("debug_label")]},"debugEnabled"),m.jsxs(et,{title:x.I18n.t("verbose_help"),onClick:s=>{s.stopPropagation(),s.preventDefault(),this.setState({showDebugMenu:!1,menuDebugAnchorEl:null,verboseEnabled:!this.state.verboseEnabled},()=>this.onChange({verbose:this.state.verboseEnabled}))},children:[m.jsx(ua,{checked:this.state.verboseEnabled}),m.jsx(Ow,{style:{...Me.menuIcon,color:Hg}}),x.I18n.t("verbose_label")]},"verboseEnabled")]},"menuDebug"):null}getDebugBadge(){return[this.state.debugEnabled&&this.state.verboseEnabled?m.jsx(Cc,{style:{...Me.menuIcon,color:Hg}},"DebugVerbose"):null,this.state.debugEnabled&&!this.state.verboseEnabled?m.jsx(Cc,{style:{...Me.menuIcon,color:W_}},"DebugNoVerbose"):null,!this.state.debugEnabled&&this.state.verboseEnabled?m.jsx(Ow,{style:{...Me.menuIcon,color:Hg}},"noDebugVerbose"):null]}getAskAboutDebug(){return this.state.askAboutDebug?m.jsx(x.DialogConfirm,{onClose:()=>{this.setState({askAboutDebug:!1},()=>this.props.onDebugModeChange(!0))},ok:x.I18n.t("Yes"),cancel:x.I18n.t("Cancel"),text:x.I18n.t("The script will be stopped and must be activated manually after debugging. Continue?")}):null}getToolbar(){var r,l;const s=!!(this.state.selected&&((r=this.scripts[this.state.selected])!=null&&r.engine)&&this.state.runningInstances[this.scripts[this.state.selected].engine]),i=!!(this.state.selected&&((l=this.scripts[this.state.selected])!=null&&l.enabled));if(this.state.selected){const c=Object.keys(this.state.changed).filter(d=>this.state.changed[d]).length,h=this.state.changed[this.state.selected];return m.jsxs(BT,{variant:"dense",sx:Me.toolbar,children:[!this.props.debugInstance&&this.state.menuOpened&&this.props.onLocate&&m.jsx(We,{style:Me.toolbarButtons,title:x.I18n.t("Locate file"),onClick:()=>this.props.onLocate(this.state.selected),size:"medium",children:m.jsx(dI,{})},"locate"),!this.props.debugInstance&&!h&&s?m.jsx(We,{disabled:this.props.debugMode,style:Me.toolbarButtons,onClick:()=>this.onRestart(),title:x.I18n.t("Restart"),size:"medium",children:m.jsx(hI,{})},"restart"):null,!this.props.debugInstance&&!h?m.jsx(We,{disabled:this.props.debugMode,onClick:()=>this.onStartStop(),title:i?x.I18n.t("Pause script"):x.I18n.t("Run script"),size:"medium",style:{...Me.toolbarButtons,color:i?WO:GO},children:i?m.jsx(pI,{}):m.jsx(gI,{})},"start-stop"):null,!this.props.debugInstance&&!h&&!i?m.jsx("span",{style:Me.notRunning,children:x.I18n.t("Script is not running")}):null,!h&&i&&!s?m.jsx("span",{style:Me.notRunning,children:x.I18n.t("Instance is disabled")}):null,h?m.jsx(je,{color:"grey",variant:"contained",style:{...Me.textButton,...Me.saveButton},className:"button-save",onClick:()=>this.onSave(),endIcon:m.jsx(Mw,{}),children:x.I18n.t("Save")},"save"):null,c>1||c===1&&!h?m.jsx(je,{color:"grey",variant:"contained",style:Me.textButton,onClick:()=>this.onSaveAll(),endIcon:m.jsx(Mw,{}),children:x.I18n.t("Save all")},"saveall"):null,h?m.jsx(je,{color:"grey",variant:"contained",style:Me.textButton,onClick:()=>this.onCancel(),endIcon:m.jsx(bu,{}),children:x.I18n.t("Cancel")},"cancel"):null,!this.state.showCompiledCode&&!this.state.rules?m.jsx(We,{title:x.I18n.t("Undo"),style:Me.toolbarButtons,onClick:()=>{var d,p;if(this.state.blockly){const g=(d=this.blocklyEditorRef.current)==null?void 0:d.blocklyWorkspace;g==null||g.undo(!1)}else(p=this.scriptEditorRef.current)==null||p.undo()},size:"medium",children:m.jsx(mI,{})},"undo"):null,!this.state.showCompiledCode&&!this.state.rules?m.jsx(We,{title:x.I18n.t("Redo"),style:Me.toolbarButtons,onClick:()=>{var d,p;if(this.state.blockly){const g=(d=this.blocklyEditorRef.current)==null?void 0:d.blocklyWorkspace;g==null||g.undo(!0)}else(p=this.scriptEditorRef.current)==null||p.redo()},size:"medium",children:m.jsx(fI,{})},"redo"):null,m.jsx("div",{style:{flex:2}}),this.state.blockly&&!this.state.showCompiledCode&&m.jsx(We,{"aria-label":"OID display mode",title:x.I18n.t("OID display mode"),style:Me.toolbarButtons,onClick:d=>this.setState({menuOidDisplayAnchorEl:d.currentTarget}),size:"medium",children:m.jsx("img",{src:Ug[this.state.oidDisplayMode]||Ug[0],alt:"OID",width:36,height:22})},"oid-display-mode"),m.jsxs(Vc,{anchorEl:this.state.menuOidDisplayAnchorEl,open:!!this.state.menuOidDisplayAnchorEl,onClose:()=>this.setState({menuOidDisplayAnchorEl:null}),children:[Ug.map((d,p)=>m.jsxs(et,{selected:this.state.oidDisplayMode===p,onClick:()=>{var $,y,w;this.setState({oidDisplayMode:p,menuOidDisplayAnchorEl:null});const g=($=window.scripts)==null?void 0:$.blocklyWorkspace;g&&((w=(y=window.Blockly)==null?void 0:y.FieldOID)!=null&&w.setDisplayMode)&&window.Blockly.FieldOID.setDisplayMode(p,g)},children:[m.jsx("img",{src:d,alt:"",width:48,height:28,style:{marginRight:8}}),(()=>{var y,w,v,_,b,T,I,C,D;const g=(v=(w=(y=window.Blockly)==null?void 0:y.FieldOID)==null?void 0:w.DISPLAY_MODE_KEYS)==null?void 0:v[p],$=["Show name","Show name path","Show ID","Show full ID"];return g&&(((T=(b=(_=window.Blockly)==null?void 0:_.Words)==null?void 0:b[g])==null?void 0:T[x.I18n.getLanguage()])||((D=(C=(I=window.Blockly)==null?void 0:I.Words)==null?void 0:C[g])==null?void 0:D.en))||$[p]})()]},`oid-mode-${p}`)),m.jsx(rm,{}),m.jsxs(et,{onClick:()=>{var g,$,y;const d=!this.state.oidShowIcon;this.setState({oidShowIcon:d});const p=(g=window.scripts)==null?void 0:g.blocklyWorkspace;p&&((y=($=window.Blockly)==null?void 0:$.FieldOID)!=null&&y.setShowIcon)&&window.Blockly.FieldOID.setShowIcon(d,p)},children:[m.jsx(ua,{checked:this.state.oidShowIcon,style:{padding:0,marginRight:8}}),(()=>{var p,g,$,y,w,v;const d="oid_show_icon";return(($=(g=(p=window.Blockly)==null?void 0:p.Words)==null?void 0:g[d])==null?void 0:$[x.I18n.getLanguage()])||((v=(w=(y=window.Blockly)==null?void 0:y.Words)==null?void 0:w[d])==null?void 0:v.en)||"Show icon"})()]},"oid-show-icon")]},"menuOidDisplay"),!this.props.debugInstance&&!this.state.showCompiledCode&&m.jsx(We,{style:Me.toolbarButtons,title:x.I18n.t("Prettify the script"),onClick:()=>this.setState({triggerPrettier:this.state.triggerPrettier+1}),size:"medium",children:m.jsx($I,{})},"prettier"),this.state.blockly&&!this.state.showCompiledCode?m.jsx(We,{"aria-label":"Export Blocks",title:x.I18n.t("Export blocks"),style:Me.toolbarButtons,onClick:()=>this.sendCommandToBlockly("export"),size:"medium",children:m.jsx(Kc,{})},"export"):null,this.state.blockly&&!this.state.showCompiledCode&&m.jsx(We,{"aria-label":"Import Blocks",title:x.I18n.t("Import blocks"),style:Me.toolbarButtons,onClick:()=>this.sendCommandToBlockly("import"),size:"medium",children:m.jsx(lm,{})},"import"),this.state.blockly&&!this.state.showCompiledCode&&m.jsx(We,{"aria-label":"Check code",title:x.I18n.t("Check blocks"),style:Me.toolbarButtons,onClick:()=>this.sendCommandToBlockly("check"),size:"medium",children:m.jsx(bI,{})},"check"),!this.props.debugMode&&!this.state.blockly&&!this.state.rules&&!this.state.showCompiledCode?m.jsx(We,{"aria-label":"create CRON",title:x.I18n.t("Create or edit CRON or time wizard"),style:Me.toolbarButtons,onClick:()=>this.setState({showCron:!0}),size:"medium",children:m.jsx(yI,{})},"select-cron"):null,this.scripts[this.state.selected]&&this.scripts[this.state.selected].engineType!=="Rules"?m.jsx(m.Fragment,{children:m.jsx(We,{"aria-label":"AI",title:x.I18n.t("AI Chat"),style:{...Me.toolbarButtons,...this.state.aiChatOpen?{color:"#4caf50"}:{}},size:"medium",onClick:()=>{const d=!this.state.aiChatOpen;window.localStorage.setItem("Editor.aiChatOpen",String(d)),this.setState({aiChatOpen:d})},children:m.jsx(vI,{})},"ai")}):null,m.jsx(We,{"aria-label":"Show astronomical events",title:x.I18n.t("Show astronomical events"),style:Me.toolbarButtons,disabled:!s,onClick:()=>{this.setState({showAstro:!0,astroEvents:null}),this.props.socket.sendTo(this.scripts[this.state.selected].engine.replace("system.adapter.",""),"calcAstroAll",{}).then(d=>this.setState({astroEvents:d}))},size:"medium",children:m.jsx(wI,{})},"show-astro"),!this.props.debugMode&&!this.state.blockly&&!this.state.rules&&!this.state.showCompiledCode&&m.jsx(We,{"aria-label":"select ID",title:x.I18n.t("Insert object ID"),style:Me.toolbarButtons,onClick:()=>this.setState({showSelectId:!0}),size:"medium",children:m.jsx(_I,{})},"select-id"),this.state.blockly&&!this.state.rules&&this.state.showCompiledCode&&m.jsx(je,{color:"grey","aria-label":"convert to javascript",title:x.I18n.t("Convert blockly to javascript for ever."),onClick:()=>this.onConvertBlockly2JS(),children:"Blockly=>JS"},"convert2js"),this.state.rules&&!this.state.showCompiledCode&&m.jsx(We,{"aria-label":"Export Blocks",title:x.I18n.t("Export blocks"),style:Me.toolbarButtons,onClick:()=>this.sendCommandToRules("export"),size:"medium",children:m.jsx(Kc,{})},"export"),this.state.rules&&!this.state.showCompiledCode&&m.jsx(We,{"aria-label":"Import Blocks",title:x.I18n.t("Import blocks"),style:Me.toolbarButtons,onClick:()=>this.sendCommandToRules("import"),size:"medium",children:m.jsx(lm,{})},"import"),this.props.expertMode&&!h&&(this.props.debugMode||!this.state.blockly&&!this.state.rules||(this.state.blockly||this.state.rules)&&this.state.showCompiledCode)&&m.jsx(We,{style:Me.toolbarButtons,color:this.props.debugMode?"primary":"default",disabled:!this.props.debugMode&&!s,onClick:()=>{!this.props.debugMode&&i?this.setState({askAboutDebug:!0}):this.props.onDebugModeChange(!this.props.debugMode)},size:"medium",children:m.jsx(Cc,{style:{fontSize:32}})}),(this.state.blockly||this.state.rules)&&m.jsx(je,{"aria-label":"blockly",title:x.I18n.t("Show javascript code"),className:"button-js-code",color:this.state.showCompiledCode?"secondary":"inherit",disabled:this.props.debugMode,style:{...Me.toolbarButtons,...this.props.debugMode?Me.toolbarButtonsDisabled:void 0,padding:"0 5px"},onClick:()=>{this.props.debugMode||(this.setState({showCompiledCode:!this.state.showCompiledCode}),this.state.isTourOpen&&this.state.tourStep===Ps.showJavascript&&this.setState({tourStep:Ps.switchBackToRules}),this.state.isTourOpen&&this.state.tourStep===Ps.switchBackToRules&&this.setState({tourStep:Ps.saveTheScript}))},children:m.jsx("img",{alt:this.state.blockly?"blockly2js":"rules2js",src:this.state.blockly?gO:mO})},"blockly-code"),m.jsx(We,{disabled:this.props.debugMode,"aria-label":"Debug menu",title:x.I18n.t("Debug options"),style:Me.toolbarButtons,onClick:d=>this.setState({showDebugMenu:!0,menuDebugAnchorEl:d.currentTarget}),size:"medium",children:m.jsx(jT,{style:Me.badgeMargin,badgeContent:this.getDebugBadge(),children:m.jsx(kI,{})})},"debug")]},"toolbar1")}return null}cachedScriptInfos=null;lastObjectsHash="";getScriptInfos(){const s=Object.keys(this.props.objects).join(",");return this.cachedScriptInfos&&this.lastObjectsHash===s?this.cachedScriptInfos:(this.lastObjectsHash=s,this.cachedScriptInfos=wO(this.props.objects),this.cachedScriptInfos)}getScriptEditor(){var s,i;if(!this.props.debugMode&&this.state.selected&&this.props.objects[this.state.selected]&&this.state.blockly!==null&&(!this.state.blockly||this.state.showCompiledCode)&&(!this.state.rules||this.state.showCompiledCode)){this.scripts[this.state.selected]||=this.getScriptFromObject(this.state.selected);const r=this.scripts[this.state.selected].engineType==="TypeScript/ts"?"typescript":"javascript",l=m.jsx(Zo,{fallback:m.jsx(Qo,{}),children:m.jsx(FO,{ref:this.scriptEditorRef,name:this.state.selected,adapterName:this.props.adapterName,insert:this.state.insert,onInserted:()=>this.setState({insert:""}),onForceSave:()=>this.onSave(),searchText:this.state.searchText,onRegisterSelect:c=>this.onRegisterSelect(c),readOnly:this.state.showCompiledCode,changed:this.state.changed[this.state.selected],code:this.scripts[this.state.selected].source||"",isDark:this.state.themeType==="dark",socket:this.props.socket,runningInstances:this.state.runningInstances,triggerPrettier:this.state.triggerPrettier,onChange:c=>this.onChange({script:c}),language:r,aiCompletionsEnabled:this.state.aiCompletionsEnabled,onAiAction:c=>this.handleAiAction(c),onInlineAsk:this.state.inlineAskHandler?c=>this.state.inlineAskHandler(c.question,c.selectedCode):void 0},"scriptEditor1")});if(this.state.aiDiffView)return m.jsx(bt,{sx:Me.editorDiv,children:m.jsx(Zo,{fallback:m.jsx(Qo,{}),children:m.jsx(UO,{originalCode:this.state.aiDiffView.original,modifiedCode:this.state.aiDiffView.modified,language:r,themeType:this.state.themeType,onAccept:c=>{this.onChange({script:c}),this.setState({aiDiffView:null})},onReject:()=>this.setState({aiDiffView:null})})})},"scriptEditorDiv");if(this.state.aiChatOpen){const c=window.localStorage.getItem("Editor.aiChatSizes");let h=[70,30];try{c&&(h=JSON.parse(c))}catch{}return m.jsx(bt,{sx:Me.editorDiv,children:m.jsxs(Jc,{direction:mt.Horizontal,initialSizes:h,minWidths:[200,250],gutterClassName:this.state.themeType==="dark"?"Dark visGutter":"Light visGutter",onResizeFinished:(d,p)=>{window.localStorage.setItem("Editor.aiChatSizes",JSON.stringify(p))},children:[l,m.jsx(Zo,{fallback:m.jsx(Qo,{}),children:m.jsx(U_,{socket:this.props.socket,runningInstances:this.state.runningInstances,themeType:this.state.themeType,currentCode:((s=this.scripts[this.state.selected])==null?void 0:s.source)||"",currentLanguage:r,selectedCode:((i=this.getSelect)==null?void 0:i.call(this))||"",allScripts:this.getScriptInfos(),editorApi:this.getEditorApi(),aiActionRequest:this.state.aiActionRequest,onAiActionConsumed:()=>this.setState({aiActionRequest:null}),onRegisterInlineAsk:d=>this.setState({inlineAskHandler:d}),currentScriptId:this.state.selected,onInsertCode:d=>this.setState({insert:d}),onShowDiff:(d,p)=>{var v;const g=this.state.selected,$=((v=this.scripts[g])==null?void 0:v.source)||"",y=this.scriptEditorRef.current,w=(_,b)=>{y==null||y.showInlineDiff({range:_,originalText:b,modifiedText:d,onAccepted:()=>{var I;const T=((I=y==null?void 0:y.getEditorContent)==null?void 0:I.call(y))||$;this.onChange({script:T})}})};if(p&&p.range&&p.scriptId===g){w(p.range,p.originalText);return}try{const _=LO(d,$);if(_){const T=$.split(` `).slice(_.range.startLine-1,_.range.endLine).join(` @@ -1264,4 +1264,4 @@ const demo = ${JSON.stringify(a,null,2).replace(/\*\//g,"* /")}; //${btoa(encodeURIComponent(''))}`),this.socket.setObject(s,{_id:s,type:"script",common:{name:i,expert:!0,engineType:c||"Javascript/js",enabled:!1,engine:`system.adapter.javascript.${l||0}`,source:h||"",debug:!1,verbose:!1},native:{}}).then(()=>setTimeout(()=>this.onSelect(s),1e3)).catch(p=>this.showJsError(p)))}async updateScript(s,i,r){let l=await this.socket.getObject(s);const c={common:{}};if(r.engine!==void 0&&(c.common.engine=r.engine),r.enabled!==void 0&&(c.common.enabled=r.enabled),r.source!==void 0&&(c.common.source=r.source),r.debug!==void 0&&(c.common.debug=r.debug),r.verbose!==void 0&&(c.common.verbose=r.verbose),c.from="system.adapter.admin.0",s===i&&(l!=null&&l.common)&&r.name===l.common.name){(!r.engineType||r.engineType!==l.common.engineType)&&r.engineType!==void 0&&(c.common.engineType=r.engineType||"Javascript/js"),c.type="script",await this.socket.extendObject(s,c);return}if(l!=null&&l.common){l.common.engineType=r.engineType||l.common.engineType||"Javascript/js",await this.socket.delObject(s),c.common.engine!==void 0&&(l.common.engine=c.common.engine),c.common.enabled!==void 0&&(l.common.enabled=c.common.enabled),c.common.source!==void 0&&(l.common.source=c.common.source),c.common.name!==void 0&&(l.common.name=c.common.name),c.common.debug!==void 0&&(l.common.debug=c.common.debug),c.common.verbose!==void 0&&(l.common.verbose=c.common.verbose),l._rev!==void 0&&delete l._rev,l.common.name=r.name,l.common.expert=!0,l.type="script",l._id=i,await this.socket.setObject(i,l);return}l=c,l.common.name=r.name,l.common.expert=!0,l.type="script",l._id=i,await this.socket.setObject(i,l)}onEnableDisable(s,i){var r;if(((r=this.scripts[s])==null?void 0:r.type)==="script"){const l=this.scripts[s].common;l.enabled=i,l.expert=!0,this.updateScript(s,s,l).catch(c=>c!=="canceled"&&this.showJsError(c))}}async getLiveHost(){for(let s=0;s{if(typeof h=="string"){const d=document.createElement("a");d.href=`../../files/${h}`,document.body.appendChild(d),d.click(),d.remove()}else if(h.error&&this.showJsError(h.error),h.data){const d=document.createElement("a");d.href=`data: application/zip;base64,${h.data}`,d.download=`${r}scripts.zip`,document.body.appendChild(d),d.click(),d.remove()}})}else{const c=new sk;for(const[h,d]of Object.entries(this.scripts))if(d.type==="script"){const p=d,g=p.common.engineType==="TypeScript/ts"?"ts":p.common.engineType==="Blockly"?"blockly":p.common.engineType==="Rules"?"rules":"js";let $=`/******* (ext=${g}/engine=${p.common.engine}/debug=${p.common.debug}/verbose=${p.common.verbose}/enabled=${p.common.enabled}) *******/ `;$+=p.common.source||"";const y=`${h.substring(10).replace(/\./g,"/")}.${g}`;c.file(y,$)}c.generateAsync({type:"blob"}).then(h=>{const d=document.createElement("a");d.href=URL.createObjectURL(h),d.download=`${r}scripts_plain.zip`,document.body.appendChild(d),d.click(),d.remove(),URL.revokeObjectURL(d.href)})}}onImport(s,i){this.importFile=s||null,this.importFileName=i||null,s?(this.confirmCallback=this.onImportConfirmed.bind(this),this.setState({importFile:!1,confirm:x.I18n.t("Existing scripts will be overwritten.")})):this.setState({importFile:!1})}async onImportConfirmed(s){let i=this.importFile;const r=this.importFileName;if(this.importFile=null,this.importFileName=null,s&&i)if(r&&/_(plain|text)\.zip$/i.test(r)){i=i.split(",")[1];try{const c=await sk.loadAsync(i,{base64:!0}),h=[];c.forEach((d,p)=>{p.dir||h.push(p.async("string").then(async g=>{const $=g.split(` `),y=$[0]||"",w=$.slice(1).join(` -`),v=y.match(/\/\*{7}\s*\(ext=(\w+)\/engine=([^/]+)\/debug=(\w+)\/verbose=(\w+)\/enabled=(\w+)\)\s*\*{7}\//);let _="Javascript/js",b="system.adapter.javascript.0",T=!1,I=!1,C=!1;if(v){const j=v[1];b=v[2],T=v[3]==="true",I=v[4]==="true",C=v[5]==="true",j==="ts"?_="TypeScript/ts":j==="blockly"?_="Blockly":j==="rules"&&(_="Rules")}const D=d.replace(/\.\w+$/,"").replace(/\//g,"."),R=`script.js.${D}`,N=D.split(".").pop()||D,U=R.split(".");for(let j=3;j{h==="permissionError"?this.showJsError(x.I18n.t(h)):!h||h.error?this.showJsError(h?x.I18n.t(h.error||""):x.I18n.t("Unknown error")):this.showMessage(x.I18n.t("Done"))})}}toggleLogLayout(){window.localStorage.setItem("App.logHorzLayout",this.state.logHorzLayout?"false":"true"),this.setState({logHorzLayout:!this.state.logHorzLayout})}renderEditor(){var i;const s=Object.keys(this.scripts).reduce((r,l)=>r+(this.scripts[l].common.engineType==="Rules"?1:0),0);return m.jsx(Hn,{scriptsHash:this.state.scriptsHash,debugMode:this.state.debugMode,onDebugModeChange:r=>{r?this.setState({debugMode:!0}):this.setState({debugMode:!1,debugInstance:null})},visible:!this.state.resizing,socket:this.socket,adapterName:this.adapterName,onLocate:r=>this.setState({menuSelectId:r}),password:this.state.password,runningInstances:this.state.runningInstances,menuOpened:this.state.menuOpened,searchText:this.state.searchText,themeType:this.state.themeType,themeName:this.state.themeName,theme:this.state.theme,expertMode:this.state.expertMode,onChange:(r,l)=>this.onUpdateScript(r,l),isAnyRulesExists:s,debugInstance:this.state.debugInstance,onSelectedChange:(r,l)=>{const c={};let h=!1;r!==this.state.selected&&(h=!0,c.selected=r),JSON.stringify(l)!==JSON.stringify(this.state.editing)&&(h=!0,c.editing=[...l]),h&&this.setState(c)},onRestart:r=>this.socket.extendObject(r,{common:{enabled:!0}}),selected:this.state.selected&&((i=this.scripts[this.state.selected])==null?void 0:i.type)==="script"?this.state.selected:"",objects:this.scripts,resizing:this.state.resizing,onChangedChanged:r=>this.changedScripts=r},"editor")}showLogButton(){return m.jsx(bt,{title:x.I18n.t("Show logs"),sx:ra.showLogButton,onClick:()=>{window.localStorage.setItem("App.hideLog","false"),this.setState({hideLog:!1,resizing:!0}),setTimeout(()=>this.setState({resizing:!1}),300)},children:m.jsx(II,{})},"showLog")}renderErrorDialog(){return this.state.errorText?m.jsx(Tu,{onClose:()=>this.setState({errorText:""}),text:this.state.errorText},"dialogError"):null}renderMain(){let s;return this.state.debugMode||this.state.hideLog?s=m.jsxs(m.Fragment,{children:[!this.state.debugMode&&this.state.hideLog?this.showLogButton():void 0,this.renderEditor()]}):s=m.jsxs(Jc,{direction:this.state.logHorzLayout?mt.Horizontal:mt.Vertical,initialSizes:this.state.logSizes,minWidths:[500,100],minHeights:[150,50],onResizeStarted:()=>this.setState({resizing:!0}),onResizeFinished:(i,r)=>{this.setState({logSizes:r,resizing:!1}),window.localStorage.setItem("JS.logSizes",JSON.stringify(r))},gutterClassName:this.state.themeType==="dark"?"Dark visGutter":"Light visGutter",children:[this.renderEditor(),m.jsx(qm,{verticalLayout:!this.state.logHorzLayout,onLayoutChange:()=>this.toggleLogLayout(),editing:this.state.editing,socket:this.socket,selected:this.state.selected,onHideLog:()=>{window.localStorage.setItem("App.hideLog","true"),this.setState({hideLog:!0,resizing:!0}),setTimeout(()=>this.setState({resizing:!1}),300)}},"log")]}),m.jsxs(bt,{sx:ra.content,className:"iobVerticalSplitter",children:[m.jsx(bt,{sx:ra.menuOpenCloseButton,onClick:()=>{window.localStorage.setItem("App.menuOpened",this.state.menuOpened?"false":"true"),this.setState({menuOpened:!this.state.menuOpened,resizing:!0}),setTimeout(()=>this.setState({resizing:!1}),300)},children:this.state.menuOpened?m.jsx(EI,{}):m.jsx(xI,{})},"closeMenu"),this.state.message?m.jsx(x.Message,{onClose:()=>this.setState({message:""}),text:this.state.message},"dialogMessage"):null,this.renderErrorDialog(),this.state.importFile?m.jsx(vf,{onClose:(i,r)=>this.onImport(i,r)},"dialogImportFile"):null,this.state.confirm?m.jsx(x.Confirm,{onClose:i=>{this.state.confirm&&this.setState({confirm:""}),this.confirmCallback&&this.confirmCallback(i),this.confirmCallback=null},text:this.state.confirm},"dialogConfirm"):null,this.renderPasswordDialog(),s]},"main")}render(){if(!this.state.ready)return m.jsx(Nw,{injectFirst:!0,children:m.jsx(Lw,{theme:this.state.theme,children:m.jsx(x.Loader,{themeType:this.state.themeType})})});let s;return this.state.menuOpened?s=m.jsxs(Jc,{direction:mt.Horizontal,initialSizes:this.state.splitSizes,minWidths:[270,400],onResizeFinished:(i,r)=>{this.setState({splitSizes:r}),window.localStorage.setItem("JS.splitSizes",JSON.stringify(r))},gutterClassName:this.state.themeType==="dark"?"Dark visGutter":"Light visGutter",children:[m.jsx("div",{style:ra.mainDiv,children:m.jsx(Ao,{password:this.state.password,debugMode:this.state.debugMode,onDebugInstance:i=>this.setState({debugInstance:i,debugMode:!!i}),scripts:this.scripts,scriptsHash:this.state.scriptsHash,instances:this.state.instances,onRename:this.onRename.bind(this),socket:this.socket,selectId:this.state.menuSelectId,onEdit:this.onEdit.bind(this),expertMode:this.state.expertMode,themeName:this.state.themeName,onThemeChange:i=>{x.Utils.setThemeName(i);const r=x.Utils.getThemeType(i);this.setState({themeName:i,themeType:r},()=>this.toggleTheme(i))},runningInstances:this.state.runningInstances,onExpertModeChange:i=>this.onExpertModeChange(i),onDelete:this.onDelete.bind(this),onAddNew:this.onAddNew.bind(this),onEnableDisable:this.onEnableDisable.bind(this),onExport:this.onExport.bind(this),width:500,onImport:()=>this.setState({importFile:!0}),onSearch:i=>this.setState({searchText:i}),version:this.props.version,changedScripts:this.changedScripts},"sidemenu")},"menu"),this.renderMain()]}):s=this.renderMain(),m.jsx(Nw,{injectFirst:!0,children:m.jsx(Lw,{theme:this.state.theme,children:m.jsx("div",{style:ra.root,children:m.jsx(pM,{socket:this.socket,children:s})})})})}}window.location.hostname==="localhost"||window.location.hostname==="[::1]"||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/);function Yre(){"serviceWorker"in navigator&&navigator.serviceWorker.ready.then(a=>{a.unregister()})}const Jre="9.2.3",AS={version:Jre};var ii;(function(a){a.mouse="mouse",a.touch="touch",a.keyboard="keyboard"})(ii||(ii={}));class qre{get delay(){var s;return(s=this.args.delay)!==null&&s!==void 0?s:0}get scrollAngleRanges(){return this.args.scrollAngleRanges}get getDropTargetElementsAtPoint(){return this.args.getDropTargetElementsAtPoint}get ignoreContextMenu(){var s;return(s=this.args.ignoreContextMenu)!==null&&s!==void 0?s:!1}get enableHoverOutsideTarget(){var s;return(s=this.args.enableHoverOutsideTarget)!==null&&s!==void 0?s:!1}get enableKeyboardEvents(){var s;return(s=this.args.enableKeyboardEvents)!==null&&s!==void 0?s:!1}get enableMouseEvents(){var s;return(s=this.args.enableMouseEvents)!==null&&s!==void 0?s:!1}get enableTouchEvents(){var s;return(s=this.args.enableTouchEvents)!==null&&s!==void 0?s:!0}get touchSlop(){return this.args.touchSlop||0}get delayTouchStart(){var s,i,r,l;return(l=(r=(s=this.args)===null||s===void 0?void 0:s.delayTouchStart)!==null&&r!==void 0?r:(i=this.args)===null||i===void 0?void 0:i.delay)!==null&&l!==void 0?l:0}get delayMouseStart(){var s,i,r,l;return(l=(r=(s=this.args)===null||s===void 0?void 0:s.delayMouseStart)!==null&&r!==void 0?r:(i=this.args)===null||i===void 0?void 0:i.delay)!==null&&l!==void 0?l:0}get window(){if(this.context&&this.context.window)return this.context.window;if(typeof window<"u")return window}get document(){var s;if(!((s=this.context)===null||s===void 0)&&s.document)return this.context.document;if(this.window)return this.window.document}get rootElement(){var s;return((s=this.args)===null||s===void 0?void 0:s.rootElement)||this.document}constructor(s,i){this.args=s,this.context=i}}function Xre(a,s,i,r){return Math.sqrt(Math.pow(Math.abs(i-a),2)+Math.pow(Math.abs(r-s),2))}function Zre(a,s,i,r,l){if(!l)return!1;const c=Math.atan2(r-s,i-a)*180/Math.PI+180;for(let h=0;h=d.start)&&(d.end==null||c<=d.end))return!0}return!1}const Qre={Left:1},eae={Left:0};function Zg(a){return a.button===void 0||a.button===eae.Left}function tae(a){return a.buttons===void 0||(a.buttons&Qre.Left)===0}function RS(a){return!!a.targetTouches}const sae=1;function oae(a){const s=a.nodeType===sae?a:a.parentElement;if(!s)return;const{top:i,left:r}=s.getBoundingClientRect();return{x:r,y:i}}function iae(a,s){if(a.targetTouches.length===1)return $u(a.targetTouches[0]);if(s&&a.touches.length===1&&a.touches[0].target===s.target)return $u(a.touches[0])}function $u(a,s){return RS(a)?iae(a,s):{x:a.clientX,y:a.clientY}}const ok=(()=>{let a=!1;try{addEventListener("test",()=>{},Object.defineProperty({},"passive",{get(){return a=!0,!0}}))}catch{}return a})(),aa={[ii.mouse]:{start:"mousedown",move:"mousemove",end:"mouseup",contextmenu:"contextmenu"},[ii.touch]:{start:"touchstart",move:"touchmove",end:"touchend"},[ii.keyboard]:{keydown:"keydown"}};class $a{profile(){var s;return{sourceNodes:this.sourceNodes.size,sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,targetNodes:this.targetNodes.size,dragOverTargetIds:((s=this.dragOverTargetIds)===null||s===void 0?void 0:s.length)||0}}get document(){return this.options.document}setup(){const s=this.options.rootElement;s&&(Ue(!$a.isSetUp,"Cannot have two Touch backends at the same time."),$a.isSetUp=!0,this.addEventListener(s,"start",this.getTopMoveStartHandler()),this.addEventListener(s,"start",this.handleTopMoveStartCapture,!0),this.addEventListener(s,"move",this.handleTopMove),this.addEventListener(s,"move",this.handleTopMoveCapture,!0),this.addEventListener(s,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.addEventListener(s,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.addEventListener(s,"keydown",this.handleCancelOnEscape,!0))}teardown(){const s=this.options.rootElement;s&&($a.isSetUp=!1,this._mouseClientOffset={},this.removeEventListener(s,"start",this.handleTopMoveStartCapture,!0),this.removeEventListener(s,"start",this.handleTopMoveStart),this.removeEventListener(s,"move",this.handleTopMoveCapture,!0),this.removeEventListener(s,"move",this.handleTopMove),this.removeEventListener(s,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.removeEventListener(s,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.removeEventListener(s,"keydown",this.handleCancelOnEscape,!0),this.uninstallSourceNodeRemovalObserver())}addEventListener(s,i,r,l=!1){const c=ok?{capture:l,passive:!1}:l;this.listenerTypes.forEach(function(h){const d=aa[h][i];d&&s.addEventListener(d,r,c)})}removeEventListener(s,i,r,l=!1){const c=ok?{capture:l,passive:!1}:l;this.listenerTypes.forEach(function(h){const d=aa[h][i];d&&s.removeEventListener(d,r,c)})}connectDragSource(s,i){const r=this.handleMoveStart.bind(this,s);return this.sourceNodes.set(s,i),this.addEventListener(i,"start",r),()=>{this.sourceNodes.delete(s),this.removeEventListener(i,"start",r)}}connectDragPreview(s,i,r){return this.sourcePreviewNodeOptions.set(s,r),this.sourcePreviewNodes.set(s,i),()=>{this.sourcePreviewNodes.delete(s),this.sourcePreviewNodeOptions.delete(s)}}connectDropTarget(s,i){const r=this.options.rootElement;if(!this.document||!r)return()=>{};const l=c=>{if(!this.document||!r||!this.monitor.isDragging())return;let h;switch(c.type){case aa.mouse.move:h={x:c.clientX,y:c.clientY};break;case aa.touch.move:var d,p;h={x:((d=c.touches[0])===null||d===void 0?void 0:d.clientX)||0,y:((p=c.touches[0])===null||p===void 0?void 0:p.clientY)||0};break}const g=h!=null?this.document.elementFromPoint(h.x,h.y):void 0,$=g&&i.contains(g);if(g===i||$)return this.handleMove(c,s)};return this.addEventListener(this.document.body,"move",l),this.targetNodes.set(s,i),()=>{this.document&&(this.targetNodes.delete(s),this.removeEventListener(this.document.body,"move",l))}}getTopMoveStartHandler(){return!this.options.delayTouchStart&&!this.options.delayMouseStart?this.handleTopMoveStart:this.handleTopMoveStartDelay}installSourceNodeRemovalObserver(s){this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=s,this.draggedSourceNodeRemovalObserver=new MutationObserver(()=>{s&&!s.parentElement&&(this.resurrectSourceNode(),this.uninstallSourceNodeRemovalObserver())}),!(!s||!s.parentElement)&&this.draggedSourceNodeRemovalObserver.observe(s.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(s,i,r){this.getSourceClientOffset=l=>{const c=this.sourceNodes.get(l);return c&&oae(c)},this.handleTopMoveStartCapture=l=>{Zg(l)&&(this.moveStartSourceIds=[])},this.handleMoveStart=l=>{Array.isArray(this.moveStartSourceIds)&&this.moveStartSourceIds.unshift(l)},this.handleTopMoveStart=l=>{if(!Zg(l))return;const c=$u(l);c&&(RS(l)&&(this.lastTargetTouchFallback=l.targetTouches[0]),this._mouseClientOffset=c),this.waitingForDelay=!1},this.handleTopMoveStartDelay=l=>{if(!Zg(l))return;const c=l.type===aa.touch.start?this.options.delayTouchStart:this.options.delayMouseStart;this.timeout=setTimeout(this.handleTopMoveStart.bind(this,l),c),this.waitingForDelay=!0},this.handleTopMoveCapture=()=>{this.dragOverTargetIds=[]},this.handleMove=(l,c)=>{this.dragOverTargetIds&&this.dragOverTargetIds.unshift(c)},this.handleTopMove=l=>{if(this.timeout&&clearTimeout(this.timeout),!this.document||this.waitingForDelay)return;const{moveStartSourceIds:c,dragOverTargetIds:h}=this,d=this.options.enableHoverOutsideTarget,p=$u(l,this.lastTargetTouchFallback);if(!p)return;if(this._isScrolling||!this.monitor.isDragging()&&Zre(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,p.x,p.y,this.options.scrollAngleRanges)){this._isScrolling=!0;return}if(!this.monitor.isDragging()&&this._mouseClientOffset.hasOwnProperty("x")&&c&&Xre(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,p.x,p.y)>(this.options.touchSlop?this.options.touchSlop:0)&&(this.moveStartSourceIds=void 0,this.actions.beginDrag(c,{clientOffset:this._mouseClientOffset,getSourceClientOffset:this.getSourceClientOffset,publishSource:!1})),!this.monitor.isDragging())return;const g=this.sourceNodes.get(this.monitor.getSourceId());this.installSourceNodeRemovalObserver(g),this.actions.publishDragSource(),l.cancelable&&l.preventDefault();const $=(h||[]).map(_=>this.targetNodes.get(_)).filter(_=>!!_),y=this.options.getDropTargetElementsAtPoint?this.options.getDropTargetElementsAtPoint(p.x,p.y,$):this.document.elementsFromPoint(p.x,p.y),w=[];for(const _ in y){if(!y.hasOwnProperty(_))continue;let b=y[_];for(b!=null&&w.push(b);b;)b=b.parentElement,b&&w.indexOf(b)===-1&&w.push(b)}const v=w.filter(_=>$.indexOf(_)>-1).map(_=>this._getDropTargetId(_)).filter(_=>!!_).filter((_,b,T)=>T.indexOf(_)===b);if(d)for(const _ in this.targetNodes){const b=this.targetNodes.get(_);if(g&&b&&b.contains(g)&&v.indexOf(_)===-1){v.unshift(_);break}}v.reverse(),this.actions.hover(v,{clientOffset:p})},this._getDropTargetId=l=>{const c=this.targetNodes.keys();let h=c.next();for(;h.done===!1;){const d=h.value;if(l===this.targetNodes.get(d))return d;h=c.next()}},this.handleTopMoveEndCapture=l=>{if(this._isScrolling=!1,this.lastTargetTouchFallback=void 0,!!tae(l)){if(!this.monitor.isDragging()||this.monitor.didDrop()){this.moveStartSourceIds=void 0;return}l.cancelable&&l.preventDefault(),this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.drop(),this.actions.endDrag()}},this.handleCancelOnEscape=l=>{l.key==="Escape"&&this.monitor.isDragging()&&(this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.endDrag())},this.options=new qre(r,i),this.actions=s.getActions(),this.monitor=s.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(ii.mouse),this.options.enableTouchEvents&&this.listenerTypes.push(ii.touch),this.options.enableKeyboardEvents&&this.listenerTypes.push(ii.keyboard)}}const nae=function(s,i={},r={}){return new $a(s,i,r)};window.GenericBlock=at;window.adapterName="javascript";window.sentryDSN="https://504499a725eb4898930d3b9e9da95740@sentry.iobroker.net/56";console.log(`iobroker.${window.adapterName}@${AS.version}`);const rae=window.innerWidth<600,ik=document.getElementById("root");ik&&vk(ik).render(m.jsx(Nk,{backend:rae?nae:Kk,children:m.jsx(Kre,{version:AS.version})}));Yre();const Mc=window.loadDynamicScript;Mc&&Mc(window.location.port==="3000"?`${window.location.protocol}//${window.location.hostname}:8081/lib/js/socket.io.js`:"./../../lib/js/socket.io.js",()=>Mc("vs/loader.js",()=>Mc("vs/configure.js",()=>typeof window.socketLoadedHandler=="function"&&window.socketLoadedHandler())));export{hM as C,XO as D,at as G,Yk as I,q_ as M,Ps as S,$x as a,Lx as b,Wx as c,Pi as d,eue as e,_f as f,Tu as g,TO as h,CO as i,tue as j,wae as k,vae as l,Jc as m,G_ as n,Oc as o,_ae as p,er as u,mt as z}; +`),v=y.match(/\/\*{7}\s*\(ext=(\w+)\/engine=([^/]+)\/debug=(\w+)\/verbose=(\w+)\/enabled=(\w+)\)\s*\*{7}\//);let _="Javascript/js",b="system.adapter.javascript.0",T=!1,I=!1,C=!1;if(v){const j=v[1];b=v[2],T=v[3]==="true",I=v[4]==="true",C=v[5]==="true",j==="ts"?_="TypeScript/ts":j==="blockly"?_="Blockly":j==="rules"&&(_="Rules")}const D=d.replace(/\.\w+$/,"").replace(/\//g,"."),R=`script.js.${D}`,N=D.split(".").pop()||D,U=R.split(".");for(let j=3;j{h==="permissionError"?this.showJsError(x.I18n.t(h)):!h||h.error?this.showJsError(h?x.I18n.t(h.error||""):x.I18n.t("Unknown error")):this.showMessage(x.I18n.t("Done"))})}}toggleLogLayout(){window.localStorage.setItem("App.logHorzLayout",this.state.logHorzLayout?"false":"true"),this.setState({logHorzLayout:!this.state.logHorzLayout})}renderEditor(){var i;const s=Object.keys(this.scripts).reduce((r,l)=>r+(this.scripts[l].common.engineType==="Rules"?1:0),0);return m.jsx(Hn,{scriptsHash:this.state.scriptsHash,debugMode:this.state.debugMode,onDebugModeChange:r=>{r?this.setState({debugMode:!0}):this.setState({debugMode:!1,debugInstance:null})},visible:!this.state.resizing,socket:this.socket,adapterName:this.adapterName,onLocate:r=>this.setState({menuSelectId:r}),password:this.state.password,runningInstances:this.state.runningInstances,menuOpened:this.state.menuOpened,searchText:this.state.searchText,themeType:this.state.themeType,themeName:this.state.themeName,theme:this.state.theme,expertMode:this.state.expertMode,onChange:(r,l)=>this.onUpdateScript(r,l),isAnyRulesExists:s,debugInstance:this.state.debugInstance,onSelectedChange:(r,l)=>{const c={};let h=!1;r!==this.state.selected&&(h=!0,c.selected=r),JSON.stringify(l)!==JSON.stringify(this.state.editing)&&(h=!0,c.editing=[...l]),h&&this.setState(c)},onRestart:r=>this.socket.extendObject(r,{common:{enabled:!0}}),selected:this.state.selected&&((i=this.scripts[this.state.selected])==null?void 0:i.type)==="script"?this.state.selected:"",objects:this.scripts,resizing:this.state.resizing,onChangedChanged:r=>this.changedScripts=r},"editor")}showLogButton(){return m.jsx(bt,{title:x.I18n.t("Show logs"),sx:ra.showLogButton,onClick:()=>{window.localStorage.setItem("App.hideLog","false"),this.setState({hideLog:!1,resizing:!0}),setTimeout(()=>this.setState({resizing:!1}),300)},children:m.jsx(II,{})},"showLog")}renderErrorDialog(){return this.state.errorText?m.jsx(Tu,{onClose:()=>this.setState({errorText:""}),text:this.state.errorText},"dialogError"):null}renderMain(){let s;return this.state.debugMode||this.state.hideLog?s=m.jsxs(m.Fragment,{children:[!this.state.debugMode&&this.state.hideLog?this.showLogButton():void 0,this.renderEditor()]}):s=m.jsxs(Jc,{direction:this.state.logHorzLayout?mt.Horizontal:mt.Vertical,initialSizes:this.state.logSizes,minWidths:[500,100],minHeights:[150,50],onResizeStarted:()=>this.setState({resizing:!0}),onResizeFinished:(i,r)=>{this.setState({logSizes:r,resizing:!1}),window.localStorage.setItem("JS.logSizes",JSON.stringify(r))},gutterClassName:this.state.themeType==="dark"?"Dark visGutter":"Light visGutter",children:[this.renderEditor(),m.jsx(qm,{verticalLayout:!this.state.logHorzLayout,onLayoutChange:()=>this.toggleLogLayout(),editing:this.state.editing,socket:this.socket,selected:this.state.selected,onHideLog:()=>{window.localStorage.setItem("App.hideLog","true"),this.setState({hideLog:!0,resizing:!0}),setTimeout(()=>this.setState({resizing:!1}),300)}},"log")]}),m.jsxs(bt,{sx:ra.content,className:"iobVerticalSplitter",children:[m.jsx(bt,{sx:ra.menuOpenCloseButton,onClick:()=>{window.localStorage.setItem("App.menuOpened",this.state.menuOpened?"false":"true"),this.setState({menuOpened:!this.state.menuOpened,resizing:!0}),setTimeout(()=>this.setState({resizing:!1}),300)},children:this.state.menuOpened?m.jsx(EI,{}):m.jsx(xI,{})},"closeMenu"),this.state.message?m.jsx(x.Message,{onClose:()=>this.setState({message:""}),text:this.state.message},"dialogMessage"):null,this.renderErrorDialog(),this.state.importFile?m.jsx(vf,{onClose:(i,r)=>this.onImport(i,r)},"dialogImportFile"):null,this.state.confirm?m.jsx(x.Confirm,{onClose:i=>{this.state.confirm&&this.setState({confirm:""}),this.confirmCallback&&this.confirmCallback(i),this.confirmCallback=null},text:this.state.confirm},"dialogConfirm"):null,this.renderPasswordDialog(),s]},"main")}render(){if(!this.state.ready)return m.jsx(Nw,{injectFirst:!0,children:m.jsx(Lw,{theme:this.state.theme,children:m.jsx(x.Loader,{themeType:this.state.themeType})})});let s;return this.state.menuOpened?s=m.jsxs(Jc,{direction:mt.Horizontal,initialSizes:this.state.splitSizes,minWidths:[270,400],onResizeFinished:(i,r)=>{this.setState({splitSizes:r}),window.localStorage.setItem("JS.splitSizes",JSON.stringify(r))},gutterClassName:this.state.themeType==="dark"?"Dark visGutter":"Light visGutter",children:[m.jsx("div",{style:ra.mainDiv,children:m.jsx(Ao,{password:this.state.password,debugMode:this.state.debugMode,onDebugInstance:i=>this.setState({debugInstance:i,debugMode:!!i}),scripts:this.scripts,scriptsHash:this.state.scriptsHash,instances:this.state.instances,onRename:this.onRename.bind(this),socket:this.socket,selectId:this.state.menuSelectId,onEdit:this.onEdit.bind(this),expertMode:this.state.expertMode,themeName:this.state.themeName,onThemeChange:i=>{x.Utils.setThemeName(i);const r=x.Utils.getThemeType(i);this.setState({themeName:i,themeType:r},()=>this.toggleTheme(i))},runningInstances:this.state.runningInstances,onExpertModeChange:i=>this.onExpertModeChange(i),onDelete:this.onDelete.bind(this),onAddNew:this.onAddNew.bind(this),onEnableDisable:this.onEnableDisable.bind(this),onExport:this.onExport.bind(this),width:500,onImport:()=>this.setState({importFile:!0}),onSearch:i=>this.setState({searchText:i}),version:this.props.version,changedScripts:this.changedScripts},"sidemenu")},"menu"),this.renderMain()]}):s=this.renderMain(),m.jsx(Nw,{injectFirst:!0,children:m.jsx(Lw,{theme:this.state.theme,children:m.jsx("div",{style:ra.root,children:m.jsx(pM,{socket:this.socket,children:s})})})})}}window.location.hostname==="localhost"||window.location.hostname==="[::1]"||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/);function Yre(){"serviceWorker"in navigator&&navigator.serviceWorker.ready.then(a=>{a.unregister()})}const Jre="9.2.4",AS={version:Jre};var ii;(function(a){a.mouse="mouse",a.touch="touch",a.keyboard="keyboard"})(ii||(ii={}));class qre{get delay(){var s;return(s=this.args.delay)!==null&&s!==void 0?s:0}get scrollAngleRanges(){return this.args.scrollAngleRanges}get getDropTargetElementsAtPoint(){return this.args.getDropTargetElementsAtPoint}get ignoreContextMenu(){var s;return(s=this.args.ignoreContextMenu)!==null&&s!==void 0?s:!1}get enableHoverOutsideTarget(){var s;return(s=this.args.enableHoverOutsideTarget)!==null&&s!==void 0?s:!1}get enableKeyboardEvents(){var s;return(s=this.args.enableKeyboardEvents)!==null&&s!==void 0?s:!1}get enableMouseEvents(){var s;return(s=this.args.enableMouseEvents)!==null&&s!==void 0?s:!1}get enableTouchEvents(){var s;return(s=this.args.enableTouchEvents)!==null&&s!==void 0?s:!0}get touchSlop(){return this.args.touchSlop||0}get delayTouchStart(){var s,i,r,l;return(l=(r=(s=this.args)===null||s===void 0?void 0:s.delayTouchStart)!==null&&r!==void 0?r:(i=this.args)===null||i===void 0?void 0:i.delay)!==null&&l!==void 0?l:0}get delayMouseStart(){var s,i,r,l;return(l=(r=(s=this.args)===null||s===void 0?void 0:s.delayMouseStart)!==null&&r!==void 0?r:(i=this.args)===null||i===void 0?void 0:i.delay)!==null&&l!==void 0?l:0}get window(){if(this.context&&this.context.window)return this.context.window;if(typeof window<"u")return window}get document(){var s;if(!((s=this.context)===null||s===void 0)&&s.document)return this.context.document;if(this.window)return this.window.document}get rootElement(){var s;return((s=this.args)===null||s===void 0?void 0:s.rootElement)||this.document}constructor(s,i){this.args=s,this.context=i}}function Xre(a,s,i,r){return Math.sqrt(Math.pow(Math.abs(i-a),2)+Math.pow(Math.abs(r-s),2))}function Zre(a,s,i,r,l){if(!l)return!1;const c=Math.atan2(r-s,i-a)*180/Math.PI+180;for(let h=0;h=d.start)&&(d.end==null||c<=d.end))return!0}return!1}const Qre={Left:1},eae={Left:0};function Zg(a){return a.button===void 0||a.button===eae.Left}function tae(a){return a.buttons===void 0||(a.buttons&Qre.Left)===0}function RS(a){return!!a.targetTouches}const sae=1;function oae(a){const s=a.nodeType===sae?a:a.parentElement;if(!s)return;const{top:i,left:r}=s.getBoundingClientRect();return{x:r,y:i}}function iae(a,s){if(a.targetTouches.length===1)return $u(a.targetTouches[0]);if(s&&a.touches.length===1&&a.touches[0].target===s.target)return $u(a.touches[0])}function $u(a,s){return RS(a)?iae(a,s):{x:a.clientX,y:a.clientY}}const ok=(()=>{let a=!1;try{addEventListener("test",()=>{},Object.defineProperty({},"passive",{get(){return a=!0,!0}}))}catch{}return a})(),aa={[ii.mouse]:{start:"mousedown",move:"mousemove",end:"mouseup",contextmenu:"contextmenu"},[ii.touch]:{start:"touchstart",move:"touchmove",end:"touchend"},[ii.keyboard]:{keydown:"keydown"}};class $a{profile(){var s;return{sourceNodes:this.sourceNodes.size,sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,targetNodes:this.targetNodes.size,dragOverTargetIds:((s=this.dragOverTargetIds)===null||s===void 0?void 0:s.length)||0}}get document(){return this.options.document}setup(){const s=this.options.rootElement;s&&(Ue(!$a.isSetUp,"Cannot have two Touch backends at the same time."),$a.isSetUp=!0,this.addEventListener(s,"start",this.getTopMoveStartHandler()),this.addEventListener(s,"start",this.handleTopMoveStartCapture,!0),this.addEventListener(s,"move",this.handleTopMove),this.addEventListener(s,"move",this.handleTopMoveCapture,!0),this.addEventListener(s,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.addEventListener(s,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.addEventListener(s,"keydown",this.handleCancelOnEscape,!0))}teardown(){const s=this.options.rootElement;s&&($a.isSetUp=!1,this._mouseClientOffset={},this.removeEventListener(s,"start",this.handleTopMoveStartCapture,!0),this.removeEventListener(s,"start",this.handleTopMoveStart),this.removeEventListener(s,"move",this.handleTopMoveCapture,!0),this.removeEventListener(s,"move",this.handleTopMove),this.removeEventListener(s,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.removeEventListener(s,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.removeEventListener(s,"keydown",this.handleCancelOnEscape,!0),this.uninstallSourceNodeRemovalObserver())}addEventListener(s,i,r,l=!1){const c=ok?{capture:l,passive:!1}:l;this.listenerTypes.forEach(function(h){const d=aa[h][i];d&&s.addEventListener(d,r,c)})}removeEventListener(s,i,r,l=!1){const c=ok?{capture:l,passive:!1}:l;this.listenerTypes.forEach(function(h){const d=aa[h][i];d&&s.removeEventListener(d,r,c)})}connectDragSource(s,i){const r=this.handleMoveStart.bind(this,s);return this.sourceNodes.set(s,i),this.addEventListener(i,"start",r),()=>{this.sourceNodes.delete(s),this.removeEventListener(i,"start",r)}}connectDragPreview(s,i,r){return this.sourcePreviewNodeOptions.set(s,r),this.sourcePreviewNodes.set(s,i),()=>{this.sourcePreviewNodes.delete(s),this.sourcePreviewNodeOptions.delete(s)}}connectDropTarget(s,i){const r=this.options.rootElement;if(!this.document||!r)return()=>{};const l=c=>{if(!this.document||!r||!this.monitor.isDragging())return;let h;switch(c.type){case aa.mouse.move:h={x:c.clientX,y:c.clientY};break;case aa.touch.move:var d,p;h={x:((d=c.touches[0])===null||d===void 0?void 0:d.clientX)||0,y:((p=c.touches[0])===null||p===void 0?void 0:p.clientY)||0};break}const g=h!=null?this.document.elementFromPoint(h.x,h.y):void 0,$=g&&i.contains(g);if(g===i||$)return this.handleMove(c,s)};return this.addEventListener(this.document.body,"move",l),this.targetNodes.set(s,i),()=>{this.document&&(this.targetNodes.delete(s),this.removeEventListener(this.document.body,"move",l))}}getTopMoveStartHandler(){return!this.options.delayTouchStart&&!this.options.delayMouseStart?this.handleTopMoveStart:this.handleTopMoveStartDelay}installSourceNodeRemovalObserver(s){this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=s,this.draggedSourceNodeRemovalObserver=new MutationObserver(()=>{s&&!s.parentElement&&(this.resurrectSourceNode(),this.uninstallSourceNodeRemovalObserver())}),!(!s||!s.parentElement)&&this.draggedSourceNodeRemovalObserver.observe(s.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(s,i,r){this.getSourceClientOffset=l=>{const c=this.sourceNodes.get(l);return c&&oae(c)},this.handleTopMoveStartCapture=l=>{Zg(l)&&(this.moveStartSourceIds=[])},this.handleMoveStart=l=>{Array.isArray(this.moveStartSourceIds)&&this.moveStartSourceIds.unshift(l)},this.handleTopMoveStart=l=>{if(!Zg(l))return;const c=$u(l);c&&(RS(l)&&(this.lastTargetTouchFallback=l.targetTouches[0]),this._mouseClientOffset=c),this.waitingForDelay=!1},this.handleTopMoveStartDelay=l=>{if(!Zg(l))return;const c=l.type===aa.touch.start?this.options.delayTouchStart:this.options.delayMouseStart;this.timeout=setTimeout(this.handleTopMoveStart.bind(this,l),c),this.waitingForDelay=!0},this.handleTopMoveCapture=()=>{this.dragOverTargetIds=[]},this.handleMove=(l,c)=>{this.dragOverTargetIds&&this.dragOverTargetIds.unshift(c)},this.handleTopMove=l=>{if(this.timeout&&clearTimeout(this.timeout),!this.document||this.waitingForDelay)return;const{moveStartSourceIds:c,dragOverTargetIds:h}=this,d=this.options.enableHoverOutsideTarget,p=$u(l,this.lastTargetTouchFallback);if(!p)return;if(this._isScrolling||!this.monitor.isDragging()&&Zre(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,p.x,p.y,this.options.scrollAngleRanges)){this._isScrolling=!0;return}if(!this.monitor.isDragging()&&this._mouseClientOffset.hasOwnProperty("x")&&c&&Xre(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,p.x,p.y)>(this.options.touchSlop?this.options.touchSlop:0)&&(this.moveStartSourceIds=void 0,this.actions.beginDrag(c,{clientOffset:this._mouseClientOffset,getSourceClientOffset:this.getSourceClientOffset,publishSource:!1})),!this.monitor.isDragging())return;const g=this.sourceNodes.get(this.monitor.getSourceId());this.installSourceNodeRemovalObserver(g),this.actions.publishDragSource(),l.cancelable&&l.preventDefault();const $=(h||[]).map(_=>this.targetNodes.get(_)).filter(_=>!!_),y=this.options.getDropTargetElementsAtPoint?this.options.getDropTargetElementsAtPoint(p.x,p.y,$):this.document.elementsFromPoint(p.x,p.y),w=[];for(const _ in y){if(!y.hasOwnProperty(_))continue;let b=y[_];for(b!=null&&w.push(b);b;)b=b.parentElement,b&&w.indexOf(b)===-1&&w.push(b)}const v=w.filter(_=>$.indexOf(_)>-1).map(_=>this._getDropTargetId(_)).filter(_=>!!_).filter((_,b,T)=>T.indexOf(_)===b);if(d)for(const _ in this.targetNodes){const b=this.targetNodes.get(_);if(g&&b&&b.contains(g)&&v.indexOf(_)===-1){v.unshift(_);break}}v.reverse(),this.actions.hover(v,{clientOffset:p})},this._getDropTargetId=l=>{const c=this.targetNodes.keys();let h=c.next();for(;h.done===!1;){const d=h.value;if(l===this.targetNodes.get(d))return d;h=c.next()}},this.handleTopMoveEndCapture=l=>{if(this._isScrolling=!1,this.lastTargetTouchFallback=void 0,!!tae(l)){if(!this.monitor.isDragging()||this.monitor.didDrop()){this.moveStartSourceIds=void 0;return}l.cancelable&&l.preventDefault(),this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.drop(),this.actions.endDrag()}},this.handleCancelOnEscape=l=>{l.key==="Escape"&&this.monitor.isDragging()&&(this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.endDrag())},this.options=new qre(r,i),this.actions=s.getActions(),this.monitor=s.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(ii.mouse),this.options.enableTouchEvents&&this.listenerTypes.push(ii.touch),this.options.enableKeyboardEvents&&this.listenerTypes.push(ii.keyboard)}}const nae=function(s,i={},r={}){return new $a(s,i,r)};window.GenericBlock=at;window.adapterName="javascript";window.sentryDSN="https://504499a725eb4898930d3b9e9da95740@sentry.iobroker.net/56";console.log(`iobroker.${window.adapterName}@${AS.version}`);const rae=window.innerWidth<600,ik=document.getElementById("root");ik&&vk(ik).render(m.jsx(Nk,{backend:rae?nae:Kk,children:m.jsx(Kre,{version:AS.version})}));Yre();const Mc=window.loadDynamicScript;Mc&&Mc(window.location.port==="3000"?`${window.location.protocol}//${window.location.hostname}:8081/lib/js/socket.io.js`:"./../../lib/js/socket.io.js",()=>Mc("vs/loader.js",()=>Mc("vs/configure.js",()=>typeof window.socketLoadedHandler=="function"&&window.socketLoadedHandler())));export{hM as C,XO as D,at as G,Yk as I,q_ as M,Ps as S,$x as a,Lx as b,Wx as c,Pi as d,eue as e,_f as f,Tu as g,TO as h,CO as i,tue as j,wae as k,vae as l,Jc as m,G_ as n,Oc as o,_ae as p,er as u,mt as z}; diff --git a/admin/assets/index-8lzQwHHF.js b/admin/assets/index-CtxgOnw1.js similarity index 99% rename from admin/assets/index-8lzQwHHF.js rename to admin/assets/index-CtxgOnw1.js index dc77a606d..fa1c5b9b3 100644 --- a/admin/assets/index-8lzQwHHF.js +++ b/admin/assets/index-CtxgOnw1.js @@ -1 +1 @@ -import{j as n}from"./createSvgIcon-DYs_tNrE.js";import{c as E,h as yt,j as M,m as nt,k as lt,l as Dt,b as ut,o as xt}from"./iobroker_javascript__loadShare__react__loadShare__.mjs-CTZOFJS2.js";import{_ as u}from"./iobroker_javascript__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.mjs-DkBjPSMw.js";import{u as kt,a as St,M as Y,C as et,G as Nt,b as $t,c as bt,I as qt,S as J,d as Bt,e as ft,j as Mt,D as Ht,f as Wt}from"./index-CyhJmDLi.js";import{_ as wt,b as Ct,h as vt,i as jt,p as Tt,f as Et,g as mt,o as Pt,Y as Ut,Z as Ft,C as Jt,D as st}from"./iobroker_javascript__loadShare___mf_0_mui_mf_1_material__loadShare__.mjs-CV1_X-Lf.js";import{I as Lt}from"./index-wHNMOf-c.js";import"./iobroker_javascript__loadShare__react__loadShare__.mjs_commonjs-proxy-CE9lvhW8.js";import"./iobroker_javascript__loadShare__prop_mf_2_types__loadShare__.mjs-BCtSFofY.js";import"./virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-DiXVqr03.js";import"./preload-helper-BDBacUwf.js";import"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-RQRRZMX5.js";import"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs-DeVAS-oa.js";import"./inheritsLoose-CIXm_zPk.js";function zt(e){const s=kt().getMonitor(),[i,a]=St(s,e);return E(()=>s.subscribeToOffsetChange(a)),E(()=>s.subscribeToStateChange(a)),i}let V;function Gt(){return V||(V=new Image,V.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),V}const Kt="_wrapperRules_nnott_1",Qt="_rootWrapper_nnott_9",Yt="_addClass_nnott_14",ot={wrapperRules:Kt,rootWrapper:Qt,addClass:Yt},Zt="_switchesItem_10ls3_1",Xt="_switchesItemActive_10ls3_28",Vt="_iconTheme_10ls3_36",it={switchesItem:Zt,switchesItemActive:Xt,iconTheme:Vt},It=({name:e,id:t,active:s,icon:i,adapter:a,socket:o,onDoubleClick:c,title:l,onTouchMove:d,style:j})=>n.jsxs("div",{onDoubleClick:c,onTouchMove:d,title:l?u.I18n.t(l):void 0,className:u.Utils.clsx(it.switchesItem,s&&it.switchesItemActive,`block-${t}`),children:[n.jsx(Y,{iconName:i,className:it.iconTheme,adapter:a,socket:o,style:j}),n.jsx("span",{children:e?u.I18n.t(e):""})]},t),Rt="_cardStyle_8rq8v_1",tn="_cardStyleActive_8rq8v_17",nn="_controlMenu_8rq8v_22",en="_closeBtn_8rq8v_31",sn="_isDelete_8rq8v_73",on="_drag_mobile_8rq8v_90",G={cardStyle:Rt,cardStyleActive:tn,controlMenu:nn,closeBtn:en,isDelete:sn,drag_mobile:on};function K(e,t,s){let i;switch(e){case"actions":if(s==="else")return i={...t,actions:{...t[e],else:[...t[e].else]}},i;if(s==="then")return i={...t,actions:{...t[e],then:[...t[e].then]}},i;throw console.error(`Unknown additionalParameter: ${s}`),new Error(`Unknown additionalParameter: ${s}`);case"triggers":return i={...t,triggers:[...t.triggers]},i;case"conditions":return i={...t,conditions:[...t.conditions]},i;default:throw new Error(`Unknown name: ${e}`)}}function z(e,t,s,i){var a;switch(e){case"actions":return t.actions[s]=t.actions[s].filter(o=>o._id!==i),t;case"conditions":return t.conditions[s]=(a=t.conditions[s])==null?void 0:a.filter(o=>o._id!==i),t;default:return t.triggers=t.triggers.filter(o=>o._id!==i),t}}function cn(e,t,s){const{_id:i,acceptedBy:a}=e;let o;if(!a||!t[a])return console.warn(`Cannot find ${a}`),t;switch(a){case"actions":if(o=t.actions[s].find(c=>c._id===i),!o)console.warn(`Cannot find ${i}`);else{const c=t.actions[s].indexOf(o);t.actions[s][c]=e}return t;case"conditions":if(o=t.conditions[s].find(c=>c._id===i),!o)console.warn(`Cannot find ${i}`);else{const c=t.conditions[s].indexOf(o);t.conditions[s][c]=e}return t;default:if(o=t.triggers.find(c=>c._id===i),!o)console.warn(`Cannot find ${i}`);else{const c=t.triggers.indexOf(o);t.triggers[c]=e}return t}}const Ot=yt(e=>{var N;const{setUserRules:t,userRules:s,_id:i,id:a,blockValue:o,active:c,acceptedBy:l,isTourOpen:d,setTourStep:j,tourStep:O}=e,[I,_]=M(null),{blocks:r,socket:k,onUpdate:H,setOnUpdate:w,onDebugMessage:f,enableSimulation:x}=nt(et),p=lt(h=>r==null?void 0:r.find(b=>b.getStaticData().id===h),[r]),g=lt(h=>{const b=cn(h,s,o);b&&t(b)},[s]),C=h=>{h.currentTarget!==I&&_(h.currentTarget)},q=()=>_(null),T=Dt(()=>{const h=p(a)||Nt;return n.jsx(h,{...e,notFound:!p(a),isTourOpen:d,setTourStep:j,tourStep:O,onUpdate:H,setOnUpdate:w,enableSimulation:x,onDebugMessage:f,onChange:g,className:void 0,socket:k})},[s,H,f,x]),[S,B]=M(!1);return n.jsxs("div",{onMouseMove:C,onMouseEnter:C,onMouseLeave:q,onMouseDown:h=>{if(h.ctrlKey){let b;const v=K(l,s,o);l==="conditions"?(b=v.conditions[o].find(m=>m._id===i),b&&v.conditions[o].splice(v.conditions[o].indexOf(b),0,{...b,_id:Date.now()})):l==="actions"?(b=v.actions[o].find(m=>m._id===i),b&&v.actions[o].splice(v.actions[o].indexOf(b),0,{...b,_id:Date.now()})):(b=v.triggers.find(m=>m._id===i),b&&v.triggers.splice(v[l].indexOf(b),0,{...b,_id:Date.now()})),t(v)}},id:"height",style:c?{width:(((N=document.getElementById("width"))==null?void 0:N.clientWidth)||0)-70}:void 0,className:`${G.cardStyle} ${c?G.cardStyleActive:null} ${S?G.isDelete:null}`,children:[n.jsx("div",{className:G.drag_mobile}),T,t&&n.jsx("div",{className:G.controlMenu,style:I?{opacity:1}:{opacity:0},children:n.jsx("div",{onClick:()=>{let h=K(l,s,o);h=z(l,h,o,i),B(!0),setTimeout(()=>{l==="triggers"&&w(!0),t(h)},300)},className:G.closeBtn})})]})}),rn={position:"fixed",pointerEvents:"none",zIndex:100,left:0,top:0,width:"100%",height:"100%"},an=(e,t,s)=>{if(!e||!t)return{display:"none"};let{x:i,y:a}=t;const o=`translate(${i}px, ${a}px)`;return{transform:o,WebkitTransform:o}},ln=e=>{const{itemType:t,isDragging:s,item:i,initialOffset:a,currentOffset:o,targetIds:c}=zt(d=>({item:d.getItem(),itemType:d.getItemType(),initialOffset:d.getInitialSourceClientOffset(),currentOffset:d.getSourceClientOffset(),isDragging:d.isDragging(),targetIds:d.getTargetIds()})),l=()=>t==="box"?c.length?n.jsx(Ot,{active:!0,...i,allBlocks:e.allBlocks}):n.jsx(It,{active:!0,...i,socket:e.socket}):null;return s?n.jsx("div",{style:rn,children:n.jsx("div",{style:an(a,o),children:l()})}):null},dn="_border_wrpm3_1",fn="_emptyBlockStyle_wrpm3_6",mn="_emptyBlock_wrpm3_6",gn="_selectOnChange_wrpm3_22",hn="_selectOnChangeHelp_wrpm3_28",_n="_selectOnChangeHelpIcon_wrpm3_34",pn="_emptyBlockNone_wrpm3_49",un="_mainBlockItemRules_wrpm3_55",xn="_nameBlockItems_wrpm3_63",bn="_contentBlockItem_wrpm3_73",wn="_wrapperMargin_wrpm3_81",Cn="_contentHeightOn_wrpm3_87",vn="_contentHeightOff_wrpm3_99",jn="_cardAdd_wrpm3_105",In="_blockCardAdd_wrpm3_125",On="_addClassOverflow_wrpm3_136",An="_addClassHeight_wrpm3_140",D={border:dn,emptyBlockStyle:fn,emptyBlock:mn,selectOnChange:gn,selectOnChangeHelp:hn,selectOnChangeHelpIcon:_n,emptyBlockNone:pn,mainBlockItemRules:un,nameBlockItems:xn,contentBlockItem:bn,wrapperMargin:wn,contentHeightOn:Cn,contentHeightOff:vn,cardAdd:jn,blockCardAdd:In,addClassOverflow:On,addClassHeight:An};function dt(e,t){const[s,i]=M(window.localStorage.getItem(t)?JSON.parse(window.localStorage.getItem(t)||""):e);return[s,o=>{window.localStorage.setItem(t,JSON.stringify(o)),i(o)},!!window.localStorage.getItem(t)]}function yn(e,t){let s=0,i=null,a;return function(...o){const c=Date.now();a=o,c-s>=t?(s=c,e.apply(this,o)):i||(i=setTimeout(()=>{s=Date.now(),i=null,e.apply(this,a)},t-(c-s)))}}function tt(e){if(Array.isArray(e))return e.map(t=>tt(t));if(typeof e=="function")return e.bind(null);if(e&&typeof e=="object"){const t={};return Object.keys(e).forEach(s=>{t[s]=tt(e[s])}),t}return e}const ct=yn((e,t)=>e(t),0);function R(e,t){const s=t.find(i=>i._id===e);return{card:s,index:s?t.indexOf(s):-1}}function rt(e,t,s,i,a,o,c,l,d){const{card:j,index:O}=R(e,s);if(!(Ot&&l>d)&&j&&O!==t){const I=tt(s);I.splice(O,1),I.splice(t,0,j);const _=tt(a);switch(o){case"actions":_.actions[c]=I,ct(i,_);return;case"conditions":_.conditions[c]=I,ct(i,_);return;default:_.triggers=I,ct(i,_);return}}}const Dn="_drag_7xfhc_1",kn="_root_7xfhc_11",gt={drag:Dn,root:kn},At=({typeBlock:e,allProperties:t,id:s,isActive:i,setUserRules:a,userRules:o,children:c,_id:l,blockValue:d})=>{const{setOnUpdate:j}=nt(et),[{opacity:O},I,_]=$t({type:"box",item:()=>({...t,id:s,isActive:i,_id:l}),end:(w,f)=>{const{acceptedBy:x}=w,p=f.getDropResult();let g;if(!p)return typeof l=="number"&&!f.getTargetIds().length&&(g=K(x,o,d),g=z(x,g,d,l),a(g)),null;if(p.blockValue!==d){const C=typeof l=="number"?l:Date.now();g=K(x,o,p.blockValue);const q={id:w.id,acceptedBy:w.acceptedBy};switch(x){case"actions":return d&&(g=z("actions",g,d,C)),g=z("actions",g,p.blockValue,C),g.actions[p.blockValue].push({...q,_id:C}),a(g);case"conditions":return typeof d=="number"&&(g=z("conditions",g,d,C)),g=z("conditions",g,p.blockValue,C),g.conditions[p.blockValue].push({...q,_id:C}),a(g);default:return j(!0),g=z("triggers",g,p.blockValue,C),g.triggers.push({...q,_id:C}),a(g)}}},collect:w=>({opacity:w.isDragging()?.4:1,isDragging:w.isDragging()})}),r=ut(null),[,k]=bt({accept:"box",canDrop:()=>!1,hover({_id:w,acceptedBy:f},x){var T;if(!r.current||e!==f)return;const p=(T=r.current)==null?void 0:T.getBoundingClientRect(),g=(p.bottom-p.top)/2,C=x.getClientOffset(),q=((C==null?void 0:C.y)||0)-p.top;if(l&&w!==l)switch(f){case"actions":if(d==="then"||d==="else"){const{index:S}=R(l,o.actions[d]);S!==w&&rt(w,S,o[f][d],a,o,f,d,q,g)}return;case"conditions":if(typeof d=="number"){const{index:S}=R(l,o[f][d]);S!==w&&rt(w,S,o[f][d],a,o,f,d,q,g)}return;default:{const{index:S}=R(l,o[f]);S!==w&&rt(w,S,o[f],a,o,f,void 0,q,g);return}}}});E(()=>{_(Gt(),{captureDraggingState:!0})},[]),I(k(r));const H=window.innerWidth<600;return n.jsxs("div",{ref:H&&l?null:r,className:gt.root,style:{opacity:O},children:[n.jsx("div",{className:l?gt.drag:null,ref:l&&H?r:null}),c]})},Sn=({onClose:e,open:t})=>n.jsxs(wt,{open:t,onClose:e,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[n.jsx(Ct,{children:n.jsxs("div",{style:{fontSize:"1rem",fontFamily:'"Roboto", "Helvetica", "Arial", sans-serif',fontWeight:400,lineHeight:1.5,letterSpacing:"0.00938em"},children:[n.jsx("h3",{children:u.I18n.t("On condition change")}),n.jsx("div",{children:u.I18n.t("help_on_change")}),n.jsx("h3",{children:u.I18n.t("Just check")}),n.jsx("div",{children:u.I18n.t("help_just_check")})]})}),n.jsx(vt,{children:n.jsx(jt,{onClick:e,color:"primary",autoFocus:!0,startIcon:n.jsx(Lt,{}),children:u.I18n.t("OK")})})]}),Nn=({onClose:e,open:t})=>n.jsxs(wt,{open:t,onClose:e,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[n.jsx(Ct,{children:n.jsxs(Tt,{id:"alert-dialog-description",children:[n.jsx("h3",{children:u.I18n.t("On condition change")}),n.jsx("div",{children:u.I18n.t("help_on_change")}),n.jsx("h3",{children:u.I18n.t("Just check")}),n.jsx("div",{children:u.I18n.t("help_just_check")})]})}),n.jsx(vt,{children:n.jsx(jt,{onClick:e,color:"primary",autoFocus:!0,children:u.I18n.t("OK")})})]}),ht=({size:e,blockValue:t,boolean:s,typeBlock:i,userRules:a,setUserRules:o,animation:c,setTourStep:l,tourStep:d,isTourOpen:j,theme:O,themeType:I,themeName:_})=>{var W;const[r,k]=M(!1),[H,w]=M(!1),[f,x]=M(!1),[p,g]=M("");s===void 0&&(s=!0);const C=bt({accept:"box",drop:()=>({blockValue:t}),hover:({acceptedBy:A,_id:L},Z)=>{k(A===i),x(!!L),g(Z.getHandlerId()||"")},canDrop:({acceptedBy:A})=>(w(A===i),A===i),collect:A=>{var L;return{isOver:A.isOver(),canDrop:((L=A.getItem())==null?void 0:L.acceptedBy)===i,offset:A.getClientOffset(),targetId:A.getHandlerId()}}}),q=C[0],{canDrop:T,isOver:S,offset:B,targetId:N}=q,h=C[1];E(()=>{g("")},[B]);const b=T&&S;let v="";b?v=r?"#00fb003d":"#fb00002e":T?v=H?"#00fb003d":"#fb00002e":B&&(v=N===p?"#fb00002e":"");let m;return i==="actions"?m=a.actions[t]:i==="conditions"?m=a.conditions[t]:m=a.triggers,n.jsx("div",{ref:h,style:{backgroundColor:v},className:`${u.Utils.clsx(D.contentBlockItem,e&&D.addClassHeight)} ${s?c?D.contentHeightOn:null:D.contentHeightOff}`,children:n.jsxs("div",{className:D.wrapperMargin,children:[m.map(A=>n.jsx(At,{typeBlock:i,...A,blockValue:t,allProperties:A,userRules:a,setUserRules:o,children:n.jsx(Ot,{...A,isTourOpen:j,setTourStep:l,tourStep:d,settings:A,blockValue:t,userRules:a,setUserRules:o,theme:O,themeType:I,themeName:_})},A._id)),n.jsx("div",{style:b&&r&&!f?{height:((W=document.getElementById("height"))==null?void 0:W.clientHeight)||200}:void 0,className:`${D.emptyBlockStyle} ${b&&r&&!f?D.emptyBlock:D.emptyBlockNone}`})]})})},at=({size:e,typeBlock:t,name:s,nameAdditionally:i,additionally:a,border:o,userRules:c,setUserRules:l,iconName:d,adapter:j,socket:O,setTourStep:I,tourStep:_,isTourOpen:r,theme:k,themeType:H,themeName:w})=>{const[f,x,p]=dt(t==="actions"?!1:[],`additionallyClickItems_${t}`),[g,C]=M(!1),[q,T]=M(!1);E(()=>{if(t==="conditions"&&(f==null?void 0:f.length)!==c.conditions.length-1){const N=[];c.conditions.forEach((h,b)=>{b>0&&N.push({_id:Date.now(),open:!0})}),x([...f,...N])}t==="actions"&&!p&&c.actions.else.length&&x(!0)},[]);const[S,B]=M(!1);return n.jsxs("div",{className:`${u.Utils.clsx(D.mainBlockItemRules,e&&D.addClassOverflow)} ${o&&!e?D.border:null}`,children:[n.jsxs("span",{id:"width",className:D.nameBlockItems,children:[n.jsx(Y,{iconName:d,className:D.iconThemCard,adapter:j,socket:O}),s]}),t==="conditions"?n.jsxs("div",{style:{width:"100%"},children:[n.jsxs(Et,{variant:"standard",className:D.selectOnChange,value:c.justCheck||!1,onChange:N=>{const h=K("conditions",c);h.justCheck=N.target.value==="true",l(h)},children:[n.jsx(mt,{value:"false",children:u.I18n.t("on condition change")}),n.jsx(mt,{value:"true",children:u.I18n.t("just check")})]}),n.jsx(Pt,{size:"small",title:u.I18n.t("Explanation"),className:D.selectOnChangeHelp,onClick:()=>C(!0),children:n.jsx(qt,{className:D.selectOnChangeHelpIcon})})]}):null,n.jsx(ht,{setTourStep:I,tourStep:_,isTourOpen:r,blockValue:t==="actions"?"then":t==="conditions"?0:t,typeBlock:t,setUserRules:l,userRules:c,theme:k,themeName:w,themeType:H,size:e}),a&&[...Array(t==="actions"?1:c.conditions.length-1)].map((N,h)=>{const b=(v=h)=>t==="actions"?!!f:!!f.find((m,W)=>W===v&&m.open);return n.jsxs(xt,{children:[n.jsxs("div",{onClick:()=>{if(t==="actions")return x(!f),null;let v=JSON.parse(JSON.stringify(f));if(c.conditions[h+1].length)return v[h].open=!v[h].open,x(v),null;v=v.filter((m,W)=>W!==h),x(v),B(h),setTimeout(()=>{B(!1),l({...c,conditions:[...c.conditions.filter((m,W)=>W!==h+1)]})},250)},className:D.blockCardAdd,children:[b()?"-":"+",n.jsx("div",{className:D.cardAdd,children:i})]},h),n.jsx(ht,{blockValue:t==="actions"?"else":t==="conditions"?h+1:t,typeBlock:t,setUserRules:l,userRules:c,boolean:b(),animation:S===h,size:e,theme:k,themeName:w,themeType:H})]},`${h}_block_${t}`)}),a&&t==="conditions"&&n.jsxs("div",{onClick:()=>{x([...f,{_id:Date.now(),open:!0}]),l({...c,conditions:[...c.conditions,[]]}),B(c.conditions.length-1),setTimeout(()=>B(!1),1e3)},className:D.blockCardAdd,children:["+",n.jsx("div",{className:D.cardAdd,children:i})]}),n.jsx(Sn,{open:g,onClose:()=>C(!1)}),n.jsx(Nn,{open:q,onClose:()=>T(!1)})]})},$n="_menuRules_1qqcb_1",qn="_switchesRenderWrapper_1qqcb_13",Bn="_menuOff_1qqcb_22",Mn="_menuTitle_1qqcb_28",Hn="_marginAuto_1qqcb_42",Wn="_inputWidth_1qqcb_47",Tn="_menuWrapper_1qqcb_52",En="_hamburgerWrapper_1qqcb_57",Pn="_hamburgerOff_1qqcb_74",Un="_nothingFound_1qqcb_82",Fn="_resetSearch_1qqcb_89",Jn="_controlPanel_1qqcb_101",Ln="_controlPanelAppBar_1qqcb_112",zn="_addClassMenu_1qqcb_126",Gn="_addClassBackground_1qqcb_132",Kn="_addClassPosition_1qqcb_136",$={menuRules:$n,switchesRenderWrapper:qn,menuOff:Bn,menuTitle:Mn,marginAuto:Hn,inputWidth:Wn,menuWrapper:Tn,hamburgerWrapper:En,hamburgerOff:Pn,nothingFound:Un,resetSearch:Fn,controlPanel:Jn,controlPanelAppBar:Ln,addClassMenu:zn,addClassBackground:Gn,addClassPosition:Kn},Qn=e=>{const{allProperties:t,allProperties:{acceptedBy:s,id:i},setUserRules:a,userRules:o,setTourStep:c,tourStep:l,isTourOpen:d,onTouchMove:j,isActive:O}=e;return n.jsx(At,{allProperties:t,id:t.id,isActive:O,setUserRules:a,userRules:o,children:n.jsx(It,{onDoubleClick:()=>{d&&l===J.addScheduleByDoubleClick&&i==="TriggerScheduleBlock"&&c(J.openTagsMenu),d&&l===J.addActionPrintText&&i==="ActionPrintText"&&c(J.showJavascript);const I=Date.now();let _;switch(s){case"actions":_="then";break;case"conditions":_=o[s].length-1;break}const r=K(s,o,_),k={id:i,_id:I,acceptedBy:s};_!==void 0?s==="actions"?r.actions[_].push({...k}):s==="conditions"&&r.conditions[_].push({...k}):r.triggers.push({...k}),a(r)},...e,...t,onTouchMove:j})})},Yn="_hamburgerMenu_hqnsm_8",Zn="_animate_hqnsm_21",_t={hamburgerMenu:Yn,animate:Zn};function Xn({bool:e}){return n.jsx("div",{className:`${_t.hamburgerMenu} ${e?_t.animate:""}`})}const Vn=({addClass:e,setAllBlocks:t,allBlocks:s,userRules:i,onChangeBlocks:a,setTourStep:o,tourStep:c,isTourOpen:l})=>{const{blocks:d,socket:j}=nt(et),[O,I]=dt(!1,"hamburgerOnOff"),[_,r]=dt({text:"",type:"triggers",index:0},"filterControlPanel"),k=(f=_.text,x=_.type)=>{if(!d)return;let p=[...d];p=p.filter(g=>{if(!f)return!0;const{name:C}=g.getStaticData();return C&&u.I18n.t(C).toLowerCase().includes(f.toLowerCase())}),p=p.filter(g=>x===g.getStaticData().acceptedBy),t(p)},H=(f,x)=>{l&&x===0&&c===J.selectTriggers&&o(J.addScheduleByDoubleClick),l&&x===2&&c===J.selectActions&&o(J.addActionPrintText),r({..._,index:x,type:["triggers","conditions","actions"][x]}),k(_.text,["triggers","conditions","actions"][x])},w=f=>({id:`scrollable-force-tab-${f}`,"aria-controls":`scrollable-force-tabpanel-${f}`});return E(()=>{k()},[d]),n.jsx(Ut,{mouseEvent:!1,touchEvent:"onTouchStart",onClickAway:()=>I(!0),children:n.jsxs("div",{className:u.Utils.clsx($.menuWrapper,e[1035]&&$.addClassMenu),children:[n.jsx("div",{className:`${$.hamburgerWrapper} ${O?$.hamburgerOff:null}`,onClick:()=>I(!O),children:n.jsx(Xn,{bool:!O})}),n.jsxs("div",{className:`${u.Utils.clsx($.menuRules,e[1035]&&$.addClassBackground,e[835]&&$.addClassPosition)} ${O?$.menuOff:null}`,children:[n.jsx("div",{className:$.controlPanel,children:n.jsx(Ft,{className:$.controlPanelAppBar,position:"static",children:n.jsxs(Jt,{value:_.index,onChange:H,children:[n.jsx(st,{className:"blocks-triggers",title:u.I18n.t("Triggers"),icon:n.jsx(Y,{iconName:"FlashOn"}),...w(0)}),n.jsx(st,{title:u.I18n.t("Conditions"),className:"blocks-conditions",icon:n.jsx(Y,{iconName:"Help"}),...w(1)}),n.jsx(st,{title:u.I18n.t("Actions"),className:"blocks-actions",icon:n.jsx(Y,{iconName:"PlayForWork"}),...w(2)})]})})}),n.jsx("div",{className:$.switchesRenderWrapper,children:n.jsxs("span",{children:[s.map(f=>{const{name:x,id:p,icon:g,adapter:C}=f.getStaticData();return n.jsx(xt,{children:n.jsx(Qn,{adapter:C,allProperties:f.getStaticData(),icon:g,id:p,isActive:!1,isTourOpen:l,name:x,onTouchMove:()=>I(!0),setTourStep:o,setUserRules:a,socket:j,tourStep:c,userRules:i})},p)}),!s.length&&n.jsxs("div",{className:$.nothingFound,children:[u.I18n.t("Nothing found"),"...",n.jsx("div",{className:$.resetSearch,onClick:()=>{r({..._,text:""}),k("")},children:u.I18n.t("reset search")})]})]})}),n.jsx("div",{className:u.Utils.clsx($.menuTitle,$.marginAuto)}),n.jsx(Bt,{className:$.inputWidth,fullWidth:!0,customValue:!0,value:_.text,size:"small",autoComplete:"off",label:u.I18n.t("search"),variant:"outlined",onChange:f=>{r({..._,text:f}),k(f)}})]})]})})};let pt=[];const me=({code:e,onChange:t,themeName:s,themeType:i,theme:a,setTourStep:o,tourStep:c,isTourOpen:l,command:d,scriptId:j,changed:O,running:I})=>{var v;const{blocks:_,socket:r,setOnUpdate:k,setOnDebugMessage:H,setEnableSimulation:w}=nt(et),[f,x]=M([]),[p,g]=M(ft(e)),[C,q]=M(""),[T,S]=M(!1);E(()=>{let m,W;const A=(P,y)=>{P===`${m}.alive`&&W!==(y==null?void 0:y.val)&&(W=!!(y!=null&&y.val),W&&m&&(r==null||r.sendTo(m.replace(/^system\.adapter\./,""),"rulesOn",j)))},L=(P,y)=>{var U,Q;r&&m!==((U=y==null?void 0:y.common)==null?void 0:U.engine)&&(m&&(r.unsubscribeState(`${m}.alive`,A),W&&r.sendTo(m.replace(/^system\.adapter\./,""),"rulesOn",j)),m=(Q=y==null?void 0:y.common)==null?void 0:Q.engine,m&&m&&r.subscribeState(`${m}.alive`,A))},Z=(P,y)=>{if(y)try{const U=JSON.parse(y.val),Q=Date.now();if(U.ruleId===j&&Q-U.ts<1e3){const F=[...pt,{blockId:U.blockId,data:U.data,ts:U.ts}];F.length>200&&F.splice(0,F.length-200);for(let X=F.length-1;X>=0;X--)if(F[X].ts{var y;m=(y=P==null?void 0:P.common)==null?void 0:y.engine,r.subscribeObject(j,L),m&&(r.subscribeState(`${m}.alive`,A),r.subscribeState(`${m.replace(/^system\.adapter\./,"")}.debug.rules`,Z))}),function(){r==null||r.unsubscribeObject(j,L),m&&(r==null||r.unsubscribeState(`${m}.alive`,A),W&&(r==null||r.sendTo(m.replace(/^system\.adapter\./,""),"rulesOff",j)),r==null||r.unsubscribeState(`${m.replace(/^system\.adapter\./,"")}.debug.rules`,Z))}},[]),E(()=>{w(!O&&I)},[O,I,w]),E(()=>{d&&(q(d),T||S(!0))},[d]),E(()=>{const m=ft(e);JSON.stringify(m)!==JSON.stringify(p)&&(g(m),k(!0))},[e]),E(()=>{document.getElementsByTagName("HTML")[0].className=s||"blue"},[s]);const B=lt(m=>{g(m),_&&t(Mt(m,_))},[_,t]),N=ut(null),[h,b]=M({835:!1,1035:!1});return E(()=>{N.current&&(N.current.clientWidth<=1035&&b({835:!1,1035:!0}),N.current.clientWidth<=835&&b({1035:!0,835:!0}),N.current.clientWidth>1035&&b({835:!1,1035:!1}))},[((v=N.current)==null?void 0:v.clientWidth)||0]),!_||!r?null:n.jsxs("div",{className:ot.wrapperRules,ref:N,children:[n.jsx(ln,{allBlocks:f,socket:r}),T?C==="export"?n.jsx(Ht,{scriptId:j,themeType:i,onClose:()=>S(!1),text:JSON.stringify(p,null,2)}):n.jsx(Wt,{themeType:i,onClose:m=>{S(!1),m&&B(JSON.parse(m))}}):null,n.jsxs("div",{className:u.Utils.clsx(ot.rootWrapper,h[835]&&ot.addClass),children:[n.jsx(Vn,{setAllBlocks:x,allBlocks:f,userRules:p,onChangeBlocks:B,setTourStep:o,tourStep:c,addClass:h,isTourOpen:l}),n.jsx(at,{socket:r,setUserRules:B,userRules:p,isTourOpen:l,setTourStep:o,tourStep:c,name:`${u.I18n.t("when")}...`,typeBlock:"triggers",iconName:"FlashOn",size:h[835],themeType:i,themeName:s,theme:a}),n.jsx(at,{socket:r,setUserRules:B,isTourOpen:l,setTourStep:o,tourStep:c,userRules:p,name:`...${u.I18n.t("and")}...`,typeBlock:"conditions",iconName:"Help",nameAdditionally:u.I18n.t("or"),additionally:!0,border:!0,size:h[835],themeType:i,themeName:s,theme:a}),n.jsx(at,{socket:r,setUserRules:B,isTourOpen:l,setTourStep:o,tourStep:c,userRules:p,name:`...${u.I18n.t("then")}`,typeBlock:"actions",iconName:"PlayForWork",nameAdditionally:u.I18n.t("else"),additionally:!0,size:h[835],themeType:i,themeName:s,theme:a})]})]},"rulesEditor")};export{me as default}; +import{j as n}from"./createSvgIcon-DYs_tNrE.js";import{c as E,h as yt,j as M,m as nt,k as lt,l as Dt,b as ut,o as xt}from"./iobroker_javascript__loadShare__react__loadShare__.mjs-CTZOFJS2.js";import{_ as u}from"./iobroker_javascript__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.mjs-DkBjPSMw.js";import{u as kt,a as St,M as Y,C as et,G as Nt,b as $t,c as bt,I as qt,S as J,d as Bt,e as ft,j as Mt,D as Ht,f as Wt}from"./index-Blu2oA9H.js";import{_ as wt,b as Ct,h as vt,i as jt,p as Tt,f as Et,g as mt,o as Pt,Y as Ut,Z as Ft,C as Jt,D as st}from"./iobroker_javascript__loadShare___mf_0_mui_mf_1_material__loadShare__.mjs-CV1_X-Lf.js";import{I as Lt}from"./index-wHNMOf-c.js";import"./iobroker_javascript__loadShare__react__loadShare__.mjs_commonjs-proxy-CE9lvhW8.js";import"./iobroker_javascript__loadShare__prop_mf_2_types__loadShare__.mjs-BCtSFofY.js";import"./virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-Dus28I2g.js";import"./preload-helper-BDBacUwf.js";import"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-RQRRZMX5.js";import"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs-DeVAS-oa.js";import"./inheritsLoose-CIXm_zPk.js";function zt(e){const s=kt().getMonitor(),[i,a]=St(s,e);return E(()=>s.subscribeToOffsetChange(a)),E(()=>s.subscribeToStateChange(a)),i}let V;function Gt(){return V||(V=new Image,V.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),V}const Kt="_wrapperRules_nnott_1",Qt="_rootWrapper_nnott_9",Yt="_addClass_nnott_14",ot={wrapperRules:Kt,rootWrapper:Qt,addClass:Yt},Zt="_switchesItem_10ls3_1",Xt="_switchesItemActive_10ls3_28",Vt="_iconTheme_10ls3_36",it={switchesItem:Zt,switchesItemActive:Xt,iconTheme:Vt},It=({name:e,id:t,active:s,icon:i,adapter:a,socket:o,onDoubleClick:c,title:l,onTouchMove:d,style:j})=>n.jsxs("div",{onDoubleClick:c,onTouchMove:d,title:l?u.I18n.t(l):void 0,className:u.Utils.clsx(it.switchesItem,s&&it.switchesItemActive,`block-${t}`),children:[n.jsx(Y,{iconName:i,className:it.iconTheme,adapter:a,socket:o,style:j}),n.jsx("span",{children:e?u.I18n.t(e):""})]},t),Rt="_cardStyle_8rq8v_1",tn="_cardStyleActive_8rq8v_17",nn="_controlMenu_8rq8v_22",en="_closeBtn_8rq8v_31",sn="_isDelete_8rq8v_73",on="_drag_mobile_8rq8v_90",G={cardStyle:Rt,cardStyleActive:tn,controlMenu:nn,closeBtn:en,isDelete:sn,drag_mobile:on};function K(e,t,s){let i;switch(e){case"actions":if(s==="else")return i={...t,actions:{...t[e],else:[...t[e].else]}},i;if(s==="then")return i={...t,actions:{...t[e],then:[...t[e].then]}},i;throw console.error(`Unknown additionalParameter: ${s}`),new Error(`Unknown additionalParameter: ${s}`);case"triggers":return i={...t,triggers:[...t.triggers]},i;case"conditions":return i={...t,conditions:[...t.conditions]},i;default:throw new Error(`Unknown name: ${e}`)}}function z(e,t,s,i){var a;switch(e){case"actions":return t.actions[s]=t.actions[s].filter(o=>o._id!==i),t;case"conditions":return t.conditions[s]=(a=t.conditions[s])==null?void 0:a.filter(o=>o._id!==i),t;default:return t.triggers=t.triggers.filter(o=>o._id!==i),t}}function cn(e,t,s){const{_id:i,acceptedBy:a}=e;let o;if(!a||!t[a])return console.warn(`Cannot find ${a}`),t;switch(a){case"actions":if(o=t.actions[s].find(c=>c._id===i),!o)console.warn(`Cannot find ${i}`);else{const c=t.actions[s].indexOf(o);t.actions[s][c]=e}return t;case"conditions":if(o=t.conditions[s].find(c=>c._id===i),!o)console.warn(`Cannot find ${i}`);else{const c=t.conditions[s].indexOf(o);t.conditions[s][c]=e}return t;default:if(o=t.triggers.find(c=>c._id===i),!o)console.warn(`Cannot find ${i}`);else{const c=t.triggers.indexOf(o);t.triggers[c]=e}return t}}const Ot=yt(e=>{var N;const{setUserRules:t,userRules:s,_id:i,id:a,blockValue:o,active:c,acceptedBy:l,isTourOpen:d,setTourStep:j,tourStep:O}=e,[I,_]=M(null),{blocks:r,socket:k,onUpdate:H,setOnUpdate:w,onDebugMessage:f,enableSimulation:x}=nt(et),p=lt(h=>r==null?void 0:r.find(b=>b.getStaticData().id===h),[r]),g=lt(h=>{const b=cn(h,s,o);b&&t(b)},[s]),C=h=>{h.currentTarget!==I&&_(h.currentTarget)},q=()=>_(null),T=Dt(()=>{const h=p(a)||Nt;return n.jsx(h,{...e,notFound:!p(a),isTourOpen:d,setTourStep:j,tourStep:O,onUpdate:H,setOnUpdate:w,enableSimulation:x,onDebugMessage:f,onChange:g,className:void 0,socket:k})},[s,H,f,x]),[S,B]=M(!1);return n.jsxs("div",{onMouseMove:C,onMouseEnter:C,onMouseLeave:q,onMouseDown:h=>{if(h.ctrlKey){let b;const v=K(l,s,o);l==="conditions"?(b=v.conditions[o].find(m=>m._id===i),b&&v.conditions[o].splice(v.conditions[o].indexOf(b),0,{...b,_id:Date.now()})):l==="actions"?(b=v.actions[o].find(m=>m._id===i),b&&v.actions[o].splice(v.actions[o].indexOf(b),0,{...b,_id:Date.now()})):(b=v.triggers.find(m=>m._id===i),b&&v.triggers.splice(v[l].indexOf(b),0,{...b,_id:Date.now()})),t(v)}},id:"height",style:c?{width:(((N=document.getElementById("width"))==null?void 0:N.clientWidth)||0)-70}:void 0,className:`${G.cardStyle} ${c?G.cardStyleActive:null} ${S?G.isDelete:null}`,children:[n.jsx("div",{className:G.drag_mobile}),T,t&&n.jsx("div",{className:G.controlMenu,style:I?{opacity:1}:{opacity:0},children:n.jsx("div",{onClick:()=>{let h=K(l,s,o);h=z(l,h,o,i),B(!0),setTimeout(()=>{l==="triggers"&&w(!0),t(h)},300)},className:G.closeBtn})})]})}),rn={position:"fixed",pointerEvents:"none",zIndex:100,left:0,top:0,width:"100%",height:"100%"},an=(e,t,s)=>{if(!e||!t)return{display:"none"};let{x:i,y:a}=t;const o=`translate(${i}px, ${a}px)`;return{transform:o,WebkitTransform:o}},ln=e=>{const{itemType:t,isDragging:s,item:i,initialOffset:a,currentOffset:o,targetIds:c}=zt(d=>({item:d.getItem(),itemType:d.getItemType(),initialOffset:d.getInitialSourceClientOffset(),currentOffset:d.getSourceClientOffset(),isDragging:d.isDragging(),targetIds:d.getTargetIds()})),l=()=>t==="box"?c.length?n.jsx(Ot,{active:!0,...i,allBlocks:e.allBlocks}):n.jsx(It,{active:!0,...i,socket:e.socket}):null;return s?n.jsx("div",{style:rn,children:n.jsx("div",{style:an(a,o),children:l()})}):null},dn="_border_wrpm3_1",fn="_emptyBlockStyle_wrpm3_6",mn="_emptyBlock_wrpm3_6",gn="_selectOnChange_wrpm3_22",hn="_selectOnChangeHelp_wrpm3_28",_n="_selectOnChangeHelpIcon_wrpm3_34",pn="_emptyBlockNone_wrpm3_49",un="_mainBlockItemRules_wrpm3_55",xn="_nameBlockItems_wrpm3_63",bn="_contentBlockItem_wrpm3_73",wn="_wrapperMargin_wrpm3_81",Cn="_contentHeightOn_wrpm3_87",vn="_contentHeightOff_wrpm3_99",jn="_cardAdd_wrpm3_105",In="_blockCardAdd_wrpm3_125",On="_addClassOverflow_wrpm3_136",An="_addClassHeight_wrpm3_140",D={border:dn,emptyBlockStyle:fn,emptyBlock:mn,selectOnChange:gn,selectOnChangeHelp:hn,selectOnChangeHelpIcon:_n,emptyBlockNone:pn,mainBlockItemRules:un,nameBlockItems:xn,contentBlockItem:bn,wrapperMargin:wn,contentHeightOn:Cn,contentHeightOff:vn,cardAdd:jn,blockCardAdd:In,addClassOverflow:On,addClassHeight:An};function dt(e,t){const[s,i]=M(window.localStorage.getItem(t)?JSON.parse(window.localStorage.getItem(t)||""):e);return[s,o=>{window.localStorage.setItem(t,JSON.stringify(o)),i(o)},!!window.localStorage.getItem(t)]}function yn(e,t){let s=0,i=null,a;return function(...o){const c=Date.now();a=o,c-s>=t?(s=c,e.apply(this,o)):i||(i=setTimeout(()=>{s=Date.now(),i=null,e.apply(this,a)},t-(c-s)))}}function tt(e){if(Array.isArray(e))return e.map(t=>tt(t));if(typeof e=="function")return e.bind(null);if(e&&typeof e=="object"){const t={};return Object.keys(e).forEach(s=>{t[s]=tt(e[s])}),t}return e}const ct=yn((e,t)=>e(t),0);function R(e,t){const s=t.find(i=>i._id===e);return{card:s,index:s?t.indexOf(s):-1}}function rt(e,t,s,i,a,o,c,l,d){const{card:j,index:O}=R(e,s);if(!(Ot&&l>d)&&j&&O!==t){const I=tt(s);I.splice(O,1),I.splice(t,0,j);const _=tt(a);switch(o){case"actions":_.actions[c]=I,ct(i,_);return;case"conditions":_.conditions[c]=I,ct(i,_);return;default:_.triggers=I,ct(i,_);return}}}const Dn="_drag_7xfhc_1",kn="_root_7xfhc_11",gt={drag:Dn,root:kn},At=({typeBlock:e,allProperties:t,id:s,isActive:i,setUserRules:a,userRules:o,children:c,_id:l,blockValue:d})=>{const{setOnUpdate:j}=nt(et),[{opacity:O},I,_]=$t({type:"box",item:()=>({...t,id:s,isActive:i,_id:l}),end:(w,f)=>{const{acceptedBy:x}=w,p=f.getDropResult();let g;if(!p)return typeof l=="number"&&!f.getTargetIds().length&&(g=K(x,o,d),g=z(x,g,d,l),a(g)),null;if(p.blockValue!==d){const C=typeof l=="number"?l:Date.now();g=K(x,o,p.blockValue);const q={id:w.id,acceptedBy:w.acceptedBy};switch(x){case"actions":return d&&(g=z("actions",g,d,C)),g=z("actions",g,p.blockValue,C),g.actions[p.blockValue].push({...q,_id:C}),a(g);case"conditions":return typeof d=="number"&&(g=z("conditions",g,d,C)),g=z("conditions",g,p.blockValue,C),g.conditions[p.blockValue].push({...q,_id:C}),a(g);default:return j(!0),g=z("triggers",g,p.blockValue,C),g.triggers.push({...q,_id:C}),a(g)}}},collect:w=>({opacity:w.isDragging()?.4:1,isDragging:w.isDragging()})}),r=ut(null),[,k]=bt({accept:"box",canDrop:()=>!1,hover({_id:w,acceptedBy:f},x){var T;if(!r.current||e!==f)return;const p=(T=r.current)==null?void 0:T.getBoundingClientRect(),g=(p.bottom-p.top)/2,C=x.getClientOffset(),q=((C==null?void 0:C.y)||0)-p.top;if(l&&w!==l)switch(f){case"actions":if(d==="then"||d==="else"){const{index:S}=R(l,o.actions[d]);S!==w&&rt(w,S,o[f][d],a,o,f,d,q,g)}return;case"conditions":if(typeof d=="number"){const{index:S}=R(l,o[f][d]);S!==w&&rt(w,S,o[f][d],a,o,f,d,q,g)}return;default:{const{index:S}=R(l,o[f]);S!==w&&rt(w,S,o[f],a,o,f,void 0,q,g);return}}}});E(()=>{_(Gt(),{captureDraggingState:!0})},[]),I(k(r));const H=window.innerWidth<600;return n.jsxs("div",{ref:H&&l?null:r,className:gt.root,style:{opacity:O},children:[n.jsx("div",{className:l?gt.drag:null,ref:l&&H?r:null}),c]})},Sn=({onClose:e,open:t})=>n.jsxs(wt,{open:t,onClose:e,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[n.jsx(Ct,{children:n.jsxs("div",{style:{fontSize:"1rem",fontFamily:'"Roboto", "Helvetica", "Arial", sans-serif',fontWeight:400,lineHeight:1.5,letterSpacing:"0.00938em"},children:[n.jsx("h3",{children:u.I18n.t("On condition change")}),n.jsx("div",{children:u.I18n.t("help_on_change")}),n.jsx("h3",{children:u.I18n.t("Just check")}),n.jsx("div",{children:u.I18n.t("help_just_check")})]})}),n.jsx(vt,{children:n.jsx(jt,{onClick:e,color:"primary",autoFocus:!0,startIcon:n.jsx(Lt,{}),children:u.I18n.t("OK")})})]}),Nn=({onClose:e,open:t})=>n.jsxs(wt,{open:t,onClose:e,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[n.jsx(Ct,{children:n.jsxs(Tt,{id:"alert-dialog-description",children:[n.jsx("h3",{children:u.I18n.t("On condition change")}),n.jsx("div",{children:u.I18n.t("help_on_change")}),n.jsx("h3",{children:u.I18n.t("Just check")}),n.jsx("div",{children:u.I18n.t("help_just_check")})]})}),n.jsx(vt,{children:n.jsx(jt,{onClick:e,color:"primary",autoFocus:!0,children:u.I18n.t("OK")})})]}),ht=({size:e,blockValue:t,boolean:s,typeBlock:i,userRules:a,setUserRules:o,animation:c,setTourStep:l,tourStep:d,isTourOpen:j,theme:O,themeType:I,themeName:_})=>{var W;const[r,k]=M(!1),[H,w]=M(!1),[f,x]=M(!1),[p,g]=M("");s===void 0&&(s=!0);const C=bt({accept:"box",drop:()=>({blockValue:t}),hover:({acceptedBy:A,_id:L},Z)=>{k(A===i),x(!!L),g(Z.getHandlerId()||"")},canDrop:({acceptedBy:A})=>(w(A===i),A===i),collect:A=>{var L;return{isOver:A.isOver(),canDrop:((L=A.getItem())==null?void 0:L.acceptedBy)===i,offset:A.getClientOffset(),targetId:A.getHandlerId()}}}),q=C[0],{canDrop:T,isOver:S,offset:B,targetId:N}=q,h=C[1];E(()=>{g("")},[B]);const b=T&&S;let v="";b?v=r?"#00fb003d":"#fb00002e":T?v=H?"#00fb003d":"#fb00002e":B&&(v=N===p?"#fb00002e":"");let m;return i==="actions"?m=a.actions[t]:i==="conditions"?m=a.conditions[t]:m=a.triggers,n.jsx("div",{ref:h,style:{backgroundColor:v},className:`${u.Utils.clsx(D.contentBlockItem,e&&D.addClassHeight)} ${s?c?D.contentHeightOn:null:D.contentHeightOff}`,children:n.jsxs("div",{className:D.wrapperMargin,children:[m.map(A=>n.jsx(At,{typeBlock:i,...A,blockValue:t,allProperties:A,userRules:a,setUserRules:o,children:n.jsx(Ot,{...A,isTourOpen:j,setTourStep:l,tourStep:d,settings:A,blockValue:t,userRules:a,setUserRules:o,theme:O,themeType:I,themeName:_})},A._id)),n.jsx("div",{style:b&&r&&!f?{height:((W=document.getElementById("height"))==null?void 0:W.clientHeight)||200}:void 0,className:`${D.emptyBlockStyle} ${b&&r&&!f?D.emptyBlock:D.emptyBlockNone}`})]})})},at=({size:e,typeBlock:t,name:s,nameAdditionally:i,additionally:a,border:o,userRules:c,setUserRules:l,iconName:d,adapter:j,socket:O,setTourStep:I,tourStep:_,isTourOpen:r,theme:k,themeType:H,themeName:w})=>{const[f,x,p]=dt(t==="actions"?!1:[],`additionallyClickItems_${t}`),[g,C]=M(!1),[q,T]=M(!1);E(()=>{if(t==="conditions"&&(f==null?void 0:f.length)!==c.conditions.length-1){const N=[];c.conditions.forEach((h,b)=>{b>0&&N.push({_id:Date.now(),open:!0})}),x([...f,...N])}t==="actions"&&!p&&c.actions.else.length&&x(!0)},[]);const[S,B]=M(!1);return n.jsxs("div",{className:`${u.Utils.clsx(D.mainBlockItemRules,e&&D.addClassOverflow)} ${o&&!e?D.border:null}`,children:[n.jsxs("span",{id:"width",className:D.nameBlockItems,children:[n.jsx(Y,{iconName:d,className:D.iconThemCard,adapter:j,socket:O}),s]}),t==="conditions"?n.jsxs("div",{style:{width:"100%"},children:[n.jsxs(Et,{variant:"standard",className:D.selectOnChange,value:c.justCheck||!1,onChange:N=>{const h=K("conditions",c);h.justCheck=N.target.value==="true",l(h)},children:[n.jsx(mt,{value:"false",children:u.I18n.t("on condition change")}),n.jsx(mt,{value:"true",children:u.I18n.t("just check")})]}),n.jsx(Pt,{size:"small",title:u.I18n.t("Explanation"),className:D.selectOnChangeHelp,onClick:()=>C(!0),children:n.jsx(qt,{className:D.selectOnChangeHelpIcon})})]}):null,n.jsx(ht,{setTourStep:I,tourStep:_,isTourOpen:r,blockValue:t==="actions"?"then":t==="conditions"?0:t,typeBlock:t,setUserRules:l,userRules:c,theme:k,themeName:w,themeType:H,size:e}),a&&[...Array(t==="actions"?1:c.conditions.length-1)].map((N,h)=>{const b=(v=h)=>t==="actions"?!!f:!!f.find((m,W)=>W===v&&m.open);return n.jsxs(xt,{children:[n.jsxs("div",{onClick:()=>{if(t==="actions")return x(!f),null;let v=JSON.parse(JSON.stringify(f));if(c.conditions[h+1].length)return v[h].open=!v[h].open,x(v),null;v=v.filter((m,W)=>W!==h),x(v),B(h),setTimeout(()=>{B(!1),l({...c,conditions:[...c.conditions.filter((m,W)=>W!==h+1)]})},250)},className:D.blockCardAdd,children:[b()?"-":"+",n.jsx("div",{className:D.cardAdd,children:i})]},h),n.jsx(ht,{blockValue:t==="actions"?"else":t==="conditions"?h+1:t,typeBlock:t,setUserRules:l,userRules:c,boolean:b(),animation:S===h,size:e,theme:k,themeName:w,themeType:H})]},`${h}_block_${t}`)}),a&&t==="conditions"&&n.jsxs("div",{onClick:()=>{x([...f,{_id:Date.now(),open:!0}]),l({...c,conditions:[...c.conditions,[]]}),B(c.conditions.length-1),setTimeout(()=>B(!1),1e3)},className:D.blockCardAdd,children:["+",n.jsx("div",{className:D.cardAdd,children:i})]}),n.jsx(Sn,{open:g,onClose:()=>C(!1)}),n.jsx(Nn,{open:q,onClose:()=>T(!1)})]})},$n="_menuRules_1qqcb_1",qn="_switchesRenderWrapper_1qqcb_13",Bn="_menuOff_1qqcb_22",Mn="_menuTitle_1qqcb_28",Hn="_marginAuto_1qqcb_42",Wn="_inputWidth_1qqcb_47",Tn="_menuWrapper_1qqcb_52",En="_hamburgerWrapper_1qqcb_57",Pn="_hamburgerOff_1qqcb_74",Un="_nothingFound_1qqcb_82",Fn="_resetSearch_1qqcb_89",Jn="_controlPanel_1qqcb_101",Ln="_controlPanelAppBar_1qqcb_112",zn="_addClassMenu_1qqcb_126",Gn="_addClassBackground_1qqcb_132",Kn="_addClassPosition_1qqcb_136",$={menuRules:$n,switchesRenderWrapper:qn,menuOff:Bn,menuTitle:Mn,marginAuto:Hn,inputWidth:Wn,menuWrapper:Tn,hamburgerWrapper:En,hamburgerOff:Pn,nothingFound:Un,resetSearch:Fn,controlPanel:Jn,controlPanelAppBar:Ln,addClassMenu:zn,addClassBackground:Gn,addClassPosition:Kn},Qn=e=>{const{allProperties:t,allProperties:{acceptedBy:s,id:i},setUserRules:a,userRules:o,setTourStep:c,tourStep:l,isTourOpen:d,onTouchMove:j,isActive:O}=e;return n.jsx(At,{allProperties:t,id:t.id,isActive:O,setUserRules:a,userRules:o,children:n.jsx(It,{onDoubleClick:()=>{d&&l===J.addScheduleByDoubleClick&&i==="TriggerScheduleBlock"&&c(J.openTagsMenu),d&&l===J.addActionPrintText&&i==="ActionPrintText"&&c(J.showJavascript);const I=Date.now();let _;switch(s){case"actions":_="then";break;case"conditions":_=o[s].length-1;break}const r=K(s,o,_),k={id:i,_id:I,acceptedBy:s};_!==void 0?s==="actions"?r.actions[_].push({...k}):s==="conditions"&&r.conditions[_].push({...k}):r.triggers.push({...k}),a(r)},...e,...t,onTouchMove:j})})},Yn="_hamburgerMenu_hqnsm_8",Zn="_animate_hqnsm_21",_t={hamburgerMenu:Yn,animate:Zn};function Xn({bool:e}){return n.jsx("div",{className:`${_t.hamburgerMenu} ${e?_t.animate:""}`})}const Vn=({addClass:e,setAllBlocks:t,allBlocks:s,userRules:i,onChangeBlocks:a,setTourStep:o,tourStep:c,isTourOpen:l})=>{const{blocks:d,socket:j}=nt(et),[O,I]=dt(!1,"hamburgerOnOff"),[_,r]=dt({text:"",type:"triggers",index:0},"filterControlPanel"),k=(f=_.text,x=_.type)=>{if(!d)return;let p=[...d];p=p.filter(g=>{if(!f)return!0;const{name:C}=g.getStaticData();return C&&u.I18n.t(C).toLowerCase().includes(f.toLowerCase())}),p=p.filter(g=>x===g.getStaticData().acceptedBy),t(p)},H=(f,x)=>{l&&x===0&&c===J.selectTriggers&&o(J.addScheduleByDoubleClick),l&&x===2&&c===J.selectActions&&o(J.addActionPrintText),r({..._,index:x,type:["triggers","conditions","actions"][x]}),k(_.text,["triggers","conditions","actions"][x])},w=f=>({id:`scrollable-force-tab-${f}`,"aria-controls":`scrollable-force-tabpanel-${f}`});return E(()=>{k()},[d]),n.jsx(Ut,{mouseEvent:!1,touchEvent:"onTouchStart",onClickAway:()=>I(!0),children:n.jsxs("div",{className:u.Utils.clsx($.menuWrapper,e[1035]&&$.addClassMenu),children:[n.jsx("div",{className:`${$.hamburgerWrapper} ${O?$.hamburgerOff:null}`,onClick:()=>I(!O),children:n.jsx(Xn,{bool:!O})}),n.jsxs("div",{className:`${u.Utils.clsx($.menuRules,e[1035]&&$.addClassBackground,e[835]&&$.addClassPosition)} ${O?$.menuOff:null}`,children:[n.jsx("div",{className:$.controlPanel,children:n.jsx(Ft,{className:$.controlPanelAppBar,position:"static",children:n.jsxs(Jt,{value:_.index,onChange:H,children:[n.jsx(st,{className:"blocks-triggers",title:u.I18n.t("Triggers"),icon:n.jsx(Y,{iconName:"FlashOn"}),...w(0)}),n.jsx(st,{title:u.I18n.t("Conditions"),className:"blocks-conditions",icon:n.jsx(Y,{iconName:"Help"}),...w(1)}),n.jsx(st,{title:u.I18n.t("Actions"),className:"blocks-actions",icon:n.jsx(Y,{iconName:"PlayForWork"}),...w(2)})]})})}),n.jsx("div",{className:$.switchesRenderWrapper,children:n.jsxs("span",{children:[s.map(f=>{const{name:x,id:p,icon:g,adapter:C}=f.getStaticData();return n.jsx(xt,{children:n.jsx(Qn,{adapter:C,allProperties:f.getStaticData(),icon:g,id:p,isActive:!1,isTourOpen:l,name:x,onTouchMove:()=>I(!0),setTourStep:o,setUserRules:a,socket:j,tourStep:c,userRules:i})},p)}),!s.length&&n.jsxs("div",{className:$.nothingFound,children:[u.I18n.t("Nothing found"),"...",n.jsx("div",{className:$.resetSearch,onClick:()=>{r({..._,text:""}),k("")},children:u.I18n.t("reset search")})]})]})}),n.jsx("div",{className:u.Utils.clsx($.menuTitle,$.marginAuto)}),n.jsx(Bt,{className:$.inputWidth,fullWidth:!0,customValue:!0,value:_.text,size:"small",autoComplete:"off",label:u.I18n.t("search"),variant:"outlined",onChange:f=>{r({..._,text:f}),k(f)}})]})]})})};let pt=[];const me=({code:e,onChange:t,themeName:s,themeType:i,theme:a,setTourStep:o,tourStep:c,isTourOpen:l,command:d,scriptId:j,changed:O,running:I})=>{var v;const{blocks:_,socket:r,setOnUpdate:k,setOnDebugMessage:H,setEnableSimulation:w}=nt(et),[f,x]=M([]),[p,g]=M(ft(e)),[C,q]=M(""),[T,S]=M(!1);E(()=>{let m,W;const A=(P,y)=>{P===`${m}.alive`&&W!==(y==null?void 0:y.val)&&(W=!!(y!=null&&y.val),W&&m&&(r==null||r.sendTo(m.replace(/^system\.adapter\./,""),"rulesOn",j)))},L=(P,y)=>{var U,Q;r&&m!==((U=y==null?void 0:y.common)==null?void 0:U.engine)&&(m&&(r.unsubscribeState(`${m}.alive`,A),W&&r.sendTo(m.replace(/^system\.adapter\./,""),"rulesOn",j)),m=(Q=y==null?void 0:y.common)==null?void 0:Q.engine,m&&m&&r.subscribeState(`${m}.alive`,A))},Z=(P,y)=>{if(y)try{const U=JSON.parse(y.val),Q=Date.now();if(U.ruleId===j&&Q-U.ts<1e3){const F=[...pt,{blockId:U.blockId,data:U.data,ts:U.ts}];F.length>200&&F.splice(0,F.length-200);for(let X=F.length-1;X>=0;X--)if(F[X].ts{var y;m=(y=P==null?void 0:P.common)==null?void 0:y.engine,r.subscribeObject(j,L),m&&(r.subscribeState(`${m}.alive`,A),r.subscribeState(`${m.replace(/^system\.adapter\./,"")}.debug.rules`,Z))}),function(){r==null||r.unsubscribeObject(j,L),m&&(r==null||r.unsubscribeState(`${m}.alive`,A),W&&(r==null||r.sendTo(m.replace(/^system\.adapter\./,""),"rulesOff",j)),r==null||r.unsubscribeState(`${m.replace(/^system\.adapter\./,"")}.debug.rules`,Z))}},[]),E(()=>{w(!O&&I)},[O,I,w]),E(()=>{d&&(q(d),T||S(!0))},[d]),E(()=>{const m=ft(e);JSON.stringify(m)!==JSON.stringify(p)&&(g(m),k(!0))},[e]),E(()=>{document.getElementsByTagName("HTML")[0].className=s||"blue"},[s]);const B=lt(m=>{g(m),_&&t(Mt(m,_))},[_,t]),N=ut(null),[h,b]=M({835:!1,1035:!1});return E(()=>{N.current&&(N.current.clientWidth<=1035&&b({835:!1,1035:!0}),N.current.clientWidth<=835&&b({1035:!0,835:!0}),N.current.clientWidth>1035&&b({835:!1,1035:!1}))},[((v=N.current)==null?void 0:v.clientWidth)||0]),!_||!r?null:n.jsxs("div",{className:ot.wrapperRules,ref:N,children:[n.jsx(ln,{allBlocks:f,socket:r}),T?C==="export"?n.jsx(Ht,{scriptId:j,themeType:i,onClose:()=>S(!1),text:JSON.stringify(p,null,2)}):n.jsx(Wt,{themeType:i,onClose:m=>{S(!1),m&&B(JSON.parse(m))}}):null,n.jsxs("div",{className:u.Utils.clsx(ot.rootWrapper,h[835]&&ot.addClass),children:[n.jsx(Vn,{setAllBlocks:x,allBlocks:f,userRules:p,onChangeBlocks:B,setTourStep:o,tourStep:c,addClass:h,isTourOpen:l}),n.jsx(at,{socket:r,setUserRules:B,userRules:p,isTourOpen:l,setTourStep:o,tourStep:c,name:`${u.I18n.t("when")}...`,typeBlock:"triggers",iconName:"FlashOn",size:h[835],themeType:i,themeName:s,theme:a}),n.jsx(at,{socket:r,setUserRules:B,isTourOpen:l,setTourStep:o,tourStep:c,userRules:p,name:`...${u.I18n.t("and")}...`,typeBlock:"conditions",iconName:"Help",nameAdditionally:u.I18n.t("or"),additionally:!0,border:!0,size:h[835],themeType:i,themeName:s,theme:a}),n.jsx(at,{socket:r,setUserRules:B,isTourOpen:l,setTourStep:o,tourStep:c,userRules:p,name:`...${u.I18n.t("then")}`,typeBlock:"actions",iconName:"PlayForWork",nameAdditionally:u.I18n.t("else"),additionally:!0,size:h[835],themeType:i,themeName:s,theme:a})]})]},"rulesEditor")};export{me as default}; diff --git a/admin/assets/localSharedImportMap-W-vnZT9_.js b/admin/assets/localSharedImportMap-Cs4ibnCv.js similarity index 91% rename from admin/assets/localSharedImportMap-W-vnZT9_.js rename to admin/assets/localSharedImportMap-Cs4ibnCv.js index 536727d34..2354b709e 100644 --- a/admin/assets/localSharedImportMap-W-vnZT9_.js +++ b/admin/assets/localSharedImportMap-Cs4ibnCv.js @@ -1 +1 @@ -import"./virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-DiXVqr03.js";const a={"@iobroker/adapter-react-v5":async()=>await import("./index-AOxv_cZq.js"),"@mui/material":async()=>await import("./index-dN73sbyQ.js"),"prop-types":async()=>await import("./index-CVZSzCXy.js").then(t=>t.i),react:async()=>await import("./index-Dsh1HfIY.js").then(t=>t.i),"react-dom":async()=>await import("./index-BkyLyaYT.js").then(t=>t.i)},n={"@iobroker/adapter-react-v5":{name:"@iobroker/adapter-react-v5",version:"8.2.6",scope:["default"],loaded:!1,from:"iobroker_javascript",async get(){n["@iobroker/adapter-react-v5"].loaded=!0;const{"@iobroker/adapter-react-v5":e}=a,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@mui/material":{name:"@mui/material",version:"6.5.0",scope:["default"],loaded:!1,from:"iobroker_javascript",async get(){n["@mui/material"].loaded=!0;const{"@mui/material":e}=a,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"prop-types":{name:"prop-types",version:"15.8.1",scope:["default"],loaded:!1,from:"iobroker_javascript",async get(){n["prop-types"].loaded=!0;const{"prop-types":e}=a,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},react:{name:"react",version:"18.3.1",scope:["default"],loaded:!1,from:"iobroker_javascript",async get(){n.react.loaded=!0;const{react:e}=a,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"react-dom":{name:"react-dom",version:"18.3.1",scope:["default"],loaded:!1,from:"iobroker_javascript",async get(){n["react-dom"].loaded=!0;const{"react-dom":e}=a,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}}},u=[];export{u as usedRemotes,n as usedShared}; +import"./virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-Dus28I2g.js";const a={"@iobroker/adapter-react-v5":async()=>await import("./index-Be9Zg6aF.js"),"@mui/material":async()=>await import("./index-dN73sbyQ.js"),"prop-types":async()=>await import("./index-CVZSzCXy.js").then(t=>t.i),react:async()=>await import("./index-Dsh1HfIY.js").then(t=>t.i),"react-dom":async()=>await import("./index-BkyLyaYT.js").then(t=>t.i)},n={"@iobroker/adapter-react-v5":{name:"@iobroker/adapter-react-v5",version:"8.2.7",scope:["default"],loaded:!1,from:"iobroker_javascript",async get(){n["@iobroker/adapter-react-v5"].loaded=!0;const{"@iobroker/adapter-react-v5":e}=a,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@mui/material":{name:"@mui/material",version:"6.5.0",scope:["default"],loaded:!1,from:"iobroker_javascript",async get(){n["@mui/material"].loaded=!0;const{"@mui/material":e}=a,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"prop-types":{name:"prop-types",version:"15.8.1",scope:["default"],loaded:!1,from:"iobroker_javascript",async get(){n["prop-types"].loaded=!0;const{"prop-types":e}=a,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},react:{name:"react",version:"18.3.1",scope:["default"],loaded:!1,from:"iobroker_javascript",async get(){n.react.loaded=!0;const{react:e}=a,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"react-dom":{name:"react-dom",version:"18.3.1",scope:["default"],loaded:!1,from:"iobroker_javascript",async get(){n["react-dom"].loaded=!0;const{"react-dom":e}=a,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}}},u=[];export{u as usedRemotes,n as usedShared}; diff --git a/admin/assets/stateHoverProvider-CSzc8h_d.js b/admin/assets/stateHoverProvider-wXU4aBfD.js similarity index 99% rename from admin/assets/stateHoverProvider-CSzc8h_d.js rename to admin/assets/stateHoverProvider-wXU4aBfD.js index 7eed6a755..552e780df 100644 --- a/admin/assets/stateHoverProvider-CSzc8h_d.js +++ b/admin/assets/stateHoverProvider-wXU4aBfD.js @@ -1,4 +1,4 @@ -import{_ as Uu}from"./iobroker_javascript__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.mjs-DkBjPSMw.js";import{o as me}from"./index-CyhJmDLi.js";import"./virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-DiXVqr03.js";import"./preload-helper-BDBacUwf.js";import"./createSvgIcon-DYs_tNrE.js";import"./iobroker_javascript__loadShare__react__loadShare__.mjs-CTZOFJS2.js";import"./iobroker_javascript__loadShare__react__loadShare__.mjs_commonjs-proxy-CE9lvhW8.js";import"./iobroker_javascript__loadShare__prop_mf_2_types__loadShare__.mjs-BCtSFofY.js";import"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-RQRRZMX5.js";import"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs-DeVAS-oa.js";import"./iobroker_javascript__loadShare___mf_0_mui_mf_1_material__loadShare__.mjs-CV1_X-Lf.js";import"./index-wHNMOf-c.js";import"./inheritsLoose-CIXm_zPk.js";var $a;function g(){return $a.apply(null,arguments)}function Iu(e){$a=e}function ce(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function st(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function F(e,s){return Object.prototype.hasOwnProperty.call(e,s)}function Dr(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var s;for(s in e)if(F(e,s))return!1;return!0}function ee(e){return e===void 0}function je(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function It(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Za(e,s){var n=[],a,l=e.length;for(a=0;a>>0,a;for(a=0;a0)for(n=0;n>>0,a;for(a=0;a0)for(n=0;n=0;return(d?n?"+":"":"-")+Math.pow(10,Math.max(0,l)).toString().substr(1)+a}var Or=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ds=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,hr={},yt={};function S(e,s,n,a){var l=a;typeof a=="string"&&(l=function(){return this[a]()}),e&&(yt[e]=l),s&&(yt[s[0]]=function(){return De(l.apply(this,arguments),s[1],s[2])}),n&&(yt[n]=function(){return this.localeData().ordinal(l.apply(this,arguments),e)})}function zu(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Gu(e){var s=e.match(Or),n,a;for(n=0,a=s.length;n=0&&ds.test(e);)e=e.replace(ds,a),ds.lastIndex=0,n-=1;return e}var $u={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Zu(e){var s=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return s||!n?s:(this._longDateFormat[e]=n.match(Or).map(function(a){return a==="MMMM"||a==="MM"||a==="DD"||a==="dddd"?a.slice(1):a}).join(""),this._longDateFormat[e])}var qu="Invalid date";function Ju(){return this._invalidDate}var Bu="%d",Qu=/\d{1,2}/;function Ku(e){return this._ordinal.replace("%d",e)}var Xu={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function ed(e,s,n,a){var l=this._relativeTime[n];return ve(l)?l(e,s,n,a):l.replace(/%d/i,e)}function td(e,s){var n=this._relativeTime[e>0?"future":"past"];return ve(n)?n(s):n.replace(/%s/i,s)}var ja={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function le(e){return typeof e=="string"?ja[e]||ja[e.toLowerCase()]:void 0}function Tr(e){var s={},n,a;for(a in e)F(e,a)&&(n=le(a),n&&(s[n]=e[a]));return s}var sd={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function rd(e){var s=[],n;for(n in e)F(e,n)&&s.push({unit:n,priority:sd[n]});return s.sort(function(a,l){return a.priority-l.priority}),s}var Qa=/\d/,se=/\d\d/,Ka=/\d{3}/,br=/\d{4}/,Ds=/[+-]?\d{6}/,V=/\d\d?/,Xa=/\d\d\d\d?/,en=/\d\d\d\d\d\d?/,Ys=/\d{1,3}/,xr=/\d{1,4}/,vs=/[+-]?\d{1,6}/,gt=/\d+/,Ss=/[+-]?\d+/,ad=/Z|[+-]\d\d:?\d\d/gi,Os=/Z|[+-]\d\d(?::?\d\d)?/gi,nd=/[+-]?\d+(\.\d{1,3})?/,jt=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,kt=/^[1-9]\d?/,Lr=/^([1-9]\d|\d)/,ys;ys={};function D(e,s,n){ys[e]=ve(s)?s:function(a,l){return a&&n?n:s}}function id(e,s){return F(ys,e)?ys[e](s._strict,s._locale):new RegExp(od(e))}function od(e){return Ie(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(s,n,a,l,d){return n||a||l||d}))}function Ie(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ie(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function L(e){var s=+e,n=0;return s!==0&&isFinite(s)&&(n=ie(s)),n}var Mr={};function I(e,s){var n,a=s,l;for(typeof e=="string"&&(e=[e]),je(s)&&(a=function(d,f){f[s]=L(d)}),l=e.length,n=0;n68?1900:2e3)};var tn=pt("FullYear",!0);function hd(){return Ts(this.year())}function pt(e,s){return function(n){return n!=null?(sn(this,e,n),g.updateOffset(this,s),this):Ft(this,e)}}function Ft(e,s){if(!e.isValid())return NaN;var n=e._d,a=e._isUTC;switch(s){case"Milliseconds":return a?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return a?n.getUTCSeconds():n.getSeconds();case"Minutes":return a?n.getUTCMinutes():n.getMinutes();case"Hours":return a?n.getUTCHours():n.getHours();case"Date":return a?n.getUTCDate():n.getDate();case"Day":return a?n.getUTCDay():n.getDay();case"Month":return a?n.getUTCMonth():n.getMonth();case"FullYear":return a?n.getUTCFullYear():n.getFullYear();default:return NaN}}function sn(e,s,n){var a,l,d,f,c;if(!(!e.isValid()||isNaN(n))){switch(a=e._d,l=e._isUTC,s){case"Milliseconds":return void(l?a.setUTCMilliseconds(n):a.setMilliseconds(n));case"Seconds":return void(l?a.setUTCSeconds(n):a.setSeconds(n));case"Minutes":return void(l?a.setUTCMinutes(n):a.setMinutes(n));case"Hours":return void(l?a.setUTCHours(n):a.setHours(n));case"Date":return void(l?a.setUTCDate(n):a.setDate(n));case"FullYear":break;default:return}d=n,f=e.month(),c=e.date(),c=c===29&&f===1&&!Ts(d)?28:c,l?a.setUTCFullYear(d,f,c):a.setFullYear(d,f,c)}}function fd(e){return e=le(e),ve(this[e])?this[e]():this}function cd(e,s){if(typeof e=="object"){e=Tr(e);var n=rd(e),a,l=n.length;for(a=0;a=0?(c=new Date(e+400,s,n,a,l,d,f),isFinite(c.getFullYear())&&c.setFullYear(e)):c=new Date(e,s,n,a,l,d,f),c}function Ht(e){var s,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,s=new Date(Date.UTC.apply(null,n)),isFinite(s.getUTCFullYear())&&s.setUTCFullYear(e)):s=new Date(Date.UTC.apply(null,arguments)),s}function Ms(e,s,n){var a=7+s-n,l=(7+Ht(e,0,a).getUTCDay()-s)%7;return-l+a-1}function un(e,s,n,a,l){var d=(7+n-a)%7,f=Ms(e,a,l),c=1+7*(s-1)+d+f,_,y;return c<=0?(_=e-1,y=Rt(_)+c):c>Rt(e)?(_=e+1,y=c-Rt(e)):(_=e,y=c),{year:_,dayOfYear:y}}function Ct(e,s,n){var a=Ms(e.year(),s,n),l=Math.floor((e.dayOfYear()-a-1)/7)+1,d,f;return l<1?(f=e.year()-1,d=l+Ee(f,s,n)):l>Ee(e.year(),s,n)?(d=l-Ee(e.year(),s,n),f=e.year()+1):(f=e.year(),d=l),{week:d,year:f}}function Ee(e,s,n){var a=Ms(e,s,n),l=Ms(e+1,s,n);return(Rt(e)-a+l)/7}S("w",["ww",2],"wo","week");S("W",["WW",2],"Wo","isoWeek");D("w",V,kt);D("ww",V,se);D("W",V,kt);D("WW",V,se);At(["w","ww","W","WW"],function(e,s,n,a){s[a.substr(0,1)]=L(e)});function Od(e){return Ct(e,this._week.dow,this._week.doy).week}var Td={dow:0,doy:6};function bd(){return this._week.dow}function xd(){return this._week.doy}function Ld(e){var s=this.localeData().week(this);return e==null?s:this.add((e-s)*7,"d")}function Wd(e){var s=Ct(this,1,4).week;return e==null?s:this.add((e-s)*7,"d")}S("d",0,"do","day");S("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});S("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});S("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});S("e",0,0,"weekday");S("E",0,0,"isoWeekday");D("d",V);D("e",V);D("E",V);D("dd",function(e,s){return s.weekdaysMinRegex(e)});D("ddd",function(e,s){return s.weekdaysShortRegex(e)});D("dddd",function(e,s){return s.weekdaysRegex(e)});At(["dd","ddd","dddd"],function(e,s,n,a){var l=n._locale.weekdaysParse(e,a,n._strict);l!=null?s.d=l:b(n).invalidWeekday=e});At(["d","e","E"],function(e,s,n,a){s[a]=L(e)});function Pd(e,s){return typeof e!="string"?e:isNaN(e)?(e=s.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function Nd(e,s){return typeof e=="string"?s.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Pr(e,s){return e.slice(s,7).concat(e.slice(0,s))}var Rd="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),dn="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Fd="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Hd=jt,Cd=jt,Ud=jt;function Id(e,s){var n=ce(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(s)?"format":"standalone"];return e===!0?Pr(n,this._week.dow):e?n[e.day()]:n}function Ed(e){return e===!0?Pr(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function jd(e){return e===!0?Pr(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Ad(e,s,n){var a,l,d,f=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],a=0;a<7;++a)d=Ye([2e3,1]).day(a),this._minWeekdaysParse[a]=this.weekdaysMin(d,"").toLocaleLowerCase(),this._shortWeekdaysParse[a]=this.weekdaysShort(d,"").toLocaleLowerCase(),this._weekdaysParse[a]=this.weekdays(d,"").toLocaleLowerCase();return n?s==="dddd"?(l=Z.call(this._weekdaysParse,f),l!==-1?l:null):s==="ddd"?(l=Z.call(this._shortWeekdaysParse,f),l!==-1?l:null):(l=Z.call(this._minWeekdaysParse,f),l!==-1?l:null):s==="dddd"?(l=Z.call(this._weekdaysParse,f),l!==-1||(l=Z.call(this._shortWeekdaysParse,f),l!==-1)?l:(l=Z.call(this._minWeekdaysParse,f),l!==-1?l:null)):s==="ddd"?(l=Z.call(this._shortWeekdaysParse,f),l!==-1||(l=Z.call(this._weekdaysParse,f),l!==-1)?l:(l=Z.call(this._minWeekdaysParse,f),l!==-1?l:null)):(l=Z.call(this._minWeekdaysParse,f),l!==-1||(l=Z.call(this._weekdaysParse,f),l!==-1)?l:(l=Z.call(this._shortWeekdaysParse,f),l!==-1?l:null))}function Vd(e,s,n){var a,l,d;if(this._weekdaysParseExact)return Ad.call(this,e,s,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),a=0;a<7;a++){if(l=Ye([2e3,1]).day(a),n&&!this._fullWeekdaysParse[a]&&(this._fullWeekdaysParse[a]=new RegExp("^"+this.weekdays(l,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[a]=new RegExp("^"+this.weekdaysShort(l,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[a]=new RegExp("^"+this.weekdaysMin(l,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[a]||(d="^"+this.weekdays(l,"")+"|^"+this.weekdaysShort(l,"")+"|^"+this.weekdaysMin(l,""),this._weekdaysParse[a]=new RegExp(d.replace(".",""),"i")),n&&s==="dddd"&&this._fullWeekdaysParse[a].test(e))return a;if(n&&s==="ddd"&&this._shortWeekdaysParse[a].test(e))return a;if(n&&s==="dd"&&this._minWeekdaysParse[a].test(e))return a;if(!n&&this._weekdaysParse[a].test(e))return a}}function zd(e){if(!this.isValid())return e!=null?this:NaN;var s=Ft(this,"Day");return e!=null?(e=Pd(e,this.localeData()),this.add(e-s,"d")):s}function Gd(e){if(!this.isValid())return e!=null?this:NaN;var s=(this.day()+7-this.localeData()._week.dow)%7;return e==null?s:this.add(e-s,"d")}function $d(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var s=Nd(e,this.localeData());return this.day(this.day()%7?s:s-7)}else return this.day()||7}function Zd(e){return this._weekdaysParseExact?(F(this,"_weekdaysRegex")||Nr.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(F(this,"_weekdaysRegex")||(this._weekdaysRegex=Hd),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function qd(e){return this._weekdaysParseExact?(F(this,"_weekdaysRegex")||Nr.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(F(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Cd),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Jd(e){return this._weekdaysParseExact?(F(this,"_weekdaysRegex")||Nr.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(F(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ud),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Nr(){function e(Y,C){return C.length-Y.length}var s=[],n=[],a=[],l=[],d,f,c,_,y;for(d=0;d<7;d++)f=Ye([2e3,1]).day(d),c=Ie(this.weekdaysMin(f,"")),_=Ie(this.weekdaysShort(f,"")),y=Ie(this.weekdays(f,"")),s.push(c),n.push(_),a.push(y),l.push(c),l.push(_),l.push(y);s.sort(e),n.sort(e),a.sort(e),l.sort(e),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Rr(){return this.hours()%12||12}function Bd(){return this.hours()||24}S("H",["HH",2],0,"hour");S("h",["hh",2],0,Rr);S("k",["kk",2],0,Bd);S("hmm",0,0,function(){return""+Rr.apply(this)+De(this.minutes(),2)});S("hmmss",0,0,function(){return""+Rr.apply(this)+De(this.minutes(),2)+De(this.seconds(),2)});S("Hmm",0,0,function(){return""+this.hours()+De(this.minutes(),2)});S("Hmmss",0,0,function(){return""+this.hours()+De(this.minutes(),2)+De(this.seconds(),2)});function hn(e,s){S(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),s)})}hn("a",!0);hn("A",!1);function fn(e,s){return s._meridiemParse}D("a",fn);D("A",fn);D("H",V,Lr);D("h",V,kt);D("k",V,kt);D("HH",V,se);D("hh",V,se);D("kk",V,se);D("hmm",Xa);D("hmmss",en);D("Hmm",Xa);D("Hmmss",en);I(["H","HH"],J);I(["k","kk"],function(e,s,n){var a=L(e);s[J]=a===24?0:a});I(["a","A"],function(e,s,n){n._isPm=n._locale.isPM(e),n._meridiem=e});I(["h","hh"],function(e,s,n){s[J]=L(e),b(n).bigHour=!0});I("hmm",function(e,s,n){var a=e.length-2;s[J]=L(e.substr(0,a)),s[fe]=L(e.substr(a)),b(n).bigHour=!0});I("hmmss",function(e,s,n){var a=e.length-4,l=e.length-2;s[J]=L(e.substr(0,a)),s[fe]=L(e.substr(a,2)),s[Ue]=L(e.substr(l)),b(n).bigHour=!0});I("Hmm",function(e,s,n){var a=e.length-2;s[J]=L(e.substr(0,a)),s[fe]=L(e.substr(a))});I("Hmmss",function(e,s,n){var a=e.length-4,l=e.length-2;s[J]=L(e.substr(0,a)),s[fe]=L(e.substr(a,2)),s[Ue]=L(e.substr(l))});function Qd(e){return(e+"").toLowerCase().charAt(0)==="p"}var Kd=/[ap]\.?m?\.?/i,Xd=pt("Hours",!0);function eh(e,s,n){return e>11?n?"pm":"PM":n?"am":"AM"}var cn={calendar:Au,longDateFormat:$u,invalidDate:qu,ordinal:Bu,dayOfMonthOrdinalParse:Qu,relativeTime:Xu,months:md,monthsShort:rn,week:Td,weekdays:Rd,weekdaysMin:Fd,weekdaysShort:dn,meridiemParse:Kd},G={},Pt={},Ut;function th(e,s){var n,a=Math.min(e.length,s.length);for(n=0;n0;){if(l=bs(d.slice(0,n).join("-")),l)return l;if(a&&a.length>=n&&th(d,a)>=n-1)break;n--}s++}return Ut}function rh(e){return!!(e&&e.match("^[^/\\\\]*$"))}function bs(e){var s=null,n;if(G[e]===void 0&&typeof module<"u"&&module&&module.exports&&rh(e))try{s=Ut._abbr,n=require,n("./locale/"+e),Be(s)}catch{G[e]=null}return G[e]}function Be(e,s){var n;return e&&(ee(s)?n=Ae(e):n=Fr(e,s),n?Ut=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Ut._abbr}function Fr(e,s){if(s!==null){var n,a=cn;if(s.abbr=e,G[e]!=null)Ja("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),a=G[e]._config;else if(s.parentLocale!=null)if(G[s.parentLocale]!=null)a=G[s.parentLocale]._config;else if(n=bs(s.parentLocale),n!=null)a=n._config;else return Pt[s.parentLocale]||(Pt[s.parentLocale]=[]),Pt[s.parentLocale].push({name:e,config:s}),null;return G[e]=new Sr(mr(a,s)),Pt[e]&&Pt[e].forEach(function(l){Fr(l.name,l.config)}),Be(e),G[e]}else return delete G[e],null}function ah(e,s){if(s!=null){var n,a,l=cn;G[e]!=null&&G[e].parentLocale!=null?G[e].set(mr(G[e]._config,s)):(a=bs(e),a!=null&&(l=a._config),s=mr(l,s),a==null&&(s.abbr=e),n=new Sr(s),n.parentLocale=G[e],G[e]=n),Be(e)}else G[e]!=null&&(G[e].parentLocale!=null?(G[e]=G[e].parentLocale,e===Be()&&Be(e)):G[e]!=null&&delete G[e]);return G[e]}function Ae(e){var s;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Ut;if(!ce(e)){if(s=bs(e),s)return s;e=[e]}return sh(e)}function nh(){return yr(G)}function Hr(e){var s,n=e._a;return n&&b(e).overflow===-2&&(s=n[Ce]<0||n[Ce]>11?Ce:n[pe]<1||n[pe]>Wr(n[K],n[Ce])?pe:n[J]<0||n[J]>24||n[J]===24&&(n[fe]!==0||n[Ue]!==0||n[tt]!==0)?J:n[fe]<0||n[fe]>59?fe:n[Ue]<0||n[Ue]>59?Ue:n[tt]<0||n[tt]>999?tt:-1,b(e)._overflowDayOfYear&&(spe)&&(s=pe),b(e)._overflowWeeks&&s===-1&&(s=ud),b(e)._overflowWeekday&&s===-1&&(s=dd),b(e).overflow=s),e}var ih=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,oh=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,lh=/Z|[+-]\d\d(?::?\d\d)?/,hs=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],fr=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],uh=/^\/?Date\((-?\d+)/i,dh=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,hh={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function _n(e){var s,n,a=e._i,l=ih.exec(a)||oh.exec(a),d,f,c,_,y=hs.length,Y=fr.length;if(l){for(b(e).iso=!0,s=0,n=y;sRt(f)||e._dayOfYear===0)&&(b(e)._overflowDayOfYear=!0),n=Ht(f,0,e._dayOfYear),e._a[Ce]=n.getUTCMonth(),e._a[pe]=n.getUTCDate()),s=0;s<3&&e._a[s]==null;++s)e._a[s]=a[s]=l[s];for(;s<7;s++)e._a[s]=a[s]=e._a[s]==null?s===2?1:0:e._a[s];e._a[J]===24&&e._a[fe]===0&&e._a[Ue]===0&&e._a[tt]===0&&(e._nextDay=!0,e._a[J]=0),e._d=(e._useUTC?Ht:Sd).apply(null,a),d=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[J]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==d&&(b(e).weekdayMismatch=!0)}}function gh(e){var s,n,a,l,d,f,c,_,y;s=e._w,s.GG!=null||s.W!=null||s.E!=null?(d=1,f=4,n=_t(s.GG,e._a[K],Ct(A(),1,4).year),a=_t(s.W,1),l=_t(s.E,1),(l<1||l>7)&&(_=!0)):(d=e._locale._week.dow,f=e._locale._week.doy,y=Ct(A(),d,f),n=_t(s.gg,e._a[K],y.year),a=_t(s.w,y.week),s.d!=null?(l=s.d,(l<0||l>6)&&(_=!0)):s.e!=null?(l=s.e+d,(s.e<0||s.e>6)&&(_=!0)):l=d),a<1||a>Ee(n,d,f)?b(e)._overflowWeeks=!0:_!=null?b(e)._overflowWeekday=!0:(c=un(n,a,l,d,f),e._a[K]=c.year,e._dayOfYear=c.dayOfYear)}g.ISO_8601=function(){};g.RFC_2822=function(){};function Ur(e){if(e._f===g.ISO_8601){_n(e);return}if(e._f===g.RFC_2822){mn(e);return}e._a=[],b(e).empty=!0;var s=""+e._i,n,a,l,d,f,c=s.length,_=0,y,Y;for(l=Ba(e._f,e._locale).match(Or)||[],Y=l.length,n=0;n0&&b(e).unusedInput.push(f),s=s.slice(s.indexOf(a)+a.length),_+=a.length),yt[d]?(a?b(e).empty=!1:b(e).unusedTokens.push(d),ld(d,a,e)):e._strict&&!a&&b(e).unusedTokens.push(d);b(e).charsLeftOver=c-_,s.length>0&&b(e).unusedInput.push(s),e._a[J]<=12&&b(e).bigHour===!0&&e._a[J]>0&&(b(e).bigHour=void 0),b(e).parsedDateParts=e._a.slice(0),b(e).meridiem=e._meridiem,e._a[J]=kh(e._locale,e._a[J],e._meridiem),y=b(e).era,y!==null&&(e._a[K]=e._locale.erasConvertYear(y,e._a[K])),Cr(e),Hr(e)}function kh(e,s,n){var a;return n==null?s:e.meridiemHour!=null?e.meridiemHour(s,n):(e.isPM!=null&&(a=e.isPM(n),a&&s<12&&(s+=12),!a&&s===12&&(s=0)),s)}function ph(e){var s,n,a,l,d,f,c=!1,_=e._f.length;if(_===0){b(e).invalidFormat=!0,e._d=new Date(NaN);return}for(l=0;l<_;l++)d=0,f=!1,s=vr({},e),e._useUTC!=null&&(s._useUTC=e._useUTC),s._f=e._f[l],Ur(s),Yr(s)&&(f=!0),d+=b(s).charsLeftOver,d+=b(s).unusedTokens.length*10,b(s).score=d,c?dthis?this:e:ps()});function wn(e,s){var n,a;if(s.length===1&&ce(s[0])&&(s=s[0]),!s.length)return A();for(n=s[0],a=1;athis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ah(){if(!ee(this._isDSTShifted))return this._isDSTShifted;var e={},s;return vr(e,this),e=yn(e),e._a?(s=e._isUTC?Ye(e._a):A(e._a),this._isDSTShifted=this.isValid()&&Nh(e._a,s.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Vh(){return this.isValid()?!this._isUTC:!1}function zh(){return this.isValid()?this._isUTC:!1}function kn(){return this.isValid()?this._isUTC&&this._offset===0:!1}var Gh=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,$h=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function ye(e,s){var n=e,a=null,l,d,f;return cs(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:je(e)||!isNaN(+e)?(n={},s?n[s]=+e:n.milliseconds=+e):(a=Gh.exec(e))?(l=a[1]==="-"?-1:1,n={y:0,d:L(a[pe])*l,h:L(a[J])*l,m:L(a[fe])*l,s:L(a[Ue])*l,ms:L(wr(a[tt]*1e3))*l}):(a=$h.exec(e))?(l=a[1]==="-"?-1:1,n={y:et(a[2],l),M:et(a[3],l),w:et(a[4],l),d:et(a[5],l),h:et(a[6],l),m:et(a[7],l),s:et(a[8],l)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(f=Zh(A(n.from),A(n.to)),n={},n.ms=f.milliseconds,n.M=f.months),d=new xs(n),cs(e)&&F(e,"_locale")&&(d._locale=e._locale),cs(e)&&F(e,"_isValid")&&(d._isValid=e._isValid),d}ye.fn=xs.prototype;ye.invalid=Ph;function et(e,s){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*s}function Va(e,s){var n={};return n.months=s.month()-e.month()+(s.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(s)&&--n.months,n.milliseconds=+s-+e.clone().add(n.months,"M"),n}function Zh(e,s){var n;return e.isValid()&&s.isValid()?(s=Er(s,e),e.isBefore(s)?n=Va(e,s):(n=Va(s,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function pn(e,s){return function(n,a){var l,d;return a!==null&&!isNaN(+a)&&(Ja(s,"moment()."+s+"(period, number) is deprecated. Please use moment()."+s+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),d=n,n=a,a=d),l=ye(n,a),Dn(this,l,e),this}}function Dn(e,s,n,a){var l=s._milliseconds,d=wr(s._days),f=wr(s._months);e.isValid()&&(a=a??!0,f&&nn(e,Ft(e,"Month")+f*n),d&&sn(e,"Date",Ft(e,"Date")+d*n),l&&e._d.setTime(e._d.valueOf()+l*n),a&&g.updateOffset(e,d||f))}var qh=pn(1,"add"),Jh=pn(-1,"subtract");function Yn(e){return typeof e=="string"||e instanceof String}function Bh(e){return _e(e)||It(e)||Yn(e)||je(e)||Kh(e)||Qh(e)||e===null||e===void 0}function Qh(e){var s=st(e)&&!Dr(e),n=!1,a=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],l,d,f=a.length;for(l=0;ln.valueOf():n.valueOf()9999?fs(n,s?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ve(Date.prototype.toISOString)?s?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",fs(n,"Z")):fs(n,s?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function cf(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",s="",n,a,l,d;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",s="Z"),n="["+e+'("]',a=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",l="-MM-DD[T]HH:mm:ss.SSS",d=s+'[")]',this.format(n+a+l+d)}function _f(e){e||(e=this.isUtc()?g.defaultFormatUtc:g.defaultFormat);var s=fs(this,e);return this.localeData().postformat(s)}function mf(e,s){return this.isValid()&&(_e(e)&&e.isValid()||A(e).isValid())?ye({to:this,from:e}).locale(this.locale()).humanize(!s):this.localeData().invalidDate()}function yf(e){return this.from(A(),e)}function Mf(e,s){return this.isValid()&&(_e(e)&&e.isValid()||A(e).isValid())?ye({from:this,to:e}).locale(this.locale()).humanize(!s):this.localeData().invalidDate()}function wf(e){return this.to(A(),e)}function vn(e){var s;return e===void 0?this._locale._abbr:(s=Ae(e),s!=null&&(this._locale=s),this)}var Sn=oe("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function On(){return this._locale}var ws=1e3,Mt=60*ws,gs=60*Mt,Tn=(365*400+97)*24*gs;function wt(e,s){return(e%s+s)%s}function bn(e,s,n){return e<100&&e>=0?new Date(e+400,s,n)-Tn:new Date(e,s,n).valueOf()}function xn(e,s,n){return e<100&&e>=0?Date.UTC(e+400,s,n)-Tn:Date.UTC(e,s,n)}function gf(e){var s,n;if(e=le(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?xn:bn,e){case"year":s=n(this.year(),0,1);break;case"quarter":s=n(this.year(),this.month()-this.month()%3,1);break;case"month":s=n(this.year(),this.month(),1);break;case"week":s=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":s=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":s=n(this.year(),this.month(),this.date());break;case"hour":s=this._d.valueOf(),s-=wt(s+(this._isUTC?0:this.utcOffset()*Mt),gs);break;case"minute":s=this._d.valueOf(),s-=wt(s,Mt);break;case"second":s=this._d.valueOf(),s-=wt(s,ws);break}return this._d.setTime(s),g.updateOffset(this,!0),this}function kf(e){var s,n;if(e=le(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?xn:bn,e){case"year":s=n(this.year()+1,0,1)-1;break;case"quarter":s=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":s=n(this.year(),this.month()+1,1)-1;break;case"week":s=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":s=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":s=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":s=this._d.valueOf(),s+=gs-wt(s+(this._isUTC?0:this.utcOffset()*Mt),gs)-1;break;case"minute":s=this._d.valueOf(),s+=Mt-wt(s,Mt)-1;break;case"second":s=this._d.valueOf(),s+=ws-wt(s,ws)-1;break}return this._d.setTime(s),g.updateOffset(this,!0),this}function pf(){return this._d.valueOf()-(this._offset||0)*6e4}function Df(){return Math.floor(this.valueOf()/1e3)}function Yf(){return new Date(this.valueOf())}function vf(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Sf(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Of(){return this.isValid()?this.toISOString():null}function Tf(){return Yr(this)}function bf(){return qe({},b(this))}function xf(){return b(this).overflow}function Lf(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}S("N",0,0,"eraAbbr");S("NN",0,0,"eraAbbr");S("NNN",0,0,"eraAbbr");S("NNNN",0,0,"eraName");S("NNNNN",0,0,"eraNarrow");S("y",["y",1],"yo","eraYear");S("y",["yy",2],0,"eraYear");S("y",["yyy",3],0,"eraYear");S("y",["yyyy",4],0,"eraYear");D("N",jr);D("NN",jr);D("NNN",jr);D("NNNN",jf);D("NNNNN",Af);I(["N","NN","NNN","NNNN","NNNNN"],function(e,s,n,a){var l=n._locale.erasParse(e,a,n._strict);l?b(n).era=l:b(n).invalidEra=e});D("y",gt);D("yy",gt);D("yyy",gt);D("yyyy",gt);D("yo",Vf);I(["y","yy","yyy","yyyy"],K);I(["yo"],function(e,s,n,a){var l;n._locale._eraYearOrdinalRegex&&(l=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?s[K]=n._locale.eraYearOrdinalParse(e,l):s[K]=parseInt(e,10)});function Wf(e,s){var n,a,l,d=this._eras||Ae("en")._eras;for(n=0,a=d.length;n=0)return d[a]}function Nf(e,s){var n=e.since<=e.until?1:-1;return s===void 0?g(e.since).year():g(e.since).year()+(s-e.offset)*n}function Rf(){var e,s,n,a=this.localeData().eras();for(e=0,s=a.length;ed&&(s=d),Bf.call(this,e,s,n,a,l))}function Bf(e,s,n,a,l){var d=un(e,s,n,a,l),f=Ht(d.year,0,d.dayOfYear);return this.year(f.getUTCFullYear()),this.month(f.getUTCMonth()),this.date(f.getUTCDate()),this}S("Q",0,"Qo","quarter");D("Q",Qa);I("Q",function(e,s){s[Ce]=(L(e)-1)*3});function Qf(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}S("D",["DD",2],"Do","date");D("D",V,kt);D("DD",V,se);D("Do",function(e,s){return e?s._dayOfMonthOrdinalParse||s._ordinalParse:s._dayOfMonthOrdinalParseLenient});I(["D","DD"],pe);I("Do",function(e,s){s[pe]=L(e.match(V)[0])});var Wn=pt("Date",!0);S("DDD",["DDDD",3],"DDDo","dayOfYear");D("DDD",Ys);D("DDDD",Ka);I(["DDD","DDDD"],function(e,s,n){n._dayOfYear=L(e)});function Kf(e){var s=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?s:this.add(e-s,"d")}S("m",["mm",2],0,"minute");D("m",V,Lr);D("mm",V,se);I(["m","mm"],fe);var Xf=pt("Minutes",!1);S("s",["ss",2],0,"second");D("s",V,Lr);D("ss",V,se);I(["s","ss"],Ue);var ec=pt("Seconds",!1);S("S",0,0,function(){return~~(this.millisecond()/100)});S(0,["SS",2],0,function(){return~~(this.millisecond()/10)});S(0,["SSS",3],0,"millisecond");S(0,["SSSS",4],0,function(){return this.millisecond()*10});S(0,["SSSSS",5],0,function(){return this.millisecond()*100});S(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});S(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});S(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});S(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});D("S",Ys,Qa);D("SS",Ys,se);D("SSS",Ys,Ka);var Je,Pn;for(Je="SSSS";Je.length<=9;Je+="S")D(Je,gt);function tc(e,s){s[tt]=L(("0."+e)*1e3)}for(Je="S";Je.length<=9;Je+="S")I(Je,tc);Pn=pt("Milliseconds",!1);S("z",0,0,"zoneAbbr");S("zz",0,0,"zoneName");function sc(){return this._isUTC?"UTC":""}function rc(){return this._isUTC?"Coordinated Universal Time":""}var w=Et.prototype;w.add=qh;w.calendar=tf;w.clone=sf;w.diff=df;w.endOf=kf;w.format=_f;w.from=mf;w.fromNow=yf;w.to=Mf;w.toNow=wf;w.get=fd;w.invalidAt=xf;w.isAfter=rf;w.isBefore=af;w.isBetween=nf;w.isSame=of;w.isSameOrAfter=lf;w.isSameOrBefore=uf;w.isValid=Tf;w.lang=Sn;w.locale=vn;w.localeData=On;w.max=Oh;w.min=Sh;w.parsingFlags=bf;w.set=cd;w.startOf=gf;w.subtract=Jh;w.toArray=vf;w.toObject=Sf;w.toDate=Yf;w.toISOString=ff;w.inspect=cf;typeof Symbol<"u"&&Symbol.for!=null&&(w[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});w.toJSON=Of;w.toString=hf;w.unix=Df;w.valueOf=pf;w.creationData=Lf;w.eraName=Rf;w.eraNarrow=Ff;w.eraAbbr=Hf;w.eraYear=Cf;w.year=tn;w.isLeapYear=hd;w.weekYear=zf;w.isoWeekYear=Gf;w.quarter=w.quarters=Qf;w.month=on;w.daysInMonth=Dd;w.week=w.weeks=Ld;w.isoWeek=w.isoWeeks=Wd;w.weeksInYear=qf;w.weeksInWeekYear=Jf;w.isoWeeksInYear=$f;w.isoWeeksInISOWeekYear=Zf;w.date=Wn;w.day=w.days=zd;w.weekday=Gd;w.isoWeekday=$d;w.dayOfYear=Kf;w.hour=w.hours=Xd;w.minute=w.minutes=Xf;w.second=w.seconds=ec;w.millisecond=w.milliseconds=Pn;w.utcOffset=Fh;w.utc=Ch;w.local=Uh;w.parseZone=Ih;w.hasAlignedHourOffset=Eh;w.isDST=jh;w.isLocal=Vh;w.isUtcOffset=zh;w.isUtc=kn;w.isUTC=kn;w.zoneAbbr=sc;w.zoneName=rc;w.dates=oe("dates accessor is deprecated. Use date instead.",Wn);w.months=oe("months accessor is deprecated. Use month instead",on);w.years=oe("years accessor is deprecated. Use year instead",tn);w.zone=oe("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Hh);w.isDSTShifted=oe("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Ah);function ac(e){return A(e*1e3)}function nc(){return A.apply(null,arguments).parseZone()}function Nn(e){return e}var H=Sr.prototype;H.calendar=Vu;H.longDateFormat=Zu;H.invalidDate=Ju;H.ordinal=Ku;H.preparse=Nn;H.postformat=Nn;H.relativeTime=ed;H.pastFuture=td;H.set=ju;H.eras=Wf;H.erasParse=Pf;H.erasConvertYear=Nf;H.erasAbbrRegex=If;H.erasNameRegex=Uf;H.erasNarrowRegex=Ef;H.months=wd;H.monthsShort=gd;H.monthsParse=pd;H.monthsRegex=vd;H.monthsShortRegex=Yd;H.week=Od;H.firstDayOfYear=xd;H.firstDayOfWeek=bd;H.weekdays=Id;H.weekdaysMin=jd;H.weekdaysShort=Ed;H.weekdaysParse=Vd;H.weekdaysRegex=Zd;H.weekdaysShortRegex=qd;H.weekdaysMinRegex=Jd;H.isPM=Qd;H.meridiem=eh;function ks(e,s,n,a){var l=Ae(),d=Ye().set(a,s);return l[n](d,e)}function Rn(e,s,n){if(je(e)&&(s=e,e=void 0),e=e||"",s!=null)return ks(e,s,n,"month");var a,l=[];for(a=0;a<12;a++)l[a]=ks(e,a,n,"month");return l}function Vr(e,s,n,a){typeof e=="boolean"?(je(s)&&(n=s,s=void 0),s=s||""):(s=e,n=s,e=!1,je(s)&&(n=s,s=void 0),s=s||"");var l=Ae(),d=e?l._week.dow:0,f,c=[];if(n!=null)return ks(s,(n+d)%7,a,"day");for(f=0;f<7;f++)c[f]=ks(s,(f+d)%7,a,"day");return c}function ic(e,s){return Rn(e,s,"months")}function oc(e,s){return Rn(e,s,"monthsShort")}function lc(e,s,n){return Vr(e,s,n,"weekdays")}function uc(e,s,n){return Vr(e,s,n,"weekdaysShort")}function dc(e,s,n){return Vr(e,s,n,"weekdaysMin")}Be("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var s=e%10,n=L(e%100/10)===1?"th":s===1?"st":s===2?"nd":s===3?"rd":"th";return e+n}});g.lang=oe("moment.lang is deprecated. Use moment.locale instead.",Be);g.langData=oe("moment.langData is deprecated. Use moment.localeData instead.",Ae);var Fe=Math.abs;function hc(){var e=this._data;return this._milliseconds=Fe(this._milliseconds),this._days=Fe(this._days),this._months=Fe(this._months),e.milliseconds=Fe(e.milliseconds),e.seconds=Fe(e.seconds),e.minutes=Fe(e.minutes),e.hours=Fe(e.hours),e.months=Fe(e.months),e.years=Fe(e.years),this}function Fn(e,s,n,a){var l=ye(s,n);return e._milliseconds+=a*l._milliseconds,e._days+=a*l._days,e._months+=a*l._months,e._bubble()}function fc(e,s){return Fn(this,e,s,1)}function cc(e,s){return Fn(this,e,s,-1)}function za(e){return e<0?Math.floor(e):Math.ceil(e)}function _c(){var e=this._milliseconds,s=this._days,n=this._months,a=this._data,l,d,f,c,_;return e>=0&&s>=0&&n>=0||e<=0&&s<=0&&n<=0||(e+=za(kr(n)+s)*864e5,s=0,n=0),a.milliseconds=e%1e3,l=ie(e/1e3),a.seconds=l%60,d=ie(l/60),a.minutes=d%60,f=ie(d/60),a.hours=f%24,s+=ie(f/24),_=ie(Hn(s)),n+=_,s-=za(kr(_)),c=ie(n/12),n%=12,a.days=s,a.months=n,a.years=c,this}function Hn(e){return e*4800/146097}function kr(e){return e*146097/4800}function mc(e){if(!this.isValid())return NaN;var s,n,a=this._milliseconds;if(e=le(e),e==="month"||e==="quarter"||e==="year")switch(s=this._days+a/864e5,n=this._months+Hn(s),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(s=this._days+Math.round(kr(this._months)),e){case"week":return s/7+a/6048e5;case"day":return s+a/864e5;case"hour":return s*24+a/36e5;case"minute":return s*1440+a/6e4;case"second":return s*86400+a/1e3;case"millisecond":return Math.floor(s*864e5)+a;default:throw new Error("Unknown unit "+e)}}function Ve(e){return function(){return this.as(e)}}var Cn=Ve("ms"),yc=Ve("s"),Mc=Ve("m"),wc=Ve("h"),gc=Ve("d"),kc=Ve("w"),pc=Ve("M"),Dc=Ve("Q"),Yc=Ve("y"),vc=Cn;function Sc(){return ye(this)}function Oc(e){return e=le(e),this.isValid()?this[e+"s"]():NaN}function rt(e){return function(){return this.isValid()?this._data[e]:NaN}}var Tc=rt("milliseconds"),bc=rt("seconds"),xc=rt("minutes"),Lc=rt("hours"),Wc=rt("days"),Pc=rt("months"),Nc=rt("years");function Rc(){return ie(this.days()/7)}var He=Math.round,mt={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Fc(e,s,n,a,l){return l.relativeTime(s||1,!!n,e,a)}function Hc(e,s,n,a){var l=ye(e).abs(),d=He(l.as("s")),f=He(l.as("m")),c=He(l.as("h")),_=He(l.as("d")),y=He(l.as("M")),Y=He(l.as("w")),C=He(l.as("y")),B=d<=n.ss&&["s",d]||d0,B[4]=a,Fc.apply(null,B)}function Cc(e){return e===void 0?He:typeof e=="function"?(He=e,!0):!1}function Uc(e,s){return mt[e]===void 0?!1:s===void 0?mt[e]:(mt[e]=s,e==="s"&&(mt.ss=s-1),!0)}function Ic(e,s){if(!this.isValid())return this.localeData().invalidDate();var n=!1,a=mt,l,d;return typeof e=="object"&&(s=e,e=!1),typeof e=="boolean"&&(n=e),typeof s=="object"&&(a=Object.assign({},mt,s),s.s!=null&&s.ss==null&&(a.ss=s.s-1)),l=this.localeData(),d=Hc(this,!n,a,l),n&&(d=l.pastFuture(+this,d)),l.postformat(d)}var cr=Math.abs;function ct(e){return(e>0)-(e<0)||+e}function Ws(){if(!this.isValid())return this.localeData().invalidDate();var e=cr(this._milliseconds)/1e3,s=cr(this._days),n=cr(this._months),a,l,d,f,c=this.asSeconds(),_,y,Y,C;return c?(a=ie(e/60),l=ie(a/60),e%=60,a%=60,d=ie(n/12),n%=12,f=e?e.toFixed(3).replace(/\.?0+$/,""):"",_=c<0?"-":"",y=ct(this._months)!==ct(c)?"-":"",Y=ct(this._days)!==ct(c)?"-":"",C=ct(this._milliseconds)!==ct(c)?"-":"",_+"P"+(d?y+d+"Y":"")+(n?y+n+"M":"")+(s?Y+s+"D":"")+(l||a||e?"T":"")+(l?C+l+"H":"")+(a?C+a+"M":"")+(e?C+f+"S":"")):"P0D"}var N=xs.prototype;N.isValid=Wh;N.abs=hc;N.add=fc;N.subtract=cc;N.as=mc;N.asMilliseconds=Cn;N.asSeconds=yc;N.asMinutes=Mc;N.asHours=wc;N.asDays=gc;N.asWeeks=kc;N.asMonths=pc;N.asQuarters=Dc;N.asYears=Yc;N.valueOf=vc;N._bubble=_c;N.clone=Sc;N.get=Oc;N.milliseconds=Tc;N.seconds=bc;N.minutes=xc;N.hours=Lc;N.days=Wc;N.weeks=Rc;N.months=Pc;N.years=Nc;N.humanize=Ic;N.toISOString=Ws;N.toString=Ws;N.toJSON=Ws;N.locale=vn;N.localeData=On;N.toIsoString=oe("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ws);N.lang=Sn;S("X",0,0,"unix");S("x",0,0,"valueOf");D("x",Ss);D("X",nd);I("X",function(e,s,n){n._d=new Date(parseFloat(e)*1e3)});I("x",function(e,s,n){n._d=new Date(L(e))});g.version="2.30.1";Iu(A);g.fn=w;g.min=Th;g.max=bh;g.now=xh;g.utc=Ye;g.unix=ac;g.months=ic;g.isDate=It;g.locale=Be;g.invalid=ps;g.duration=ye;g.isMoment=_e;g.weekdays=lc;g.parseZone=nc;g.localeData=Ae;g.isDuration=cs;g.monthsShort=oc;g.weekdaysMin=dc;g.defineLocale=Fr;g.updateLocale=ah;g.locales=nh;g.weekdaysShort=uc;g.normalizeUnits=le;g.relativeTimeRounding=Cc;g.relativeTimeThreshold=Uc;g.calendarFormat=ef;g.prototype=w;g.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};var Ec={exports:{}},ms={exports:{}},jc=ms.exports,Ga;function Se(){return Ga||(Ga=1,(function(e,s){(function(n,a){e.exports=a()})(jc,(function(){var n;function a(){return n.apply(null,arguments)}function l(t){n=t}function d(t){return t instanceof Array||Object.prototype.toString.call(t)==="[object Array]"}function f(t){return t!=null&&Object.prototype.toString.call(t)==="[object Object]"}function c(t,r){return Object.prototype.hasOwnProperty.call(t,r)}function _(t){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(t).length===0;var r;for(r in t)if(c(t,r))return!1;return!0}function y(t){return t===void 0}function Y(t){return typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]"}function C(t){return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}function B(t,r){var i=[],o,u=t.length;for(o=0;o>>0,o;for(o=0;o0)for(i=0;ii.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./localSharedImportMap-Cs4ibnCv.js","./preload-helper-BDBacUwf.js"])))=>i.map(i=>d[i]); import{_ as sr}from"./preload-helper-BDBacUwf.js";var ir={},ar={},Tt={},M={},D={},P={};const ln="federation-manifest.json",cn=".json",un="FEDERATION_DEBUG",j={AT:"@",HYPHEN:"-",SLASH:"/"},De={[j.AT]:"scope_",[j.HYPHEN]:"_",[j.SLASH]:"__"},fn={[De[j.AT]]:j.AT,[De[j.HYPHEN]]:j.HYPHEN,[De[j.SLASH]]:j.SLASH},dn=":",hn="mf-manifest.json",mn="mf-stats.json",_n={NPM:"npm",APP:"app"},gn="__MF_DEVTOOLS_MODULE_INFO__",pn="ENCODE_NAME_PREFIX",yn=".federation",En={identifier:"MFDataPrefetch",globalKey:"__PREFETCH__",library:"mf-data-prefetch",exportsKey:"__PREFETCH_EXPORTS__",fileName:"bootstrap.js"};let Sn=(function(e){return e[e.UNKNOWN=1]="UNKNOWN",e[e.CALCULATED=2]="CALCULATED",e[e.NO_USE=0]="NO_USE",e})({});P.BROWSER_LOG_KEY=un;P.ENCODE_NAME_PREFIX=pn;P.EncodedNameTransformMap=fn;P.FederationModuleManifest=ln;P.MANIFEST_EXT=cn;P.MFModuleType=_n;P.MFPrefetchCommon=En;P.MODULE_DEVTOOL_IDENTIFIER=gn;P.ManifestFileName=hn;P.NameTransformMap=De;P.NameTransformSymbol=j;P.SEPARATOR=dn;P.StatsFileName=mn;P.TEMP_DIR=yn;P.TreeShakingStatus=Sn;var lr={},re={},kt=Object.defineProperty,bn=(e,t)=>{let r={};for(var n in e)kt(r,n,{get:e[n],enumerable:!0});return t||kt(r,Symbol.toStringTag,{value:"Module"}),r};re.__exportAll=bn;(function(e){var r=re.__exportAll({});Object.defineProperty(e,"ContainerPlugin_exports",{enumerable:!0,get:function(){return r}})})(lr);var cr={};(function(e){var r=re.__exportAll({});Object.defineProperty(e,"ContainerReferencePlugin_exports",{enumerable:!0,get:function(){return r}})})(cr);var ur={};(function(e){var r=re.__exportAll({});Object.defineProperty(e,"ModuleFederationPlugin_exports",{enumerable:!0,get:function(){return r}})})(ur);var fr={};(function(e){var r=re.__exportAll({});Object.defineProperty(e,"SharePlugin_exports",{enumerable:!0,get:function(){return r}})})(fr);var dr={};(function(e){var r=re.__exportAll({});Object.defineProperty(e,"ConsumeSharedPlugin_exports",{enumerable:!0,get:function(){return r}})})(dr);var hr={};(function(e){var r=re.__exportAll({});Object.defineProperty(e,"ProvideSharedPlugin_exports",{enumerable:!0,get:function(){return r}})})(hr);var J={},be={};const Rn=P,mr=!0;function _r(){return mr}function Tn(){return typeof navigator<"u"&&(navigator==null?void 0:navigator.product)==="ReactNative"}function In(){try{if(_r()&&window.localStorage)return!!localStorage.getItem(Rn.BROWSER_LOG_KEY)}catch{return!1}return!1}function $n(){return typeof process<"u"&&be&&be.FEDERATION_DEBUG?!!be.FEDERATION_DEBUG:typeof FEDERATION_DEBUG<"u"&&FEDERATION_DEBUG?!0:In()}const Nn=function(){return typeof process<"u"&&be?be:{}};J.getProcessEnv=Nn;J.isBrowserEnv=_r;J.isBrowserEnvValue=mr;J.isDebugMode=$n;J.isReactNativeEnv=Tn;var H={};const S=P,dt=J,gr="[ Federation Runtime ]",Mn=(e,t,r=S.SEPARATOR)=>{const n=e.split(r),o=dt.getProcessEnv().NODE_ENV==="development"&&t,s="*",i=a=>a.startsWith("http")||a.includes(S.MANIFEST_EXT);if(n.length>=2){let[a,...c]=n;e.startsWith(r)&&(a=n.slice(0,2).join(r),c=[o||n.slice(2).join(r)]);let l=o||c.join(r);return i(l)?{name:a,entry:l}:{name:a,version:l||s}}else if(n.length===1){const[a]=n;return o&&i(o)?{name:a,entry:o}:{name:a,version:o||s}}else throw`Invalid entry value: ${e}`},Pn=function(...e){return e.length?e.reduce((t,r)=>r?t?`${t}${S.SEPARATOR}${r}`:r:t,""):""},It=function(e,t="",r=!1){try{const n=r?".js":"";return`${t}${e.replace(new RegExp(`${S.NameTransformSymbol.AT}`,"g"),S.NameTransformMap[S.NameTransformSymbol.AT]).replace(new RegExp(`${S.NameTransformSymbol.HYPHEN}`,"g"),S.NameTransformMap[S.NameTransformSymbol.HYPHEN]).replace(new RegExp(`${S.NameTransformSymbol.SLASH}`,"g"),S.NameTransformMap[S.NameTransformSymbol.SLASH])}${n}`}catch(n){throw n}},vn=function(e,t,r){try{let n=e;if(t){if(!n.startsWith(t))return n;n=n.replace(new RegExp(t,"g"),"")}return n=n.replace(new RegExp(`${S.NameTransformMap[S.NameTransformSymbol.AT]}`,"g"),S.EncodedNameTransformMap[S.NameTransformMap[S.NameTransformSymbol.AT]]).replace(new RegExp(`${S.NameTransformMap[S.NameTransformSymbol.SLASH]}`,"g"),S.EncodedNameTransformMap[S.NameTransformMap[S.NameTransformSymbol.SLASH]]).replace(new RegExp(`${S.NameTransformMap[S.NameTransformSymbol.HYPHEN]}`,"g"),S.EncodedNameTransformMap[S.NameTransformMap[S.NameTransformSymbol.HYPHEN]]),r&&(n=n.replace(".js","")),n}catch(n){throw n}},An=(e,t)=>{if(!e)return"";let r=e;return r==="."&&(r="default_export"),r.startsWith("./")&&(r=r.replace("./","")),It(r,"__federation_expose_",t)},kn=(e,t)=>e?It(e,"__federation_shared_",t):"",On=(e,t)=>{if("getPublicPath"in e){let r;return e.getPublicPath.startsWith("function")?r=new Function("return "+e.getPublicPath)()():r=new Function(e.getPublicPath)(),`${r}${t}`}else return"publicPath"in e?!dt.isBrowserEnv()&&!dt.isReactNativeEnv()&&"ssrPublicPath"in e&&typeof e.ssrPublicPath=="string"?`${e.ssrPublicPath}${t}`:`${e.publicPath}${t}`:(console.warn("Cannot get resource URL. If in debug mode, please ignore.",e,t),"")},wn=(e,t)=>{e||pr(t)},pr=e=>{throw new Error(`${gr}: ${e}`)},Fn=e=>{console.warn(`${gr}: ${e}`)};function Ln(e){try{return JSON.stringify(e,null,2)}catch{return""}}const Dn=/^([\d^=v<>~]|[*xX]$)/;function Hn(e){return Dn.test(e)}H.assert=wn;H.composeKeyWithSeparator=Pn;H.decodeName=vn;H.encodeName=It;H.error=pr;H.generateExposeFilename=An;H.generateShareFilename=kn;H.getResourceUrl=On;H.isRequiredVersion=Hn;H.parseEntry=Mn;H.safeToString=Ln;H.warn=Fn;var ue={};const ye=P,Q=(e,t)=>{if(!e)return t;const n=(o=>{if(o===".")return"";if(o.startsWith("./"))return o.replace("./","");if(o.startsWith("/")){const s=o.slice(1);return s.endsWith("/")?s.slice(0,-1):s}return o})(e);return n?n.endsWith("/")?`${n}${t}`:`${n}/${t}`:t};function yr(e){return e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")}function Cn(e,t={}){var E,I,O;const{remotes:r={},overrides:n={},version:o}=t;let s;const i=()=>"publicPath"in e.metaData?(e.metaData.publicPath==="auto"||e.metaData.publicPath==="")&&o?yr(o):e.metaData.publicPath:e.metaData.getPublicPath,a=Object.keys(n);let c={};Object.keys(r).length||(c=((E=e.remotes)==null?void 0:E.reduce((y,N)=>{let R;const v=N.federationContainerName;return a.includes(v)?R=n[v]:"version"in N?R=N.version:R=N.entry,y[v]={matchedVersion:R},y},{}))||{}),Object.keys(r).forEach(y=>c[y]={matchedVersion:a.includes(y)?n[y]:r[y]});const{remoteEntry:{path:l,name:u,type:d},types:f={path:"",name:"",zip:"",api:""},buildInfo:{buildVersion:h},globalName:m,ssrRemoteEntry:_}=e.metaData,{exposes:g}=e;let p={version:o||"",buildVersion:h,globalName:m,remoteEntry:Q(l,u),remoteEntryType:d,remoteTypes:Q(f.path,f.name),remoteTypesZip:f.zip||"",remoteTypesAPI:f.api||"",remotesInfo:c,shared:e==null?void 0:e.shared.map(y=>({assets:y.assets,sharedName:y.name,version:y.version,usedExports:y.referenceExports||[]})),modules:g==null?void 0:g.map(y=>({moduleName:y.name,modulePath:y.path,assets:y.assets}))};if((I=e.metaData)!=null&&I.prefetchInterface){const y=e.metaData.prefetchInterface;p={...p,prefetchInterface:y}}if((O=e.metaData)!=null&&O.prefetchEntry){const{path:y,name:N,type:R}=e.metaData.prefetchEntry;p={...p,prefetchEntry:Q(y,N),prefetchEntryType:R}}if("publicPath"in e.metaData?(s={...p,publicPath:i()},typeof e.metaData.ssrPublicPath=="string"&&(s.ssrPublicPath=e.metaData.ssrPublicPath)):s={...p,getPublicPath:i()},_){const y=Q(_.path,_.name);s.ssrRemoteEntry=y,s.ssrRemoteEntryType=_.type||"commonjs-module"}return s}function qn(e){return!!("remoteEntry"in e&&e.remoteEntry.includes(ye.MANIFEST_EXT))}function Gn(e){if(!e)return{statsFileName:ye.StatsFileName,manifestFileName:ye.ManifestFileName};let t=typeof e=="boolean"?"":e.filePath||"",r=typeof e=="boolean"?"":e.fileName||"";const n=".json",o=a=>a.endsWith(n)?a:`${a}${n}`,s=(a,c)=>a.replace(n,`${c}${n}`),i=r?o(r):ye.ManifestFileName;return{statsFileName:Q(t,r?s(i,"-stats"):ye.StatsFileName),manifestFileName:Q(t,i)}}ue.generateSnapshotFromManifest=Cn;ue.getManifestFileName=Gn;ue.inferAutoPublicPath=yr;ue.isManifestProvider=qn;ue.simpleJoinRemoteEntry=Q;var fe={};const Ot=J,Er="[ Module Federation ]",ge=console,Un=["logger.ts","logger.js","captureStackTrace","Logger.emit","Logger.log","Logger.info","Logger.warn","Logger.error","Logger.debug"];function Wn(){try{const e=new Error().stack;if(!e)return;const[,...t]=e.split(` `),r=t.filter(n=>!Un.some(o=>n.includes(o)));return r.length?`Stack trace: ${r.slice(0,5).join(` `)}`:void 0}catch{return}}var Sr=class{constructor(e,t=ge){this.prefix=e,this.delegate=t??ge}setPrefix(e){this.prefix=e}setDelegate(e){this.delegate=e??ge}emit(e,t){const r=this.delegate,n=Ot.isDebugMode()?Wn():void 0,o=n?[...t,n]:t,s=(()=>{switch(e){case"log":return["log","info"];case"info":return["info","log"];case"warn":return["warn","info","log"];case"error":return["error","warn","log"];default:return["debug","log"]}})();for(const i of s){const a=r[i];if(typeof a=="function"){a.call(r,this.prefix,...o);return}}for(const i of s){const a=ge[i];if(typeof a=="function"){a.call(ge,this.prefix,...o);return}}}log(...e){this.emit("log",e)}warn(...e){this.emit("warn",e)}error(...e){this.emit("error",e)}success(...e){this.emit("info",e)}info(...e){this.emit("info",e)}ready(...e){this.emit("info",e)}debug(...e){Ot.isDebugMode()&&this.emit("debug",e)}};function br(e){return new Sr(e)}function Rr(e){const t=new Sr(e);return Object.defineProperty(t,"__mf_infrastructure_logger__",{value:!0,enumerable:!1,configurable:!1}),t}function Bn(e,t,r){if(e.__mf_infrastructure_logger__&&t!=null&&t.getInfrastructureLogger)try{const n=t.getInfrastructureLogger(r);n&&typeof n=="object"&&(typeof n.log=="function"||typeof n.info=="function"||typeof n.warn=="function"||typeof n.error=="function")&&e.setDelegate(n)}catch{e.setDelegate(void 0)}}const jn=br(Er),Vn=Rr(Er);fe.bindLoggerToCompiler=Bn;fe.createInfrastructureLogger=Rr;fe.createLogger=br;fe.infrastructureLogger=Vn;fe.logger=jn;var de={};const Xn=H;async function $t(e,t){try{return await e()}catch(r){!t&&Xn.warn(r);return}}function Ue(e,t){const r=/^(https?:)?\/\//i;return e.replace(r,"").replace(/\/$/,"")===t.replace(r,"").replace(/\/$/,"")}function Tr(e){let t=null,r=!0,n=2e4,o;const s=document.getElementsByTagName("script");for(let l=0;l{t&&(d==="async"||d==="defer"?t[d]=l[d]:t.getAttribute(d)||t.setAttribute(d,l[d]))})}let i=null;const a=typeof window<"u"?l=>{if(l.filename&&Ue(l.filename,e.url)){const u=new Error(`ScriptExecutionError: Script "${e.url}" loaded but threw a runtime error during execution: ${l.message} (${l.filename}:${l.lineno}:${l.colno})`);u.name="ScriptExecutionError",i=u}}:null;a&&window.addEventListener("error",a);const c=async(l,u)=>{clearTimeout(o),a&&window.removeEventListener("error",a);const d=()=>{if((u==null?void 0:u.type)==="error"){const f=new Error(`ScriptNetworkError: Failed to load script "${e.url}" - the script URL is unreachable or the server returned an error (network failure, 404, CORS, etc.)`);f.name="ScriptNetworkError",e!=null&&e.onErrorCallback&&(e==null||e.onErrorCallback(f))}else i?e!=null&&e.onErrorCallback&&(e==null||e.onErrorCallback(i)):e!=null&&e.cb&&(e==null||e.cb())};if(t&&(t.onerror=null,t.onload=null,$t(()=>{const{needDeleteScript:f=!0}=e;f&&t!=null&&t.parentNode&&t.parentNode.removeChild(t)}),l&&typeof l=="function")){const f=l(u);if(f instanceof Promise){const h=await f;return d(),h}return d(),f}d()};return t.onerror=c.bind(null,t.onerror),t.onload=c.bind(null,t.onload),o=setTimeout(()=>{c(null,new Error(`Remote script "${e.url}" time-outed.`))},n),{script:t,needAttach:r}}function xn(e){let t=null,r=!0;const n=document.getElementsByTagName("link");for(let s=0;s{t&&!t.getAttribute(a)&&t.setAttribute(a,i[a])})}const o=(s,i)=>{const a=()=>{(i==null?void 0:i.type)==="error"?e!=null&&e.onErrorCallback&&(e==null||e.onErrorCallback(i)):e!=null&&e.cb&&(e==null||e.cb())};if(t&&(t.onerror=null,t.onload=null,$t(()=>{const{needDeleteLink:c=!0}=e;c&&t!=null&&t.parentNode&&t.parentNode.removeChild(t)}),s)){const c=s(i);return a(),c}a()};return t.onerror=o.bind(null,t.onerror),t.onload=o.bind(null,t.onload),{link:t,needAttach:r}}function Kn(e,t){const{attrs:r={},createScriptHook:n}=t;return new Promise((o,s)=>{const{script:i,needAttach:a}=Tr({url:e,cb:o,onErrorCallback:s,attrs:{fetchpriority:"high",...r},createScriptHook:n,needDeleteScript:!0});a&&document.head.appendChild(i)})}de.createLink=xn;de.createScript=Tr;de.isStaticResourcesEqual=Ue;de.loadScript=Kn;de.safeWrapper=$t;var Nt={};const Yn=(e,t,r,n)=>{t(new Error("createScriptNode is disabled in non-Node.js environment"))},zn=(e,t)=>{throw new Error("loadScriptNode is disabled in non-Node.js environment")};Nt.createScriptNode=Yn;Nt.loadScriptNode=zn;var Ir={};function Jn(e,t,r){return function(n){if(n===!1)return!1;if(typeof n>"u")return e?t:!1;if(n===!0)return t;if(n&&typeof n=="object")return{...t,...n};throw new Error(`Unexpected type for \`${r}\`, expect boolean/undefined/object, got: ${typeof n}`)}}Ir.normalizeOptions=Jn;var $r={};const Zn=e=>e;$r.createModuleFederationConfig=Zn;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=P,r=lr,n=cr,o=ur,s=fr,i=dr,a=hr,c=J,l=H,u=ue,d=fe,f=de,h=Nt,m=Ir,_=$r;e.BROWSER_LOG_KEY=t.BROWSER_LOG_KEY,e.ENCODE_NAME_PREFIX=t.ENCODE_NAME_PREFIX,e.EncodedNameTransformMap=t.EncodedNameTransformMap,e.FederationModuleManifest=t.FederationModuleManifest,e.MANIFEST_EXT=t.MANIFEST_EXT,e.MFModuleType=t.MFModuleType,e.MFPrefetchCommon=t.MFPrefetchCommon,e.MODULE_DEVTOOL_IDENTIFIER=t.MODULE_DEVTOOL_IDENTIFIER,e.ManifestFileName=t.ManifestFileName,e.NameTransformMap=t.NameTransformMap,e.NameTransformSymbol=t.NameTransformSymbol,e.SEPARATOR=t.SEPARATOR,e.StatsFileName=t.StatsFileName,e.TEMP_DIR=t.TEMP_DIR,e.TreeShakingStatus=t.TreeShakingStatus,e.assert=l.assert,e.bindLoggerToCompiler=d.bindLoggerToCompiler,e.composeKeyWithSeparator=l.composeKeyWithSeparator,Object.defineProperty(e,"consumeSharedPlugin",{enumerable:!0,get:function(){return i.ConsumeSharedPlugin_exports}}),Object.defineProperty(e,"containerPlugin",{enumerable:!0,get:function(){return r.ContainerPlugin_exports}}),Object.defineProperty(e,"containerReferencePlugin",{enumerable:!0,get:function(){return n.ContainerReferencePlugin_exports}}),e.createInfrastructureLogger=d.createInfrastructureLogger,e.createLink=f.createLink,e.createLogger=d.createLogger,e.createModuleFederationConfig=_.createModuleFederationConfig,e.createScript=f.createScript,e.createScriptNode=h.createScriptNode,e.decodeName=l.decodeName,e.encodeName=l.encodeName,e.error=l.error,e.generateExposeFilename=l.generateExposeFilename,e.generateShareFilename=l.generateShareFilename,e.generateSnapshotFromManifest=u.generateSnapshotFromManifest,e.getManifestFileName=u.getManifestFileName,e.getProcessEnv=c.getProcessEnv,e.getResourceUrl=l.getResourceUrl,e.inferAutoPublicPath=u.inferAutoPublicPath,e.infrastructureLogger=d.infrastructureLogger,e.isBrowserEnv=c.isBrowserEnv,e.isBrowserEnvValue=c.isBrowserEnvValue,e.isDebugMode=c.isDebugMode,e.isManifestProvider=u.isManifestProvider,e.isReactNativeEnv=c.isReactNativeEnv,e.isRequiredVersion=l.isRequiredVersion,e.isStaticResourcesEqual=f.isStaticResourcesEqual,e.loadScript=f.loadScript,e.loadScriptNode=h.loadScriptNode,e.logger=d.logger,Object.defineProperty(e,"moduleFederationPlugin",{enumerable:!0,get:function(){return o.ModuleFederationPlugin_exports}}),e.normalizeOptions=m.normalizeOptions,e.parseEntry=l.parseEntry,Object.defineProperty(e,"provideSharedPlugin",{enumerable:!0,get:function(){return a.ProvideSharedPlugin_exports}}),e.safeToString=l.safeToString,e.safeWrapper=f.safeWrapper,Object.defineProperty(e,"sharePlugin",{enumerable:!0,get:function(){return s.SharePlugin_exports}}),e.simpleJoinRemoteEntry=u.simpleJoinRemoteEntry,e.warn=l.warn})(D);var Nr={},Mt={};const Qn=e=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}#${e.toLowerCase()}`,eo=(e,t,r,n)=>{const o=[`${[t[e]]} #${e}`];return r&&o.push(`args: ${JSON.stringify(r)}`),o.push(Qn(e)),n&&o.push(`Original Error Message: ${n}`),o.join(` `)};Mt.getShortErrorMsg=eo;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Mt;function r(n,o,s,i,a,c){return i(t.getShortErrorMsg(n,o,s,a))}e.logAndReport=r})(Nr);let to=D,ro=Nr;const ee="[ Federation Runtime ]",ht=(0,to.createLogger)(ee);function no(e,t,r,n,o){e||(r!==void 0?mt(t,r,n,void 0,o):mt(t))}function mt(e,t,r,n,o){if(t!==void 0)return(0,ro.logAndReport)(e,t,r??{},i=>{throw new Error(`${ee}: ${i}`)},n,o);const s=e;throw s instanceof Error?(s.message.startsWith(ee)||(s.message=`${ee}: ${s.message}`),s):new Error(`${ee}: ${s}`)}function oo(e){e instanceof Error&&(e.message.startsWith(ee)||(e.message=`${ee}: ${e.message}`)),ht.warn(e)}M.assert=no;M.error=mt;M.logger=ht;M.warn=oo;var $={};const so=M;let wt=D;function io(e,t){return e.findIndex(r=>r===t)===-1&&e.push(t),e}function ao(e){return"version"in e&&e.version?`${e.name}:${e.version}`:"entry"in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function lo(e){return typeof e.entry<"u"}function co(e){return!e.entry.includes(".json")}async function uo(e,t){try{return await e()}catch(r){!t&&so.warn(r);return}}function fo(e){return e&&typeof e=="object"}const Mr=Object.prototype.toString;function ho(e){return Mr.call(e)==="[object Object]"}function mo(e,t){const r=/^(https?:)?\/\//i;return e.replace(r,"").replace(/\/$/,"")===t.replace(r,"").replace(/\/$/,"")}function _o(e){return Array.isArray(e)?e:[e]}function go(e){const t={url:"",type:"global",globalName:""};return wt.isBrowserEnvValue||(0,wt.isReactNativeEnv)()||!("ssrRemoteEntry"in e)?"remoteEntry"in e?{url:e.remoteEntry,type:e.remoteEntryType,globalName:e.globalName}:t:"ssrRemoteEntry"in e?{url:e.ssrRemoteEntry||t.url,type:e.ssrRemoteEntryType||t.type,globalName:e.globalName}:t}const po=(e,t)=>{let r;return e.endsWith("/")?r=e.slice(0,-1):r=e,t.startsWith(".")&&(t=t.slice(1)),r=r+t,r};$.addUniqueItem=io;$.arrayOptions=_o;$.getFMId=ao;$.getRemoteEntryInfoFromSnapshot=go;$.isObject=fo;$.isPlainObject=ho;$.isPureRemoteEntry=co;$.isRemoteInfoWithEntry=lo;$.isStaticResourcesEqual=mo;$.objectToString=Mr;$.processModuleAlias=po;$.safeWrapper=uo;var b={};const Pr=M,_t=$;let yo=D;const k=typeof globalThis=="object"?globalThis:window,C=(()=>{try{return document.defaultView}catch{return k}})(),Eo=C;function He(e,t,r){Object.defineProperty(e,t,{value:r,configurable:!1,writable:!0})}function Ce(e,t){return Object.hasOwnProperty.call(e,t)}Ce(k,"__GLOBAL_LOADING_REMOTE_ENTRY__")||He(k,"__GLOBAL_LOADING_REMOTE_ENTRY__",{});const gt=k.__GLOBAL_LOADING_REMOTE_ENTRY__;function vr(e){Ce(e,"__VMOK__")&&!Ce(e,"__FEDERATION__")&&He(e,"__FEDERATION__",e.__VMOK__),Ce(e,"__FEDERATION__")||(He(e,"__FEDERATION__",{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),He(e,"__VMOK__",e.__FEDERATION__)),e.__FEDERATION__.__GLOBAL_PLUGIN__??=[],e.__FEDERATION__.__INSTANCES__??=[],e.__FEDERATION__.moduleInfo??={},e.__FEDERATION__.__SHARE__??={},e.__FEDERATION__.__MANIFEST_LOADING__??={},e.__FEDERATION__.__PRELOADED_MAP__??=new Map}vr(k);vr(C);function So(){k.__FEDERATION__.__GLOBAL_PLUGIN__=[],k.__FEDERATION__.__INSTANCES__=[],k.__FEDERATION__.moduleInfo={},k.__FEDERATION__.__SHARE__={},k.__FEDERATION__.__MANIFEST_LOADING__={},Object.keys(gt).forEach(e=>{delete gt[e]})}function bo(e){k.__FEDERATION__.__INSTANCES__.push(e)}function Ro(){return k.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function To(e,t=(0,yo.isDebugMode)()){t&&(k.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,k.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__="2.2.2")}function pt(e,t){if(typeof t=="string"){if(e[t])return{value:e[t],key:t};{const r=Object.keys(e);for(const n of r){const[o,s]=n.split(":"),i=`${o}:${t}`,a=e[i];if(a)return{value:a,key:i}}return{value:void 0,key:t}}}else Pr.error(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`)}const Io=()=>C.__FEDERATION__.moduleInfo,Ar=(e,t)=>{const r=pt(t,_t.getFMId(e)).value;if(r&&!r.version&&"version"in e&&e.version&&(r.version=e.version),r)return r;if("version"in e&&e.version){const{version:n,...o}=e,s=_t.getFMId(o),i=pt(C.__FEDERATION__.moduleInfo,s).value;if((i==null?void 0:i.version)===n)return i}},$o=e=>Ar(e,C.__FEDERATION__.moduleInfo),No=(e,t)=>{const r=_t.getFMId(e);return C.__FEDERATION__.moduleInfo[r]=t,C.__FEDERATION__.moduleInfo},Mo=e=>(C.__FEDERATION__.moduleInfo={...C.__FEDERATION__.moduleInfo,...e},()=>{const t=Object.keys(e);for(const r of t)delete C.__FEDERATION__.moduleInfo[r]}),Po=(e,t)=>{const r=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:r,entryExports:k[r]}},vo=e=>{const{__GLOBAL_PLUGIN__:t}=C.__FEDERATION__;e.forEach(r=>{t.findIndex(n=>n.name===r.name)===-1?t.push(r):Pr.warn(`The plugin ${r.name} has been registered.`)})},Ao=()=>C.__FEDERATION__.__GLOBAL_PLUGIN__,ko=e=>k.__FEDERATION__.__PRELOADED_MAP__.get(e),Oo=e=>k.__FEDERATION__.__PRELOADED_MAP__.set(e,!0);b.CurrentGlobal=k;b.Global=Eo;b.addGlobalSnapshot=Mo;b.getGlobalFederationConstructor=Ro;b.getGlobalHostPlugins=Ao;b.getGlobalSnapshot=Io;b.getGlobalSnapshotInfoByModuleInfo=$o;b.getInfoWithoutType=pt;b.getPreloaded=ko;b.getRemoteEntryExports=Po;b.getTargetSnapshotInfoByModuleInfo=Ar;b.globalLoading=gt;b.nativeGlobal=C;b.registerGlobalPlugins=vo;b.resetFederationGlobalInfo=So;b.setGlobalFederationConstructor=To;b.setGlobalFederationInstance=bo;b.setGlobalSnapshotInfoByModuleInfo=No;b.setPreloaded=Oo;var Pt={},ne={},W={};const Ft="[0-9A-Za-z-]+",vt=`(?:\\+(${Ft}(?:\\.${Ft})*))`,Re="0|[1-9]\\d*",qe="[0-9]+",kr="\\d*[a-zA-Z-][a-zA-Z0-9-]*",Lt=`(?:${qe}|${kr})`,wo=`(?:-?(${Lt}(?:\\.${Lt})*))`,Dt=`(?:${Re}|${kr})`,Or=`(?:-(${Dt}(?:\\.${Dt})*))`,ze=`${Re}|x|X|\\*`,ce=`[v=\\s]*(${ze})(?:\\.(${ze})(?:\\.(${ze})(?:${Or})?${vt}?)?)?`,Fo=`^\\s*(${ce})\\s+-\\s+(${ce})\\s*$`,Lo=`[v=\\s]*${`(${qe})\\.(${qe})\\.(${qe})`}${wo}?${vt}?`,At="((?:<|>)?=?)",Do=`(\\s*)${At}\\s*(${Lo}|${ce})`,wr="(?:~>?)",Ho=`(\\s*)${wr}\\s+`,Fr="(?:\\^)",Co=`(\\s*)${Fr}\\s+`,qo="(<|>)?=?\\s*\\*",Go=`^${Fr}${ce}$`,Uo=`v?${`(${Re})\\.(${Re})\\.(${Re})`}${Or}?${vt}?`,Wo=`^${wr}${ce}$`,Bo=`^${At}\\s*${ce}$`,jo=`^${At}\\s*(${Uo})$|^$`,Vo="^\\s*>=\\s*0.0.0\\s*$";W.caret=Go;W.caretTrim=Co;W.comparator=jo;W.comparatorTrim=Do;W.gte0=Vo;W.hyphenRange=Fo;W.star=qo;W.tilde=Wo;W.tildeTrim=Ho;W.xRange=Bo;const Xo=W;function Lr(e){return new RegExp(e)}function xo(e){return!e||e.toLowerCase()==="x"||e==="*"}function Ko(...e){return t=>e.reduce((r,n)=>n(r),t)}function Yo(e){return e.match(Lr(Xo.comparator))}function zo(e,t,r,n){const o=`${e}.${t}.${r}`;return n?`${o}-${n}`:o}ne.combineVersion=zo;ne.extractComparator=Yo;ne.isXVersion=xo;ne.parseRegex=Lr;ne.pipe=Ko;var V={};const x=W,T=ne;function Jo(e){return e.replace(T.parseRegex(x.hyphenRange),(t,r,n,o,s,i,a,c,l,u,d,f)=>(T.isXVersion(n)?r="":T.isXVersion(o)?r=`>=${n}.0.0`:T.isXVersion(s)?r=`>=${n}.${o}.0`:r=`>=${r}`,T.isXVersion(l)?c="":T.isXVersion(u)?c=`<${Number(l)+1}.0.0-0`:T.isXVersion(d)?c=`<${l}.${Number(u)+1}.0-0`:f?c=`<=${l}.${u}.${d}-${f}`:c=`<=${c}`,`${r} ${c}`.trim()))}function Zo(e){return e.replace(T.parseRegex(x.comparatorTrim),"$1$2$3")}function Qo(e){return e.replace(T.parseRegex(x.tildeTrim),"$1~")}function es(e){return e.replace(T.parseRegex(x.caretTrim),"$1^")}function ts(e){return e.trim().split(/\s+/).map(t=>t.replace(T.parseRegex(x.caret),(r,n,o,s,i)=>T.isXVersion(n)?"":T.isXVersion(o)?`>=${n}.0.0 <${Number(n)+1}.0.0-0`:T.isXVersion(s)?n==="0"?`>=${n}.${o}.0 <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.0 <${Number(n)+1}.0.0-0`:i?n==="0"?o==="0"?`>=${n}.${o}.${s}-${i} <${n}.${o}.${Number(s)+1}-0`:`>=${n}.${o}.${s}-${i} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${s}-${i} <${Number(n)+1}.0.0-0`:n==="0"?o==="0"?`>=${n}.${o}.${s} <${n}.${o}.${Number(s)+1}-0`:`>=${n}.${o}.${s} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${s} <${Number(n)+1}.0.0-0`)).join(" ")}function rs(e){return e.trim().split(/\s+/).map(t=>t.replace(T.parseRegex(x.tilde),(r,n,o,s,i)=>T.isXVersion(n)?"":T.isXVersion(o)?`>=${n}.0.0 <${Number(n)+1}.0.0-0`:T.isXVersion(s)?`>=${n}.${o}.0 <${n}.${Number(o)+1}.0-0`:i?`>=${n}.${o}.${s}-${i} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${s} <${n}.${Number(o)+1}.0-0`)).join(" ")}function ns(e){return e.split(/\s+/).map(t=>t.trim().replace(T.parseRegex(x.xRange),(r,n,o,s,i,a)=>{const c=T.isXVersion(o),l=c||T.isXVersion(s),u=l||T.isXVersion(i);return n==="="&&u&&(n=""),a="",c?n===">"||n==="<"?"<0.0.0-0":"*":n&&u?(l&&(s=0),i=0,n===">"?(n=">=",l?(o=Number(o)+1,s=0,i=0):(s=Number(s)+1,i=0)):n==="<="&&(n="<",l?o=Number(o)+1:s=Number(s)+1),n==="<"&&(a="-0"),`${n+o}.${s}.${i}${a}`):l?`>=${o}.0.0${a} <${Number(o)+1}.0.0-0`:u?`>=${o}.${s}.0${a} <${o}.${Number(s)+1}.0-0`:r})).join(" ")}function os(e){return e.trim().replace(T.parseRegex(x.star),"")}function ss(e){return e.trim().replace(T.parseRegex(x.gte0),"")}V.parseCaretTrim=es;V.parseCarets=ts;V.parseComparatorTrim=Zo;V.parseGTE0=ss;V.parseHyphen=Jo;V.parseStar=os;V.parseTildeTrim=Qo;V.parseTildes=rs;V.parseXRanges=ns;var Dr={};function Ge(e,t){return e=Number(e)||e,t=Number(t)||t,e>t?1:e===t?0:-1}function is(e,t){const{preRelease:r}=e,{preRelease:n}=t;if(r===void 0&&n)return 1;if(r&&n===void 0)return-1;if(r===void 0&&n===void 0)return 0;for(let o=0,s=r.length;o<=s;o++){const i=r[o],a=n[o];if(i!==a)return i===void 0&&a===void 0?0:i?a?Ge(i,a):-1:1}return 0}function Oe(e,t){return Ge(e.major,t.major)||Ge(e.minor,t.minor)||Ge(e.patch,t.patch)||is(e,t)}function Je(e,t){return e.version===t.version}function as(e,t){switch(e.operator){case"":case"=":return Je(e,t);case">":return Oe(e,t)<0;case">=":return Je(e,t)||Oe(e,t)<0;case"<":return Oe(e,t)>0;case"<=":return Je(e,t)||Oe(e,t)>0;case void 0:return!0;default:return!1}}Dr.compare=as;const ae=ne,X=V,ls=Dr;function cs(e){return ae.pipe(X.parseCarets,X.parseTildes,X.parseXRanges,X.parseStar)(e)}function us(e){return ae.pipe(X.parseHyphen,X.parseComparatorTrim,X.parseTildeTrim,X.parseCaretTrim)(e.trim()).split(/\s+/).join(" ")}function fs(e,t){if(!e)return!1;const r=ae.extractComparator(e);if(!r)return!1;const[,n,,o,s,i,a]=r,c={operator:n,version:ae.combineVersion(o,s,i,a),major:o,minor:s,patch:i,preRelease:a==null?void 0:a.split(".")},l=t.split("||");for(const u of l){const d=u.trim();if(!d||d==="*"||d==="x")return!0;try{const f=us(d);if(!f.trim())return!0;const h=f.split(" ").map(g=>cs(g)).join(" ");if(!h.trim())return!0;const m=h.split(/\s+/).map(g=>X.parseGTE0(g)).filter(Boolean);if(m.length===0)continue;let _=!0;for(const g of m){const p=ae.extractComparator(g);if(!p){_=!1;break}const[,E,,I,O,y,N]=p;if(!ls.compare({operator:E,version:ae.combineVersion(I,O,y,N),major:I,minor:O,patch:y,preRelease:N==null?void 0:N.split(".")},c)){_=!1;break}}if(_)return!0}catch(f){console.error(`[semver] Error processing range part "${d}":`,f);continue}}return!1}Pt.satisfy=fs;var q={},oe={};const ds="default",hs="global";oe.DEFAULT_REMOTE_TYPE=hs;oe.DEFAULT_SCOPE=ds;const We=M,Hr=$,Cr=b,ms=oe,Ee=Pt;let yt=D;function _s(e,t,r,n){var s,i;let o;return"get"in e?o=e.get:"lib"in e?o=()=>Promise.resolve(e.lib):o=()=>Promise.resolve(()=>{We.error(`Cannot get shared "${r}" from "${t}": neither "get" nor "lib" is provided in the share config.`)}),(s=e.shareConfig)!=null&&s.eager&&((i=e.treeShaking)!=null&&i.mode)&&We.error(`Invalid shared config for "${r}" from "${t}": cannot use both "eager: true" and "treeShaking.mode" simultaneously. Choose one strategy.`),{deps:[],useIn:[],from:t,loading:null,...e,shareConfig:{requiredVersion:`^${e.version}`,singleton:!1,eager:!1,strictVersion:!1,...e.shareConfig},get:o,loaded:e!=null&&e.loaded||"lib"in e?!0:void 0,version:e.version??"0",scope:Array.isArray(e.scope)?e.scope:[e.scope??"default"],strategy:(e.strategy??n)||"version-first",treeShaking:e.treeShaking?{...e.treeShaking,mode:e.treeShaking.mode??"server-calc",status:e.treeShaking.status??yt.TreeShakingStatus.UNKNOWN,useIn:[]}:void 0}}function gs(e,t){const r=t.shared||{},n=t.name,o=Object.keys(r).reduce((i,a)=>{const c=Hr.arrayOptions(r[a]);return i[a]=i[a]||[],c.forEach(l=>{i[a].push(_s(l,n,a,t.shareStrategy))}),i},{}),s={...e.shared};return Object.keys(o).forEach(i=>{s[i]?o[i].forEach(a=>{s[i].find(c=>c.version===a.version)||s[i].push(a)}):s[i]=o[i]}),{allShareInfos:s,newShareInfos:o}}function Te(e,t){if(!e)return!1;const{status:r,mode:n}=e;return r===yt.TreeShakingStatus.NO_USE?!1:r===yt.TreeShakingStatus.CALCULATED?!0:n==="runtime-infer"?t?ys(e,t):!0:!1}function te(e,t){const r=n=>{if(!Number.isNaN(Number(n))){const o=n.split(".");let s=n;for(let i=0;i<3-o.length;i++)s+=".0";return s}return n};return!!Ee.satisfy(r(e),`<=${r(t)}`)}const Ie=(e,t)=>{const r=t||function(n,o){return te(n,o)};return Object.keys(e).reduce((n,o)=>!n||r(n,o)||n==="0"?o:n,0)},Be=e=>!!e.loaded||typeof e.lib=="function",ps=e=>!!e.loading,ys=(e,t)=>{if(!e||!t)return!1;const{usedExports:r}=e;return r?!!t.every(n=>r.includes(n)):!1};function Es(e,t,r,n){const o=e[t][r];let s="",i=Te(n);const a=function(c,l){return i?o[c].treeShaking?o[l].treeShaking?!Be(o[c].treeShaking)&&te(c,l):!1:!0:!Be(o[c])&&te(c,l)};if(i){if(s=Ie(e[t][r],a),s)return{version:s,useTreesShaking:i};i=!1}return{version:Ie(e[t][r],a),useTreesShaking:i}}const se=e=>Be(e)||ps(e);function Ss(e,t,r,n){const o=e[t][r];let s="",i=Te(n);const a=function(c,l){if(i){if(!o[c].treeShaking)return!0;if(!o[l].treeShaking)return!1;if(se(o[l].treeShaking))return se(o[c].treeShaking)?!!te(c,l):!0;if(se(o[c].treeShaking))return!1}return se(o[l])?se(o[c])?!!te(c,l):!0:se(o[c])?!1:te(c,l)};if(i){if(s=Ie(e[t][r],a),s)return{version:s,useTreesShaking:i};i=!1}return{version:Ie(e[t][r],a),useTreesShaking:i}}function bs(e){return e==="loaded-first"?Ss:Es}function Rs(e,t,r,n){if(!e)return;const{shareConfig:o,scope:s=ms.DEFAULT_SCOPE,strategy:i,treeShaking:a}=r,c=Array.isArray(s)?s:[s];for(const l of c)if(o&&e[l]&&e[l][t]){const{requiredVersion:u}=o,{version:d,useTreesShaking:f}=bs(i)(e,l,t,a),h=()=>{const _=e[l][t][d];if(o.singleton){if(typeof u=="string"&&!Ee.satisfy(d,u)){const g=`Version ${d} from ${d&&_.from} of shared singleton module ${t} does not satisfy the requirement of ${r.from} which needs ${u})`;o.strictVersion?We.error(g):We.warn(g)}return{shared:_,useTreesShaking:f}}else{if(u===!1||u==="*")return{shared:_,useTreesShaking:f};if(Ee.satisfy(d,u))return{shared:_,useTreesShaking:f};const g=Te(a);if(g){for(const[p,E]of Object.entries(e[l][t]))if(Te(E.treeShaking,a==null?void 0:a.usedExports)&&Ee.satisfy(p,u))return{shared:E,useTreesShaking:g}}for(const[p,E]of Object.entries(e[l][t]))if(Ee.satisfy(p,u))return{shared:E,useTreesShaking:!1}}},m={shareScopeMap:e,scope:l,pkgName:t,version:d,GlobalFederation:Cr.Global.__FEDERATION__,shareInfo:r,resolver:h};return(n.emit(m)||m).resolver()}}function Ts(){return Cr.Global.__FEDERATION__.__SHARE__}function Is(e){const{pkgName:t,extraOptions:r,shareInfos:n}=e,o=c=>{if(!c)return;const l={};return c.forEach(d=>{l[d.version]=d}),l[Ie(l,function(d,f){return!Be(l[d])&&te(d,f)})]},s=(r==null?void 0:r.resolver)??o,i=c=>c!==null&&typeof c=="object"&&!Array.isArray(c),a=(...c)=>{const l={};for(const u of c)if(u)for(const[d,f]of Object.entries(u)){const h=l[d];i(h)&&i(f)?l[d]=a(h,f):f!==void 0&&(l[d]=f)}return l};return a(s(n[t]),r==null?void 0:r.customShareInfo)}const $s=(e,t)=>{e.useIn||(e.useIn=[]),Hr.addUniqueItem(e.useIn,t)};function Ns(e,t){return t&&e.treeShaking?e.treeShaking:e}q.addUseIn=$s;q.directShare=Ns;q.formatShareConfigs=gs;q.getGlobalShareScope=Ts;q.getRegisteredShare=Rs;q.getTargetSharedOptions=Is;q.shouldUseTreeShaking=Te;var he={};function Ms(e,t){for(const r of e){const n=t.startsWith(r.name);let o=t.replace(r.name,"");if(n){if(o.startsWith("/")){const a=r.name;return o=`.${o}`,{pkgNameOrAlias:a,expose:o,remote:r}}else if(o==="")return{pkgNameOrAlias:r.name,expose:".",remote:r}}const s=r.alias&&t.startsWith(r.alias);let i=r.alias&&t.replace(r.alias,"");if(r.alias&&s){if(i&&i.startsWith("/")){const a=r.alias;return i=`.${i}`,{pkgNameOrAlias:a,expose:i,remote:r}}else if(i==="")return{pkgNameOrAlias:r.alias,expose:".",remote:r}}}}function Ps(e,t){for(const r of e)if(t===r.name||r.alias&&t===r.alias)return r}he.matchRemote=Ps;he.matchRemoteWithNameAndExpose=Ms;var K={},Y={},F={};const vs="RUNTIME-001",As="RUNTIME-002",ks="RUNTIME-003",Os="RUNTIME-004",ws="RUNTIME-005",Fs="RUNTIME-006",Ls="RUNTIME-007",Ds="RUNTIME-008",Hs="RUNTIME-009",Cs="RUNTIME-010",qs="RUNTIME-011",Gs="TYPE-001",Us="BUILD-001",Ws="BUILD-002";F.BUILD_001=Us;F.BUILD_002=Ws;F.RUNTIME_001=vs;F.RUNTIME_002=As;F.RUNTIME_003=ks;F.RUNTIME_004=Os;F.RUNTIME_005=ws;F.RUNTIME_006=Fs;F.RUNTIME_007=Ls;F.RUNTIME_008=Ds;F.RUNTIME_009=Hs;F.RUNTIME_010=Cs;F.RUNTIME_011=qs;F.TYPE_001=Gs;var Me={};const L=F,qr={[L.RUNTIME_001]:"Failed to get remoteEntry exports.",[L.RUNTIME_002]:'The remote entry interface does not contain "init"',[L.RUNTIME_003]:"Failed to get manifest.",[L.RUNTIME_004]:"Failed to locate remote.",[L.RUNTIME_005]:"Invalid loadShareSync function call from bundler runtime",[L.RUNTIME_006]:"Invalid loadShareSync function call from runtime",[L.RUNTIME_007]:"Failed to get remote snapshot.",[L.RUNTIME_008]:"Failed to load script resources.",[L.RUNTIME_009]:"Please call createInstance first.",[L.RUNTIME_010]:'The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.',[L.RUNTIME_011]:"The remoteEntry URL is missing from the remote snapshot."},Gr={[L.TYPE_001]:"Failed to generate type declaration. Execute the below cmd to reproduce and fix the error."},Ur={[L.BUILD_001]:"Failed to find expose module.",[L.BUILD_002]:"PublicPath is required in prod mode."},Bs={...qr,...Gr,...Ur};Me.buildDescMap=Ur;Me.errorDescMap=Bs;Me.runtimeDescMap=qr;Me.typeDescMap=Gr;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=F,r=Mt,n=Me;e.BUILD_001=t.BUILD_001,e.BUILD_002=t.BUILD_002,e.RUNTIME_001=t.RUNTIME_001,e.RUNTIME_002=t.RUNTIME_002,e.RUNTIME_003=t.RUNTIME_003,e.RUNTIME_004=t.RUNTIME_004,e.RUNTIME_005=t.RUNTIME_005,e.RUNTIME_006=t.RUNTIME_006,e.RUNTIME_007=t.RUNTIME_007,e.RUNTIME_008=t.RUNTIME_008,e.RUNTIME_009=t.RUNTIME_009,e.RUNTIME_010=t.RUNTIME_010,e.RUNTIME_011=t.RUNTIME_011,e.TYPE_001=t.TYPE_001,e.buildDescMap=n.buildDescMap,e.errorDescMap=n.errorDescMap,e.getShortErrorMsg=r.getShortErrorMsg,e.runtimeDescMap=n.runtimeDescMap,e.typeDescMap=n.typeDescMap})(Y);const Ve=M,le=b,Ht=oe;let Wr=D,$e=Y;const Br=".then(callbacks[0]).catch(callbacks[1])";async function js({entry:e,remoteEntryExports:t}){return new Promise((r,n)=>{try{t?r(t):typeof FEDERATION_ALLOW_NEW_FUNCTION<"u"?new Function("callbacks",`import("${e}")${Br}`)([r,n]):import(e).then(r).catch(n)}catch(o){Ve.error(`Failed to load ESM entry from "${e}". ${o instanceof Error?o.message:String(o)}`)}})}async function Vs({entry:e,remoteEntryExports:t}){return new Promise((r,n)=>{try{t?r(t):typeof __system_context__>"u"?System.import(e).then(r).catch(n):new Function("callbacks",`System.import("${e}")${Br}`)([r,n])}catch(o){Ve.error(`Failed to load SystemJS entry from "${e}". ${o instanceof Error?o.message:String(o)}`)}})}function Xs(e,t,r){const{remoteEntryKey:n,entryExports:o}=le.getRemoteEntryExports(e,t);return o||Ve.error($e.RUNTIME_001,$e.runtimeDescMap,{remoteName:e,remoteEntryUrl:r,remoteEntryKey:n}),o}async function xs({name:e,globalName:t,entry:r,loaderHook:n,getEntryUrl:o}){const{entryExports:s}=le.getRemoteEntryExports(e,t);if(s)return s;const i=o?o(r):r;return(0,Wr.loadScript)(i,{attrs:{},createScriptHook:(a,c)=>{const l=n.lifecycle.createScript.emit({url:a,attrs:c});if(l&&(l instanceof HTMLScriptElement||"script"in l||"timeout"in l))return l}}).then(()=>Xs(e,t,r),a=>{const c=a instanceof Error?a.message:String(a);Ve.error($e.RUNTIME_008,$e.runtimeDescMap,{remoteName:e,resourceUrl:i},c)})}async function Ks({remoteInfo:e,remoteEntryExports:t,loaderHook:r,getEntryUrl:n}){const{entry:o,entryGlobalName:s,name:i,type:a}=e;switch(a){case"esm":case"module":return js({entry:o,remoteEntryExports:t});case"system":return Vs({entry:o,remoteEntryExports:t});default:return xs({entry:o,globalName:s,name:i,loaderHook:r,getEntryUrl:n})}}function Et(e){const{entry:t,name:r}=e;return(0,Wr.composeKeyWithSeparator)(r,t)}async function jr(e){const{origin:t,remoteEntryExports:r,remoteInfo:n,getEntryUrl:o,_inErrorHandling:s=!1}=e,i=Et(n);if(r)return r;if(!le.globalLoading[i]){const a=t.remoteHandler.hooks.lifecycle.loadEntry,c=t.loaderHook;le.globalLoading[i]=a.emit({loaderHook:c,remoteInfo:n,remoteEntryExports:r}).then(l=>l||Ks({remoteInfo:n,remoteEntryExports:r,loaderHook:c,getEntryUrl:o})).catch(async l=>{const u=Et(n),d=l instanceof Error&&l.message.includes("ScriptExecutionError");if(l instanceof Error&&l.message.includes($e.RUNTIME_008)&&!d&&!s){const f=m=>jr({...m,_inErrorHandling:!0}),h=await t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:f,origin:t,remoteInfo:n,remoteEntryExports:r,globalLoading:le.globalLoading,uniqueKey:u});if(h)return h}throw l})}return le.globalLoading[i]}function Ys(e){return{...e,entry:"entry"in e?e.entry:"",type:e.type||Ht.DEFAULT_REMOTE_TYPE,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||Ht.DEFAULT_SCOPE}}K.getRemoteEntry=jr;K.getRemoteEntryUniqueKey=Et;K.getRemoteInfo=Ys;var Vr={};function zs(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}Vr.getBuilderId=zs;var Xr={};const Js=b;function Zs(e,t){const r=Js.getGlobalHostPlugins(),n=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return r.length>0&&r.forEach(o=>{e!=null&&e.find(s=>s.name!==o.name)&&e.push(o)}),e&&e.length>0&&e.forEach(o=>{n.forEach(s=>{s.applyPlugin(o,t)})}),e}Xr.registerPlugins=Zs;var Pe={};function Qs(e){return{name:e.name,alias:e.alias,entry:"entry"in e?e.entry:void 0,version:"version"in e?e.version:void 0,type:e.type,entryGlobalName:e.entryGlobalName,shareScope:e.shareScope}}function ei(e){var r,n,o,s,i,a;const t={};for(const[c,l]of Object.entries(e.shared)){const u=l[0];u&&(t[c]={version:u.version,singleton:(r=u.shareConfig)==null?void 0:r.singleton,requiredVersion:((n=u.shareConfig)==null?void 0:n.requiredVersion)===!1?!1:(o=u.shareConfig)==null?void 0:o.requiredVersion,eager:u.eager,strictVersion:(s=u.shareConfig)==null?void 0:s.strictVersion})}return{project:{name:e.name,mfRole:((i=e.remotes)==null?void 0:i.length)>0?"host":"unknown"},mfConfig:{name:e.name,remotes:((a=e.remotes)==null?void 0:a.map(Qs))??[],shared:t}}}Pe.optionsToMFContext=ei;var xr={},Z={};const ti=M,ri=he,Ct=K;let Se=D;function Kr(e){return{resourceCategory:"sync",share:!0,depsRemote:!0,prefetchInterface:!1,...e}}function ni(e,t){return t.map(r=>{const n=ri.matchRemote(e,r.nameOrAlias);return ti.assert(n,`Unable to preload ${r.nameOrAlias} as it is not included in ${!n&&(0,Se.safeToString)({remoteInfo:n,remotes:e})}`),{remote:n,preloadConfig:Kr(r)}})}function oi(e){return e?e.map(t=>t==="."?t:t.startsWith("./")?t.replace("./",""):t):[]}function si(e,t,r,n=!0){const{cssAssets:o,jsAssetsWithoutEntry:s,entryAssets:i}=r;if(t.options.inBrowser){if(i.forEach(a=>{const{moduleInfo:c}=a,l=t.moduleCache.get(e.name);l?Ct.getRemoteEntry({origin:t,remoteInfo:c,remoteEntryExports:l.remoteEntryExports}):Ct.getRemoteEntry({origin:t,remoteInfo:c,remoteEntryExports:void 0})}),n){const a={rel:"preload",as:"style"};o.forEach(c=>{const{link:l,needAttach:u}=(0,Se.createLink)({url:c,cb:()=>{},attrs:a,createLinkHook:(d,f)=>{const h=t.loaderHook.lifecycle.createLink.emit({url:d,attrs:f});if(h instanceof HTMLLinkElement)return h}});u&&document.head.appendChild(l)})}else{const a={rel:"stylesheet",type:"text/css"};o.forEach(c=>{const{link:l,needAttach:u}=(0,Se.createLink)({url:c,cb:()=>{},attrs:a,createLinkHook:(d,f)=>{const h=t.loaderHook.lifecycle.createLink.emit({url:d,attrs:f});if(h instanceof HTMLLinkElement)return h},needDeleteLink:!1});u&&document.head.appendChild(l)})}if(n){const a={rel:"preload",as:"script"};s.forEach(c=>{const{link:l,needAttach:u}=(0,Se.createLink)({url:c,cb:()=>{},attrs:a,createLinkHook:(d,f)=>{const h=t.loaderHook.lifecycle.createLink.emit({url:d,attrs:f});if(h instanceof HTMLLinkElement)return h}});u&&document.head.appendChild(l)})}else{const a={fetchpriority:"high",type:(e==null?void 0:e.type)==="module"?"module":"text/javascript"};s.forEach(c=>{const{script:l,needAttach:u}=(0,Se.createScript)({url:c,cb:()=>{},attrs:a,createScriptHook:(d,f)=>{const h=t.loaderHook.lifecycle.createScript.emit({url:d,attrs:f});if(h instanceof HTMLScriptElement)return h},needDeleteScript:!0});u&&document.head.appendChild(l)})}}}Z.defaultPreloadArgs=Kr;Z.formatPreloadArgs=ni;Z.normalizePreloadExposes=oi;Z.preloadAssets=si;const w=b,qt=q,ii=he,ai=K,li=Z,ci={getRegisteredShare:qt.getRegisteredShare,getGlobalShareScope:qt.getGlobalShareScope},ui={Global:w.Global,nativeGlobal:w.nativeGlobal,resetFederationGlobalInfo:w.resetFederationGlobalInfo,setGlobalFederationInstance:w.setGlobalFederationInstance,getGlobalFederationConstructor:w.getGlobalFederationConstructor,setGlobalFederationConstructor:w.setGlobalFederationConstructor,getInfoWithoutType:w.getInfoWithoutType,getGlobalSnapshot:w.getGlobalSnapshot,getTargetSnapshotInfoByModuleInfo:w.getTargetSnapshotInfoByModuleInfo,getGlobalSnapshotInfoByModuleInfo:w.getGlobalSnapshotInfoByModuleInfo,setGlobalSnapshotInfoByModuleInfo:w.setGlobalSnapshotInfoByModuleInfo,addGlobalSnapshot:w.addGlobalSnapshot,getRemoteEntryExports:w.getRemoteEntryExports,registerGlobalPlugins:w.registerGlobalPlugins,getGlobalHostPlugins:w.getGlobalHostPlugins,getPreloaded:w.getPreloaded,setPreloaded:w.setPreloaded};var fi={global:ui,share:ci,utils:{matchRemoteWithNameAndExpose:ii.matchRemoteWithNameAndExpose,preloadAssets:li.preloadAssets,getRemoteInfo:ai.getRemoteInfo}};xr.default=fi;var Xe={};const Ze=M,Gt=$,di=K,hi=Pe;let mi=D,Ut=Y;function _i(e,t,r){const n=t,o=Array.isArray(e.shareScope)?e.shareScope:[e.shareScope];o.length||o.push("default"),o.forEach(i=>{n[i]||(n[i]={})});const s={version:e.version||"",shareScopeKeys:Array.isArray(e.shareScope)?o:e.shareScope||"default"};return Object.defineProperty(s,"shareScopeMap",{value:n,enumerable:!1}),{remoteEntryInitOptions:s,shareScope:n[o[0]],initScope:r??[]}}var gi=class{constructor({remoteInfo:e,host:t}){this.inited=!1,this.initing=!1,this.lib=void 0,this.remoteInfo=e,this.host=t}async getEntry(){if(this.remoteEntryExports)return this.remoteEntryExports;const e=await di.getRemoteEntry({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports});return Ze.assert(e,`remoteEntryExports is undefined - ${(0,mi.safeToString)(this.remoteInfo)}`),this.remoteEntryExports=e,this.remoteEntryExports}async init(e,t,r){const n=await this.getEntry();if(this.inited)return n;if(this.initPromise)return await this.initPromise,n;this.initing=!0,this.initPromise=(async()=>{const{remoteEntryInitOptions:o,shareScope:s,initScope:i}=_i(this.remoteInfo,this.host.shareScopeMap,r),a=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:s,remoteEntryInitOptions:o,initScope:i,remoteInfo:this.remoteInfo,origin:this.host});typeof(n==null?void 0:n.init)>"u"&&Ze.error(Ut.RUNTIME_002,Ut.runtimeDescMap,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName},void 0,hi.optionsToMFContext(this.host.options)),await n.init(a.shareScope,a.initScope,a.remoteEntryInitOptions),await this.host.hooks.lifecycle.initContainer.emit({...a,id:e,remoteSnapshot:t,remoteEntryExports:n}),this.inited=!0})();try{await this.initPromise}finally{this.initing=!1,this.initPromise=void 0}return n}async get(e,t,r,n){const{loadFactory:o=!0}=r||{loadFactory:!0},s=await this.init(e,n);this.lib=s;let i;i=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:s,expose:t,moduleInfo:this.remoteInfo}),i||(i=await s.get(t)),Ze.assert(i,`${Gt.getFMId(this.remoteInfo)} remote don't export ${t}.`);const a=Gt.processModuleAlias(this.remoteInfo.name,t),c=this.wraperFactory(i,a);return o?await c():c}wraperFactory(e,t){function r(n,o){n&&typeof n=="object"&&Object.isExtensible(n)&&!Object.getOwnPropertyDescriptor(n,Symbol.for("mf_module_id"))&&Object.defineProperty(n,Symbol.for("mf_module_id"),{value:o,enumerable:!1})}return e instanceof Promise?async()=>{const n=await e();return r(n,t),n}:()=>{const n=e();return r(n,t),n}}};Xe.Module=gi;var Yr={},me={},pi=class{constructor(e){this.type="",this.listeners=new Set,e&&(this.type=e)}on(e){typeof e=="function"&&this.listeners.add(e)}once(e){const t=this;this.on(function r(...n){return t.remove(r),e.apply(null,n)})}emit(...e){let t;return this.listeners.size>0&&this.listeners.forEach(r=>{t=r(...e)}),t}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}};me.SyncHook=pi;var ve={};const yi=me;var Ei=class extends yi.SyncHook{emit(...e){let t;const r=Array.from(this.listeners);if(r.length>0){let n=0;const o=s=>s===!1?!1:n0){let r=0;const n=s=>(et.warn(s),this.onerror(s),e),o=s=>{if(Ii.checkReturnData(e,s)){if(e=s,r{const s=e[o];s&&this.lifecycle[o].on(s)}))}removePlugin(e){we.assert(e,"A name is required.");const t=this.registerPlugins[e];we.assert(t,`The plugin "${e}" is not registered.`),Object.keys(t).forEach(r=>{r!=="name"&&this.lifecycle[r].remove(t[r])})}};ke.PluginSystem=Mi;var xe={};const Pi=M,St=$,vi=Z;let Wt=D,Bt=Y;function Zr(e,t){const r=St.getRemoteEntryInfoFromSnapshot(t);r.url||Pi.error(Bt.RUNTIME_011,Bt.runtimeDescMap,{remoteName:e.name});let n=(0,Wt.getResourceUrl)(t,r.url);!Wt.isBrowserEnvValue&&!n.startsWith("http")&&(n=`https:${n}`),e.type=r.type,e.entryGlobalName=r.globalName,e.entry=n,e.version=t.version,e.buildVersion=t.buildVersion}function Ai(){return{name:"snapshot-plugin",async afterResolve(e){const{remote:t,pkgNameOrAlias:r,expose:n,origin:o,remoteInfo:s,id:i}=e;if(!St.isRemoteInfoWithEntry(t)||!St.isPureRemoteEntry(t)){const{remoteSnapshot:a,globalSnapshot:c}=await o.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:i});Zr(s,a);const l={remote:t,preloadConfig:{nameOrAlias:r,exposes:[n],resourceCategory:"sync",share:!1,depsRemote:!1}},u=await o.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:o,preloadOptions:l,remoteInfo:s,remote:t,remoteSnapshot:a,globalSnapshot:c});return u&&vi.preloadAssets(s,o,u,!1),{...e,remoteSnapshot:a}}return e}}}xe.assignRemoteInfo=Zr;xe.snapshotPlugin=Ai;var Qr={};const Ne=$,bt=b,ki=q,jt=Z,Oi=xe;let je=D;function wi(e){const t=e.split(":");return t.length===1?{name:t[0],version:void 0}:t.length===2?{name:t[0],version:t[1]}:{name:t[1],version:t[2]}}function en(e,t,r,n,o={},s){const{value:i}=bt.getInfoWithoutType(e,Ne.getFMId(t)),a=s||i;if(a&&!(0,je.isManifestProvider)(a)&&(r(a,t,n),a.remotesInfo)){const c=Object.keys(a.remotesInfo);for(const l of c){if(o[l])continue;o[l]=!0;const u=wi(l),d=a.remotesInfo[l];en(e,{name:u.name,version:d.matchedVersion},r,!1,o,void 0)}}}const tt=(e,t)=>document.querySelector(`${e}[${e==="link"?"href":"src"}="${t}"]`);function Fi(e,t,r,n,o){const s=[],i=[],a=[],c=new Set,l=new Set,{options:u}=e,{preloadConfig:d}=t,{depsRemote:f}=d;if(en(n,r,(m,_,g)=>{var N;let p;if(g)p=d;else if(Array.isArray(f)){const R=f.find(v=>v.nameOrAlias===_.name||v.nameOrAlias===_.alias);if(!R)return;p=jt.defaultPreloadArgs(R)}else if(f===!0)p=d;else return;const E=(0,je.getResourceUrl)(m,Ne.getRemoteEntryInfoFromSnapshot(m).url);E&&a.push({name:_.name,moduleInfo:{name:_.name,entry:E,type:"remoteEntryType"in m?m.remoteEntryType:"global",entryGlobalName:"globalName"in m?m.globalName:_.name,shareScope:"",version:"version"in m?m.version:void 0},url:E});let I="modules"in m?m.modules:[];const O=jt.normalizePreloadExposes(p.exposes);O.length&&"modules"in m&&(I=(N=m==null?void 0:m.modules)==null?void 0:N.reduce((R,v)=>((O==null?void 0:O.indexOf(v.moduleName))!==-1&&R.push(v),R),[]));function y(R){const v=R.map(B=>(0,je.getResourceUrl)(m,B));return p.filter?v.filter(p.filter):v}if(I){const R=I.length;for(let v=0;v0){const m=(_,g)=>{const{shared:p}=ki.getRegisteredShare(e.shareScopeMap,g.sharedName,_,e.sharedHandler.hooks.lifecycle.resolveShare)||{};p&&typeof p.lib=="function"&&(g.assets.js.sync.forEach(E=>{c.add(E)}),g.assets.css.sync.forEach(E=>{l.add(E)}))};o.shared.forEach(_=>{var E;const g=(E=u.shared)==null?void 0:E[_.sharedName];if(!g)return;const p=_.version?g.find(I=>I.version===_.version):g;p&&Ne.arrayOptions(p).forEach(I=>{m(I,_)})})}const h=i.filter(m=>!c.has(m)&&!tt("script",m));return{cssAssets:s.filter(m=>!l.has(m)&&!tt("link",m)),jsAssetsWithoutEntry:h,entryAssets:a.filter(m=>!tt("script",m.url))}}const Li=function(){return{name:"generate-preload-assets-plugin",async generatePreloadAssets(e){const{origin:t,preloadOptions:r,remoteInfo:n,remote:o,globalSnapshot:s,remoteSnapshot:i}=e;return je.isBrowserEnvValue?Ne.isRemoteInfoWithEntry(o)&&Ne.isPureRemoteEntry(o)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:o.name,url:o.entry,moduleInfo:{name:n.name,entry:o.entry,type:n.type||"global",entryGlobalName:"",shareScope:""}}]}:(Oi.assignRemoteInfo(n,i),Fi(t,r,n,s,i)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}}}};Qr.generatePreloadAssetsPlugin=Li;var Ke={};const rt=M,Di=$,U=b,Vt=Pe,Hi=ve,nt=Ae,Ci=ke;let ot=D,Fe=Y;function tn(e,t){const r=U.getGlobalSnapshotInfoByModuleInfo({name:t.name,version:t.options.version}),n=r&&"remotesInfo"in r&&r.remotesInfo&&U.getInfoWithoutType(r.remotesInfo,e.name).value;return n&&n.matchedVersion?{hostGlobalSnapshot:r,globalSnapshot:U.getGlobalSnapshot(),remoteSnapshot:U.getGlobalSnapshotInfoByModuleInfo({name:e.name,version:n.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:U.getGlobalSnapshot(),remoteSnapshot:U.getGlobalSnapshotInfoByModuleInfo({name:e.name,version:"version"in e?e.version:void 0})}}var qi=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new Ci.PluginSystem({beforeLoadRemoteSnapshot:new Hi.AsyncHook("beforeLoadRemoteSnapshot"),loadSnapshot:new nt.AsyncWaterfallHook("loadGlobalSnapshot"),loadRemoteSnapshot:new nt.AsyncWaterfallHook("loadRemoteSnapshot"),afterLoadSnapshot:new nt.AsyncWaterfallHook("afterLoadSnapshot")}),this.manifestLoading=U.Global.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:t,expose:r}){const{options:n}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:n,moduleInfo:e});let o=U.getGlobalSnapshotInfoByModuleInfo({name:this.HostInstance.options.name,version:this.HostInstance.options.version});o||(o={version:this.HostInstance.options.version||"",remoteEntry:"",remotesInfo:{}},U.addGlobalSnapshot({[this.HostInstance.options.name]:o})),o&&"remotesInfo"in o&&!U.getInfoWithoutType(o.remotesInfo,e.name).value&&("version"in e||"entry"in e)&&(o.remotesInfo={...o==null?void 0:o.remotesInfo,[e.name]:{matchedVersion:"version"in e?e.version:e.entry}});const{hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:a}=this.getGlobalRemoteInfo(e),{remoteSnapshot:c,globalSnapshot:l}=await this.hooks.lifecycle.loadSnapshot.emit({options:n,moduleInfo:e,hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:a});let u,d;if(c)if((0,ot.isManifestProvider)(c)){const f=ot.isBrowserEnvValue?c.remoteEntry:c.ssrRemoteEntry||c.remoteEntry||"",h=await this.getManifestJson(f,e,{}),m=U.setGlobalSnapshotInfoByModuleInfo({...e,entry:f},h);u=h,d=m}else{const{remoteSnapshot:f}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:c,from:"global"});u=f,d=l}else if(Di.isRemoteInfoWithEntry(e)){const f=await this.getManifestJson(e.entry,e,{}),h=U.setGlobalSnapshotInfoByModuleInfo(e,f),{remoteSnapshot:m}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:f,from:"global"});u=m,d=h}else rt.error(Fe.RUNTIME_007,Fe.runtimeDescMap,{remoteName:e.name,remoteVersion:e.version,hostName:this.HostInstance.options.name,globalSnapshot:JSON.stringify(l)},void 0,Vt.optionsToMFContext(this.HostInstance.options));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:n,moduleInfo:e,remoteSnapshot:u}),{remoteSnapshot:u,globalSnapshot:d}}getGlobalRemoteInfo(e){return tn(e,this.HostInstance)}async getManifestJson(e,t,r){const n=async()=>{let s=this.manifestCache.get(e);if(s)return s;try{let i=await this.loaderHook.lifecycle.fetch.emit(e,{});(!i||!(i instanceof Response))&&(i=await fetch(e,{})),s=await i.json()}catch(i){s=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:i,from:"runtime",lifecycle:"afterResolve",origin:this.HostInstance}),s||(delete this.manifestLoading[e],rt.error(Fe.RUNTIME_003,Fe.runtimeDescMap,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${i}`,Vt.optionsToMFContext(this.HostInstance.options)))}return rt.assert(s.metaData&&s.exposes&&s.shared,`"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${[!s.metaData&&"metaData",!s.exposes&&"exposes",!s.shared&&"shared"].filter(Boolean).join(", ")}.`),this.manifestCache.set(e,s),s},o=async()=>{const s=await n(),i=(0,ot.generateSnapshotFromManifest)(s,{version:e}),{remoteSnapshot:a}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:s,remoteSnapshot:i,manifestUrl:e,from:"manifest"});return a};return this.manifestLoading[e]||(this.manifestLoading[e]=o().then(s=>s)),this.manifestLoading[e]}};Ke.SnapshotHandler=qi;Ke.getGlobalRemoteInfo=tn;var rn={};const st=M,Gi=oe,A=q,Xt=Pe,Ui=ve,it=_e,xt=Ae,Wi=ke;let pe=Y;var Bi=class{constructor(e){this.hooks=new Wi.PluginSystem({beforeRegisterShare:new it.SyncWaterfallHook("beforeRegisterShare"),afterResolve:new xt.AsyncWaterfallHook("afterResolve"),beforeLoadShare:new xt.AsyncWaterfallHook("beforeLoadShare"),loadShare:new Ui.AsyncHook,resolveShare:new it.SyncWaterfallHook("resolveShare"),initContainerShareScopeMap:new it.SyncWaterfallHook("initContainerShareScopeMap")}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}registerShared(e,t){const{newShareInfos:r,allShareInfos:n}=A.formatShareConfigs(e,t);return Object.keys(r).forEach(o=>{r[o].forEach(s=>{s.scope.forEach(i=>{var a;this.hooks.lifecycle.beforeRegisterShare.emit({origin:this.host,pkgName:o,shared:s}),(a=this.shareScopeMap[i])!=null&&a[o]||this.setShared({pkgName:o,lib:s.lib,get:s.get,loaded:s.loaded||!!s.lib,shared:s,from:t.name})})})}),{newShareInfos:r,allShareInfos:n}}async loadShare(e,t){const{host:r}=this,n=A.getTargetSharedOptions({pkgName:e,extraOptions:t,shareInfos:r.options.shared});n!=null&&n.scope&&await Promise.all(n.scope.map(async a=>{await Promise.all(this.initializeSharing(a,{strategy:n.strategy}))}));const{shareInfo:o}=await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:n,shared:r.options.shared,origin:r});st.assert(o,`Cannot find shared "${e}" in host "${r.options.name}". Ensure the shared config for "${e}" is declared in the federation plugin options and the host has been initialized before loading shares.`);const{shared:s,useTreesShaking:i}=A.getRegisteredShare(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare)||{};if(s){const a=A.directShare(s,i);if(a.lib)return A.addUseIn(a,r.options.name),a.lib;if(a.loading&&!a.loaded){const c=await a.loading;return a.loaded=!0,a.lib||(a.lib=c),A.addUseIn(a,r.options.name),c}else{const l=(async()=>{const u=await a.get();return A.addUseIn(a,r.options.name),a.loaded=!0,a.lib=u,u})();return this.setShared({pkgName:e,loaded:!1,shared:s,from:r.options.name,lib:null,loading:l,treeShaking:i?a:void 0}),l}}else{if(t!=null&&t.customShareInfo)return!1;const a=A.shouldUseTreeShaking(o.treeShaking),c=A.directShare(o,a),u=(async()=>{const d=await c.get();c.lib=d,c.loaded=!0,A.addUseIn(c,r.options.name);const{shared:f,useTreesShaking:h}=A.getRegisteredShare(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare)||{};if(f){const m=A.directShare(f,h);m.lib=d,m.loaded=!0,f.from=o.from}return d})();return this.setShared({pkgName:e,loaded:!1,shared:o,from:r.options.name,lib:null,loading:u,treeShaking:a?c:void 0}),u}}initializeSharing(e=Gi.DEFAULT_SCOPE,t){const{host:r}=this,n=t==null?void 0:t.from,o=t==null?void 0:t.strategy;let s=t==null?void 0:t.initScope;const i=[];if(n!=="build"){const{initTokens:f}=this;s||(s=[]);let h=f[e];if(h||(h=f[e]={from:this.host.name}),s.indexOf(h)>=0)return i;s.push(h)}const a=this.shareScopeMap,c=r.options.name;a[e]||(a[e]={});const l=a[e],u=(f,h)=>{var I;const{version:m,eager:_}=h;l[f]=l[f]||{};const g=l[f],p=g[m]&&A.directShare(g[m]),E=!!(p&&("eager"in p&&p.eager||"shareConfig"in p&&((I=p.shareConfig)!=null&&I.eager)));(!p||p.strategy!=="loaded-first"&&!p.loaded&&(!_!=!E?_:c>g[m].from))&&(g[m]=h)},d=async f=>{const{module:h}=await r.remoteHandler.getRemoteModuleAndOptions({id:f});let m;try{m=await h.getEntry()}catch(_){if(m=await r.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:f,error:_,from:"runtime",lifecycle:"beforeLoadShare",origin:r}),!m)return}finally{m!=null&&m.init&&!h.initing&&(h.remoteEntryExports=m,await h.init(void 0,void 0,s))}};return Object.keys(r.options.shared).forEach(f=>{r.options.shared[f].forEach(h=>{h.scope.includes(e)&&u(f,h)})}),(r.options.shareStrategy==="version-first"||o==="version-first")&&r.options.remotes.forEach(f=>{f.shareScope===e&&i.push(d(f.name))}),i}loadShareSync(e,t){const{host:r}=this,n=A.getTargetSharedOptions({pkgName:e,extraOptions:t,shareInfos:r.options.shared});n!=null&&n.scope&&n.scope.forEach(i=>{this.initializeSharing(i,{strategy:n.strategy})});const{shared:o,useTreesShaking:s}=A.getRegisteredShare(this.shareScopeMap,e,n,this.hooks.lifecycle.resolveShare)||{};if(o){if(typeof o.lib=="function")return A.addUseIn(o,r.options.name),o.loaded||(o.loaded=!0,o.from===r.options.name&&(n.loaded=!0)),o.lib;if(typeof o.get=="function"){const i=o.get();if(!(i instanceof Promise))return A.addUseIn(o,r.options.name),this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:i,shared:o}),i}}if(n.lib)return n.loaded||(n.loaded=!0),n.lib;if(n.get){const i=n.get();return i instanceof Promise&&st.error((t==null?void 0:t.from)==="build"?pe.RUNTIME_005:pe.RUNTIME_006,pe.runtimeDescMap,{hostName:r.options.name,sharedPkgName:e},void 0,Xt.optionsToMFContext(r.options)),n.lib=i,this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:n.lib,shared:n}),n.lib}st.error(pe.RUNTIME_006,pe.runtimeDescMap,{hostName:r.options.name,sharedPkgName:e},void 0,Xt.optionsToMFContext(r.options))}initShareScopeMap(e,t,r={}){const{host:n}=this;this.shareScopeMap[e]=t,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:t,options:n.options,origin:n,scopeName:e,hostShareScopeMap:r.hostShareScopeMap})}setShared({pkgName:e,shared:t,from:r,lib:n,loading:o,loaded:s,get:i,treeShaking:a}){const{version:c,scope:l="default",...u}=t,d=Array.isArray(l)?l:[l],f=h=>{const m=(g,p,E)=>{E&&!g[p]&&(g[p]=E)},_=a?h.treeShaking:h;m(_,"loaded",s),m(_,"loading",o),m(_,"get",i)};d.forEach(h=>{this.shareScopeMap[h]||(this.shareScopeMap[h]={}),this.shareScopeMap[h][e]||(this.shareScopeMap[h][e]={}),this.shareScopeMap[h][e][c]||(this.shareScopeMap[h][e][c]={version:c,scope:[h],...u,lib:n});const m=this.shareScopeMap[h][e][c];f(m),r&&m.from!==r&&(m.from=r)})}_setGlobalShareScopeMap(e){const t=A.getGlobalShareScope(),r=e.id||e.name;r&&!t[r]&&(t[r]=this.shareScopeMap)}};rn.SharedHandler=Bi;var nn={};const Le=M,G=b,Kt=oe,ji=q,Vi=he,at=K,Xi=Pe,Yt=Z,xi=Xe,Ki=me,ie=ve,zt=_e,Yi=Ae,zi=ke,Ji=Ke;let lt=D,Jt=Y;var Zi=class{constructor(e){this.hooks=new zi.PluginSystem({beforeRegisterRemote:new zt.SyncWaterfallHook("beforeRegisterRemote"),registerRemote:new zt.SyncWaterfallHook("registerRemote"),beforeRequest:new Yi.AsyncWaterfallHook("beforeRequest"),onLoad:new ie.AsyncHook("onLoad"),handlePreloadModule:new Ki.SyncHook("handlePreloadModule"),errorLoadRemote:new ie.AsyncHook("errorLoadRemote"),beforePreloadRemote:new ie.AsyncHook("beforePreloadRemote"),generatePreloadAssets:new ie.AsyncHook("generatePreloadAssets"),afterPreloadRemote:new ie.AsyncHook,loadEntry:new ie.AsyncHook}),this.host=e,this.idToRemoteMap={}}formatAndRegisterRemote(e,t){return(t.remotes||[]).reduce((r,n)=>(this.registerRemote(n,r,{force:!1}),r),e.remotes)}setIdToRemoteMap(e,t){const{remote:r,expose:n}=t,{name:o,alias:s}=r;if(this.idToRemoteMap[e]={name:r.name,expose:n},s&&e.startsWith(o)){const i=e.replace(o,s);this.idToRemoteMap[i]={name:r.name,expose:n};return}if(s&&e.startsWith(s)){const i=e.replace(s,o);this.idToRemoteMap[i]={name:r.name,expose:n}}}async loadRemote(e,t){const{host:r}=this;try{const{loadFactory:n=!0}=t||{loadFactory:!0},{module:o,moduleOptions:s,remoteMatchInfo:i}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:a,remote:c,expose:l,id:u,remoteSnapshot:d}=i,f=await o.get(u,l,t,d),h=await this.hooks.lifecycle.onLoad.emit({id:u,pkgNameOrAlias:a,expose:l,exposeModule:n?f:void 0,exposeModuleFactory:n?void 0:f,remote:c,options:s,moduleInstance:o,origin:r});return this.setIdToRemoteMap(e,i),typeof h=="function"?h:f}catch(n){const{from:o="runtime"}=t||{from:"runtime"},s=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:n,from:o,lifecycle:"onLoad",origin:r});if(!s)throw n;return s}}async preloadRemote(e){const{host:t}=this;await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});const r=Yt.formatPreloadArgs(t.options.remotes,e);await Promise.all(r.map(async n=>{const{remote:o}=n,s=at.getRemoteInfo(o),{globalSnapshot:i,remoteSnapshot:a}=await t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:o}),c=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:n,remote:o,remoteInfo:s,globalSnapshot:i,remoteSnapshot:a});c&&Yt.preloadAssets(s,t,c)}))}registerRemotes(e,t){const{host:r}=this;e.forEach(n=>{this.registerRemote(n,r.options.remotes,{force:t==null?void 0:t.force})})}async getRemoteModuleAndOptions(e){const{host:t}=this,{id:r}=e;let n;try{n=await this.hooks.lifecycle.beforeRequest.emit({id:r,options:t.options,origin:t})}catch(h){if(n=await this.hooks.lifecycle.errorLoadRemote.emit({id:r,options:t.options,origin:t,from:"runtime",error:h,lifecycle:"beforeRequest"}),!n)throw h}const{id:o}=n,s=Vi.matchRemoteWithNameAndExpose(t.options.remotes,o);s||Le.error(Jt.RUNTIME_004,Jt.runtimeDescMap,{hostName:t.options.name,requestId:o},void 0,Xi.optionsToMFContext(t.options));const{remote:i}=s,a=at.getRemoteInfo(i),c=await t.sharedHandler.hooks.lifecycle.afterResolve.emit({id:o,...s,options:t.options,origin:t,remoteInfo:a}),{remote:l,expose:u}=c;Le.assert(l&&u,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${o}.`);let d=t.moduleCache.get(l.name);const f={host:t,remoteInfo:a};return d||(d=new xi.Module(f),t.moduleCache.set(l.name,d)),{module:d,moduleOptions:f,remoteMatchInfo:c}}registerRemote(e,t,r){const{host:n}=this,o=()=>{if(e.alias){const i=t.find(a=>{var c;return e.alias&&(a.name.startsWith(e.alias)||((c=a.alias)==null?void 0:c.startsWith(e.alias)))});Le.assert(!i,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${i&&i.name} name or alias`)}"entry"in e&<.isBrowserEnvValue&&typeof window<"u"&&!e.entry.startsWith("http")&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||(e.shareScope=Kt.DEFAULT_SCOPE),e.type||(e.type=Kt.DEFAULT_REMOTE_TYPE)};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:n});const s=t.find(i=>i.name===e.name);if(!s)o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n});else{const i=[`The remote "${e.name}" is already registered.`,"Please note that overriding it may cause unexpected errors."];r!=null&&r.force&&(this.removeRemote(s),o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n}),(0,lt.warn)(i.join(" ")))}}removeRemote(e){var t;try{const{host:r}=this,{name:n}=e,o=r.options.remotes.findIndex(i=>i.name===n);o!==-1&&r.options.remotes.splice(o,1);const s=r.moduleCache.get(e.name);if(s){const i=s.remoteInfo,a=i.entryGlobalName;G.CurrentGlobal[a]&&((t=Object.getOwnPropertyDescriptor(G.CurrentGlobal,a))!=null&&t.configurable?delete G.CurrentGlobal[a]:G.CurrentGlobal[a]=void 0);const c=at.getRemoteEntryUniqueKey(s.remoteInfo);G.globalLoading[c]&&delete G.globalLoading[c],r.snapshotHandler.manifestCache.delete(i.entry);let l=i.buildVersion?(0,lt.composeKeyWithSeparator)(i.name,i.buildVersion):i.name;const u=G.CurrentGlobal.__FEDERATION__.__INSTANCES__.findIndex(f=>i.buildVersion?f.options.id===l:f.name===l);if(u!==-1){const f=G.CurrentGlobal.__FEDERATION__.__INSTANCES__[u];l=f.options.id||l;const h=ji.getGlobalShareScope();let m=!0;const _=[];Object.keys(h).forEach(g=>{const p=h[g];p&&Object.keys(p).forEach(E=>{const I=p[E];I&&Object.keys(I).forEach(O=>{const y=I[O];y&&Object.keys(y).forEach(N=>{const R=y[N];R&&typeof R=="object"&&R.from===i.name&&(R.loaded||R.loading?(R.useIn=R.useIn.filter(v=>v!==i.name),R.useIn.length?m=!1:_.push([g,E,O,N])):_.push([g,E,O,N]))})})})}),m&&(f.shareScopeMap={},delete h[l]),_.forEach(([g,p,E,I])=>{var O,y,N;(N=(y=(O=h[g])==null?void 0:O[p])==null?void 0:y[E])==null||delete N[I]}),G.CurrentGlobal.__FEDERATION__.__INSTANCES__.splice(u,1)}const{hostGlobalSnapshot:d}=Ji.getGlobalRemoteInfo(e,r);if(d){const f=d&&"remotesInfo"in d&&d.remotesInfo&&G.getInfoWithoutType(d.remotesInfo,e.name).key;f&&(delete d.remotesInfo[f],G.Global.__FEDERATION__.__MANIFEST_LOADING__[f]&&delete G.Global.__FEDERATION__.__MANIFEST_LOADING__[f])}r.moduleCache.delete(e.name)}}catch(r){Le.logger.error(`removeRemote failed: ${r instanceof Error?r.message:String(r)}`)}}};nn.RemoteHandler=Zi;const Qi=M,ea=oe,ta=q,ra=Vr,na=Xr,oa=K,sa=Xe,z=me,ct=ve,ia=_e,Zt=Ae,ut=ke,aa=xe,la=Qr,ca=Ke,ua=rn,fa=nn;let da=D,ft=Y;const ha=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN=="boolean"?!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN:!0;var ma=class{constructor(e){this.hooks=new ut.PluginSystem({beforeInit:new ia.SyncWaterfallHook("beforeInit"),init:new z.SyncHook,beforeInitContainer:new Zt.AsyncWaterfallHook("beforeInitContainer"),initContainer:new Zt.AsyncWaterfallHook("initContainer")}),this.version="2.2.2",this.moduleCache=new Map,this.loaderHook=new ut.PluginSystem({getModuleInfo:new z.SyncHook,createScript:new z.SyncHook,createLink:new z.SyncHook,fetch:new ct.AsyncHook,loadEntryError:new ct.AsyncHook,getModuleFactory:new ct.AsyncHook}),this.bridgeHook=new ut.PluginSystem({beforeBridgeRender:new z.SyncHook,afterBridgeRender:new z.SyncHook,beforeBridgeDestroy:new z.SyncHook,afterBridgeDestroy:new z.SyncHook});const t=ha?[aa.snapshotPlugin(),la.generatePreloadAssetsPlugin()]:[],r={id:ra.getBuilderId(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:da.isBrowserEnvValue};this.name=e.name,this.options=r,this.snapshotHandler=new ca.SnapshotHandler(this),this.sharedHandler=new ua.SharedHandler(this),this.remoteHandler=new fa.RemoteHandler(this),this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...r.plugins,...e.plugins||[]]),this.options=this.formatOptions(r,e)}initOptions(e){e.name&&e.name!==this.options.name&&Qi.error((0,ft.getShortErrorMsg)(ft.RUNTIME_010,ft.runtimeDescMap)),this.registerPlugins(e.plugins);const t=this.formatOptions(this.options,e);return this.options=t,t}async loadShare(e,t){return this.sharedHandler.loadShare(e,t)}loadShareSync(e,t){return this.sharedHandler.loadShareSync(e,t)}initializeSharing(e=ea.DEFAULT_SCOPE,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,r){const n=oa.getRemoteInfo({name:e,entry:t}),o=new sa.Module({host:this,remoteInfo:n});return o.remoteEntryExports=r,this.moduleCache.set(e,o),o}async loadRemote(e,t){return this.remoteHandler.loadRemote(e,t)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,t,r={}){this.sharedHandler.initShareScopeMap(e,t,r)}formatOptions(e,t){const{allShareInfos:r}=ta.formatShareConfigs(e,t),{userOptions:n,options:o}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:r}),s=this.remoteHandler.formatAndRegisterRemote(o,n),{allShareInfos:i}=this.sharedHandler.registerShared(o,n),a=[...o.plugins];n.plugins&&n.plugins.forEach(l=>{a.includes(l)||a.push(l)});const c={...e,...t,plugins:a,remotes:s,shared:i};return this.hooks.lifecycle.init.emit({origin:this,options:c}),c}registerPlugins(e){const t=na.registerPlugins(e,this);this.options.plugins=this.options.plugins.reduce((r,n)=>(n&&r&&!r.find(o=>o.name===n.name)&&r.push(n),r),t||[])}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}};Yr.ModuleFederation=ma;var on={},sn={},Qt=Object.defineProperty,_a=(e,t)=>{let r={};for(var n in e)Qt(r,n,{get:e[n],enumerable:!0});return t||Qt(r,Symbol.toStringTag,{value:"Module"}),r};sn.__exportAll=_a;(function(e){var r=sn.__exportAll({});Object.defineProperty(e,"type_exports",{enumerable:!0,get:function(){return r}})})(on);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=M,r=$,n=b,o=Pt,s=q,i=he,a=K,c=xr,l=Xe,u=Yr,d=on;let f=D;const h=c.default;e.CurrentGlobal=n.CurrentGlobal,e.Global=n.Global,e.Module=l.Module,e.ModuleFederation=u.ModuleFederation,e.addGlobalSnapshot=n.addGlobalSnapshot,e.assert=t.assert,e.error=t.error,e.getGlobalFederationConstructor=n.getGlobalFederationConstructor,e.getGlobalSnapshot=n.getGlobalSnapshot,e.getInfoWithoutType=n.getInfoWithoutType,e.getRegisteredShare=s.getRegisteredShare,e.getRemoteEntry=a.getRemoteEntry,e.getRemoteInfo=a.getRemoteInfo,e.helpers=h,e.isStaticResourcesEqual=r.isStaticResourcesEqual,Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return f.loadScript}}),Object.defineProperty(e,"loadScriptNode",{enumerable:!0,get:function(){return f.loadScriptNode}}),e.matchRemoteWithNameAndExpose=i.matchRemoteWithNameAndExpose,e.registerGlobalPlugins=n.registerGlobalPlugins,e.resetFederationGlobalInfo=n.resetFederationGlobalInfo,e.safeWrapper=r.safeWrapper,e.satisfy=o.satisfy,e.setGlobalFederationConstructor=n.setGlobalFederationConstructor,e.setGlobalFederationInstance=n.setGlobalFederationInstance,Object.defineProperty(e,"types",{enumerable:!0,get:function(){return d.type_exports}})})(Tt);let ga=Tt;function pa(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function ya(e,t){const r=pa();return ga.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(n=>!!(r&&n.options.id===r||n.options.name===e&&!n.options.version&&!t||n.options.name===e&&t&&n.options.version===t))}ar.getGlobalFederationInstance=ya;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ar;let r=Tt,n=Y;function o(_){const g=new((0,r.getGlobalFederationConstructor)()||r.ModuleFederation)(_);return(0,r.setGlobalFederationInstance)(g),g}let s=null;function i(_){const g=t.getGlobalFederationInstance(_.name,_.version);return g?(g.initOptions(_),s||(s=g),g):(s=o(_),s)}function a(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.loadRemote.apply(s,_)}function c(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.loadShare.apply(s,_)}function l(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.loadShareSync.apply(s,_)}function u(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.preloadRemote.apply(s,_)}function d(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.registerRemotes.apply(s,_)}function f(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.registerPlugins.apply(s,_)}function h(){return s}function m(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.registerShared.apply(s,_)}(0,r.setGlobalFederationConstructor)(r.ModuleFederation),Object.defineProperty(e,"Module",{enumerable:!0,get:function(){return r.Module}}),e.ModuleFederation=r.ModuleFederation,e.createInstance=o,e.getInstance=h,Object.defineProperty(e,"getRemoteEntry",{enumerable:!0,get:function(){return r.getRemoteEntry}}),Object.defineProperty(e,"getRemoteInfo",{enumerable:!0,get:function(){return r.getRemoteInfo}}),e.init=i,e.loadRemote=a,Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return r.loadScript}}),Object.defineProperty(e,"loadScriptNode",{enumerable:!0,get:function(){return r.loadScriptNode}}),e.loadShare=c,e.loadShareSync=l,e.preloadRemote=u,Object.defineProperty(e,"registerGlobalPlugins",{enumerable:!0,get:function(){return r.registerGlobalPlugins}}),e.registerPlugins=f,e.registerRemotes=d,e.registerShared=m})(ir);const an="__mf_init____mf__virtual/iobroker_javascript__mf_v__runtimeInit__mf_v__.js__";let Rt=globalThis[an];if(!Rt){let e,t;const r=new Promise((n,o)=>{e=n,t=o});Rt=globalThis[an]={initPromise:r,initResolve:e,initReject:t},typeof window>"u"&&e({loadRemote:function(){return Promise.resolve(void 0)},loadShare:function(){return Promise.resolve(void 0)}})}const Ea=Rt.initResolve,er={},tr="default",rr="iobroker_javascript";let nr,or;async function Sa(){return nr??=sr(()=>import("./localSharedImportMap-W-vnZT9_.js"),__vite__mapDeps([0,1]),import.meta.url),nr}async function ba(){return or??=sr(()=>import("./virtualExposes-BPsCufin.js"),[],import.meta.url).then(e=>e.default??e),or}async function Ta(e={},t=[]){const{usedShared:r,usedRemotes:n}=await Sa(),o=ir.init({name:rr,remotes:n,shared:r,plugins:[],shareStrategy:"version-first"});var s=er[tr];if(s||(s=er[tr]={from:rr}),!(t.indexOf(s)>=0)){t.push(s),o.initShareScopeMap("default",e),Ea(o);try{await Promise.all(await o.initializeSharing("default",{strategy:"version-first",from:"build",initScope:t}))}catch(i){console.error(i)}return o}}async function Ia(e){const t=await ba();if(!(e in t))throw new Error(`Module ${e} does not exist in container.`);return t[e]().then(r=>()=>r)}export{ir as d,Ia as g,Ta as i}; + ${(0,mi.safeToString)(this.remoteInfo)}`),this.remoteEntryExports=e,this.remoteEntryExports}async init(e,t,r){const n=await this.getEntry();if(this.inited)return n;if(this.initPromise)return await this.initPromise,n;this.initing=!0,this.initPromise=(async()=>{const{remoteEntryInitOptions:o,shareScope:s,initScope:i}=_i(this.remoteInfo,this.host.shareScopeMap,r),a=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:s,remoteEntryInitOptions:o,initScope:i,remoteInfo:this.remoteInfo,origin:this.host});typeof(n==null?void 0:n.init)>"u"&&Ze.error(Ut.RUNTIME_002,Ut.runtimeDescMap,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName},void 0,hi.optionsToMFContext(this.host.options)),await n.init(a.shareScope,a.initScope,a.remoteEntryInitOptions),await this.host.hooks.lifecycle.initContainer.emit({...a,id:e,remoteSnapshot:t,remoteEntryExports:n}),this.inited=!0})();try{await this.initPromise}finally{this.initing=!1,this.initPromise=void 0}return n}async get(e,t,r,n){const{loadFactory:o=!0}=r||{loadFactory:!0},s=await this.init(e,n);this.lib=s;let i;i=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:s,expose:t,moduleInfo:this.remoteInfo}),i||(i=await s.get(t)),Ze.assert(i,`${Gt.getFMId(this.remoteInfo)} remote don't export ${t}.`);const a=Gt.processModuleAlias(this.remoteInfo.name,t),c=this.wraperFactory(i,a);return o?await c():c}wraperFactory(e,t){function r(n,o){n&&typeof n=="object"&&Object.isExtensible(n)&&!Object.getOwnPropertyDescriptor(n,Symbol.for("mf_module_id"))&&Object.defineProperty(n,Symbol.for("mf_module_id"),{value:o,enumerable:!1})}return e instanceof Promise?async()=>{const n=await e();return r(n,t),n}:()=>{const n=e();return r(n,t),n}}};Xe.Module=gi;var Yr={},me={},pi=class{constructor(e){this.type="",this.listeners=new Set,e&&(this.type=e)}on(e){typeof e=="function"&&this.listeners.add(e)}once(e){const t=this;this.on(function r(...n){return t.remove(r),e.apply(null,n)})}emit(...e){let t;return this.listeners.size>0&&this.listeners.forEach(r=>{t=r(...e)}),t}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}};me.SyncHook=pi;var ve={};const yi=me;var Ei=class extends yi.SyncHook{emit(...e){let t;const r=Array.from(this.listeners);if(r.length>0){let n=0;const o=s=>s===!1?!1:n0){let r=0;const n=s=>(et.warn(s),this.onerror(s),e),o=s=>{if(Ii.checkReturnData(e,s)){if(e=s,r{const s=e[o];s&&this.lifecycle[o].on(s)}))}removePlugin(e){we.assert(e,"A name is required.");const t=this.registerPlugins[e];we.assert(t,`The plugin "${e}" is not registered.`),Object.keys(t).forEach(r=>{r!=="name"&&this.lifecycle[r].remove(t[r])})}};ke.PluginSystem=Mi;var xe={};const Pi=M,St=$,vi=Z;let Wt=D,Bt=Y;function Zr(e,t){const r=St.getRemoteEntryInfoFromSnapshot(t);r.url||Pi.error(Bt.RUNTIME_011,Bt.runtimeDescMap,{remoteName:e.name});let n=(0,Wt.getResourceUrl)(t,r.url);!Wt.isBrowserEnvValue&&!n.startsWith("http")&&(n=`https:${n}`),e.type=r.type,e.entryGlobalName=r.globalName,e.entry=n,e.version=t.version,e.buildVersion=t.buildVersion}function Ai(){return{name:"snapshot-plugin",async afterResolve(e){const{remote:t,pkgNameOrAlias:r,expose:n,origin:o,remoteInfo:s,id:i}=e;if(!St.isRemoteInfoWithEntry(t)||!St.isPureRemoteEntry(t)){const{remoteSnapshot:a,globalSnapshot:c}=await o.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:i});Zr(s,a);const l={remote:t,preloadConfig:{nameOrAlias:r,exposes:[n],resourceCategory:"sync",share:!1,depsRemote:!1}},u=await o.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:o,preloadOptions:l,remoteInfo:s,remote:t,remoteSnapshot:a,globalSnapshot:c});return u&&vi.preloadAssets(s,o,u,!1),{...e,remoteSnapshot:a}}return e}}}xe.assignRemoteInfo=Zr;xe.snapshotPlugin=Ai;var Qr={};const Ne=$,bt=b,ki=q,jt=Z,Oi=xe;let je=D;function wi(e){const t=e.split(":");return t.length===1?{name:t[0],version:void 0}:t.length===2?{name:t[0],version:t[1]}:{name:t[1],version:t[2]}}function en(e,t,r,n,o={},s){const{value:i}=bt.getInfoWithoutType(e,Ne.getFMId(t)),a=s||i;if(a&&!(0,je.isManifestProvider)(a)&&(r(a,t,n),a.remotesInfo)){const c=Object.keys(a.remotesInfo);for(const l of c){if(o[l])continue;o[l]=!0;const u=wi(l),d=a.remotesInfo[l];en(e,{name:u.name,version:d.matchedVersion},r,!1,o,void 0)}}}const tt=(e,t)=>document.querySelector(`${e}[${e==="link"?"href":"src"}="${t}"]`);function Fi(e,t,r,n,o){const s=[],i=[],a=[],c=new Set,l=new Set,{options:u}=e,{preloadConfig:d}=t,{depsRemote:f}=d;if(en(n,r,(m,_,g)=>{var N;let p;if(g)p=d;else if(Array.isArray(f)){const R=f.find(v=>v.nameOrAlias===_.name||v.nameOrAlias===_.alias);if(!R)return;p=jt.defaultPreloadArgs(R)}else if(f===!0)p=d;else return;const E=(0,je.getResourceUrl)(m,Ne.getRemoteEntryInfoFromSnapshot(m).url);E&&a.push({name:_.name,moduleInfo:{name:_.name,entry:E,type:"remoteEntryType"in m?m.remoteEntryType:"global",entryGlobalName:"globalName"in m?m.globalName:_.name,shareScope:"",version:"version"in m?m.version:void 0},url:E});let I="modules"in m?m.modules:[];const O=jt.normalizePreloadExposes(p.exposes);O.length&&"modules"in m&&(I=(N=m==null?void 0:m.modules)==null?void 0:N.reduce((R,v)=>((O==null?void 0:O.indexOf(v.moduleName))!==-1&&R.push(v),R),[]));function y(R){const v=R.map(B=>(0,je.getResourceUrl)(m,B));return p.filter?v.filter(p.filter):v}if(I){const R=I.length;for(let v=0;v0){const m=(_,g)=>{const{shared:p}=ki.getRegisteredShare(e.shareScopeMap,g.sharedName,_,e.sharedHandler.hooks.lifecycle.resolveShare)||{};p&&typeof p.lib=="function"&&(g.assets.js.sync.forEach(E=>{c.add(E)}),g.assets.css.sync.forEach(E=>{l.add(E)}))};o.shared.forEach(_=>{var E;const g=(E=u.shared)==null?void 0:E[_.sharedName];if(!g)return;const p=_.version?g.find(I=>I.version===_.version):g;p&&Ne.arrayOptions(p).forEach(I=>{m(I,_)})})}const h=i.filter(m=>!c.has(m)&&!tt("script",m));return{cssAssets:s.filter(m=>!l.has(m)&&!tt("link",m)),jsAssetsWithoutEntry:h,entryAssets:a.filter(m=>!tt("script",m.url))}}const Li=function(){return{name:"generate-preload-assets-plugin",async generatePreloadAssets(e){const{origin:t,preloadOptions:r,remoteInfo:n,remote:o,globalSnapshot:s,remoteSnapshot:i}=e;return je.isBrowserEnvValue?Ne.isRemoteInfoWithEntry(o)&&Ne.isPureRemoteEntry(o)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:o.name,url:o.entry,moduleInfo:{name:n.name,entry:o.entry,type:n.type||"global",entryGlobalName:"",shareScope:""}}]}:(Oi.assignRemoteInfo(n,i),Fi(t,r,n,s,i)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}}}};Qr.generatePreloadAssetsPlugin=Li;var Ke={};const rt=M,Di=$,U=b,Vt=Pe,Hi=ve,nt=Ae,Ci=ke;let ot=D,Fe=Y;function tn(e,t){const r=U.getGlobalSnapshotInfoByModuleInfo({name:t.name,version:t.options.version}),n=r&&"remotesInfo"in r&&r.remotesInfo&&U.getInfoWithoutType(r.remotesInfo,e.name).value;return n&&n.matchedVersion?{hostGlobalSnapshot:r,globalSnapshot:U.getGlobalSnapshot(),remoteSnapshot:U.getGlobalSnapshotInfoByModuleInfo({name:e.name,version:n.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:U.getGlobalSnapshot(),remoteSnapshot:U.getGlobalSnapshotInfoByModuleInfo({name:e.name,version:"version"in e?e.version:void 0})}}var qi=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new Ci.PluginSystem({beforeLoadRemoteSnapshot:new Hi.AsyncHook("beforeLoadRemoteSnapshot"),loadSnapshot:new nt.AsyncWaterfallHook("loadGlobalSnapshot"),loadRemoteSnapshot:new nt.AsyncWaterfallHook("loadRemoteSnapshot"),afterLoadSnapshot:new nt.AsyncWaterfallHook("afterLoadSnapshot")}),this.manifestLoading=U.Global.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:t,expose:r}){const{options:n}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:n,moduleInfo:e});let o=U.getGlobalSnapshotInfoByModuleInfo({name:this.HostInstance.options.name,version:this.HostInstance.options.version});o||(o={version:this.HostInstance.options.version||"",remoteEntry:"",remotesInfo:{}},U.addGlobalSnapshot({[this.HostInstance.options.name]:o})),o&&"remotesInfo"in o&&!U.getInfoWithoutType(o.remotesInfo,e.name).value&&("version"in e||"entry"in e)&&(o.remotesInfo={...o==null?void 0:o.remotesInfo,[e.name]:{matchedVersion:"version"in e?e.version:e.entry}});const{hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:a}=this.getGlobalRemoteInfo(e),{remoteSnapshot:c,globalSnapshot:l}=await this.hooks.lifecycle.loadSnapshot.emit({options:n,moduleInfo:e,hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:a});let u,d;if(c)if((0,ot.isManifestProvider)(c)){const f=ot.isBrowserEnvValue?c.remoteEntry:c.ssrRemoteEntry||c.remoteEntry||"",h=await this.getManifestJson(f,e,{}),m=U.setGlobalSnapshotInfoByModuleInfo({...e,entry:f},h);u=h,d=m}else{const{remoteSnapshot:f}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:c,from:"global"});u=f,d=l}else if(Di.isRemoteInfoWithEntry(e)){const f=await this.getManifestJson(e.entry,e,{}),h=U.setGlobalSnapshotInfoByModuleInfo(e,f),{remoteSnapshot:m}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:f,from:"global"});u=m,d=h}else rt.error(Fe.RUNTIME_007,Fe.runtimeDescMap,{remoteName:e.name,remoteVersion:e.version,hostName:this.HostInstance.options.name,globalSnapshot:JSON.stringify(l)},void 0,Vt.optionsToMFContext(this.HostInstance.options));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:n,moduleInfo:e,remoteSnapshot:u}),{remoteSnapshot:u,globalSnapshot:d}}getGlobalRemoteInfo(e){return tn(e,this.HostInstance)}async getManifestJson(e,t,r){const n=async()=>{let s=this.manifestCache.get(e);if(s)return s;try{let i=await this.loaderHook.lifecycle.fetch.emit(e,{});(!i||!(i instanceof Response))&&(i=await fetch(e,{})),s=await i.json()}catch(i){s=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:i,from:"runtime",lifecycle:"afterResolve",origin:this.HostInstance}),s||(delete this.manifestLoading[e],rt.error(Fe.RUNTIME_003,Fe.runtimeDescMap,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${i}`,Vt.optionsToMFContext(this.HostInstance.options)))}return rt.assert(s.metaData&&s.exposes&&s.shared,`"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${[!s.metaData&&"metaData",!s.exposes&&"exposes",!s.shared&&"shared"].filter(Boolean).join(", ")}.`),this.manifestCache.set(e,s),s},o=async()=>{const s=await n(),i=(0,ot.generateSnapshotFromManifest)(s,{version:e}),{remoteSnapshot:a}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:s,remoteSnapshot:i,manifestUrl:e,from:"manifest"});return a};return this.manifestLoading[e]||(this.manifestLoading[e]=o().then(s=>s)),this.manifestLoading[e]}};Ke.SnapshotHandler=qi;Ke.getGlobalRemoteInfo=tn;var rn={};const st=M,Gi=oe,A=q,Xt=Pe,Ui=ve,it=_e,xt=Ae,Wi=ke;let pe=Y;var Bi=class{constructor(e){this.hooks=new Wi.PluginSystem({beforeRegisterShare:new it.SyncWaterfallHook("beforeRegisterShare"),afterResolve:new xt.AsyncWaterfallHook("afterResolve"),beforeLoadShare:new xt.AsyncWaterfallHook("beforeLoadShare"),loadShare:new Ui.AsyncHook,resolveShare:new it.SyncWaterfallHook("resolveShare"),initContainerShareScopeMap:new it.SyncWaterfallHook("initContainerShareScopeMap")}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}registerShared(e,t){const{newShareInfos:r,allShareInfos:n}=A.formatShareConfigs(e,t);return Object.keys(r).forEach(o=>{r[o].forEach(s=>{s.scope.forEach(i=>{var a;this.hooks.lifecycle.beforeRegisterShare.emit({origin:this.host,pkgName:o,shared:s}),(a=this.shareScopeMap[i])!=null&&a[o]||this.setShared({pkgName:o,lib:s.lib,get:s.get,loaded:s.loaded||!!s.lib,shared:s,from:t.name})})})}),{newShareInfos:r,allShareInfos:n}}async loadShare(e,t){const{host:r}=this,n=A.getTargetSharedOptions({pkgName:e,extraOptions:t,shareInfos:r.options.shared});n!=null&&n.scope&&await Promise.all(n.scope.map(async a=>{await Promise.all(this.initializeSharing(a,{strategy:n.strategy}))}));const{shareInfo:o}=await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:n,shared:r.options.shared,origin:r});st.assert(o,`Cannot find shared "${e}" in host "${r.options.name}". Ensure the shared config for "${e}" is declared in the federation plugin options and the host has been initialized before loading shares.`);const{shared:s,useTreesShaking:i}=A.getRegisteredShare(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare)||{};if(s){const a=A.directShare(s,i);if(a.lib)return A.addUseIn(a,r.options.name),a.lib;if(a.loading&&!a.loaded){const c=await a.loading;return a.loaded=!0,a.lib||(a.lib=c),A.addUseIn(a,r.options.name),c}else{const l=(async()=>{const u=await a.get();return A.addUseIn(a,r.options.name),a.loaded=!0,a.lib=u,u})();return this.setShared({pkgName:e,loaded:!1,shared:s,from:r.options.name,lib:null,loading:l,treeShaking:i?a:void 0}),l}}else{if(t!=null&&t.customShareInfo)return!1;const a=A.shouldUseTreeShaking(o.treeShaking),c=A.directShare(o,a),u=(async()=>{const d=await c.get();c.lib=d,c.loaded=!0,A.addUseIn(c,r.options.name);const{shared:f,useTreesShaking:h}=A.getRegisteredShare(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare)||{};if(f){const m=A.directShare(f,h);m.lib=d,m.loaded=!0,f.from=o.from}return d})();return this.setShared({pkgName:e,loaded:!1,shared:o,from:r.options.name,lib:null,loading:u,treeShaking:a?c:void 0}),u}}initializeSharing(e=Gi.DEFAULT_SCOPE,t){const{host:r}=this,n=t==null?void 0:t.from,o=t==null?void 0:t.strategy;let s=t==null?void 0:t.initScope;const i=[];if(n!=="build"){const{initTokens:f}=this;s||(s=[]);let h=f[e];if(h||(h=f[e]={from:this.host.name}),s.indexOf(h)>=0)return i;s.push(h)}const a=this.shareScopeMap,c=r.options.name;a[e]||(a[e]={});const l=a[e],u=(f,h)=>{var I;const{version:m,eager:_}=h;l[f]=l[f]||{};const g=l[f],p=g[m]&&A.directShare(g[m]),E=!!(p&&("eager"in p&&p.eager||"shareConfig"in p&&((I=p.shareConfig)!=null&&I.eager)));(!p||p.strategy!=="loaded-first"&&!p.loaded&&(!_!=!E?_:c>g[m].from))&&(g[m]=h)},d=async f=>{const{module:h}=await r.remoteHandler.getRemoteModuleAndOptions({id:f});let m;try{m=await h.getEntry()}catch(_){if(m=await r.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:f,error:_,from:"runtime",lifecycle:"beforeLoadShare",origin:r}),!m)return}finally{m!=null&&m.init&&!h.initing&&(h.remoteEntryExports=m,await h.init(void 0,void 0,s))}};return Object.keys(r.options.shared).forEach(f=>{r.options.shared[f].forEach(h=>{h.scope.includes(e)&&u(f,h)})}),(r.options.shareStrategy==="version-first"||o==="version-first")&&r.options.remotes.forEach(f=>{f.shareScope===e&&i.push(d(f.name))}),i}loadShareSync(e,t){const{host:r}=this,n=A.getTargetSharedOptions({pkgName:e,extraOptions:t,shareInfos:r.options.shared});n!=null&&n.scope&&n.scope.forEach(i=>{this.initializeSharing(i,{strategy:n.strategy})});const{shared:o,useTreesShaking:s}=A.getRegisteredShare(this.shareScopeMap,e,n,this.hooks.lifecycle.resolveShare)||{};if(o){if(typeof o.lib=="function")return A.addUseIn(o,r.options.name),o.loaded||(o.loaded=!0,o.from===r.options.name&&(n.loaded=!0)),o.lib;if(typeof o.get=="function"){const i=o.get();if(!(i instanceof Promise))return A.addUseIn(o,r.options.name),this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:i,shared:o}),i}}if(n.lib)return n.loaded||(n.loaded=!0),n.lib;if(n.get){const i=n.get();return i instanceof Promise&&st.error((t==null?void 0:t.from)==="build"?pe.RUNTIME_005:pe.RUNTIME_006,pe.runtimeDescMap,{hostName:r.options.name,sharedPkgName:e},void 0,Xt.optionsToMFContext(r.options)),n.lib=i,this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:n.lib,shared:n}),n.lib}st.error(pe.RUNTIME_006,pe.runtimeDescMap,{hostName:r.options.name,sharedPkgName:e},void 0,Xt.optionsToMFContext(r.options))}initShareScopeMap(e,t,r={}){const{host:n}=this;this.shareScopeMap[e]=t,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:t,options:n.options,origin:n,scopeName:e,hostShareScopeMap:r.hostShareScopeMap})}setShared({pkgName:e,shared:t,from:r,lib:n,loading:o,loaded:s,get:i,treeShaking:a}){const{version:c,scope:l="default",...u}=t,d=Array.isArray(l)?l:[l],f=h=>{const m=(g,p,E)=>{E&&!g[p]&&(g[p]=E)},_=a?h.treeShaking:h;m(_,"loaded",s),m(_,"loading",o),m(_,"get",i)};d.forEach(h=>{this.shareScopeMap[h]||(this.shareScopeMap[h]={}),this.shareScopeMap[h][e]||(this.shareScopeMap[h][e]={}),this.shareScopeMap[h][e][c]||(this.shareScopeMap[h][e][c]={version:c,scope:[h],...u,lib:n});const m=this.shareScopeMap[h][e][c];f(m),r&&m.from!==r&&(m.from=r)})}_setGlobalShareScopeMap(e){const t=A.getGlobalShareScope(),r=e.id||e.name;r&&!t[r]&&(t[r]=this.shareScopeMap)}};rn.SharedHandler=Bi;var nn={};const Le=M,G=b,Kt=oe,ji=q,Vi=he,at=K,Xi=Pe,Yt=Z,xi=Xe,Ki=me,ie=ve,zt=_e,Yi=Ae,zi=ke,Ji=Ke;let lt=D,Jt=Y;var Zi=class{constructor(e){this.hooks=new zi.PluginSystem({beforeRegisterRemote:new zt.SyncWaterfallHook("beforeRegisterRemote"),registerRemote:new zt.SyncWaterfallHook("registerRemote"),beforeRequest:new Yi.AsyncWaterfallHook("beforeRequest"),onLoad:new ie.AsyncHook("onLoad"),handlePreloadModule:new Ki.SyncHook("handlePreloadModule"),errorLoadRemote:new ie.AsyncHook("errorLoadRemote"),beforePreloadRemote:new ie.AsyncHook("beforePreloadRemote"),generatePreloadAssets:new ie.AsyncHook("generatePreloadAssets"),afterPreloadRemote:new ie.AsyncHook,loadEntry:new ie.AsyncHook}),this.host=e,this.idToRemoteMap={}}formatAndRegisterRemote(e,t){return(t.remotes||[]).reduce((r,n)=>(this.registerRemote(n,r,{force:!1}),r),e.remotes)}setIdToRemoteMap(e,t){const{remote:r,expose:n}=t,{name:o,alias:s}=r;if(this.idToRemoteMap[e]={name:r.name,expose:n},s&&e.startsWith(o)){const i=e.replace(o,s);this.idToRemoteMap[i]={name:r.name,expose:n};return}if(s&&e.startsWith(s)){const i=e.replace(s,o);this.idToRemoteMap[i]={name:r.name,expose:n}}}async loadRemote(e,t){const{host:r}=this;try{const{loadFactory:n=!0}=t||{loadFactory:!0},{module:o,moduleOptions:s,remoteMatchInfo:i}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:a,remote:c,expose:l,id:u,remoteSnapshot:d}=i,f=await o.get(u,l,t,d),h=await this.hooks.lifecycle.onLoad.emit({id:u,pkgNameOrAlias:a,expose:l,exposeModule:n?f:void 0,exposeModuleFactory:n?void 0:f,remote:c,options:s,moduleInstance:o,origin:r});return this.setIdToRemoteMap(e,i),typeof h=="function"?h:f}catch(n){const{from:o="runtime"}=t||{from:"runtime"},s=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:n,from:o,lifecycle:"onLoad",origin:r});if(!s)throw n;return s}}async preloadRemote(e){const{host:t}=this;await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});const r=Yt.formatPreloadArgs(t.options.remotes,e);await Promise.all(r.map(async n=>{const{remote:o}=n,s=at.getRemoteInfo(o),{globalSnapshot:i,remoteSnapshot:a}=await t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:o}),c=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:n,remote:o,remoteInfo:s,globalSnapshot:i,remoteSnapshot:a});c&&Yt.preloadAssets(s,t,c)}))}registerRemotes(e,t){const{host:r}=this;e.forEach(n=>{this.registerRemote(n,r.options.remotes,{force:t==null?void 0:t.force})})}async getRemoteModuleAndOptions(e){const{host:t}=this,{id:r}=e;let n;try{n=await this.hooks.lifecycle.beforeRequest.emit({id:r,options:t.options,origin:t})}catch(h){if(n=await this.hooks.lifecycle.errorLoadRemote.emit({id:r,options:t.options,origin:t,from:"runtime",error:h,lifecycle:"beforeRequest"}),!n)throw h}const{id:o}=n,s=Vi.matchRemoteWithNameAndExpose(t.options.remotes,o);s||Le.error(Jt.RUNTIME_004,Jt.runtimeDescMap,{hostName:t.options.name,requestId:o},void 0,Xi.optionsToMFContext(t.options));const{remote:i}=s,a=at.getRemoteInfo(i),c=await t.sharedHandler.hooks.lifecycle.afterResolve.emit({id:o,...s,options:t.options,origin:t,remoteInfo:a}),{remote:l,expose:u}=c;Le.assert(l&&u,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${o}.`);let d=t.moduleCache.get(l.name);const f={host:t,remoteInfo:a};return d||(d=new xi.Module(f),t.moduleCache.set(l.name,d)),{module:d,moduleOptions:f,remoteMatchInfo:c}}registerRemote(e,t,r){const{host:n}=this,o=()=>{if(e.alias){const i=t.find(a=>{var c;return e.alias&&(a.name.startsWith(e.alias)||((c=a.alias)==null?void 0:c.startsWith(e.alias)))});Le.assert(!i,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${i&&i.name} name or alias`)}"entry"in e&<.isBrowserEnvValue&&typeof window<"u"&&!e.entry.startsWith("http")&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||(e.shareScope=Kt.DEFAULT_SCOPE),e.type||(e.type=Kt.DEFAULT_REMOTE_TYPE)};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:n});const s=t.find(i=>i.name===e.name);if(!s)o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n});else{const i=[`The remote "${e.name}" is already registered.`,"Please note that overriding it may cause unexpected errors."];r!=null&&r.force&&(this.removeRemote(s),o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n}),(0,lt.warn)(i.join(" ")))}}removeRemote(e){var t;try{const{host:r}=this,{name:n}=e,o=r.options.remotes.findIndex(i=>i.name===n);o!==-1&&r.options.remotes.splice(o,1);const s=r.moduleCache.get(e.name);if(s){const i=s.remoteInfo,a=i.entryGlobalName;G.CurrentGlobal[a]&&((t=Object.getOwnPropertyDescriptor(G.CurrentGlobal,a))!=null&&t.configurable?delete G.CurrentGlobal[a]:G.CurrentGlobal[a]=void 0);const c=at.getRemoteEntryUniqueKey(s.remoteInfo);G.globalLoading[c]&&delete G.globalLoading[c],r.snapshotHandler.manifestCache.delete(i.entry);let l=i.buildVersion?(0,lt.composeKeyWithSeparator)(i.name,i.buildVersion):i.name;const u=G.CurrentGlobal.__FEDERATION__.__INSTANCES__.findIndex(f=>i.buildVersion?f.options.id===l:f.name===l);if(u!==-1){const f=G.CurrentGlobal.__FEDERATION__.__INSTANCES__[u];l=f.options.id||l;const h=ji.getGlobalShareScope();let m=!0;const _=[];Object.keys(h).forEach(g=>{const p=h[g];p&&Object.keys(p).forEach(E=>{const I=p[E];I&&Object.keys(I).forEach(O=>{const y=I[O];y&&Object.keys(y).forEach(N=>{const R=y[N];R&&typeof R=="object"&&R.from===i.name&&(R.loaded||R.loading?(R.useIn=R.useIn.filter(v=>v!==i.name),R.useIn.length?m=!1:_.push([g,E,O,N])):_.push([g,E,O,N]))})})})}),m&&(f.shareScopeMap={},delete h[l]),_.forEach(([g,p,E,I])=>{var O,y,N;(N=(y=(O=h[g])==null?void 0:O[p])==null?void 0:y[E])==null||delete N[I]}),G.CurrentGlobal.__FEDERATION__.__INSTANCES__.splice(u,1)}const{hostGlobalSnapshot:d}=Ji.getGlobalRemoteInfo(e,r);if(d){const f=d&&"remotesInfo"in d&&d.remotesInfo&&G.getInfoWithoutType(d.remotesInfo,e.name).key;f&&(delete d.remotesInfo[f],G.Global.__FEDERATION__.__MANIFEST_LOADING__[f]&&delete G.Global.__FEDERATION__.__MANIFEST_LOADING__[f])}r.moduleCache.delete(e.name)}}catch(r){Le.logger.error(`removeRemote failed: ${r instanceof Error?r.message:String(r)}`)}}};nn.RemoteHandler=Zi;const Qi=M,ea=oe,ta=q,ra=Vr,na=Xr,oa=K,sa=Xe,z=me,ct=ve,ia=_e,Zt=Ae,ut=ke,aa=xe,la=Qr,ca=Ke,ua=rn,fa=nn;let da=D,ft=Y;const ha=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN=="boolean"?!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN:!0;var ma=class{constructor(e){this.hooks=new ut.PluginSystem({beforeInit:new ia.SyncWaterfallHook("beforeInit"),init:new z.SyncHook,beforeInitContainer:new Zt.AsyncWaterfallHook("beforeInitContainer"),initContainer:new Zt.AsyncWaterfallHook("initContainer")}),this.version="2.2.2",this.moduleCache=new Map,this.loaderHook=new ut.PluginSystem({getModuleInfo:new z.SyncHook,createScript:new z.SyncHook,createLink:new z.SyncHook,fetch:new ct.AsyncHook,loadEntryError:new ct.AsyncHook,getModuleFactory:new ct.AsyncHook}),this.bridgeHook=new ut.PluginSystem({beforeBridgeRender:new z.SyncHook,afterBridgeRender:new z.SyncHook,beforeBridgeDestroy:new z.SyncHook,afterBridgeDestroy:new z.SyncHook});const t=ha?[aa.snapshotPlugin(),la.generatePreloadAssetsPlugin()]:[],r={id:ra.getBuilderId(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:da.isBrowserEnvValue};this.name=e.name,this.options=r,this.snapshotHandler=new ca.SnapshotHandler(this),this.sharedHandler=new ua.SharedHandler(this),this.remoteHandler=new fa.RemoteHandler(this),this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...r.plugins,...e.plugins||[]]),this.options=this.formatOptions(r,e)}initOptions(e){e.name&&e.name!==this.options.name&&Qi.error((0,ft.getShortErrorMsg)(ft.RUNTIME_010,ft.runtimeDescMap)),this.registerPlugins(e.plugins);const t=this.formatOptions(this.options,e);return this.options=t,t}async loadShare(e,t){return this.sharedHandler.loadShare(e,t)}loadShareSync(e,t){return this.sharedHandler.loadShareSync(e,t)}initializeSharing(e=ea.DEFAULT_SCOPE,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,r){const n=oa.getRemoteInfo({name:e,entry:t}),o=new sa.Module({host:this,remoteInfo:n});return o.remoteEntryExports=r,this.moduleCache.set(e,o),o}async loadRemote(e,t){return this.remoteHandler.loadRemote(e,t)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,t,r={}){this.sharedHandler.initShareScopeMap(e,t,r)}formatOptions(e,t){const{allShareInfos:r}=ta.formatShareConfigs(e,t),{userOptions:n,options:o}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:r}),s=this.remoteHandler.formatAndRegisterRemote(o,n),{allShareInfos:i}=this.sharedHandler.registerShared(o,n),a=[...o.plugins];n.plugins&&n.plugins.forEach(l=>{a.includes(l)||a.push(l)});const c={...e,...t,plugins:a,remotes:s,shared:i};return this.hooks.lifecycle.init.emit({origin:this,options:c}),c}registerPlugins(e){const t=na.registerPlugins(e,this);this.options.plugins=this.options.plugins.reduce((r,n)=>(n&&r&&!r.find(o=>o.name===n.name)&&r.push(n),r),t||[])}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}};Yr.ModuleFederation=ma;var on={},sn={},Qt=Object.defineProperty,_a=(e,t)=>{let r={};for(var n in e)Qt(r,n,{get:e[n],enumerable:!0});return t||Qt(r,Symbol.toStringTag,{value:"Module"}),r};sn.__exportAll=_a;(function(e){var r=sn.__exportAll({});Object.defineProperty(e,"type_exports",{enumerable:!0,get:function(){return r}})})(on);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=M,r=$,n=b,o=Pt,s=q,i=he,a=K,c=xr,l=Xe,u=Yr,d=on;let f=D;const h=c.default;e.CurrentGlobal=n.CurrentGlobal,e.Global=n.Global,e.Module=l.Module,e.ModuleFederation=u.ModuleFederation,e.addGlobalSnapshot=n.addGlobalSnapshot,e.assert=t.assert,e.error=t.error,e.getGlobalFederationConstructor=n.getGlobalFederationConstructor,e.getGlobalSnapshot=n.getGlobalSnapshot,e.getInfoWithoutType=n.getInfoWithoutType,e.getRegisteredShare=s.getRegisteredShare,e.getRemoteEntry=a.getRemoteEntry,e.getRemoteInfo=a.getRemoteInfo,e.helpers=h,e.isStaticResourcesEqual=r.isStaticResourcesEqual,Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return f.loadScript}}),Object.defineProperty(e,"loadScriptNode",{enumerable:!0,get:function(){return f.loadScriptNode}}),e.matchRemoteWithNameAndExpose=i.matchRemoteWithNameAndExpose,e.registerGlobalPlugins=n.registerGlobalPlugins,e.resetFederationGlobalInfo=n.resetFederationGlobalInfo,e.safeWrapper=r.safeWrapper,e.satisfy=o.satisfy,e.setGlobalFederationConstructor=n.setGlobalFederationConstructor,e.setGlobalFederationInstance=n.setGlobalFederationInstance,Object.defineProperty(e,"types",{enumerable:!0,get:function(){return d.type_exports}})})(Tt);let ga=Tt;function pa(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function ya(e,t){const r=pa();return ga.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(n=>!!(r&&n.options.id===r||n.options.name===e&&!n.options.version&&!t||n.options.name===e&&t&&n.options.version===t))}ar.getGlobalFederationInstance=ya;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ar;let r=Tt,n=Y;function o(_){const g=new((0,r.getGlobalFederationConstructor)()||r.ModuleFederation)(_);return(0,r.setGlobalFederationInstance)(g),g}let s=null;function i(_){const g=t.getGlobalFederationInstance(_.name,_.version);return g?(g.initOptions(_),s||(s=g),g):(s=o(_),s)}function a(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.loadRemote.apply(s,_)}function c(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.loadShare.apply(s,_)}function l(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.loadShareSync.apply(s,_)}function u(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.preloadRemote.apply(s,_)}function d(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.registerRemotes.apply(s,_)}function f(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.registerPlugins.apply(s,_)}function h(){return s}function m(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.registerShared.apply(s,_)}(0,r.setGlobalFederationConstructor)(r.ModuleFederation),Object.defineProperty(e,"Module",{enumerable:!0,get:function(){return r.Module}}),e.ModuleFederation=r.ModuleFederation,e.createInstance=o,e.getInstance=h,Object.defineProperty(e,"getRemoteEntry",{enumerable:!0,get:function(){return r.getRemoteEntry}}),Object.defineProperty(e,"getRemoteInfo",{enumerable:!0,get:function(){return r.getRemoteInfo}}),e.init=i,e.loadRemote=a,Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return r.loadScript}}),Object.defineProperty(e,"loadScriptNode",{enumerable:!0,get:function(){return r.loadScriptNode}}),e.loadShare=c,e.loadShareSync=l,e.preloadRemote=u,Object.defineProperty(e,"registerGlobalPlugins",{enumerable:!0,get:function(){return r.registerGlobalPlugins}}),e.registerPlugins=f,e.registerRemotes=d,e.registerShared=m})(ir);const an="__mf_init____mf__virtual/iobroker_javascript__mf_v__runtimeInit__mf_v__.js__";let Rt=globalThis[an];if(!Rt){let e,t;const r=new Promise((n,o)=>{e=n,t=o});Rt=globalThis[an]={initPromise:r,initResolve:e,initReject:t},typeof window>"u"&&e({loadRemote:function(){return Promise.resolve(void 0)},loadShare:function(){return Promise.resolve(void 0)}})}const Ea=Rt.initResolve,er={},tr="default",rr="iobroker_javascript";let nr,or;async function Sa(){return nr??=sr(()=>import("./localSharedImportMap-Cs4ibnCv.js"),__vite__mapDeps([0,1]),import.meta.url),nr}async function ba(){return or??=sr(()=>import("./virtualExposes-BPsCufin.js"),[],import.meta.url).then(e=>e.default??e),or}async function Ta(e={},t=[]){const{usedShared:r,usedRemotes:n}=await Sa(),o=ir.init({name:rr,remotes:n,shared:r,plugins:[],shareStrategy:"version-first"});var s=er[tr];if(s||(s=er[tr]={from:rr}),!(t.indexOf(s)>=0)){t.push(s),o.initShareScopeMap("default",e),Ea(o);try{await Promise.all(await o.initializeSharing("default",{strategy:"version-first",from:"build",initScope:t}))}catch(i){console.error(i)}return o}}async function Ia(e){const t=await ba();if(!(e in t))throw new Error(`Module ${e} does not exist in container.`);return t[e]().then(r=>()=>r)}export{ir as d,Ia as g,Ta as i}; diff --git a/admin/custom/assets/index-DD6zfnpm.js b/admin/custom/assets/index-BVOepGI5.js similarity index 95% rename from admin/custom/assets/index-DD6zfnpm.js rename to admin/custom/assets/index-BVOepGI5.js index ae6ff99e6..dacde6790 100644 --- a/admin/custom/assets/index-DD6zfnpm.js +++ b/admin/custom/assets/index-BVOepGI5.js @@ -1 +1 @@ -import"./virtual_mf-REMOTE_ENTRY_ID_ConfigCustomJavascriptSet__customComponents_js-Oq3-1vii.js";import{j as n}from"./jsx-runtime-BplTyRFk.js";import{h as d}from"./ConfigCustomJavascriptSet__loadShare__react__loadShare__.mjs-BW9Qbxx5.js";import{r as m}from"./ConfigCustomJavascriptSet__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-D8zcZsJo.js";import"./preload-helper-BDBacUwf.js";import"./ConfigCustomJavascriptSet__loadShare__react__loadShare__.mjs_commonjs-proxy-2W2BYT2K.js";import"./ConfigCustomJavascriptSet__loadShare__react_mf_2_dom__loadShare__.mjs-CL--xmjC.js";(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const o of t.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function a(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function i(e){if(e.ep)return;e.ep=!0;const t=a(e);fetch(e.href,t)}})();var c,s=m;c=s.createRoot,s.hydrateRoot;window.adapterName="adapter-component-template";const u=document.getElementById("root"),f=c(u);f.render(n.jsx(d.StrictMode,{children:n.jsx("div",{})})); +import"./virtual_mf-REMOTE_ENTRY_ID_ConfigCustomJavascriptSet__customComponents_js-CO2hfDx_.js";import{j as n}from"./jsx-runtime-BplTyRFk.js";import{h as d}from"./ConfigCustomJavascriptSet__loadShare__react__loadShare__.mjs-BW9Qbxx5.js";import{r as m}from"./ConfigCustomJavascriptSet__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-D8zcZsJo.js";import"./preload-helper-BDBacUwf.js";import"./ConfigCustomJavascriptSet__loadShare__react__loadShare__.mjs_commonjs-proxy-2W2BYT2K.js";import"./ConfigCustomJavascriptSet__loadShare__react_mf_2_dom__loadShare__.mjs-CL--xmjC.js";(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const o of t.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function a(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function i(e){if(e.ep)return;e.ep=!0;const t=a(e);fetch(e.href,t)}})();var c,s=m;c=s.createRoot,s.hydrateRoot;window.adapterName="adapter-component-template";const u=document.getElementById("root"),f=c(u);f.render(n.jsx(d.StrictMode,{children:n.jsx("div",{})})); diff --git a/admin/custom/assets/index-ByH7ba-v.js b/admin/custom/assets/index-C8_qJ4Y6.js similarity index 65% rename from admin/custom/assets/index-ByH7ba-v.js rename to admin/custom/assets/index-C8_qJ4Y6.js index 337d65925..f8e1b9128 100644 --- a/admin/custom/assets/index-ByH7ba-v.js +++ b/admin/custom/assets/index-C8_qJ4Y6.js @@ -1,19 +1,19 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-B5DqCD_a.js","./index-D_5kZmfw.js","./ConfigCustomJavascriptSet__loadShare__react__loadShare__.mjs_commonjs-proxy-2W2BYT2K.js","./ConfigCustomJavascriptSet__loadShare__react__loadShare__.mjs-BW9Qbxx5.js"])))=>i.map(i=>d[i]); -import{i as Ao,h as x,f as Kl,a as Gl,p as Jl}from"./ConfigCustomJavascriptSet__loadShare__react__loadShare__.mjs-BW9Qbxx5.js";import{c as Ge,r as Ps}from"./ConfigCustomJavascriptSet__loadShare__react__loadShare__.mjs_commonjs-proxy-2W2BYT2K.js";function Yl(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var n=e.default;if(typeof n=="function"){var t=function r(){var o=!1;try{o=this instanceof r}catch{}return o?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};t.prototype=n.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),t}function Ql(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}import{G as He,p as me,F as In,i as Pn,M as yt,z as ge,r as se,W as Ws,X as js,s as Ie,Y as zs,g as ve,Z as Pi,b as pe,$ as vn,h as Tt,c as fe,d as Te,e as Be,f as xe,_ as Xn,a as Zt,a0 as Do,Q as On,T as $o,S as ct,R as Ee,V as Fn,k as Lt,l as yn,m as Kt,n as Xl,o as Gt,a1 as Zl,a2 as ql,D as ec,a3 as Hs,j as Ti,E as Wi,A as xo,B as Vs,x as tc,y as nc,a4 as ic,a5 as sc,N as rc,a6 as _o,a7 as ko,I as oc,U as ac,a8 as as,a9 as lc,aa as cc,t as hc,v as uc,w as pc}from"./ConfigCustomJavascriptSet__loadShare___mf_0_mui_mf_1_material__loadShare__.mjs-KsT5vKjV.js";import{a7 as Hn,W as Jt,k as Li,aj as dc,ak as To,al as fc,am as Lo,an as gc,J as mc,S as Vn,u as Mo,ao as Io,ap as Oo,c as _t,E as Us,R as Un,aq as Fo,M as Ro,_ as vc,ar as yc,as as bc,at as wc,au as Cc,af as Mi,av as Ei,aw as Ai,n as fn,b as Ks,a as ht,ax as Sc,ay as Ec,az as Ac,q as Dc,aA as No,w as Bo,r as Po,aB as Gs,d as $c,aC as xc,aD as _c,a8 as Wo,aE as kc,aF as Tc,aG as Lc,aH as Mc,aI as Ic,aJ as Oc,aK as Fc,aL as Rc,aM as Nc,V as Bc,aN as Pc,j as Wc,X as jc,aO as zc,aP as Hc,aQ as Vc,aR as Uc,G as Rr}from"./ConfigCustomJavascriptSet__loadShare___mf_0_mui_mf_1_icons_mf_2_material__loadShare__.mjs-B551AMx-.js";import{_ as P,A as Kc}from"./ConfigCustomJavascriptSet__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.mjs-B7D2xOvV.js";import{R as Gc}from"./ConfigCustomJavascriptSet__loadShare__react_mf_2_dom__loadShare__.mjs-CL--xmjC.js";import{b as Jc}from"./blue-CagzI6CQ.js";import{C as Yc,D as jo}from"./index-CzRngQHl.js";import{d as xs}from"./virtual_mf-REMOTE_ENTRY_ID_ConfigCustomJavascriptSet__customComponents_js-Oq3-1vii.js";import{b as Qc,a as Xc}from"./ConfigCustomJavascriptSet__loadShare___mf_0_mui_mf_1_x_mf_2_date_mf_2_pickers__loadShare__.mjs-DgHZUNxn.js";import{p as Js}from"./index-D_5kZmfw.js";import{_ as zo}from"./preload-helper-BDBacUwf.js";const Zc=Object.freeze(Object.defineProperty({__proto__:null,get ConfigGeneric(){return V},get ConfigPanel(){return tn},get JsonConfig(){return Mf},get JsonConfigComponent(){return ki}},Symbol.toStringTag,{value:"Module"}));var qc=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,eh=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\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uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\u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5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u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3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17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\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uD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\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,ls={Space_Separator:qc,ID_Start:eh,ID_Continue:th},_e={isSpaceSeparator(m){return typeof m=="string"&&ls.Space_Separator.test(m)},isIdStartChar(m){return typeof m=="string"&&(m>="a"&&m<="z"||m>="A"&&m<="Z"||m==="$"||m==="_"||ls.ID_Start.test(m))},isIdContinueChar(m){return typeof m=="string"&&(m>="a"&&m<="z"||m>="A"&&m<="Z"||m>="0"&&m<="9"||m==="$"||m==="_"||m==="‌"||m==="‍"||ls.ID_Continue.test(m))},isDigit(m){return typeof m=="string"&&/[0-9]/.test(m)},isHexDigit(m){return typeof m=="string"&&/[0-9A-Fa-f]/.test(m)}};let _s,je,mt,Ii,Mt,rt,Re,Ys,Wn;var nh=function(e,t){_s=String(e),je="start",mt=[],Ii=0,Mt=1,rt=0,Re=void 0,Ys=void 0,Wn=void 0;do Re=ih(),oh[je]();while(Re.type!=="eof");return typeof t=="function"?ks({"":Wn},"",t):Wn};function ks(m,e,t){const n=m[e];if(n!=null&&typeof n=="object")if(Array.isArray(n))for(let u=0;u="a"&&m<="z"||m>="A"&&m<="Z"||m==="$"||m==="_"||cs.ID_Start.test(m))},isIdContinueChar(m){return typeof m=="string"&&(m>="a"&&m<="z"||m>="A"&&m<="Z"||m>="0"&&m<="9"||m==="$"||m==="_"||m==="‌"||m==="‍"||cs.ID_Continue.test(m))},isDigit(m){return typeof m=="string"&&/[0-9]/.test(m)},isHexDigit(m){return typeof m=="string"&&/[0-9A-Fa-f]/.test(m)}};let ks,je,mt,Oi,Mt,rt,Re,Qs,Wn;var rh=function(e,t){ks=String(e),je="start",mt=[],Oi=0,Mt=1,rt=0,Re=void 0,Qs=void 0,Wn=void 0;do Re=oh(),ch[je]();while(Re.type!=="eof");return typeof t=="function"?Ts({"":Wn},"",t):Wn};function Ts(m,e,t){const n=m[e];if(n!=null&&typeof n=="object")if(Array.isArray(n))for(let h=0;h0;){const t=bt();if(!_e.isHexDigit(t))throw Ce(Q());m+=Q()}return String.fromCodePoint(parseInt(m,16))}const oh={start(){if(Re.type==="eof")throw Wt();cs()},beforePropertyName(){switch(Re.type){case"identifier":case"string":Ys=Re.value,je="afterPropertyName";return;case"punctuator":ui();return;case"eof":throw Wt()}},afterPropertyName(){if(Re.type==="eof")throw Wt();je="beforePropertyValue"},beforePropertyValue(){if(Re.type==="eof")throw Wt();cs()},beforeArrayValue(){if(Re.type==="eof")throw Wt();if(Re.type==="punctuator"&&Re.value==="]"){ui();return}cs()},afterPropertyValue(){if(Re.type==="eof")throw Wt();switch(Re.value){case",":je="beforePropertyName";return;case"}":ui()}},afterArrayValue(){if(Re.type==="eof")throw Wt();switch(Re.value){case",":je="beforeArrayValue";return;case"]":ui()}},end(){}};function cs(){let m;switch(Re.type){case"punctuator":switch(Re.value){case"{":m={};break;case"[":m=[];break}break;case"null":case"boolean":case"numeric":case"string":m=Re.value;break}if(Wn===void 0)Wn=m;else{const e=mt[mt.length-1];Array.isArray(e)?e.push(m):Object.defineProperty(e,Ys,{value:m,writable:!0,enumerable:!0,configurable:!0})}if(m!==null&&typeof m=="object")mt.push(m),Array.isArray(m)?je="beforeArrayValue":je="beforePropertyName";else{const e=mt[mt.length-1];e==null?je="end":Array.isArray(e)?je="afterArrayValue":je="afterPropertyValue"}}function ui(){mt.pop();const m=mt[mt.length-1];m==null?je="end":Array.isArray(m)?je="afterArrayValue":je="afterPropertyValue"}function Ce(m){return Oi(m===void 0?`JSON5: invalid end of input at ${Mt}:${rt}`:`JSON5: invalid character '${Vo(m)}' at ${Mt}:${rt}`)}function Wt(){return Oi(`JSON5: invalid end of input at ${Mt}:${rt}`)}function Nr(){return rt-=5,Oi(`JSON5: invalid identifier character at ${Mt}:${rt}`)}function ah(m){console.warn(`JSON5: '${Vo(m)}' in strings is not valid ECMAScript; consider escaping`)}function Vo(m){const e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[m])return e[m];if(m<" "){const t=m.charCodeAt(0).toString(16);return"\\x"+("00"+t).substring(t.length)}return m}function Oi(m){const e=new SyntaxError(m);return e.lineNumber=Mt,e.columnNumber=rt,e}var lh=function(e,t,n){const u=[];let i="",s,d,o="",l;if(t!=null&&typeof t=="object"&&!Array.isArray(t)&&(n=t.space,l=t.quote,t=t.replacer),typeof t=="function")d=t;else if(Array.isArray(t)){s=[];for(const f of t){let g;typeof f=="string"?g=f:(typeof f=="number"||f instanceof String||f instanceof Number)&&(g=String(f)),g!==void 0&&s.indexOf(g)<0&&s.push(g)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n=="number"?n>0&&(n=Math.min(10,Math.floor(n)),o=" ".substr(0,n)):typeof n=="string"&&(o=n.substr(0,10)),r("",{"":e});function r(f,g){let v=g[f];switch(v!=null&&(typeof v.toJSON5=="function"?v=v.toJSON5(f):typeof v.toJSON=="function"&&(v=v.toJSON(f))),d&&(v=d.call(g,f,v)),v instanceof Number?v=Number(v):v instanceof String?v=String(v):v instanceof Boolean&&(v=v.valueOf()),v){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof v=="string")return a(v);if(typeof v=="number")return String(v);if(typeof v=="object")return Array.isArray(v)?h(v):c(v)}function a(f){const g={"'":.1,'"':.2},v={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let b="";for(let E=0;Eg[E]=0)throw TypeError("Converting circular structure to JSON5");u.push(f);let g=i;i=i+o;let v=s||Object.keys(f),b=[];for(const E of v){const w=r(E,f);if(w!==void 0){let y=p(E)+":";o!==""&&(y+=" "),y+=w,b.push(y)}}let D;if(b.length===0)D="{}";else{let E;if(o==="")E=b.join(","),D="{"+E+"}";else{let w=`, +`&&Q(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw Ce(Q());case void 0:throw Ce(Q())}return Q()}function lh(){let m="",e=bt();if(!ke.isHexDigit(e)||(m+=Q(),e=bt(),!ke.isHexDigit(e)))throw Ce(Q());return m+=Q(),String.fromCodePoint(parseInt(m,16))}function Ls(){let m="",e=4;for(;e-- >0;){const t=bt();if(!ke.isHexDigit(t))throw Ce(Q());m+=Q()}return String.fromCodePoint(parseInt(m,16))}const ch={start(){if(Re.type==="eof")throw Wt();hs()},beforePropertyName(){switch(Re.type){case"identifier":case"string":Qs=Re.value,je="afterPropertyName";return;case"punctuator":ui();return;case"eof":throw Wt()}},afterPropertyName(){if(Re.type==="eof")throw Wt();je="beforePropertyValue"},beforePropertyValue(){if(Re.type==="eof")throw Wt();hs()},beforeArrayValue(){if(Re.type==="eof")throw Wt();if(Re.type==="punctuator"&&Re.value==="]"){ui();return}hs()},afterPropertyValue(){if(Re.type==="eof")throw Wt();switch(Re.value){case",":je="beforePropertyName";return;case"}":ui()}},afterArrayValue(){if(Re.type==="eof")throw Wt();switch(Re.value){case",":je="beforeArrayValue";return;case"]":ui()}},end(){}};function hs(){let m;switch(Re.type){case"punctuator":switch(Re.value){case"{":m={};break;case"[":m=[];break}break;case"null":case"boolean":case"numeric":case"string":m=Re.value;break}if(Wn===void 0)Wn=m;else{const e=mt[mt.length-1];Array.isArray(e)?e.push(m):Object.defineProperty(e,Qs,{value:m,writable:!0,enumerable:!0,configurable:!0})}if(m!==null&&typeof m=="object")mt.push(m),Array.isArray(m)?je="beforeArrayValue":je="beforePropertyName";else{const e=mt[mt.length-1];e==null?je="end":Array.isArray(e)?je="afterArrayValue":je="afterPropertyValue"}}function ui(){mt.pop();const m=mt[mt.length-1];m==null?je="end":Array.isArray(m)?je="afterArrayValue":je="afterPropertyValue"}function Ce(m){return Fi(m===void 0?`JSON5: invalid end of input at ${Mt}:${rt}`:`JSON5: invalid character '${Go(m)}' at ${Mt}:${rt}`)}function Wt(){return Fi(`JSON5: invalid end of input at ${Mt}:${rt}`)}function Pr(){return rt-=5,Fi(`JSON5: invalid identifier character at ${Mt}:${rt}`)}function hh(m){console.warn(`JSON5: '${Go(m)}' in strings is not valid ECMAScript; consider escaping`)}function Go(m){const e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[m])return e[m];if(m<" "){const t=m.charCodeAt(0).toString(16);return"\\x"+("00"+t).substring(t.length)}return m}function Fi(m){const e=new SyntaxError(m);return e.lineNumber=Mt,e.columnNumber=rt,e}var uh=function(e,t,n){const h=[];let i="",s,d,o="",l;if(t!=null&&typeof t=="object"&&!Array.isArray(t)&&(n=t.space,l=t.quote,t=t.replacer),typeof t=="function")d=t;else if(Array.isArray(t)){s=[];for(const f of t){let g;typeof f=="string"?g=f:(typeof f=="number"||f instanceof String||f instanceof Number)&&(g=String(f)),g!==void 0&&s.indexOf(g)<0&&s.push(g)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n=="number"?n>0&&(n=Math.min(10,Math.floor(n)),o=" ".substr(0,n)):typeof n=="string"&&(o=n.substr(0,10)),r("",{"":e});function r(f,g){let v=g[f];switch(v!=null&&(typeof v.toJSON5=="function"?v=v.toJSON5(f):typeof v.toJSON=="function"&&(v=v.toJSON(f))),d&&(v=d.call(g,f,v)),v instanceof Number?v=Number(v):v instanceof String?v=String(v):v instanceof Boolean&&(v=v.valueOf()),v){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof v=="string")return a(v);if(typeof v=="number")return String(v);if(typeof v=="object")return Array.isArray(v)?u(v):c(v)}function a(f){const g={"'":.1,'"':.2},v={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let b="";for(let E=0;Eg[E]=0)throw TypeError("Converting circular structure to JSON5");h.push(f);let g=i;i=i+o;let v=s||Object.keys(f),b=[];for(const E of v){const w=r(E,f);if(w!==void 0){let y=p(E)+":";o!==""&&(y+=" "),y+=w,b.push(y)}}let D;if(b.length===0)D="{}";else{let E;if(o==="")E=b.join(","),D="{"+E+"}";else{let w=`, `+i;E=b.join(w),D=`{ `+i+E+`, -`+g+"}"}}return u.pop(),i=g,D}function p(f){if(f.length===0)return a(f);const g=String.fromCodePoint(f.codePointAt(0));if(!_e.isIdStartChar(g))return a(f);for(let v=g.length;v=0)throw TypeError("Converting circular structure to JSON5");u.push(f);let g=i;i=i+o;let v=[];for(let D=0;D=0)throw TypeError("Converting circular structure to JSON5");h.push(f);let g=i;i=i+o;let v=[];for(let D=0;D>>2]>>>24-A%4*8&255;D[w+A>>>2]|=T<<24-(w+A)%4*8}else for(var $=0;$>>2]=E[$>>>2];return this.sigBytes+=y,this},clamp:function(){var b=this.words,D=this.sigBytes;b[D>>>2]&=4294967295<<32-D%4*8,b.length=n.ceil(D/4)},clone:function(){var b=r.clone.call(this);return b.words=this.words.slice(0),b},random:function(b){for(var D=[],E=0;E>>2]>>>24-y%4*8&255;w.push((A>>>4).toString(16)),w.push((A&15).toString(16))}return w.join("")},parse:function(b){for(var D=b.length,E=[],w=0;w>>3]|=parseInt(b.substr(w,2),16)<<24-w%8*4;return new a.init(E,D/2)}},h=c.Latin1={stringify:function(b){for(var D=b.words,E=b.sigBytes,w=[],y=0;y>>2]>>>24-y%4*8&255;w.push(String.fromCharCode(A))}return w.join("")},parse:function(b){for(var D=b.length,E=[],w=0;w>>2]|=(b.charCodeAt(w)&255)<<24-w%4*8;return new a.init(E,D)}},f=c.Utf8={stringify:function(b){try{return decodeURIComponent(escape(h.stringify(b)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(b){return h.parse(unescape(encodeURIComponent(b)))}},g=l.BufferedBlockAlgorithm=r.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(b){typeof b=="string"&&(b=f.parse(b)),this._data.concat(b),this._nDataBytes+=b.sigBytes},_process:function(b){var D,E=this._data,w=E.words,y=E.sigBytes,A=this.blockSize,T=A*4,$=y/T;b?$=n.ceil($):$=n.max(($|0)-this._minBufferSize,0);var M=$*A,O=n.min(M*4,y);if(M){for(var _=0;_>>24)&16711935|(D<<24|D>>>8)&4278255360}var E=this._hash.words,w=f[g+0],y=f[g+1],A=f[g+2],T=f[g+3],$=f[g+4],M=f[g+5],O=f[g+6],_=f[g+7],k=f[g+8],S=f[g+9],C=f[g+10],L=f[g+11],I=f[g+12],F=f[g+13],R=f[g+14],B=f[g+15],N=E[0],H=E[1],W=E[2],j=E[3];N=a(N,H,W,j,w,7,l[0]),j=a(j,N,H,W,y,12,l[1]),W=a(W,j,N,H,A,17,l[2]),H=a(H,W,j,N,T,22,l[3]),N=a(N,H,W,j,$,7,l[4]),j=a(j,N,H,W,M,12,l[5]),W=a(W,j,N,H,O,17,l[6]),H=a(H,W,j,N,_,22,l[7]),N=a(N,H,W,j,k,7,l[8]),j=a(j,N,H,W,S,12,l[9]),W=a(W,j,N,H,C,17,l[10]),H=a(H,W,j,N,L,22,l[11]),N=a(N,H,W,j,I,7,l[12]),j=a(j,N,H,W,F,12,l[13]),W=a(W,j,N,H,R,17,l[14]),H=a(H,W,j,N,B,22,l[15]),N=c(N,H,W,j,y,5,l[16]),j=c(j,N,H,W,O,9,l[17]),W=c(W,j,N,H,L,14,l[18]),H=c(H,W,j,N,w,20,l[19]),N=c(N,H,W,j,M,5,l[20]),j=c(j,N,H,W,C,9,l[21]),W=c(W,j,N,H,B,14,l[22]),H=c(H,W,j,N,$,20,l[23]),N=c(N,H,W,j,S,5,l[24]),j=c(j,N,H,W,R,9,l[25]),W=c(W,j,N,H,T,14,l[26]),H=c(H,W,j,N,k,20,l[27]),N=c(N,H,W,j,F,5,l[28]),j=c(j,N,H,W,A,9,l[29]),W=c(W,j,N,H,_,14,l[30]),H=c(H,W,j,N,I,20,l[31]),N=p(N,H,W,j,M,4,l[32]),j=p(j,N,H,W,k,11,l[33]),W=p(W,j,N,H,L,16,l[34]),H=p(H,W,j,N,R,23,l[35]),N=p(N,H,W,j,y,4,l[36]),j=p(j,N,H,W,$,11,l[37]),W=p(W,j,N,H,_,16,l[38]),H=p(H,W,j,N,C,23,l[39]),N=p(N,H,W,j,F,4,l[40]),j=p(j,N,H,W,w,11,l[41]),W=p(W,j,N,H,T,16,l[42]),H=p(H,W,j,N,O,23,l[43]),N=p(N,H,W,j,S,4,l[44]),j=p(j,N,H,W,I,11,l[45]),W=p(W,j,N,H,B,16,l[46]),H=p(H,W,j,N,A,23,l[47]),N=h(N,H,W,j,w,6,l[48]),j=h(j,N,H,W,_,10,l[49]),W=h(W,j,N,H,R,15,l[50]),H=h(H,W,j,N,M,21,l[51]),N=h(N,H,W,j,I,6,l[52]),j=h(j,N,H,W,T,10,l[53]),W=h(W,j,N,H,C,15,l[54]),H=h(H,W,j,N,y,21,l[55]),N=h(N,H,W,j,k,6,l[56]),j=h(j,N,H,W,B,10,l[57]),W=h(W,j,N,H,O,15,l[58]),H=h(H,W,j,N,F,21,l[59]),N=h(N,H,W,j,$,6,l[60]),j=h(j,N,H,W,L,10,l[61]),W=h(W,j,N,H,A,15,l[62]),H=h(H,W,j,N,S,21,l[63]),E[0]=E[0]+N|0,E[1]=E[1]+H|0,E[2]=E[2]+W|0,E[3]=E[3]+j|0},_doFinalize:function(){var f=this._data,g=f.words,v=this._nDataBytes*8,b=f.sigBytes*8;g[b>>>5]|=128<<24-b%32;var D=n.floor(v/4294967296),E=v;g[(b+64>>>9<<4)+15]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360,g[(b+64>>>9<<4)+14]=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,f.sigBytes=(g.length+1)*4,this._process();for(var w=this._hash,y=w.words,A=0;A<4;A++){var T=y[A];y[A]=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360}return w},clone:function(){var f=d.clone.call(this);return f._hash=this._hash.clone(),f}});function a(f,g,v,b,D,E,w){var y=f+(g&v|~g&b)+D+w;return(y<>>32-E)+g}function c(f,g,v,b,D,E,w){var y=f+(g&b|v&~b)+D+w;return(y<>>32-E)+g}function p(f,g,v,b,D,E,w){var y=f+(g^v^b)+D+w;return(y<>>32-E)+g}function h(f,g,v,b,D,E,w){var y=f+(v^(g|~b))+D+w;return(y<>>32-E)+g}u.MD5=d._createHelper(r),u.HmacMD5=d._createHmacHelper(r)})(Math),t.MD5})})(Qs);var vh=Qs.exports;const Pr=Ql(vh),yh=window.innerWidth<=600?12:void 0;function hs(m){return Object.prototype.toString.call(m)==="[object Object]"}class V extends Ao{static DIFFERENT_VALUE="__different__";static DIFFERENT_LABEL="ra___different__";static NONE_VALUE="";static NONE_LABEL="ra_none";defaultValue;isError;lang;defaultSendToDone;sendToTimeout;noPlaceRequired;reportedHidden=!1;calculateTimeout=null;AsyncFunction;constructor(e){super(e),this.AsyncFunction=Object.getPrototypeOf(async function(){}).constructor,this.state={confirmDialog:!1,confirmNewValue:null,confirmAttr:null,confirmData:null,confirmCallback:null},this.isError={},this.lang=P.I18n.getLanguage(),e.schema&&(e.custom?e.schema.defaultFunc||(this.defaultValue=e.schema.default):e.schema.type!=="state"&&!e.schema.defaultFunc&&(this.defaultValue=e.schema.default))}async getCachedObject(e){return this.props.oContext.getCachedObject?this.props.oContext.getCachedObject(e):await this.props.oContext.socket.getObject(e)||null}async componentDidMount(){var t,n,u;(t=this.props.schema)!=null&&t.defaultFunc&&(this.props.custom?this.defaultValue=await this.executeCustom(this.props.schema.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):this.props.schema.type!=="state"&&(this.defaultValue=await this.execute(this.props.schema.defaultFunc,this.props.schema.default,this.props.data,this.props.arrayIndex,this.props.globalData))),(u=(n=this.props.oContext).registerOnForceUpdate)==null||u.call(n,this.props.attr,this.onUpdate);const e=["select","autocomplete","autocompleteSendTo"];if(this.defaultValue!==void 0){const i=V.getValue(this.props.data,this.props.attr);(i===void 0||e.includes(this.props.schema.type)&&(i===""||i===null))&&setTimeout(()=>{this.props.custom?this.props.onChange(this.props.attr,this.defaultValue,()=>setTimeout(()=>this.props.oContext.forceUpdate([this.props.attr],this.props.data),100)):(V.setValue(this.props.data,this.props.attr,this.defaultValue),this.props.onChange(this.props.data,void 0,()=>this.props.oContext.forceUpdate([this.props.attr],this.props.data)))},100)}else this.props.schema.defaultSendTo&&this.sendTo().catch(i=>console.error(i))}async sendTo(){if(this.props.alive){this.defaultSendToDone=!0;let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){const n=await this.getPatternAsync(this.props.schema.jsonData,null,!0);try{e=JSON.parse(n)}catch{console.error(`Cannot parse json data: ${n}`)}}else e={attr:this.props.attr,value:V.getValue(this.props.data,this.props.attr)};e===void 0&&(e=null);const t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){const n=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(n!=null&&n.val)){window.alert(P.I18n.t("ra_Instance %s is not alive",t));return}}this.props.oContext.socket.sendTo(t,this.props.schema.defaultSendTo,e).then(n=>{n!=null&&(this.props.custom?this.props.onChange(this.props.attr,n,()=>this.props.oContext.forceUpdate([this.props.attr],this.props.data)):(V.setValue(this.props.data,this.props.attr,n),this.props.onChange(this.props.data,void 0,()=>this.props.oContext.forceUpdate([this.props.attr],this.props.data))))})}else this.defaultSendToDone=!1,this.props.schema.allowSaveWithError||this.onError(this.props.attr,P.I18n.t("ra_Instance %s is not alive",this.props.oContext.instance.toString()))}componentWillUnmount(){this.props.oContext.registerOnForceUpdate&&this.props.oContext.registerOnForceUpdate(this.props.attr),this.sendToTimeout&&(clearTimeout(this.sendToTimeout),this.sendToTimeout=null),this.calculateTimeout&&(clearTimeout(this.calculateTimeout),this.calculateTimeout=null)}onUpdate=e=>{const t=V.getValue(e||this.props.data,this.props.attr)||"";this.state.value!==t?this.setState({value:t}):this.forceUpdate()};static getValue(e,t){if(typeof t=="string")return V.getValue(e,t.split("."));if(t.length===1)return e[t[0]];const n=t.shift();if(typeof n=="string"&&typeof e[n]=="object")return V.getValue(e[n],t)}static setValue(e,t,n){if(typeof t=="string"){V.setValue(e,t.split("."),n);return}if(t.length===1)n===null?delete e[t[0]]:e[t[0]]=n;else{const u=t.shift();if(typeof u!="string")return;(!e[u]||typeof e[u]=="object")&&(e[u]=e[u]||{}),V.setValue(e[u],t,n)}}getText(e,t){if(!e)return"";if(typeof e=="string"){const n=t?e:P.I18n.t(e);return n.includes("${")?this.getPattern(n,null,t):n}return hs(e)?e.func?typeof e.func=="object"?this.getPattern(e.func[this.lang]||e.func.en||"",null,!0):this.getPattern(e.func,null,t):e[this.lang]||e.en||"":e.toString()}renderDialogConfirm(){if(!this.state.confirmDialog)return null;const e=this.state.confirmData||this.props.schema.confirm;let t=null;return e.type==="warning"?t=x.createElement(Hn,null):e.type==="error"?t=x.createElement(Jt,null):e.type==="info"&&(t=x.createElement(Li,null)),x.createElement(P.DialogConfirm,{title:this.getText(e.title)||P.I18n.t("ra_Please confirm"),text:this.getText(e.text),ok:this.getText(e.ok)||P.I18n.t("ra_Ok"),cancel:this.getText(e.cancel)||P.I18n.t("ra_Cancel"),icon:t||void 0,onClose:n=>this.setState({confirmDialog:!1},()=>{if(n){if(this.state.confirmCallback){const i=this.state.confirmCallback;this.setState({confirmCallback:null},()=>i(!0));return}const u=JSON.parse(JSON.stringify(this.props.data));this.state.confirmDepAttr&&V.setValue(u,this.state.confirmDepAttr,this.state.confirmDepNewValue),V.setValue(u,this.state.confirmAttr,this.state.confirmNewValue),this.setState({confirmDialog:!1,confirmDepAttr:null,confirmDepNewValue:null,confirmNewValue:null,confirmAttr:null,confirmData:null},()=>this.props.onChange(u))}else{const u=this.state.confirmCallback;this.setState({confirmDialog:!1,confirmDepAttr:null,confirmDepNewValue:null,confirmNewValue:null,confirmAttr:null,confirmData:null,confirmCallback:null},()=>{u&&u(!1)})}})})}getIcon(e){e=e||this.props.schema.icon;let t=null;return e==="auth"?t=x.createElement(dc,null):e==="send"?t=x.createElement(To,null):e==="web"?t=x.createElement(fc,null):e==="warning"?t=x.createElement(Hn,null):e==="error"?t=x.createElement(Jt,null):e==="info"?t=x.createElement(Li,null):e==="search"?t=x.createElement(Lo,null):e==="book"?t=x.createElement(gc,null):e==="help"?t=x.createElement(mc,null):e==="upload"?t=x.createElement(Vn,null):e==="edit"?t=x.createElement(Mo,null):e==="user"?t=x.createElement(Io,null):e==="group"?t=x.createElement(Oo,null):e==="delete"?t=x.createElement(_t,null):e==="refresh"?t=x.createElement(Us,null):e==="add"?t=x.createElement(Un,null):e==="unpair"?t=x.createElement(Fo,null):e==="pair"?t=x.createElement(Ro,null):e==="save"?t=x.createElement(vc,null):e==="open"?t=x.createElement(yc,null):e&&((e.endsWith(".png")||e.endsWith(".svg")||e.endsWith(".jpg"))&&!e.startsWith("http://")&&!e.startsWith("https://")&&(e=`${this.props.oContext.imagePrefix}/adapter/${this.props.oContext.adapterName}/${e}`),t=x.createElement(P.Icon,{src:e,style:{width:22,height:22}})),t}onChangeAsync(e,t){return new Promise(n=>{const u=this.onChange(e,t,n);u instanceof Promise&&u.catch(i=>console.error(`Cannot set value: ${i}`))})}async onChange(e,t,n){const u=JSON.parse(JSON.stringify(this.props.data));if(V.setValue(u,e,t),this.props.schema.confirm&&await this.execute(this.props.schema.confirm.condition,!1,u,this.props.arrayIndex,this.props.globalData))return new Promise(s=>{this.setState({confirmDialog:!0,confirmNewValue:t,confirmAttr:e,confirmData:null},()=>{typeof n=="function"?n():s()})});if(this.props.schema.confirmDependsOn)for(let s=0;s{this.setState({confirmDialog:!0,confirmNewValue:t,confirmAttr:e,confirmDepNewValue:o,confirmDepAttr:d.attr,confirmData:d.confirm},()=>{typeof n=="function"?n():l()})})}}const i=[];if(this.props.schema.onChangeDependsOn)for(let s=0;sn&&n()),i!=null&&i.length&&i.forEach((s,d)=>setTimeout(()=>this.props.onChange(s,V.getValue(u,s)),d*50))):this.props.onChange(u,void 0,()=>{i.length&&this.props.oContext.forceUpdate(i,u),n==null||n()}),Promise.resolve()}static ensureAwaitGetObject(e){return e.replace(/(?{const u=e.slice(Math.max(0,n-10),n);return/await\s+$/.test(u)?t:`await ${t}`})}async execute(e,t,n,u,i){let s;if(hs(e))s=e.func;else if(typeof e=="string")s=e;else return e;if(!s)return t;s.includes("getObject(")&&(s=V.ensureAwaitGetObject(s));try{return await new this.AsyncFunction("data","originalData","_system","_alive","_common","_socket","_instance","arrayIndex","globalData","_changed","_href","getObject",s.includes("return")?s:`return ${s}`)(n||this.props.data,this.props.originalData,this.props.oContext.systemConfig,this.props.alive,this.props.common,this.props.oContext.socket,this.props.oContext.instance,u,i,this.props.changed,window.location.href,this.getObject)}catch(d){return console.error(`Cannot execute ${JSON.stringify(e)}: ${d}`),t}}async executeCustom(e,t,n,u,i,s){let d;if(hs(e))d=e.func;else if(typeof e=="string")d=e;else return e;if(!d)return null;d.includes("getObject(")&&(d=V.ensureAwaitGetObject(d));try{return await new this.AsyncFunction("data","originalData","_system","instanceObj","customObj","_socket","arrayIndex","globalData","_changed","_href","getObject",d.includes("return")?d:`return ${d}`)(t||this.props.data,this.props.originalData,this.props.oContext.systemConfig,u,n,this.props.oContext.socket,i,s,this.props.changed,window.location.href,this.getObject)}catch(o){return console.error(`Cannot execute ${d}: ${o}`),null}}async calculate(e){let t,n,u,i;return this.props.custom?(t=e.validator?!await this.executeCustom(e.validator,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):!1,e.disabled===!0?n=!0:n=e.disabled?await this.executeCustom(e.disabled,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):!1,e.hidden===!0?u=!0:u=e.hidden?await this.executeCustom(e.hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):!1,i=e.defaultFunc?await this.executeCustom(e.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):e.default):(t=e.validator?!await this.execute(e.validator,!1,this.props.data,this.props.arrayIndex,this.props.globalData):!1,e.disabled===!0?n=!0:n=e.disabled?await this.execute(e.disabled,!1,this.props.data,this.props.arrayIndex,this.props.globalData):!1,e.hidden===!0?u=!0:u=e.hidden?await this.execute(e.hidden,!1,this.props.data,this.props.arrayIndex,this.props.globalData):!1,i=e.defaultFunc?await this.execute(e.defaultFunc,e.default,this.props.data,this.props.arrayIndex,this.props.globalData):e.default),{error:t,disabled:n,hidden:u,defaultValue:i}}onError(e,t){t?this.isError[e]=t:delete this.isError[e],this.props.onError&&this.props.onError(e,t)}renderItem(e,t,n){return this.getText(this.props.schema.label)||this.getText(this.props.schema.text)}renderHelp(e,t,n){return t?x.createElement("a",{href:t,target:"_blank",rel:"noreferrer",style:{color:this.props.oContext.themeType==="dark"?"#a147ff":"#5b238f",textDecoration:"underline"}},this.getText(e,n)):(e=this.getText(e,n)||"",e&&(e.includes("")||e.includes(""))?P.Utils.renderTextWithA(e):e)}static escapeString(e,t){return typeof e!="string"?"":(e=e.replace(/`/g,"\\`"),e=e.replace(/\${([^}]+)}/g,(n,u)=>{if(u&&typeof u=="string"&&u.startsWith("data.")){const i=V.getValue(t,u.replace(/^data\./,""));if(typeof i=="string"&&(i.includes("\\")||i.includes('"')))return`\${${u}.replace(/\\\\/g, '\\\\\\\\').replace(/"/g, '\\\\"')}`}return n}),e)}getObject=async e=>{try{return await this.props.oContext.getCachedObject(e)||null}catch(t){return console.error(t),null}};async getPatternAsync(e,t,n){if(t||=this.props.data,!e)return"";let u;typeof e=="object"?e.func?u=e.func:(console.log(`Object must be stringified: ${JSON.stringify(e)}`),u=JSON.stringify(e)):u=e,u.includes("getObject(")&&(u=V.ensureAwaitGetObject(u));try{if(this.props.custom){const o=await new this.AsyncFunction("data","originalData","arrayIndex","globalData","_system","instanceObj","customObj","_socket","_changed","_href","getObject",`return \`${V.escapeString(u,t)}\``)(t,this.props.originalData,this.props.arrayIndex,this.props.globalData,this.props.oContext.systemConfig,this.props.oContext.instanceObj,this.props.customObj,this.props.oContext.socket,this.props.changed,window.location.href,this.getObject);return n?o:P.I18n.t(o)}const s=await new this.AsyncFunction("data","originalData","arrayIndex","globalData","_system","_alive","_common","_socket","_changed","_href","getObject",`return \`${V.escapeString(u,t)}\``)(t,this.props.originalData,this.props.arrayIndex,this.props.globalData,this.props.oContext.systemConfig,this.props.alive,this.props.common,this.props.oContext.socket,this.props.changed,window.location.href,this.getObject);return n?s:P.I18n.t(s)}catch(i){return console.error(`Cannot execute ${u}: ${i}`),u}}getPattern(e,t,n){if(t||=this.props.data,!e)return"";let u;typeof e=="object"?e.func?u=e.func:(console.log(`Object must be stringified: ${JSON.stringify(e)}`),u=JSON.stringify(e)):u=e,u.includes("getObject(")&&console.log(`It is not possible to use getObject function in text patterns: ${u}`);try{if(this.props.custom){const o=new this.AsyncFunction("data","originalData","arrayIndex","globalData","_system","instanceObj","customObj","_socket","_changed","_href","getObject",`return \`${V.escapeString(u,t)}\``)(t,this.props.originalData,this.props.arrayIndex,this.props.globalData,this.props.oContext.systemConfig,this.props.oContext.instanceObj,this.props.customObj,this.props.oContext.socket,this.props.changed,window.location.href,this.getObject);return n?o:P.I18n.t(o)}const s=new this.AsyncFunction("data","originalData","arrayIndex","globalData","_system","_alive","_common","_socket","_changed","_href","getObject",`return \`${V.escapeString(u,t)}\``)(t,this.props.originalData,this.props.arrayIndex,this.props.globalData,this.props.oContext.systemConfig,this.props.alive,this.props.common,this.props.oContext.socket,this.props.changed,window.location.href,this.getObject);return n?s:P.I18n.t(s)}catch(i){return console.error(`Cannot execute ${u}: ${i}`),u}}updateCalculatedValues(){this.calculateTimeout&&clearTimeout(this.calculateTimeout),this.calculateTimeout=setTimeout(async()=>{this.calculateTimeout=null;const e=this.props.schema;if(!e)return null;const{error:t,disabled:n,hidden:u,defaultValue:i}=await this.calculate(e);(!this.state.calculatedValues||this.state.calculatedValues.error!==t||this.state.calculatedValues.disabled!==n||this.state.calculatedValues.hidden!==u||this.state.calculatedValues.defaultValue!==i)&&this.setState({calculatedValues:{error:t,disabled:n,hidden:u,defaultValue:i}})},50)}render(){const e=this.props.schema;if(!e||this.props.expertMode===!1&&e.expertMode||(this.props.alive&&this.defaultSendToDone===!1&&(this.sendToTimeout=setTimeout(async()=>{this.sendToTimeout=null,await this.sendTo()},200)),this.updateCalculatedValues(),!this.state.calculatedValues))return null;if(this.state.calculatedValues.hidden){if(Object.keys(this.isError).length&&(setTimeout(u=>Object.keys(u).forEach(i=>this.props.onError(i)),100,JSON.parse(JSON.stringify(this.isError))),this.isError={}),e.hideOnlyControl){const u=x.createElement(He,{size:{xs:e.xs||yh,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0},style:{marginBottom:0,textAlign:"left",...e.style,...this.props.oContext.themeType==="dark"?e.darkStyle:{}}});return e.newLine?x.createElement(x.Fragment,null,x.createElement("div",{style:{flexBasis:"100%",height:0}}),u):u}return this.props.onHiddenChanged&&!this.reportedHidden&&(this.reportedHidden=!0,setTimeout(()=>this.props.onHiddenChanged(this.props.attr,!0),10)),null}this.props.onHiddenChanged&&this.reportedHidden&&(this.reportedHidden=!1,setTimeout(()=>this.props.onHiddenChanged(this.props.attr,!1),10)),e.validatorNoSaveOnError&&(this.state.calculatedValues.error&&!Object.keys(this.isError).length?(this.isError={[this.props.attr]:e.validatorErrorText?P.I18n.t(e.validatorErrorText):!0},setTimeout(u=>Object.keys(u).forEach(i=>this.props.onError(i,u[i])),100,JSON.parse(JSON.stringify(this.isError)))):!this.state.calculatedValues.error&&Object.keys(this.isError).length&&(setTimeout(u=>Object.keys(u).forEach(i=>this.props.onError(i)),100,JSON.parse(JSON.stringify(this.isError))),this.isError={}));const t=this.renderItem(this.state.calculatedValues.error,this.state.calculatedValues.disabled||this.props.commandRunning||this.props.disabled,this.state.calculatedValues.defaultValue);if(this.noPlaceRequired)return t;const n=x.createElement(He,{title:this.getText(e.tooltip),size:{xs:e.xs||12,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0},style:{marginBottom:0,textAlign:"left",width:e.type==="divider"||e.type==="header"?e.width||"100%":void 0,...e.style,...this.props.oContext.themeType==="dark"?e.darkStyle:{}}},this.props.schema.defaultSendTo&&this.props.schema.button?x.createElement(He,{container:!0,style:{width:"100%"}},x.createElement(He,{flex:1},t),x.createElement(He,null,x.createElement(me,{disabled:this.state.calculatedValues.disabled,variant:"outlined",onClick:()=>this.sendTo(),title:this.props.schema.buttonTooltip?this.getText(this.props.schema.buttonTooltip,this.props.schema.buttonTooltipNoTranslation):P.I18n.t("ra_Request data by instance")},this.getText(this.props.schema.button)))):t);return e.newLine?x.createElement(x.Fragment,null,x.createElement("div",{style:{flexBasis:"100%",height:0}}),this.renderDialogConfirm(),n):this.state.confirmDialog?x.createElement(x.Fragment,null,this.renderDialogConfirm(),n):n}}const tt={fullWidth:{width:"100%"},accordionSummary:m=>({backgroundColor:m.palette.mode==="dark"?"rgba(255, 255, 255, 0.08)":"rgba(0, 0, 0, 0.08)"}),accordionTitle:{},toolbar:m=>({backgroundColor:m.palette.mode==="dark"?"rgba(255, 255, 255, 0.08)":"rgba(0, 0, 0, 0.08)",borderRadius:"3px"}),tooltip:{pointerEvents:"none"}};class bh extends V{typingTimer=null;constructor(e){super(e),this.props.schema.items||=[]}async componentDidMount(){await super.componentDidMount();let e=V.getValue(this.props.data,this.props.attr)||[];Array.isArray(e)||(e=[]),this.setState({value:e,activeIndex:-1,iteration:0,accordionErrors:{}})}componentWillUnmount(){this.typingTimer&&(clearTimeout(this.typingTimer),this.typingTimer=null),super.componentWillUnmount()}onAccordionError=e=>(t,n)=>{const u={...this.state.accordionErrors};u[e]||(u[e]={}),n?u[e][t]=n:(delete u[e][t],Object.keys(u[e]).length===0&&delete u[e]),this.setState({accordionErrors:u}),this.props.onError(t,n)};hasAccordionErrors=e=>!!(this.state.accordionErrors[e]&&Object.keys(this.state.accordionErrors[e]).length>0);itemAccordion(e,t){const{value:n}=this.state,{schema:u}=this.props,i={type:"panel",items:u.items.reduce((s,d)=>(s[d.attr]=d,s),{}),style:{marginLeft:"-8px",marginTop:"10px",marginBottom:"10px"}};return x.createElement(tn,{oContext:this.props.oContext,index:t+this.state.iteration,arrayIndex:t,changed:this.props.changed,expertMode:this.props.expertMode,globalData:this.props.data,common:this.props.common,alive:this.props.alive,themeName:this.props.themeName,data:e,custom:!0,schema:i,originalData:this.props.originalData,onChange:(s,d)=>{const o=JSON.parse(JSON.stringify(n));o[t][s]=d,this.setState({value:o},()=>this.onChangeWrapper(o))},onError:this.onAccordionError(t),onHiddenChanged:this.props.onHiddenChanged,table:this.props.table,customComponents:this.props.customComponents})}onDelete=e=>()=>{const t=JSON.parse(JSON.stringify(this.state.value));t.splice(e,1),this.setState({value:t,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(t))};onClone=e=>()=>{const t=JSON.parse(JSON.stringify(this.state.value)),n=JSON.parse(JSON.stringify(t[e]));if(typeof this.props.schema.clone=="string"&&typeof n[this.props.schema.clone]=="string"){let u=1,i=n[this.props.schema.clone];const s=i.match(/(\d+)$/);for(s?(i=i.replace(s[0],""),u=parseInt(s[0],10)+1):i+="_";t.find(d=>d[this.props.schema.clone]===i+u.toString());)u++;n[this.props.schema.clone]=`${n[this.props.schema.clone]}_${u}`}t.splice(e,0,n),this.setState({value:t,activeIndex:-1,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(t))};onChangeWrapper=e=>{this.typingTimer&&clearTimeout(this.typingTimer),this.typingTimer=setTimeout(t=>{this.typingTimer=null;const n=this.onChange(this.props.attr,t);n instanceof Promise&&n.catch(u=>this.onError(u))},300,e)};onAdd=async()=>{const{schema:e}=this.props,t=JSON.parse(JSON.stringify(this.state.value)),n={};if(e.items)for(const u of e.items){let i;u.defaultFunc?this.props.custom?i=u.defaultFunc?await this.executeCustom(u.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,t.length,this.props.data):this.props.schema.default:i=u.defaultFunc?await this.execute(u.defaultFunc,this.props.schema.default,this.props.data,t.length,this.props.data):this.props.schema.default:i=u.default??null,n[u.attr]=i}t.push(n),this.setState({value:t,activeIndex:t.length-1},()=>this.onChangeWrapper(t))};onMoveUp(e){const t=JSON.parse(JSON.stringify(this.state.value)),n=t[e];t.splice(e,1),t.splice(e-1,0,n);const u=this.state.activeIndex-1;this.setState({value:t,activeIndex:u,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(t))}onMoveDown(e){const t=JSON.parse(JSON.stringify(this.state.value)),n=t[e];t.splice(e,1),t.splice(e+1,0,n);const u=this.state.activeIndex+1;this.setState({value:t,activeIndex:u,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(t))}onExport=()=>{const{value:e}=this.state,t=JSON.stringify(e,null,2),n=`data:application/json;charset=utf-8,${encodeURIComponent(t)}`,u=`config_section_${new Date().toISOString().slice(0,19).replace(/:/g,"-")}.json`,i=document.createElement("a");i.setAttribute("href",n),i.setAttribute("download",u),i.click()};onImport=e=>{const t=document.createElement("input");t.type="file",t.accept=".json",t.onchange=n=>{var s;const u=(s=n.target.files)==null?void 0:s[0];if(!u)return;const i=new FileReader;i.onload=d=>{var o;try{const l=JSON.parse((o=d.target)==null?void 0:o.result);if(!Array.isArray(l)){alert(P.I18n.t("ra_Invalid JSON format. Expected an array."));return}let r;e?r=l:r=[...this.state.value,...l],this.setState({value:r,activeIndex:-1},()=>this.onChangeWrapper(r))}catch{alert(P.I18n.t("ra_Invalid JSON file."))}},i.readAsText(u)},t.click()};renderItem(){const{schema:e}=this.props,{value:t}=this.state;return t?x.createElement(In,null,e.label||!e.noDelete?x.createElement(Pn,{variant:"dense"},e.label?x.createElement(yt,{variant:"h6",id:"tableTitle",component:"div"},this.getText(e.label)):null,e.noDelete?null:x.createElement(x.Fragment,null,x.createElement(ge,{title:P.I18n.t("ra_Export configuration section")},x.createElement(se,{size:"small",color:"primary",onClick:this.onExport},x.createElement(bc,null))),x.createElement(ge,{title:P.I18n.t("ra_Import and replace configuration section")},x.createElement(se,{size:"small",color:"primary",onClick:()=>this.onImport(!0)},x.createElement(wc,null))),x.createElement(ge,{title:P.I18n.t("ra_Import and add configuration section")},x.createElement(se,{size:"small",color:"primary",onClick:()=>this.onImport(!1)},x.createElement(Cc,null))),x.createElement(se,{size:"small",color:"primary",onClick:this.onAdd},x.createElement(Un,null)))):null,t.map((n,u)=>x.createElement(Ws,{key:`${n}_${u}`,expanded:this.state.activeIndex===u,onChange:(i,s)=>this.setState({activeIndex:s?u:-1})},x.createElement(js,{expandIcon:x.createElement(Mi,null),sx:P.Utils.getStyle(this.props.oContext.theme,tt.fullWidth,tt.accordionSummary)},x.createElement(Ie,{sx:{display:"flex",alignItems:"center",gap:1,width:"100%"}},x.createElement(yt,{style:tt.accordionTitle},n[e.titleAttr]),this.hasAccordionErrors(u)&&x.createElement(Jt,{sx:{fontSize:20,color:"error.main"}}))),x.createElement(zs,{style:{...e.style,...this.props.oContext.themeType?e.darkStyle:void 0}},this.itemAccordion(t[u],u),x.createElement(Pn,{sx:tt.toolbar},u?x.createElement(ge,{title:P.I18n.t("ra_Move up"),slotProps:{popper:{sx:tt.tooltip}}},x.createElement(se,{size:"small",onClick:()=>this.onMoveUp(u)},x.createElement(Ei,null))):x.createElement("div",{style:tt.buttonEmpty}),uthis.onMoveDown(u)},x.createElement(Ai,null))):x.createElement("div",{style:tt.buttonEmpty}),e.noDelete?null:x.createElement(ge,{title:P.I18n.t("ra_Delete current row"),slotProps:{popper:{sx:tt.tooltip}}},x.createElement(se,{size:"small",onClick:this.onDelete(u)},x.createElement(_t,null))),e.clone?x.createElement(ge,{title:P.I18n.t("ra_Clone current row"),slotProps:{popper:{sx:tt.tooltip}}},x.createElement(se,{size:"small",onClick:this.onClone(u)},x.createElement(fn,null))):null)))),!e.noDelete&&t.length>0?x.createElement(Pn,{variant:"dense",sx:tt.rootTool},x.createElement(se,{size:"small",color:"primary",onClick:this.onAdd},x.createElement(Un,null))):null,e.help?x.createElement(ve,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null):null}}const Wr={root:{width:"100%"},notAlive:{color:"#a30000"}};class wh extends V{aliveId=null;checkTimeout=null;async componentDidMount(){await super.componentDidMount();const e=await this.getInstance();this.aliveId=`${e}.alive`;const t=await this.props.oContext.socket.getState(this.aliveId);this.setState({alive:!!(t&&t.val),instance:e},async()=>{await this.props.oContext.socket.subscribeState(this.aliveId,this.onAliveChanged)})}componentWillUnmount(){this.checkTimeout&&(clearTimeout(this.checkTimeout),this.checkTimeout=null),this.props.oContext.socket.unsubscribeState(this.aliveId,this.onAliveChanged)}onAliveChanged=(e,t)=>{e===this.aliveId&&this.state.alive!==!!(t!=null&&t.val)&&this.setState({alive:!!(t!=null&&t.val)})};async getInstance(){let e=this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`;return e.includes("${")&&(e=await this.getPatternAsync(e,null,!0)),e&&!e.startsWith("system.adapter.")&&(e=`system.adapter.${e}`),e}checkIfInstanceChanged(){this.checkTimeout&&clearTimeout(this.checkTimeout),this.checkTimeout=setTimeout(async()=>{this.checkTimeout=null;const e=await this.getInstance();e!==this.state.instance&&(e?this.props.oContext.socket.getState(`${e}.alive`).then(t=>this.setState({alive:!!(t&&t.val),instance:e})):this.setState({alive:null,instance:e}))},200)}renderItem(){if(this.checkIfInstanceChanged(),this.state.alive!==!1&&this.state.alive!==!0)return null;const e=this.state.instance.replace(/^system\.adapter\./,"");return x.createElement("div",{style:{...Wr.root,...this.state.alive?void 0:Wr.notAlive}},this.state.alive?this.props.schema.textAlive!==void 0?this.props.schema.textAlive?P.I18n.t(this.props.schema.textAlive,e):"":P.I18n.t("ra_Instance %s is alive",e):this.props.schema.textNotAlive!==void 0?this.props.schema.textNotAlive?P.I18n.t(this.props.schema.textNotAlive,e):"":P.I18n.t("ra_Instance %s is not alive",e))}}class Ch extends V{async componentDidMount(){await super.componentDidMount();const e=V.getValue(this.props.data,this.props.attr),t=this.props.schema.options.map(n=>typeof n=="string"?{label:n,value:n}:JSON.parse(JSON.stringify(n)));if(this.props.onFilterLabelUpdate&&this.props.table){const n={};for(const u of t)u.value!==V.DIFFERENT_VALUE&&(n[u.value]=u.label);this.props.onFilterLabelUpdate(this.props.attr,n)}Array.isArray(e)?(t.unshift({label:P.I18n.t(V.DIFFERENT_LABEL),value:V.DIFFERENT_VALUE}),this.setState({value:V.DIFFERENT_VALUE,selectOptions:t})):this.setState({value:e,selectOptions:t})}renderItem(e,t){if(!this.state.selectOptions)return null;let n;const u=JSON.parse(JSON.stringify(this.state.selectOptions));return Array.isArray(this.state.value)||this.state.value===V.DIFFERENT_VALUE?([...this.state.value].filter(s=>!u.find(d=>typeof d=="object"?d.value===s:d===s)).forEach(s=>u.push({label:s.toString(),value:s})),n={label:P.I18n.t(V.DIFFERENT_LABEL),value:V.DIFFERENT_VALUE},u.unshift(n)):(n=this.state.value!==null&&this.state.value!==void 0&&u.find(s=>typeof s=="object"?s.value==this.state.value:s==this.state.value),this.state.value!==null&&this.state.value!==void 0&&!n&&this.props.schema.freeSolo&&(n={value:this.state.value,label:this.state.value},u.push(n))),x.createElement(Pi,{fullWidth:!0,freeSolo:!!this.props.schema.freeSolo,value:n,options:u,isOptionEqualToValue:(s,d)=>s.value===d.value,filterOptions:(s,d)=>{const o=s.filter(l=>d.inputValue===""?!0:l.label.toLowerCase().includes(d.inputValue.toLowerCase())||l.value.toLowerCase().includes(d.inputValue.toLowerCase()));return this.props.schema.freeSolo&&d.inputValue!==""&&o.push({label:d.inputValue,value:d.inputValue}),o},onInputChange:s=>{if(!s||!this.props.schema.freeSolo)return;const d=s.target.value;d!==this.state.value&&this.setState({value:d},()=>this.onChange(this.props.attr,d))},onChange:(s,d)=>{const o=typeof d=="object"?d?d.value:"":d;o!==this.state.value&&this.setState({value:o},()=>this.onChange(this.props.attr,o))},getOptionLabel:s=>typeof s=="object"?(s==null?void 0:s.label)??"":"",renderInput:s=>x.createElement(pe,{variant:"standard",...s,error:!!e,placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),disabled:t})})}}class Sh extends V{initialized=!1;localContext;async askInstance(){const e=V.getValue(this.props.data,this.props.attr),t=this.props.schema.options?this.props.schema.options.map(n=>typeof n=="string"?{label:n,value:n}:JSON.parse(JSON.stringify(n))):[];if(this.props.alive){let n=this.props.schema.data;if(n===void 0&&this.props.schema.jsonData){const i=await this.getPatternAsync(this.props.schema.jsonData,null,!0);try{typeof i=="string"&&(n=JSON.parse(i))}catch{console.error(`Cannot parse json data: ${JSON.stringify(n)}`)}}n===void 0&&(n=null),this.setState({loading:!0});const u=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(u!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){const i=await this.props.oContext.socket.getState(`system.adapter.${u}.alive`);if(!(i!=null&&i.val)){window.alert(P.I18n.t("ra_Instance %s is not alive",u));return}}this.props.oContext.socket.sendTo(u,this.props.schema.command||"send",n).then(i=>{i&&Array.isArray(i)&&i.forEach(s=>t.push(typeof s=="string"?{label:s,value:s}:JSON.parse(JSON.stringify(s)))),this.reportFilterLabels(t),Array.isArray(e)?(t.unshift({label:P.I18n.t(V.DIFFERENT_LABEL),value:V.DIFFERENT_VALUE}),this.setState({value:V.DIFFERENT_VALUE,selectOptions:t,loading:!1})):this.setState({value:e,selectOptions:t,loading:!1})}).catch(i=>{console.error("Error in autocompleteSendTo:",i),this.setState({loading:!1})})}else Array.isArray(e)?(t.unshift({label:P.I18n.t(V.DIFFERENT_LABEL),value:V.DIFFERENT_VALUE}),this.reportFilterLabels(t),this.setState({value:V.DIFFERENT_VALUE,selectOptions:t})):(this.reportFilterLabels(t),this.setState({value:e,selectOptions:t}))}reportFilterLabels(e){if(this.props.onFilterLabelUpdate&&this.props.table){const t={};for(const n of e)n.value!==V.DIFFERENT_VALUE&&(t[n.value]=n.label);this.props.onFilterLabelUpdate(this.props.attr,t)}}getContext(){const e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=V.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(e,t){if(this.props.alive){const s=this.getContext();(s!==this.localContext||!this.initialized)&&(this.localContext=s,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}let n;const u=this.state.selectOptions?JSON.parse(JSON.stringify(this.state.selectOptions)):[];return Array.isArray(this.state.value)||this.state.value===V.DIFFERENT_LABEL?([...this.state.value].filter(s=>!u.find(d=>d.value===s)).forEach(s=>u.push({label:s.toString(),value:s})),n={label:P.I18n.t(V.DIFFERENT_LABEL),value:V.DIFFERENT_VALUE},u.unshift(n)):(n=this.state.value!==null&&this.state.value!==void 0&&u.find(s=>s.value==this.state.value),this.state.value!==null&&this.state.value!==void 0&&!n&&this.props.schema.freeSolo&&(n={value:this.state.value,label:this.state.value},u.push(n)),n=n||null),u.length?x.createElement(Pi,{value:n,fullWidth:!0,freeSolo:!!this.props.schema.freeSolo,options:u,disabled:t,isOptionEqualToValue:(s,d)=>s.value===d.value,filterOptions:(s,d)=>{const o=s.filter(l=>d.inputValue===""?!0:l.label.toLowerCase().includes(d.inputValue.toLowerCase())||l.value.toLowerCase().includes(d.inputValue.toLowerCase()));return this.props.schema.freeSolo&&d.inputValue!==""&&o.push({label:d.inputValue,value:d.inputValue}),o},getOptionLabel:s=>(s==null?void 0:s.label)??"",onInputChange:s=>{if(!s||!this.props.schema.freeSolo)return;const d=s.target.value;d!==this.state.value&&this.setState({value:d},()=>this.onChange(this.props.attr,d))},onChange:(s,d)=>{const o=typeof d=="object"?d?d.value:"":d;o!==this.state.value&&this.setState({value:o},()=>this.onChange(this.props.attr,o))},renderInput:s=>x.createElement(pe,{variant:"standard",...s,error:!!e,placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),disabled:t,slotProps:{input:{...s.InputProps,endAdornment:x.createElement(x.Fragment,null,this.state.loading?x.createElement(vn,{position:"end"},x.createElement(Tt,{size:20})):null,t?null:s.InputProps.endAdornment)}}})}):x.createElement(pe,{variant:"standard",fullWidth:!0,value:this.state.value??"",error:!!e,disabled:t,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0},input:{endAdornment:this.state.loading?x.createElement(vn,{position:"end"},x.createElement(Tt,{size:20})):null}},onChange:s=>{const d=s.target.value;this.setState({value:d},()=>this.onChange(this.props.attr,(d||"").trim()))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}}const us={fullWidth:{width:"100%"},flex:{display:"flex"},button:{height:48,marginLeft:4,minWidth:48}};class Eh extends V{async componentDidMount(){await super.componentDidMount();const{data:e,attr:t}=this.props,n=V.getValue(e,t)||"";this.setState({value:n,showDialog:!1})}renderItem(e,t){const{schema:n,attr:u}=this.props,{value:i,showDialog:s}=this.state;return x.createElement(fe,{style:us.fullWidth,variant:"standard"},n.label?x.createElement(Te,{shrink:!0},this.getText(n.label)):null,x.createElement("div",{style:us.flex},x.createElement(pe,{variant:"standard",fullWidth:!0,value:i??"",error:!!e,disabled:t,placeholder:this.getText(n.placeholder),label:this.getText(n.label),helperText:this.renderHelp(n.help,n.helpLink,n.noTranslation),onChange:d=>{const o=d.target.value;this.setState({value:o},()=>this.onChange(u,o))}}),x.createElement(me,{color:"grey",disabled:t,style:us.button,size:"small",variant:"outlined",onClick:()=>this.setState({showDialog:!0})},"...")),s?x.createElement(P.DialogCron,{title:P.I18n.t("ra_Define schedule"),simple:n.simple,complex:n.complex,cron:i,onClose:()=>this.setState({showDialog:!1}),cancel:P.I18n.t("ra_Cancel"),ok:P.I18n.t("ra_Ok"),theme:this.props.oContext.theme,onOk:d=>this.setState({showDialog:!1,value:d},()=>this.onChange(u,d))}):null)}}class Ah extends V{async componentDidMount(){await super.componentDidMount();const e=V.getValue(this.props.data,this.props.attr),n=(await this.props.oContext.socket.getCertificates()).filter(u=>{const i=this.props.attr.toLowerCase();return i.includes(u.type)||u.type==="public"&&i.includes("cert")||u.type==="private"&&(i.includes("priv")||i.includes("key"))?!0:!!(u.type==="chained"&&(i.includes("chain")||i.includes("ca")))}).map(u=>({label:u.name,value:u.name}));n.unshift({label:P.I18n.t(V.NONE_LABEL),value:V.NONE_VALUE}),this.setState({value:e,selectOptions:n})}renderItem(e,t){var u,i;if(!this.state.selectOptions)return null;const n=(u=this.state.selectOptions)==null?void 0:u.find(s=>s.value===this.state.value);return x.createElement(fe,{style:{width:"100%"},variant:"standard"},this.props.schema.label?x.createElement(Te,{shrink:!0},this.getText(this.props.schema.label)):null,x.createElement(Be,{variant:"standard",error:!!e,displayEmpty:!0,disabled:!!t,value:this.state.value,renderValue:()=>this.getText(n==null?void 0:n.label,this.props.schema.noTranslation!==!1),onChange:s=>this.setState({value:s.target.value},()=>this.onChange(this.props.attr,this.state.value))},(i=this.state.selectOptions)==null?void 0:i.map(s=>x.createElement(xe,{key:s.value,value:s.value,style:s.value===V.NONE_VALUE?{opacity:.5}:{}},this.getText(s.label,this.props.schema.noTranslation!==!1)))),this.props.schema.help?x.createElement(ve,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const Ln={fullWidth:{width:"100%"},leWidth:{width:620,marginBottom:10},certWidth:{width:200,marginRight:10}};class Dh extends V{async componentDidMount(){var d;await super.componentDidMount();const e=await this.props.oContext.socket.getCertificates(),t=[],n=[],u=[];let i=[];const s=await this.getCachedObject("system.certificates");(d=s==null?void 0:s.native)!=null&&d.collections?i=Object.keys(s.native.collections):i=null,e.forEach(o=>{o.type==="public"?t.push({label:o.name,value:o.name}):o.type==="private"?n.push({label:o.name,value:o.name}):o.type==="chained"?u.push({label:o.name,value:o.name}):(t.push({label:o.name,value:o.name}),n.push({label:o.name,value:o.name}),u.push({label:o.name,value:o.name}))}),t.unshift({label:P.I18n.t(V.NONE_LABEL),value:V.NONE_VALUE}),n.unshift({label:P.I18n.t(V.NONE_LABEL),value:V.NONE_VALUE}),u.unshift({label:P.I18n.t(V.NONE_LABEL),value:V.NONE_VALUE}),this.setState({certsPublicOptions:t,certsChainOptions:u,certsPrivateOptions:n,collectionsOptions:i})}renderItem(e,t){var r,a,c,p,h,f,g;if(!this.state.certsPublicOptions||!this.state.certsPrivateOptions||!this.state.certsChainOptions)return null;const n=(V.getValue(this.props.data,this.props.schema.leCollectionName||"leCollection")||"false").toString(),u=V.getValue(this.props.data,this.props.schema.certPublicName||"certPublic"),i=V.getValue(this.props.data,this.props.schema.certPrivateName||"certPrivate"),s=V.getValue(this.props.data,this.props.schema.certChainedName||"certChained"),d=(r=this.state.certsPublicOptions)==null?void 0:r.find(v=>v.value===u),o=(a=this.state.certsPrivateOptions)==null?void 0:a.find(v=>v.value===i),l=(c=this.state.certsChainOptions)==null?void 0:c.find(v=>v.value===s);return x.createElement("div",{style:Ln.fullWidth},this.state.collectionsOptions?x.createElement(fe,{style:Ln.leWidth,variant:"standard"},x.createElement(Te,{shrink:!0},"Let's encrypt"),x.createElement(Be,{variant:"standard",error:!!e,displayEmpty:!0,disabled:!!t,value:n,onChange:v=>this.onChange(this.props.schema.leCollectionName||"leCollection",v.target.value==="false"?!1:v.target.value==="true"?!0:v.target.value)},x.createElement(xe,{key:"_false",value:"false",style:{fontWeight:"bold"}},P.I18n.t("ra_Do not use let's encrypt")),x.createElement(xe,{key:"_true",value:"true",style:{fontWeight:"bold"}},P.I18n.t("ra_Use all available let's encrypt certificates")),(p=this.state.collectionsOptions)==null?void 0:p.map(v=>x.createElement(xe,{key:v,value:v},v)))):null,this.state.collectionsOptions?x.createElement("br",null):null,this.state.collectionsOptions&&n!=="false"?x.createElement("div",null,P.I18n.t("ra_Fallback custom certificates")):null,x.createElement(fe,{style:Ln.certWidth,variant:"standard"},x.createElement(Te,{shrink:!0},P.I18n.t("ra_Public certificate")),x.createElement(Be,{variant:"standard",error:!!e,displayEmpty:!0,disabled:!!t,value:u||"",renderValue:()=>this.getText(d==null?void 0:d.label,!0),onChange:v=>this.onChange(this.props.schema.certPublicName||"certPublic",v.target.value)},(h=this.state.certsPublicOptions)==null?void 0:h.map((v,b)=>x.createElement(xe,{key:`${v.value}_${b}`,value:v.value,style:v.value===V.NONE_VALUE?{opacity:.5}:{}},this.getText(v.label,!0))))),x.createElement(fe,{style:Ln.certWidth,variant:"standard"},x.createElement(Te,{shrink:!0},P.I18n.t("ra_Private certificate")),x.createElement(Be,{variant:"standard",error:!!e,displayEmpty:!0,disabled:!!t,value:i||"",renderValue:()=>this.getText(o==null?void 0:o.label,!0),onChange:v=>this.onChange(this.props.schema.certPrivateName||"certPrivate",v.target.value)},(f=this.state.certsPrivateOptions)==null?void 0:f.map((v,b)=>x.createElement(xe,{key:`${v.value}_${b}`,value:v.value,style:v.value===V.NONE_VALUE?{opacity:.5}:{}},this.getText(v.label,!0))))),x.createElement(fe,{style:Ln.certWidth,variant:"standard"},x.createElement(Te,{shrink:!0},P.I18n.t("ra_Chained certificate")),x.createElement(Be,{variant:"standard",error:!!e,displayEmpty:!0,disabled:!!t,value:s||"",renderValue:()=>this.getText(l==null?void 0:l.label,!0),onChange:v=>this.onChange(this.props.schema.certChainedName||"certChained",v.target.value)},(g=this.state.certsChainOptions)==null?void 0:g.map((v,b)=>x.createElement(xe,{key:`${v.value}_${b}`,value:v.value,style:v.value===V.NONE_VALUE?{opacity:.5}:{}},this.getText(v.label,!0))))))}}class $h extends V{async componentDidMount(){var n;await super.componentDidMount();let e;const t=await this.getCachedObject("system.certificates");(n=t==null?void 0:t.native)!=null&&n.collections?e=Object.keys(t.native.collections):e=[],this.setState({collectionsOptions:e})}renderItem(e,t){var u;if(!this.state.collectionsOptions)return null;const n=(V.getValue(this.props.data,this.props.schema.leCollectionName||"leCollection")||"false").toString();return x.createElement(fe,{style:{width:"100%"},variant:"standard"},this.props.schema.label?x.createElement(Te,{shrink:!0},this.getText(this.props.schema.label)):null,x.createElement(Be,{variant:"standard",error:!!e,displayEmpty:!0,disabled:!!t,value:n,onChange:i=>this.onChange(this.props.schema.leCollectionName||"leCollection",i.target.value==="false"?!1:i.target.value==="true"?!0:i.target.value)},x.createElement(xe,{key:"_false",value:"false",style:{fontWeight:"bold"}},P.I18n.t("ra_Do not use let's encrypt")),x.createElement(xe,{key:"_true",value:"true",style:{fontWeight:"bold"}},P.I18n.t("ra_Use all available let's encrypt certificates")),(u=this.state.collectionsOptions)==null?void 0:u.map(i=>x.createElement(xe,{key:i,value:i},i))),this.props.schema.help?x.createElement(ve,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}class xh extends V{async componentDidMount(){await super.componentDidMount();const e=await this.props.oContext.socket.getCurrentInstance();this.setState({requesting:!0},async()=>{const t=await this.props.oContext.socket.sendTo(e,"checkDocker",null);this.setState({requesting:!1,version:(t==null?void 0:t.version)||"",errorDocker:t?t.daemonRunning?"":P.I18n.t("ra_Docker is not installed or not running"):P.I18n.t("ra_No response from admin")})})}renderItem(e,t){const n=V.getValue(this.props.data,this.props.attr);return this.state.requesting?x.createElement(Tt,null):this.state.errorDocker&&!n?x.createElement(ve,{style:{color:"orange"}},P.I18n.t("ra_Docker is not available"),": ",P.I18n.t(`ra_${this.state.errorDocker}`).replace(/^ra_/,"")):x.createElement(fe,{style:{width:"100%"},variant:"standard"},x.createElement(Xn,{onClick:u=>{if(u.preventDefault(),u.stopPropagation(),!t){const i=this.onChange(this.props.attr,!n);i instanceof Promise&&i.catch(s=>console.error(`Cannot set value: ${s}`))}},control:x.createElement(Zt,{checked:!!n,onChange:u=>{this.onChange(this.props.attr,u.target.checked)},disabled:t||!!this.state.errorDocker&&!n}),label:this.getText(this.props.schema.label)}),this.props.schema.hideVersion?null:x.createElement(ve,null,this.state.errorDocker?this.state.errorDocker:this.state.version),this.props.schema.help?x.createElement(ve,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const Ke={fullWidth:{width:"100%"},licLabel:{fontWeight:"bold",minWidth:100,marginRight:10,textTransform:"capitalize",display:"inline-block"},errorTitle:m=>({color:m.palette.mode==="dark"?"#e39191":"#b62020"}),okTitle:m=>({color:m.palette.mode==="dark"?"#6fd56f":"#007c00"}),errorText:m=>({color:m.palette.mode==="dark"?"#e39191":"#b62020",mb:"30px"})};class $t extends V{async componentDidMount(){await super.componentDidMount(),this.setState({_error:"",running:!1,showLicenseData:null,foundSuitableLicense:!1,licenseOfflineCheck:!1,result:null,allLicenses:null,askForUpdate:!1,showLinkToProfile:!1})}renderErrorDialog(){if(this.state._error&&!this.state.showLicenseData){let e=this.state._error;return this.state.allLicenses&&(e=[x.createElement("div",{key:"error"},e)],e.push(x.createElement(me,{key:"button",variant:"contained",onClick:()=>window.open("https://iobroker.net/www/account/licenses","_blank")},P.I18n.t("iobroker.net"))),this.state.allLicenses.length?e.push(x.createElement(Do,{key:"table"},x.createElement(On,{size:"small"},x.createElement($o,null,x.createElement(ct,null,x.createElement(Ee,null,P.I18n.t("ra_Product")),x.createElement(Ee,null,P.I18n.t("ra_Version")),x.createElement(Ee,null,"UUID"),x.createElement(Ee,null,P.I18n.t("ra_ValidTill")),x.createElement(Ee,null,P.I18n.t("ra_Commercial")),x.createElement(Ee,null,"ID"))),x.createElement(Fn,null,this.state.allLicenses.map(t=>x.createElement(ct,{key:t.id},x.createElement(Ee,{sx:t.validName?null:Ke.errorText},t.license.product),x.createElement(Ee,{sx:t.validVersion?null:Ke.errorText},t.license.version),x.createElement(Ee,{sx:t.validUuid?null:Ke.errorText},t.license.uuid||"--"),x.createElement(Ee,{sx:t.validTill?null:Ke.errorText},t.license.validTill&&t.license.validTill!=="0000-00-00 00:00:00"?new Date(t.license.validTill).toLocaleDateString():"--"),x.createElement(Ee,null,t.license.invoice!=="free"?t.license.invoice==="MANUALLY_CREATED"?"✓":t.license.invoice:"-"),x.createElement(Ee,null,t.id))))))):(e.push(x.createElement("div",{key:"text1"},P.I18n.t("ra_No one license found in license manager"))),e.push(x.createElement("div",{key:"text2"},P.I18n.t("ra_Please create license"))))),x.createElement(Lt,{open:!0,maxWidth:"xl",fullWidth:this.props.fullWidth!==void 0?this.props.fullWidth:!0,onClick:()=>this.setState({_error:"",allLicenses:null})},x.createElement(yn,null,P.I18n.t("ra_Error")),x.createElement(Kt,null,x.createElement(Xl,null,e)),x.createElement(Gt,null,x.createElement(me,{variant:"contained",onClick:()=>this.setState({_error:"",allLicenses:null}),color:"primary",autoFocus:!0,startIcon:x.createElement(Ks,null)},P.I18n.t("ra_Ok"))))}return null}renderMessageDialog(){if(this.state.showLicenseData){const e=[],t=this.state.showLicenseData;return Object.keys(t).forEach(n=>{if(!(t[n]===null||t[n]===void 0))if(typeof t[n]=="object"){const u=t[n];Object.keys(u).forEach(i=>{u[i]!==null&&u[i]!==void 0&&(typeof u[i]=="object"?e.push(x.createElement("div",{key:i},x.createElement("div",{style:Ke.licLabel},i,":"),JSON.stringify(u[i],null,2))):e.push(x.createElement("div",{key:i},x.createElement("div",{style:Ke.licLabel},n," -",i,":"),u[i].toString())))})}else e.push(x.createElement("div",{key:n},x.createElement("div",{style:Ke.licLabel},n.replace(/_/g," "),":"),t[n].toString()))}),e.push(x.createElement("div",{key:"checked"},x.createElement("div",{style:Ke.licLabel},P.I18n.t("ra_Checked"),":"),this.state.licenseOfflineCheck?P.I18n.t("ra_locally"):P.I18n.t("ra_via internet"))),x.createElement(Lt,{open:!0,onClose:()=>this.setState({showLicenseData:null})},x.createElement(yn,null,x.createElement(Ie,{component:"span",sx:this.state.result?Ke.okTitle:Ke.errorTitle},P.I18n.t("ra_License %s",this.state.result?"OK":"INVALID"))),x.createElement(Kt,null,this.state.showLinkToProfile?x.createElement(me,{variant:"contained",onClick:()=>window.open("https://iobroker.net/www/account/licenses","_blank")},"https://iobroker.net"):null,this.state._error?x.createElement(Ie,{component:"div",sx:Ke.errorText},this.state._error):null,e),x.createElement(Gt,null,x.createElement(me,{onClick:()=>this.setState({showLicenseData:null,_error:""}),color:"primary",variant:"contained"},P.I18n.t("ra_Close"))))}return null}static parseJwt(e){const n=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),u=decodeURIComponent(atob(n).split("").map(i=>`%${`00${i.charCodeAt(0).toString(16)}`.slice(-2)}`).join(""));try{return JSON.parse(u)}catch{return null}}static isVersionValid(e,t,n,u){if(!t||!e)return!0;let i=!0;const[s]=e.split(".");return t.startsWith(">=")?i=parseInt(s,10)>=parseInt(t.substring(2,10)):t.startsWith("<=")?i=parseInt(s,10)<=parseInt(t.substring(2,10)):t.startsWith(">")?i=parseInt(s,10)>parseInt(t.substring(1,10)):t.startsWith("<")?i=parseInt(s,10){const p=!c.validTill||c.validTill==="0000-00-00 00:00:00"||new Date(c.validTill).getTime()>l,h=(c.product||"").split("."),f=h[1]===e||e==="vis-2"&&h[1]==="vis",g=!r||!c.uuid||c.uuid===r,v=$t.isVersionValid(a,c.version,c.invoice,e);(!o||c.invoice!=="free")&&p&&f&&g&&v&&(o=c),n.push({id:c.id,validName:f,validUuid:g,validVersion:v,validTill:p,license:c})}),o&&(n.find(c=>c.id===o.id).used=!0)}return n}async checkLicense(e,t){var d,o,l;let n;if(this.props.schema.uuid){const r=await this.getCachedObject("system.meta.uuid");n=(d=r==null?void 0:r.native)==null?void 0:d.uuid}let u;if(this.props.schema.version){const r=await this.getCachedObject(`system.adapter.${t}`);u=(o=r==null?void 0:r.common)==null?void 0:o.version}const i=new AbortController;let s=setTimeout(()=>{s=null,i.abort()},5e3);try{const r=await window.fetch("https://iobroker.net/api/v1/public/cert/",{method:"POST",body:JSON.stringify({json:e,uuid:n}),headers:{"Content-Type":"text/plain"},signal:i.signal});s&&clearTimeout(s);const a=await r.text();let c;try{c=JSON.parse(a)}catch{}if(c!=null&&c.error)try{const p=$t.parseJwt(e),h=P.I18n.t(`ra_${p.error||c.error||"Unknown error"}`).replace(/^ra_/,"");return this.setState({_error:h,licenseOfflineCheck:!1,showLicenseData:p,result:!1,running:!1})}catch{return console.log("Cannot parse license"),this.setState({_error:c.error,result:!1,running:!1})}else{let p=null;try{p=$t.parseJwt(e)}catch{}if(c){const h=c.validTill||c.valid_till;if(h&&h!=="0000-00-00 00:00:00"&&new Date(h).getTime(){if(e){this.setState({askForUpdate:!1});try{await this.props.oContext.socket.updateLicenses(null,null)}catch(t){window.alert(P.I18n.t("ra_Cannot read licenses: %s",t));return}await this._onClick(!0)}else this.setState({askForUpdate:!1,running:!1})}}):null}async _onClick(e){const t=this.props.oContext.adapterName==="vis-2"?"vis":this.props.oContext.adapterName;this.setState({running:!0});let n,u;if(this.props.data.useLicenseManager){if(u=await this.findInLicenseManager(t),n=u.find(i=>i.used),n&&(n=n.license.json),!n&&!e){this.setState({askForUpdate:!0});return}}else n=this.props.data.license;n?await this.checkLicense(n,t):this.props.data.useLicenseManager?this.setState({_error:P.I18n.t("ra_Suitable license not found in license manager"),result:!1,running:!1,allLicenses:u}):this.setState({_error:P.I18n.t("ra_Please enter the license"),result:!1,running:!1})}renderItem(){return x.createElement("div",{style:Ke.fullWidth},x.createElement(me,{variant:this.props.schema.variant||"outlined",color:this.props.schema.color||"primary",style:Ke.fullWidth,disabled:!this.props.data.license&&!this.props.data.useLicenseManager||this.state.running,startIcon:x.createElement(To,null),onClick:()=>this._onClick()},this.state.running?x.createElement(Tt,{size:20,style:{marginRight:8}}):null,this.getText(this.props.schema.label||"ra_Check license",this.props.schema.noTranslation)),this.renderMessageDialog(),this.renderErrorDialog(),this.renderAskForUpdate())}}class _h extends V{renderItem(e,t){const n=V.getValue(this.props.data,this.props.attr),u=Array.isArray(n);return x.createElement(fe,{style:{width:"100%"},variant:"standard"},x.createElement(Xn,{onClick:i=>{if(i.preventDefault(),i.stopPropagation(),!t){const s=this.onChange(this.props.attr,!n);s instanceof Promise&&s.catch(d=>console.error(`Cannot set value: ${d}`))}},control:x.createElement(Zt,{indeterminate:u,checked:!!n,onChange:i=>{let s;u?s=this.onChange(this.props.attr,!0):s=this.onChange(this.props.attr,i.target.checked),s instanceof Promise&&s.catch(d=>console.error(`Cannot set value: ${d}`))},disabled:t||this.props.schema.readOnly}),label:this.getText(this.props.schema.label)}),x.createElement(ve,{style:{color:"red"}},e?this.props.schema.validatorErrorText?P.I18n.t(this.props.schema.validatorErrorText):P.I18n.t("ra_Error"):null),this.props.schema.help?x.createElement(ve,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const kh={standard:ec,filled:ql,outlined:Zl},Th=m=>{const e=m.palette.mode==="light",t=e?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return{root:{},inputRoot:{display:"inline-flex",flexWrap:"wrap",flex:1,marginTop:0,minWidth:70,"&.mui-variant-outlined,&.mui-variant-filled":{boxSizing:"border-box"},"&.mui-variant-outlined":{paddingTop:"14px"},"&.mui-variant-filled":{paddingTop:"28px"}},input:{display:"inline-block",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",appearance:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",float:"left",flex:1},chipContainer:{display:"flex",flexFlow:"row wrap",alignItems:"center",cursor:"text",marginBottom:"-2px",minHeight:40},outlined:{"& input":{height:16,paddingTop:"4px",paddingBottom:"12px",marginTop:"4px",marginBottom:"4px"}},standard:{marginTop:"18px"},filled:{"& input":{height:22,marginBottom:"4px",marginTop:"4px",paddingTop:0},"$marginDense & input":{height:26}},labeled:{},label:{top:4,"&$outlined&:not($labelShrink)":{top:2,"$marginDense &":{top:5}},"&$filled&:not($labelShrink)":{top:15,"$marginDense &":{top:20}}},labelShrink:{top:0},helperText:{marginBottom:-20},focused:{},disabled:{},underline:{"&:after":{borderBottom:`2px solid ${m.palette.primary[e?"dark":"light"]}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:m.transitions.create("transform",{duration:m.transitions.duration.shorter,easing:m.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:m.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:m.transitions.create("border-bottom-color",{duration:m.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:not($disabled):not($focused):not($error):before":{borderBottom:`2px solid ${m.palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},"&$disabled:before":{borderBottomStyle:"dotted"}},error:{"&:after":{backgroundColor:m.palette.error.main,transform:"scaleX(1)"}},chip:{margin:"0 8px 8px 0",float:"left"},marginDense:{}}},pi={BACKSPACE:8,DELETE:46,LEFT_ARROW:37,RIGHT_ARROW:39},Lh=({value:m,isFocused:e,isDisabled:t,isReadOnly:n,handleClick:u,handleDelete:i,style:s},d)=>x.createElement(Hs,{key:d,style:{...s,pointerEvents:t||n?"none":void 0,backgroundColor:e?Jc[300]:void 0},onClick:u,onDelete:i,label:m});class Mh extends x.Component{labelRef;labelNode=null;input;newChipKeyCodes;newChipKeys;actualInput=null;inputBlurTimeout=null;_keyPressed;_preventChipCreation;styles={};styleTheme=null;constructor(e){super(e),this.state={chips:e.defaultValue||[],focusedChip:null,inputValue:"",isFocused:!1,chipsUpdated:!1,prevPropsValue:[],variant:this.props.variant||"standard"},this.newChipKeyCodes=e.newChipKeyCodes||[13],this.newChipKeys=e.newChipKeys||["Enter"],this.labelRef=x.createRef(),this.input=x.createRef()}componentDidMount(){this.state.variant==="outlined"&&(this.labelNode=Gc.findDOMNode(this.labelRef.current),this.forceUpdate())}componentWillUnmount(){this.inputBlurTimeout&&clearTimeout(this.inputBlurTimeout)}static getDerivedStateFromProps(e,t){let n=null;return e.value&&e.value.length!==t.prevPropsValue.length&&(n={prevPropsValue:e.value},e.clearInputValueOnChange&&(n.inputValue="")),e.clearInputValueOnChange&&e.value&&e.value.length!==t.prevPropsValue.length&&(n={prevPropsValue:e.value,inputValue:""}),e.disabled&&(n={...n,focusedChip:null}),!t.chipsUpdated&&e.defaultValue&&(n={...n,chips:e.defaultValue}),n}focus=()=>{var e;(e=this.actualInput)==null||e.focus(),this.state.focusedChip&&this.setState({focusedChip:null})};handleInputBlur=e=>{this.props.onBlur&&this.props.onBlur(e),this.setState({isFocused:!1}),this.state.focusedChip&&this.setState({focusedChip:null});const t=e.target.value;let n;switch(this.props.blurBehavior||"clear"){case"add-or-clear":n={clearInputOnFail:!0};case"add":if(this.props.delayBeforeAdd){const u=(this.props.value||this.state.chips).length;this.inputBlurTimeout=setTimeout(()=>{const i=(this.props.value||this.state.chips).length;u===i?this.handleAddChip(t,n):this.clearInput()},150)}else this.handleAddChip(t,n);break;case"clear":this.clearInput();break}};handleInputFocus=e=>{var t,n;this.setState({isFocused:!0}),(n=(t=this.props).onFocus)==null||n.call(t,e)};handleKeyDown=e=>{const{focusedChip:t}=this.state;if(this._keyPressed=!1,this._preventChipCreation=!1,this.props.onKeyDown&&(this.props.onKeyDown(e),e.isDefaultPrevented()))return;const n=this.props.value||this.state.chips;if(this.newChipKeyCodes.includes(e.keyCode)||this.newChipKeys.includes(e.key)){this.handleAddChip(e.target.value)!==!1&&e.preventDefault();return}switch(e.keyCode){case pi.BACKSPACE:e.target.value===""&&(t?(this.handleDeleteChip(n[t],t),t&&this.setState({focusedChip:t-1})):this.setState({focusedChip:n.length-1}));break;case pi.DELETE:e.target.value===""&&t&&(this.handleDeleteChip(n[t],t),t<=n.length-1&&this.setState({focusedChip:t}));break;case pi.LEFT_ARROW:t===null&&e.target.value===""&&n.length?this.setState({focusedChip:n.length-1}):t!==null&&t>0&&this.setState({focusedChip:t-1});break;case pi.RIGHT_ARROW:t!==null&&t{!this._preventChipCreation&&(this.newChipKeyCodes.includes(e.keyCode)||this.newChipKeys.includes(e.key))&&this._keyPressed?this.clearInput():this.updateInput(e.target.value),this.props.onKeyUp&&this.props.onKeyUp(e)};handleUpdateInput=e=>{(this.props.inputValue===null||this.props.inputValue===void 0)&&this.updateInput(e.target.value),this.props.onUpdateInput&&this.props.onUpdateInput(e)};handleAddChip(e,t){if(this.props.onBeforeAdd&&!this.props.onBeforeAdd(e))return this._preventChipCreation=!0,t&&t.clearInputOnFail&&this.clearInput(),!1;this.clearInput();const n=this.props.value||this.state.chips;return e.trim().length?((this.props.allowDuplicates||!n.includes(e))&&(this.props.value&&this.props.onAdd?this.props.onAdd(e):this.updateChips([...this.state.chips,e])),!0):!1}handleDeleteChip(e,t){if(this.props.value)this.props.onDelete&&this.props.onDelete(e,t);else{const n=this.state.chips.slice();if(n.splice(t,1)){let i=this.state.focusedChip;this.state.focusedChip===t?i=null:this.state.focusedChip!==null&&this.state.focusedChip>t&&(i=this.state.focusedChip-1),this.updateChips(n,{focusedChip:i})}}}updateChips(e,t={}){this.setState({chips:e,chipsUpdated:!0,...t}),this.props.onChange&&this.props.onChange(e)}clearInput(){this.updateInput("")}updateInput(e){this.setState({inputValue:e})}setActualInputRef=e=>{this.actualInput=e,this.props.inputRef&&this.props.inputRef(e)};render(){const{alwaysShowPlaceholder:e,chipRenderer:t=Lh,className:n,disabled:u,disableUnderline:i,error:s,FormHelperTextProps:d,fullWidth:o,fullWidthInput:l,helperText:r,id:a,InputProps:c={},InputLabelProps:p={},inputValue:h,label:f,placeholder:g,readOnly:v,required:b,rootRef:D,value:E,margin:w}=this.props,y=this.state.variant;this.styleTheme!==this.props.theme.palette.mode&&(this.styleTheme=this.props.theme.palette.mode,this.styles=P.Utils.getStyle(this.props.theme,Th));let A=E||this.state.chips||[];Array.isArray(A)||(A=(A||"").toString().split(/[,\s]+/).map(S=>S.trim()));const T=h??this.state.inputValue,$=(this.props.value||T).length||T.length,M=typeof p.shrink=="boolean"?p.shrink:f!==null&&($||this.state.isFocused||A.length),O=A.map((S,C)=>t({value:S,isDisabled:!!u,isReadOnly:!!v,isFocused:this.state.focusedChip===C,handleClick:()=>this.setState({focusedChip:C}),handleDelete:()=>this.handleDeleteChip(S,C),style:this.styles.chip},C.toString())),_={};y==="outlined"&&(_.notched=!!M,_.labelWidth=M&&this.labelNode&&this.labelNode.offsetWidth||0),y!=="standard"?_.startAdornment=O:c.disableUnderline=!0;const k=kh[y];return x.createElement(fe,{ref:D,fullWidth:o,className:n,sx:{...this.styles.root,...w==="dense"?this.styles.marginDense:{}},error:s,required:A.length>0?void 0:b,onClick:this.focus,disabled:u,variant:y,component:"div",margin:w},f&&x.createElement(Te,{htmlFor:a,sx:{"&.MuiInputLabel-root":this.styles.label,"&.MuiInputLabel-shrink":this.styles.labelShrink},shrink:!!M,focused:this.state.isFocused,variant:y,ref:this.labelRef,required:b,component:"label",...p},f),x.createElement(Ie,{component:"div",id:"input-chip-container",sx:{...this.styles[y],...this.styles.chipContainer,...this.state.isFocused?this.styles.focused:void 0,...!i&&y==="standard"?this.styles.underline:void 0,...u?this.styles.disabled:void 0,...f?this.styles.labeled:void 0,...s?this.styles.error:void 0}},y==="standard"&&O,x.createElement(k,{ref:this.input,className:`mui-variant-${this.styles[y]} ${f?"mui-chip-with-label":"mui-chip-no-label"}`,sx:{"&.MuiInputBase-input":{...this.styles.input,...this.styles[y]},"&.MuiInputBase-root":{...this.styles.inputRoot}},id:a,value:T,onChange:this.handleUpdateInput,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,inputRef:this.setActualInputRef,disabled:u,fullWidth:l,placeholder:!$&&(M||f===null||f===void 0)||e?g:void 0,readOnly:v,...c,..._})),r&&x.createElement(ve,{...d,className:d==null?void 0:d.className,style:this.styles.helperText},r))}}class jr extends V{async componentDidMount(){await super.componentDidMount();const{data:e,attr:t}=this.props,n=V.getValue(e,t);if(this.props.schema.delimiter&&typeof n=="string"){const u=n.split(this.props.schema.delimiter).map(i=>i.trim()).filter(i=>i);this.setState({value:u})}else this.setState({value:n||[]})}renderItem(e,t){const{attr:n,schema:u}=this.props,{value:i}=this.state;return x.createElement(fe,{fullWidth:!0,variant:"standard"},x.createElement(Mh,{value:i,disabled:!!t,label:this.getText(u.label),error:!!e,onAdd:s=>{const d=JSON.parse(JSON.stringify(i));d.push(s),this.setState({value:d},()=>{let o;this.props.schema.delimiter?o=this.onChange(n,d.join(`${this.props.schema.delimiter} `)):o=this.onChange(n,d),o instanceof Promise&&o.catch(l=>console.error(l))})},theme:this.props.oContext.theme,onDelete:(s,d)=>{const o=JSON.parse(JSON.stringify(i));o.splice(d,1),this.setState({value:o},()=>{let l;this.props.schema.delimiter?l=this.onChange(n,o.join(`${this.props.schema.delimiter} `)):l=this.onChange(n,o),l instanceof Promise&&l.catch(r=>console.error(r))})}}),x.createElement(ve,null,P.I18n.t("ra_Press ENTER Key to add new item")),this.props.schema.help?x.createElement(ve,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}class Ih extends V{renderColorDialog(){return!!this.state.showColorDialog&&x.createElement(Lt,{onClose:()=>this.setState({showColorDialog:!1}),open:this.state.showColorDialog},x.createElement(Yc,{color:this.state.colorDialogValue,onChange:e=>this.setState({colorDialogValue:e.hex},()=>this.onChange(this.props.attr,this.state.colorDialogValue))}))}renderItem(e,t){const n=V.getValue(this.props.data,this.props.attr);let u=P.Utils.isUseBright(n,null);return u===null&&(u=void 0),x.createElement(x.Fragment,null,this.renderColorDialog(),x.createElement(pe,{variant:"standard",disabled:!!t,style:{minWidth:100,width:"calc(100% - 8px)"},label:this.getText(this.props.schema.label),value:n||"",onClick:()=>!this.props.schema.readOnly&&this.setState({showColorDialog:!0,colorDialogValue:n||""}),onChange:i=>{const s=i.target.value,d=this.onChange(this.props.attr,s);d instanceof Promise&&d.catch(o=>console.error(`Cannot set value: ${o}`))},slotProps:{htmlInput:{style:{backgroundColor:n,color:u?"#FFF":"#000"},readOnly:this.props.schema.readOnly||!1},input:{endAdornment:!this.props.schema.readOnly&&n&&!this.props.schema.noClearButton?x.createElement(se,{tabIndex:-1,size:"small",onClick:i=>{i.stopPropagation();const s=this.onChange(this.props.attr,"");s instanceof Promise&&s.catch(d=>console.error(`Cannot set value: ${d}`))}},x.createElement(ht,null)):void 0},inputLabel:{shrink:!0}}}))}}const ps={width:{width:"calc(100% - 85px)"},width50:{width:120,marginRight:5}};class Oh extends V{async componentDidMount(){await super.componentDidMount();const e=V.getValue(this.props.data,this.props.attr);this.setState({value:e});const t={};this.props.schema.useSystemName&&(t.useSystem=!!V.getValue(this.props.data,this.props.schema.useSystemName)),this.props.schema.longitudeName&&this.props.schema.latitudeName?(t.longitude=V.getValue(this.props.data,this.props.schema.longitudeName),t.latitude=V.getValue(this.props.data,this.props.schema.latitudeName),!t.longitude&&!t.latitude&&this.props.schema.autoInit&&setTimeout(()=>this.getCoordinates(),300)):!V.getValue(this.props.data,this.props.attr)&&this.props.schema.autoInit&&setTimeout(()=>this.getCoordinates(),300),Object.keys(t).length&&setTimeout(()=>this.setState(t),50)}async getSystemCoordinates(){let e;try{this.props.oContext.socket.getCompactSystemConfig?e=await this.props.oContext.socket.getCompactSystemConfig():e=await this.getCachedObject("system.config")}catch(t){console.error(`Cannot get system configuration: ${t}`)}if(e!=null&&e.common&&(e.common.longitude||e.common.latitude))if(window.alert(P.I18n.t("ra_Used system settings")),this.props.schema.longitudeName&&this.props.schema.latitudeName)this.setState({longitude:e.common.longitude,latitude:e.common.latitude},async()=>{await this.onChange(this.props.schema.longitudeName,e.common.longitude),await this.onChange(this.props.schema.latitudeName,e.common.latitude)});else{const t=e.common.latitude+(this.props.schema.divider||",")+e.common.longitude;this.setState({value:t},()=>{const n=this.onChange(this.props.attr,t);n instanceof Promise&&n.catch(u=>console.error(`Cannot set value: ${u}`))})}else window.alert(P.I18n.t("ra_Cannot determine position: System settings are empty and GPS detection is disabled in browser"))}getCoordinates(){navigator.geolocation?navigator.geolocation.getCurrentPosition(async e=>{if(e!=null&&e.coords)if(this.props.schema.longitudeName&&this.props.schema.latitudeName)this.setState({longitude:e.coords.longitude,latitude:e.coords.latitude},async()=>{await this.onChange(this.props.schema.longitudeName,e.coords.longitude||""),await this.onChange(this.props.schema.latitudeName,e.coords.latitude||"")});else{const t=e.coords.latitude+(this.props.schema.divider||",")+e.coords.longitude;this.setState({value:t},()=>{const n=this.onChange(this.props.attr,t);n instanceof Promise&&n.catch(u=>console.error(`Cannot set value: ${u}`))})}else await this.getSystemCoordinates()},async e=>{console.error(`Cannot determine coordinates from browser: ${e.message}`),await this.getSystemCoordinates()}):this.getSystemCoordinates().catch(e=>{console.error(`Cannot determine coordinates: ${e}`)})}renderItem(e,t){return x.createElement(x.Fragment,null,this.props.schema.useSystemName?x.createElement(Xn,{control:x.createElement(Zt,{checked:!!this.state.useSystem,onChange:n=>{const u=n.target.checked;u&&this.getSystemCoordinates().catch(i=>console.error(`Cannot determine coordinates: ${i}`)),this.setState({useSystem:u},()=>this.onChange(this.props.schema.useSystemName,u))}}),label:P.I18n.t("ra_Use system settings for position")}):null,this.props.schema.longitudeName&&this.props.schema.latitudeName?x.createElement(pe,{variant:"standard",style:ps.width50,value:this.state.longitude??"",error:!!e,disabled:this.state.useSystem||!!t,onChange:n=>{const u=n.target.value;this.setState({longitude:u},()=>{const i=this.onChange(this.props.schema.longitudeName,(u||"").trim());i instanceof Promise&&i.catch(s=>console.error(`Cannot set value: ${s}`))})},label:P.I18n.t("ra_Longitude")}):null,this.props.schema.longitudeName&&this.props.schema.latitudeName?x.createElement(pe,{variant:"standard",style:ps.width50,value:this.state.latitude??"",error:!!e,disabled:this.state.useSystem||!!t,onChange:n=>{const u=n.target.value;this.setState({latitude:u},()=>this.onChange(this.props.schema.latitudeName,(u||"").trim()))},label:P.I18n.t("ra_Latitude")}):null,!this.props.schema.longitudeName||!this.props.schema.latitudeName?x.createElement(pe,{variant:"standard",style:ps.width,value:this.state.value??"",error:!!e,disabled:!!t,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:this.state.useSystem}},onChange:n=>{const u=n.target.value;this.setState({value:u},()=>this.onChange(this.props.attr,(u||"").trim()))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}):null,this.state.useSystem?null:x.createElement(Ti,{size:"small",onClick:()=>this.getCoordinates(),title:P.I18n.t("ra_Take browser position"),style:{marginRight:4}},x.createElement(Sc,null)),this.state.useSystem?null:x.createElement(Ti,{size:"small",onClick:()=>this.getSystemCoordinates(),title:P.I18n.t("ra_Take position from system settings")},x.createElement(Ec,null)))}}xs.init({name:"iobroker_admin",shared:{"@iobroker/adapter-react-v5":{lib:()=>Kc,version:"*"},"@mui/icons-material":{lib:()=>Ac,version:"*"},"@iobroker/json-config":{lib:()=>Zc,version:"*"}},remotes:[]});class Kn extends V{static runningLoads={};constructor(e){super(e),Object.assign(this.state,{Component:null,error:""})}async componentDidMount(){if(!this.props.schema.url){console.error("URL is empty. Cannot load custom component!"),this.setState({error:"URL is empty. Cannot load custom component!"});return}let e;this.props.schema.url.startsWith("http:")||this.props.schema.url.startsWith("https:")?e=this.props.schema.url:this.props.schema.url.startsWith("./")?e=`${window.location.protocol}//${window.location.host}${this.props.schema.url.replace(/^\./,"")}`:e=`${window.location.protocol}//${window.location.host}/adapter/${this.props.oContext.adapterName}/${this.props.schema.url}`;const[t,n,...u]=this.props.schema.name.split("/"),i=u.join("/");if(!e){console.error('Cannot find URL for custom component! Please define "url" as "custom/customComponents.js" in the schema');return}if(!t||!n||!i){console.error('Invalid format of "name"! Please define "name" as "ConfigCustomBackItUpSet/Components/AdapterExist" in the schema');return}let s=Kn.runningLoads[`${e}!${n}`];if(!(s instanceof Promise)){let d;if(this.props.schema.i18n===!0){const o=e.lastIndexOf("/");let l;o!==-1?l=e.substring(0,o):l=e;const r=P.I18n.getLanguage(),a=`${l}/i18n/${r}.json`;d=fetch(a).then(c=>c.json()).then(c=>P.I18n.extendTranslations(c,r)).catch(c=>{if(r!=="en"){fetch(`${l}/i18n/en.json`).then(p=>p.json()).then(p=>P.I18n.extendTranslations(p,r)).catch(p=>console.log(`Cannot load i18n "${a}": ${p}`));return}console.log(`Cannot load i18n "${a}": ${c}`)})}else if(this.props.schema.i18n&&typeof this.props.schema.i18n=="object")try{P.I18n.extendTranslations(this.props.schema.i18n)}catch(o){console.error(`Cannot import i18n: ${o}`)}try{console.log(e,t,n,i),xs.registerRemotes([{name:t,entry:e,type:this.props.schema.bundlerType||void 0}]),s=xs.loadRemote(`${t}/${n}`),d instanceof Promise&&(s=Promise.all([s,d]).then(o=>o[0])),Kn.runningLoads[`${e}!${n}`]=s}catch(o){console.error(o),this.setState({error:`Cannot import from ${this.props.schema.url}: ${o}`})}}try{const d=(await s).default;if(d!=null&&d[i])this.setState({Component:d[i]});else{const o=Object.keys(d||{});console.error("URL is empty. Cannot load custom component!"),this.setState({error:`Component ${this.props.schema.name} not found in ${this.props.schema.url}. Found: ${o.join(", ")}`})}}catch(d){console.error(d),this.setState({error:`Cannot import from ${this.props.schema.url}: ${d}`})}}render(){const e=this.state.Component,t=this.props.schema||{},n=e?x.createElement(e,{...this.props,socket:this.props.oContext.socket,theme:this.props.oContext.theme,themeType:this.props.oContext.themeType,instance:this.props.oContext.instance,adapterName:this.props.oContext.adapterName,systemConfig:this.props.oContext.systemConfig,forceUpdate:this.props.oContext.forceUpdate}):this.state.error?x.createElement("div",null,this.state.error):x.createElement(Wi,null);return t.newLine?x.createElement(x.Fragment,null,x.createElement("div",{style:{flexBasis:"100%",height:0}}),n):n}}class Fh extends V{async componentDidMount(){await super.componentDidMount();const e=V.getValue(this.props.data,this.props.attr);if(e)try{const t=new Date(e);this.setState({value:t})}catch{}}renderItem(e,t){return x.createElement(Qc,{sx:n=>({width:"100%",borderBottom:`1px solid ${e?"#F00":n.palette.text.primary}`,"& fieldset":{display:"none"},"& input":{padding:`${n.spacing(1.5)} 0 4px 0`},"& .MuiInputAdornment-root":{marginLeft:0,marginTop:1},"& label":{transform:"translate(0px, -9px) scale(0.75)"}}),format:this.props.oContext.systemConfig.dateFormat.toLowerCase().replace("mm","MM"),disabled:!!t,value:this.state.value||null,onChange:n=>this.setState({value:n},()=>{try{const u=this.state.value.toISOString();this.onChange(this.props.attr,u).catch(i=>console.warn(`Error saving value for ${this.props.attr}:`,i))}catch{}}),label:this.getText(this.props.schema.label)})}}class Rh extends V{renderItem(){if(!this.props.schema)return null;if(this.props.oContext.DeviceManager){const t=this.props.oContext.DeviceManager;return x.createElement(t,{uploadImagesToInstance:`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,title:this.getText(this.props.schema.label),socket:this.props.oContext.socket,selectedInstance:`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,themeName:this.props.themeName,theme:this.props.oContext.theme,themeType:this.props.oContext.themeType,isFloatComma:this.props.oContext.isFloatComma,dateFormat:this.props.oContext.dateFormat,smallCards:this.props.schema.smallCards})}return x.createElement("div",null,"DeviceManager not found")}}const nt={fullWidth:{width:"100%"},uploadDiv:{position:"relative",width:"100%"},uploadDivDragging:{opacity:1,background:"rgba(128,255,128,0.1)"},uploadCenterDiv:{margin:5,border:"3px dashed grey",borderRadius:5,width:"100%",height:"100%",position:"absolute",display:"flex"},uploadCenterIcon:{paddingTop:10,width:48,height:48},uploadCenterText:{fontSize:16},uploadCenterTextAndIcon:{textAlign:"center",position:"absolute",top:0,bottom:0,left:0,right:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},disabledOpacity:{opacity:.3,cursor:"default"},error:{border:"2px solid red"},deleteButton:{},selectedImage:{height:40,width:40,display:"inline-block",marginRight:8}},Nh=["jpg","jpeg","svg","png","webp","gif","apng","avif","webp"],Bh=["mp3","ogg","wav","aac"],Ph=["avi","mp4","mov"],Wh=["txt","log","html","htm"],jh=["json","js","ts"];class ji extends V{dropzoneRef;imagePrefix;objectID;path;constructor(e){super(e),this.dropzoneRef=x.createRef(),this.imagePrefix=this.props.oContext.imagePrefix??"./files"}async componentDidMount(){await super.componentDidMount(),this.objectID=(this.props.schema.objectID||"0_userdata.0").replace("%INSTANCE%",(this.props.oContext.instance||0).toString()),this.path=this.props.schema.upload,this.path&&(this.path==="/"?this.path="":this.path.endsWith("/")||(this.path=`${this.path}/`)),this.updateFiles().then(()=>{const e=V.getValue(this.props.data,this.props.attr);this.setState({value:e}),this.props.oContext.socket.subscribeFiles(this.objectID,`${this.path}/*`,this.onFolderChanged).catch(t=>console.error(`Cannot subscribe: ${t}`))})}onFolderChanged=(e,t)=>{this.path&&t.startsWith(this.path)&&this.updateFiles().catch(n=>console.error(`Cannot update files: ${n}`))};componentWillUnmount(){this.props.oContext.socket.subscribeFiles(this.objectID,`${this.path}/*`,this.onFolderChanged).catch(e=>console.error(`Cannot subscribe: ${e}`)),super.componentWillUnmount()}async updateFiles(){const e=await this.readFiles(this.props.schema.pattern);await new Promise(t=>this.setState({files:e},t))}async readFolder(e,t,n){try{const u=await this.props.oContext.socket.readDir(this.objectID,e.replace(/^\//,"")||null);for(let i=0;iconsole.log("file reading was aborted"),n.onerror=()=>console.log("file reading has failed"),n.onload=()=>{if(t.size>u){window.alert(P.I18n.t("File is too big. Max %sk allowed. Try use SVG.",Math.round(u/1024)));return}this.props.oContext.socket.writeFile64(this.objectID,this.path+t.name,n.result).then(()=>this.updateFiles()).then(()=>this.setState({value:this.path+t.name},()=>this.onChange(this.props.attr,this.path+t.name))).catch(i=>window.alert(`Cannot upload file: ${i}`))},n.readAsArrayBuffer(t)}renderDeleteDialog(){return this.state.deleteFile?x.createElement(P.DialogConfirm,{title:P.I18n.t("ra_Are you sure?"),text:P.I18n.t("ra_File will be deleted"),ok:P.I18n.t("ra_Delete"),cancel:P.I18n.t("ra_Cancel"),onClose:e=>{const t=this.state.deleteFile;this.setState({deleteFile:""},()=>{e&&this.props.oContext.socket.deleteFile(this.objectID,t).then(()=>this.updateFiles()).catch(n=>window.alert(`Cannot delete file: ${n}`))})}}):null}static base64ToArrayBuffer(e){const t=window.atob(e),n=t.length,u=new Uint8Array(n);for(let i=0;i{if(typeof AudioContext<"u"){const t=new AudioContext,n=ji.base64ToArrayBuffer(e.file);t.decodeAudioData(n,u=>{const i=t.createBufferSource();i.buffer=u,i.connect(t.destination),i.start(0)},u=>window.alert(`Cannot play: ${u.message}`))}})}getFileIcon(e){return e!=null&&e.extension?Nh.includes(e.extension)?x.createElement("div",{style:{...nt.selectedImage,backgroundImage:`url(${this.imagePrefix}/${this.objectID}/${e.value})`,backgroundSize:"contain",backgroundRepeat:"no-repeat"}}):Bh.includes(e.extension)?x.createElement(Dc,null):Wh.includes(e.extension)?x.createElement(No,null):Ph.includes(e.extension)?x.createElement(Bo,null):jh.includes(e.extension)?x.createElement(Po,null):null:null}renderItem(e,t){if(!this.state.files)return null;const n=[];this.props.schema.withFolder||this.state.files.forEach(r=>{const a=r.name.lastIndexOf("/");if(a===-1)n.includes("/")||n.push("/");else{const c=r.name.substring(0,a+1);n.includes(c)||n.push(c)}});const u=this.state.files.map(r=>({value:r.name,label:!this.props.schema.withFolder&&n.length===1?`${r.name.substring(n[0].length)}`:`${r.name}${this.props.schema.noSize?"":`(${r.size})`}`,extension:r.name.toLowerCase().split(".").pop()}));this.props.schema.noNone||u.unshift({label:P.I18n.t("ra_none"),value:""});const i=u.find(r=>r.value===this.state.value);let s=0;this.props.schema.upload&&s++,this.props.schema.refresh&&s++;const d=this.state.value&&(this.state.value.endsWith(".mp3")||this.state.value.endsWith(".ogg")||this.state.value.endsWith(".wav"));d&&s++;const o=x.createElement("div",{style:nt.fullWidth},x.createElement(fe,{variant:"standard",style:{width:`calc(100% - ${s*42}px)`}},this.props.schema.label?x.createElement(Te,null,this.getText(this.props.schema.label)):null,x.createElement(Be,{variant:"standard",error:!!e,disabled:!!t,value:this.state.value||"_",renderValue:()=>x.createElement(x.Fragment,null,this.getFileIcon(i),x.createElement("span",null,(i==null?void 0:i.label)||"")),onChange:r=>{this.setState({value:r.target.value==="_"?"":r.target.value},()=>this.onChange(this.props.attr,this.state.value))}},u.map(r=>x.createElement(xe,{key:r.value,value:r.value},x.createElement(xo,null,this.getFileIcon(r)),x.createElement(Vs,null,r.label),this.props.schema.delete&&i.value?x.createElement(se,{style:nt.deleteButton,size:"small",onClick:()=>this.setState({deleteFile:i.value})},x.createElement(_t,null)):null))),this.props.schema.help?x.createElement(ve,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null),this.props.schema.refresh&&x.createElement(se,{onClick:()=>this.updateFiles()},x.createElement(Us,null)),this.props.schema.upload&&x.createElement(se,{onClick:()=>{var r;return(r=this.dropzoneRef.current)==null?void 0:r.open()}},x.createElement(Vn,null)),d&&x.createElement(se,{style:{color:"#00FF00"},onClick:()=>this.play()},x.createElement(Gs,null)));if(!this.props.schema.upload)return x.createElement(x.Fragment,null,o,this.renderDeleteDialog());let l={"*/*":[]};if(this.props.schema.fileTypes==="image"?l={"image/*":[".png",".jpg",".svg",".gif",".apng",".avif",".webp"]}:this.props.schema.fileTypes==="audio"?l={"audio/*":[".mp3",".ogg",".wav",".mp4"]}:this.props.schema.fileTypes==="text"&&(l={"text/plain":[".txt"]}),this.props.schema.pattern){const r=this.props.schema.pattern.split("/").pop().toLowerCase().replace(/.*\./,"");r==="png"||r==="jpg"||r==="svg"||r==="gif"||r==="apng"||r==="avif"||r==="webp"?l={"image/*":[".png",".jpg",".svg",".gif",".apng",".avif",".webp"]}:r==="mp3"||r==="ogg"||r==="wav"?l={"audio/*":[".mp3",".ogg",".wav",".mp4"]}:r==="ics"?l={"text/calendar":[".ics"]}:r==="txt"?l={"text/plain":[".txt"]}:r==="pem"?l={"text/plain":[".pem"]}:l={"*/*":[`.${r}`]}}return x.createElement(jo,{ref:this.dropzoneRef,multiple:!1,accept:l,noKeyboard:!0,noClick:!0,maxSize:this.props.schema.maxSize||2*1024*1024,onDragEnter:()=>{this.setState({uploadFile:"dragging"})},onDragLeave:()=>this.setState({uploadFile:!0}),onDrop:(r,a)=>{var c,p,h;this.setState({uploadFile:!1}),r.length?this.onDrop(r):window.alert(((h=(p=(c=a==null?void 0:a[0])==null?void 0:c.errors)==null?void 0:p[0])==null?void 0:h.message)||P.I18n.t("Cannot upload"))}},({getRootProps:r,getInputProps:a})=>x.createElement("div",{style:{...nt.uploadDiv,...this.state.uploadFile==="dragging"?nt.uploadDivDragging:void 0,...t?nt.disabledOpacity:void 0},...r()},x.createElement("input",{...a()}),this.state.uploadFile==="dragging"?x.createElement("div",{style:{...nt.uploadCenterDiv,...this.state.uploadError?nt.error:void 0}},x.createElement("div",{style:nt.uploadCenterTextAndIcon},x.createElement(Vn,{style:nt.uploadCenterIcon}),x.createElement("div",{style:nt.uploadCenterText},this.state.uploadFile==="dragging"?P.I18n.t("ra_Drop file here"):P.I18n.t("ra_Place your files here or click here to open the browse dialog")))):null,o,this.renderDeleteDialog()))}}const di={fullWidth:{width:"100%"},fullWidthOneButton:{width:"calc(100% - 69px)",marginRight:4},fullWidthIcon:{width:"calc(100% - 119px)",marginRight:4},selectedImage:{height:40,width:40,display:"inline-block",marginRight:8}},zh=["jpg","jpeg","svg","png","webp","gif","apng","avif","webp"],Hh=["mp3","ogg","wav","aac"],Vh=["avi","mp4","mov"],Uh=["txt","log","html","htm"],Kh=["json","js","ts"];class Gh extends V{imagePrefix="../..";async componentDidMount(){await super.componentDidMount();const e=V.getValue(this.props.data,this.props.attr);this.imagePrefix=this.props.oContext.imagePrefix??"./files",this.setState({value:e??""})}static getDerivedStateFromProps(e,t){const n=V.getValue(e.data,e.attr);return n==null||n.toString().trim()!==(t.value||"").toString().trim()?{value:n??""}:null}loadFile(){const e=this.state.value.indexOf("/");if(e!==-1){const t=this.state.value.substring(0,e),n=this.state.value.substring(e+1);return this.props.oContext.socket.readFile(t,n,!0)}return Promise.resolve(null)}play(){this.loadFile().then(e=>{if(typeof AudioContext<"u"&&(e!=null&&e.file)){const t=new AudioContext,n=ji.base64ToArrayBuffer(e.file);t.decodeAudioData(n,u=>{const i=t.createBufferSource();i.buffer=u,i.connect(t.destination),i.start(0)},u=>window.alert(`Cannot play: ${u.message}`))}})}getIcon(){const e=this.state.value.split(".").pop().toLowerCase();return zh.includes(e)?x.createElement("div",{style:{...di.selectedImage,backgroundImage:`url(${this.imagePrefix}/${this.state.value})`,backgroundSize:"contain",backgroundRepeat:"no-repeat"}}):Hh.includes(e)?x.createElement(se,{style:{color:"#00FF00"},onClick:()=>this.play()},x.createElement(Gs,null)):Uh.includes(e)?x.createElement(No,null):Vh.includes(e)?x.createElement(Bo,null):Kh.includes(e)?x.createElement(Po,null):null}renderFileBrowser(){return this.state.showFileBrowser?x.createElement(P.DialogSelectFile,{imagePrefix:this.props.oContext.imagePrefix,socket:this.props.oContext.socket,selected:this.state.value,onClose:()=>this.setState({showFileBrowser:!1}),onOk:e=>{const t=Array.isArray(e)?e[0]:e;this.setState({value:t},()=>this.onChange(this.props.attr,this.props.schema.trim===!1?t:(t||"").trim()))},selectOnlyFolders:this.props.schema.selectOnlyFolders,allowUpload:this.props.schema.allowUpload,allowDownload:this.props.schema.allowDownload,allowCreateFolder:this.props.schema.allowCreateFolder,allowView:this.props.schema.allowView,showToolbar:this.props.schema.showToolbar,limitPath:this.props.schema.limitPath,theme:this.props.oContext.theme}):null}renderItem(e,t){const n=this.getIcon();return x.createElement("div",{style:di.fullWidth},n,x.createElement(pe,{variant:"standard",style:n?di.fullWidthIcon:di.fullWidthOneButton,value:this.state.value??"",error:!!e,disabled:!!t,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:!!this.props.schema.disableEdit}},onChange:u=>{const i=u.target.value;this.setState({value:i},()=>this.onChange(this.props.attr,this.props.schema.trim===!1?i:(i||"").trim()))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}),x.createElement(me,{disabled:t,variant:"outlined",onClick:()=>this.setState({showFileBrowser:!0})},"..."),this.renderFileBrowser())}}class Jh extends V{async componentDidMount(){await super.componentDidMount();const e=V.getValue(this.props.data,this.props.attr);this.props.oContext.socket.getEnums("functions").then(t=>{const n=Object.keys(t).map(u=>({value:this.props.schema.short?u.replace("enum.functions.",""):u,label:this.getText(t[u].common.name),obj:t[u]}));this.props.schema.allowDeactivate!==!1&&n.unshift({label:P.I18n.t(V.NONE_LABEL),value:V.NONE_VALUE}),this.setState({value:e,selectOptions:n})})}renderItem(e,t){if(!this.state.selectOptions)return null;const n=this.state.selectOptions.find(u=>u.value===this.state.value);return x.createElement(fe,{variant:"standard",fullWidth:!0},this.props.schema.label?x.createElement(Te,null,this.getText(this.props.schema.label)):null,x.createElement(Be,{variant:"standard",error:!!e,disabled:!!t,value:this.state.value||"_",renderValue:()=>n?n.obj?x.createElement(P.TextWithIcon,{value:n.obj,themeType:this.props.oContext.themeType,lang:P.I18n.getLanguage()}):n.label:"",onChange:u=>{this.setState({value:u.target.value==="_"?"":u.target.value},()=>this.onChange(this.props.attr,this.state.value))}},this.state.selectOptions.map(u=>x.createElement(xe,{key:u.value,value:u.value,style:u.value===V.DIFFERENT_VALUE?{opacity:.5}:{}},u.obj?x.createElement(P.TextWithIcon,{value:u.obj,themeType:this.props.oContext.themeType,lang:P.I18n.getLanguage()}):u.label))),this.props.schema.help?x.createElement(ve,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}class Yh extends V{iframeRef=x.createRef();observer=null;async componentDidMount(){await super.componentDidMount(),this.props.schema.reloadOnShow&&(this.observer=new IntersectionObserver(([e])=>{if(e.isIntersecting&&this.state.isVisible===!1&&this.iframeRef.current){const t=this.iframeRef.current.src;this.iframeRef.current.src="",setTimeout(()=>{this.iframeRef.current&&(this.iframeRef.current.src=t)},0)}this.setState({isVisible:e.isIntersecting})}),this.iframeRef.current&&this.observer.observe(this.iframeRef.current))}componentWillUnmount(){var e,t;(e=super.componentWillUnmount)==null||e.call(this),(t=this.observer)==null||t.disconnect()}renderItem(e,t){const n=this.props.schema.url||V.getValue(this.props.data,this.props.attr);return x.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},x.createElement("iframe",{style:{width:"100%",height:"100%",borderWidth:this.props.schema.frameBorder??0,...this.props.schema.innerStyle,border:e?"1px solid red":void 0},ref:this.iframeRef,src:n,allowFullScreen:this.props.schema.allowFullscreen??!1,sandbox:this.props.schema.sandbox,loading:this.props.schema.lazyLoad??"lazy"}),t&&x.createElement("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(255, 255, 255, 0.3)",cursor:"not-allowed",zIndex:1}}))}}class Qh extends V{initialized=!1;localContext;iframeRef=x.createRef();observer=null;async componentDidMount(){await super.componentDidMount(),this.askInstance().catch(e=>console.error(e)),this.props.schema.reloadOnShow&&(this.observer=new IntersectionObserver(([e])=>{if(e.isIntersecting&&this.state.isVisible===!1&&this.iframeRef.current){const t=this.iframeRef.current.src;this.iframeRef.current.src="",setTimeout(()=>{this.iframeRef.current&&(this.iframeRef.current.src=t)},0)}this.setState({isVisible:e.isIntersecting})}),this.iframeRef.current&&this.observer.observe(this.iframeRef.current))}async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){const n=await this.getPatternAsync(this.props.schema.jsonData,null,!0);if(n)try{e=JSON.parse(n)}catch{console.error(`Cannot parse json data: ${JSON.stringify(e)}`)}}e===void 0&&(e=null);const t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){const n=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(n!=null&&n.val)){window.alert(P.I18n.t("ra_Instance %s is not alive",t));return}}this.props.oContext.socket.sendTo(t,this.props.schema.command||"send",e).then(n=>this.setState({url:n||""}))}}getContext(){const e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=V.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(e,t){if(this.props.alive){const n=this.getContext();(n!==this.localContext||!this.initialized)&&(this.localContext=n,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}return this.state.url===void 0?null:x.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},x.createElement("iframe",{style:{width:"100%",height:"100%",borderWidth:this.props.schema.frameBorder??0,...this.props.schema.innerStyle,border:e?"1px solid red":void 0},ref:this.iframeRef,src:this.state.url,allowFullScreen:this.props.schema.allowFullscreen??!1,sandbox:this.props.schema.sandbox,loading:this.props.schema.lazyLoad??"lazy"}),t&&x.createElement("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(255, 255, 255, 0.3)",cursor:"not-allowed",zIndex:1}}))}}class Xh extends V{async componentDidMount(){await super.componentDidMount(),this.props.oContext.socket.getHostByIp(this.props.common.host).then(e=>{this.props.schema.listenOnAllPorts||(e=e.filter(t=>t.address!=="0.0.0.0"&&t.address!=="::")),this.props.schema.onlyIp4?e=e.filter(t=>t.family==="ipv4"):this.props.schema.onlyIp6&&(e=e.filter(t=>t.family==="ipv6")),this.props.schema.noInternal&&(e=e.filter(t=>!t.internal)),e.forEach(t=>{t.address==="0.0.0.0"?t.name=`[IPv4] 0.0.0.0 - ${P.I18n.t("ra_Listen on all IPs")}`:t.address==="::"&&(t.name=`[IPv6] :: - ${P.I18n.t("ra_Listen on all IPs")}`)}),this.setState({ips:e})}).catch(e=>console.error(e))}renderItem(e,t){var i,s;const n=V.getValue(this.props.data,this.props.attr),u=(i=this.state.ips)==null?void 0:i.find(d=>d.address===n);return x.createElement(fe,{fullWidth:!0,variant:"standard"},this.state.ips&&this.props.schema.label?x.createElement(Te,null,this.getText(this.props.schema.label)):null,this.state.ips?x.createElement(Be,{variant:"standard",error:!!e,disabled:!!t,value:n,renderValue:d=>(u==null?void 0:u.name)||d,onChange:d=>this.onChange(this.props.attr,d.target.value)},(s=this.state.ips)==null?void 0:s.map((d,o)=>x.createElement(xe,{key:o,value:d.address},d.name))):x.createElement(pe,{fullWidth:!0,variant:"standard",error:!!e,disabled:!!t,value:n,onChange:d=>this.onChange(this.props.attr,d.target.value),label:this.getText(this.props.schema.label)}),this.props.schema.help?x.createElement(ve,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}class Zh extends V{initialized=!1;localContext;async componentDidMount(){await super.componentDidMount(),this.props.schema.sendFirstByClick||this.askInstance().catch(e=>console.error(e))}async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){const n=await this.getPatternAsync(this.props.schema.jsonData,null,!0);if(n)try{e=JSON.parse(n)}catch{console.error(`Cannot parse json data: ${JSON.stringify(e)}`)}}e===void 0&&(e=null);const t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){const n=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(n!=null&&n.val)){window.alert(P.I18n.t("ra_Instance %s is not alive",t));return}}this.setState({loading:!0},()=>this.props.oContext.socket.sendTo(t,this.props.schema.command||"send",e).then(n=>this.setState({image:n||""})))}}getContext(){const e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=V.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(){if(this.props.alive){const e=this.getContext();(e!==this.localContext||!this.initialized)&&(this.localContext=e,(!this.props.schema.sendFirstByClick||this.state.image!==void 0)&&setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}return!this.state.image&&this.props.schema.sendFirstByClick?x.createElement("div",{style:{width:this.props.schema.width||"100%",height:this.props.schema.height,display:"flex",alignItems:"center",justifyContent:"center",cursor:this.state.loading?"default":"pointer"},onClick:()=>!this.state.loading&&this.askInstance()},this.state.loading?x.createElement(Tt,null):typeof this.props.schema.sendFirstByClick=="boolean"?P.I18n.t("ra_Click to show"):this.getText(this.props.schema.sendFirstByClick,this.props.schema.noTranslation)):this.state.image===void 0?null:x.createElement(P.Icon,{title:this.getText(this.props.schema.tooltip),src:this.state.image,style:{width:this.props.schema.width||"100%",height:this.props.schema.height}})}}class qh extends V{index;constructor(e){super(e),this.index=Date.now()}async componentDidMount(){if(await super.componentDidMount(),this.props.schema.base64){const e=V.getValue(this.props.data,this.props.attr);this.setState({value:e})}else this.props.oContext.socket.fileExists(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.attr).then(e=>e&&this.loadImage())}_getUrl(e){e&&(this.index=Date.now());let t=`files/${this.props.oContext.adapterName}.${this.props.oContext.instance}/${this.props.attr}?t=${this.index}`;return window.location.port==="3000"&&(t=`${window.location.protocol}//${window.location.hostname}:8081/${t}`),t}loadImage(){fetch(this._getUrl()).then(e=>e.blob()).then(e=>{const t=new FileReader;t.onload=()=>{this.setState({value:t.result})},t.readAsDataURL(e)}).catch(e=>console.error(e))}renderItem(e,t){return x.createElement(fe,{fullWidth:!0,variant:"standard"},this.props.schema.label?x.createElement(Te,{shrink:!0},this.getText(this.props.schema.label)):null,x.createElement(P.UploadImage,{error:!!e,disabled:t,accept:this.props.schema.accept,crop:this.props.schema.crop,maxSize:this.props.schema.maxSize||256*1024,icon:this.state.value||void 0,removeIconFunc:()=>this.setState({value:null},()=>{if(this.props.schema.base64){const n=this.onChange(this.props.attr,this.state.value);n instanceof Promise&&n.catch(u=>console.error(`Cannot set value: ${u}`))}else this.props.oContext.socket.deleteFile(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.attr).catch(n=>console.error(n))}),onChange:n=>this.setState({value:n},()=>{if(this.props.schema.base64){const u=this.onChange(this.props.attr,this.state.value);u instanceof Promise&&u.catch(i=>console.error(`Cannot set value: ${i}`))}else n.startsWith("data")&&(n=n.split(",")[1]);this.props.oContext.socket.writeFile64(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.attr,n).catch(u=>console.error(u))})}),this.props.schema.help?x.createElement(ve,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}class eu extends V{renderItem(){return x.createElement(P.InfoBox,{type:this.props.schema.boxType||"info",closeable:this.props.schema.closeable!==void 0?this.props.schema.closeable:!0,storeId:this.props.schema.closed!==void 0?void 0:`${!!this.props.oContext.adapterName} ${this.props.attr}`,closed:this.props.schema.closed,style:{width:"100%",...this.props.schema.style}},this.props.schema.title?x.createElement(Ie,{component:"div",sx:{fontWeight:"bold",fontSize:"larger"}},this.getText(this.props.schema.title)):null,this.getText(this.props.schema.text))}}const zr={icon:{width:20,height:20,marginRight:4}};class tu extends V{async componentDidMount(){await super.componentDidMount();const e=V.getValue(this.props.data,this.props.attr);let t=this.props.schema.adapter;t==="_dataSources"&&(t=void 0),this.props.oContext.socket.getAdapterInstances(t,!0).then(async n=>{this.props.schema.adapter==="_dataSources"?n=n.filter(i=>{var s;return(s=i==null?void 0:i.common)==null?void 0:s.getHistory}):this.props.schema.adapter?n=n.filter(i=>i==null?void 0:i._id.startsWith(`system.adapter.${this.props.schema.adapter}.`)):this.props.schema.adapters&&Array.isArray(this.props.schema.adapters)&&(n=n.filter(i=>{var s;return this.props.schema.adapters.includes((s=i==null?void 0:i.common)==null?void 0:s.name)})),this.props.schema.onlyEnabled&&(n=n.filter(i=>{var s;return(s=i==null?void 0:i.common)==null?void 0:s.enabled}));const u=n.map(i=>({value:this.props.schema.long?i._id:this.props.schema.short?i._id.split(".").pop():i._id.replace(/^system\.adapter\./,""),label:`${i.common.name} [${i._id.replace(/^system\.adapter\./,"")}]`,icon:`${this.props.oContext.imagePrefix}/adapter/${i.common.name}/${i.common.icon}`}));u.sort((i,s)=>i.value>s.value?1:i.valueconsole.error(`Cannot get instances: ${n}`))}componentWillUnmount(){this.props.oContext.socket.unsubscribeObject("system.adapter.*",this.onInstancesUpdate).then(()=>{}),super.componentWillUnmount()}onInstancesUpdate=(e,t)=>{if(!e.match(/^system\.adapter\.[-_a-z\d]+\.\d+$/))return;const n=this.props.schema.long?e:this.props.schema.short?e.split(".").pop():e.replace(/^system\.adapter\./,""),u=this.state.selectOptions.findIndex(i=>i.value===n);if(t){if(this.props.schema.adapter==="_dataSources"&&(!t.common||!t.common.getHistory))return;if(u===-1){const i=JSON.parse(JSON.stringify(this.state.selectOptions)),s=typeof t.common.name=="object"?t.common.name[P.I18n.getLanguage()]||t.common.name.en:t.common.name;i.push({value:this.props.schema.long?t._id:this.props.schema.short?t._id.split(".").pop():t._id.replace(/^system\.adapter\./,""),label:`${s} [${t._id.replace(/^system\.adapter\./,"")}]`,icon:`${this.props.oContext.imagePrefix}/adapter/${s}/${t.common.icon}`}),i.sort((d,o)=>d.label>o.label?1:d.labeli.value===this.state.value);return x.createElement(fe,{fullWidth:!0,key:this.props.attr,variant:"standard"},this.props.schema.label?x.createElement(Te,{shrink:!0},this.getText(this.props.schema.label)):null,x.createElement(Be,{variant:"standard",error:!!e,displayEmpty:!0,disabled:!!t,value:this.state.value,renderValue:()=>x.createElement("span",{style:{display:"flex"}},n!=null&&n.icon?x.createElement(P.Icon,{src:`./${n.icon}`,style:zr.icon}):null,this.getText(n==null?void 0:n.label,!0)),onChange:i=>this.setState({value:i.target.value},()=>this.onChange(this.props.attr,this.state.value))},this.state.selectOptions.map(i=>x.createElement(xe,{key:i.value,value:i.value,style:i.value===V.NONE_VALUE?{opacity:.5}:{}},i.icon?x.createElement(P.Icon,{src:`./${i.icon}`,style:zr.icon}):null,this.getText(i.label,!0)))),this.props.schema.help?x.createElement(ve,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const Hr={address:{fontSize:"smaller",opacity:.5,marginLeft:8}};class nu extends V{async componentDidMount(){await super.componentDidMount(),this.props.oContext.getCachedObject(`system.host.${this.props.common.host}`).then(e=>{var n,u;const t=[];if((u=(n=e==null?void 0:e.native)==null?void 0:n.hardware)!=null&&u.networkInterfaces){const i=e.native.hardware.networkInterfaces;Object.keys(i).forEach(s=>{if(this.props.schema.ignoreInternal&&!i[s].find(o=>!o.internal)||this.props.schema.ignoreLoopback&&i[s].find(o=>o.address==="127.0.0.1"||o.address==="::1"))return;let d=i[s].find(o=>o.family==="IPv4");d||=i[s].find(o=>o.family==="IPv6"),t.push({value:s,address:d.address})})}this.setState({interfaces:t})}).catch(e=>window.alert(`Cannot read interfaces: ${e}`))}renderItem(e,t){var i,s,d;const n=V.getValue(this.props.data,this.props.attr),u=(i=this.state.interfaces)==null?void 0:i.find(o=>o.value===n);return x.createElement(fe,{fullWidth:!0,variant:"standard"},(s=this.state.interfaces)!=null&&s.length&&this.props.schema.label?x.createElement(Te,null,this.getText(this.props.schema.label)):null,(d=this.state.interfaces)!=null&&d.length?x.createElement(Be,{variant:"standard",error:!!e,disabled:!!t,value:n,renderValue:o=>u?x.createElement("span",null,u.value,x.createElement("span",{style:Hr.address},u.address)):o,onChange:o=>this.onChange(this.props.attr,o.target.value)},this.state.interfaces.map((o,l)=>x.createElement(xe,{key:l,value:o.value},x.createElement("span",null,o.value,x.createElement("span",{style:Hr.address},o.address))))):x.createElement(pe,{fullWidth:!0,variant:"standard",error:!!e,disabled:!!t,value:n,onChange:o=>this.onChange(this.props.attr,o.target.value),label:this.getText(this.props.schema.label)}),this.props.schema.help?x.createElement(ve,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const rn={modalDialog:{minWidth:400,maxWidth:800},overflowHidden:{display:"flex",overflow:"hidden"},titleIcon:{marginRight:5},content:{fontSize:16},languageButton:{position:"absolute",right:8,top:8},languageButtonActive:{color:"primary.main"}},Xs=({toggleTranslation:m,noTranslation:e,title:t,fullWidth:n,help:u,maxWidth:i,progress:s,icon:d,applyDisabled:o,applyButton:l,onClose:r,children:a,titleButtonApply:c,titleButtonClose:p,onApply:h,textInput:f,defaultValue:g,overflowHidden:v})=>{const[b,D]=Kl(g);Gl(()=>{D(g)},[g]);const E=tc(),w=nc(E.breakpoints.down("md"));let y=null;return d&&(y=d),x.createElement(Lt,{open:!0,maxWidth:w?!1:i||"md",fullWidth:!!n,fullScreen:w,disableEscapeKeyDown:!1,onClose:r,sx:{"& .MuiPaper-root":w?{}:rn.modalDialog}},t&&x.createElement(yn,null,d?x.createElement(y,{style:rn.titleIcon}):null,t,P.I18n.getLanguage()!=="en"&&m?x.createElement(se,{size:"large",style:{...rn.languageButton,...e?rn.languageButtonActive:{}},onClick:()=>m(),title:P.I18n.t("ra_Disable/Enable translation")},x.createElement($c,null)):null),x.createElement(Kt,{sx:{...v?rn.overflowHidden:{},...rn.content},style:{paddingTop:8}},f&&x.createElement(pe,{autoComplete:"off",fullWidth:!0,autoFocus:!0,variant:"outlined",size:"medium",multiline:!0,value:b,onChange:A=>D(A.target.value)}),a,u?x.createElement("div",null,u):null),x.createElement(Gt,null,l!==!1&&x.createElement(me,{startIcon:x.createElement(Ks,null),disabled:s||o&&g===b,onClick:()=>h&&h(f?b:""),variant:"contained",color:"primary"},P.I18n.t(c||"ra_Ok")),x.createElement(me,{color:"grey",onClick:()=>r&&r(),disabled:s,variant:"contained",startIcon:x.createElement(ht,null)},P.I18n.t(p||"ra_Cancel"))))};var bn={},Yt={},Ko={exports:{}};(function(m,e){(function(){var t="ace",n=(function(){return this})();!n&&typeof window<"u"&&(n=window);var u=function(r,a,c){if(typeof r!="string"){u.original?u.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(c=a),u.modules[r]||(u.payloads[r]=c,u.modules[r]=null)};u.modules={},u.payloads={};var i=function(r,a,c){if(typeof a=="string"){var p=o(r,a);if(p!=null)return c&&c(),p}else if(Object.prototype.toString.call(a)==="[object Array]"){for(var h=[],f=0,g=a.length;fo.length)&&(d=o.length),d-=s.length;var l=o.indexOf(s,d);return l!==-1&&l===d}),String.prototype.repeat||i(String.prototype,"repeat",function(s){for(var d="",o=this;s>0;)s&1&&(d+=o),(s>>=1)&&(o+=o);return d}),String.prototype.includes||i(String.prototype,"includes",function(s,d){return this.indexOf(s,d)!=-1}),Object.assign||(Object.assign=function(s){if(s==null)throw new TypeError("Cannot convert undefined or null to object");for(var d=Object(s),o=1;o>>0,l=arguments[1],r=l>>0,a=r<0?Math.max(o+r,0):Math.min(r,o),c=arguments[2],p=c===void 0?o:c>>0,h=p<0?Math.max(o+p,0):Math.min(p,o);a0;)o&1&&(l+=d),(o>>=1)&&(d+=d);return l};var i=/^\s\s*/,s=/\s\s*$/;n.stringTrimLeft=function(d){return d.replace(i,"")},n.stringTrimRight=function(d){return d.replace(s,"")},n.copyObject=function(d){var o={};for(var l in d)o[l]=d[l];return o},n.copyArray=function(d){for(var o=[],l=0,r=d.length;l65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(t,n,u){n.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},n.getOS=function(){return n.isMac?n.OS.MAC:n.isLinux?n.OS.LINUX:n.OS.WINDOWS};var i=typeof navigator=="object"?navigator:{},s=(/mac|win|linux/i.exec(i.platform)||["other"])[0].toLowerCase(),d=i.userAgent||"",o=i.appName||"";n.isWin=s=="win",n.isMac=s=="mac",n.isLinux=s=="linux",n.isIE=o=="Microsoft Internet Explorer"||o.indexOf("MSAppHost")>=0?parseFloat((d.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((d.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),n.isOldIE=n.isIE&&n.isIE<9,n.isGecko=n.isMozilla=d.match(/ Gecko\/\d+/),n.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",n.isWebKit=parseFloat(d.split("WebKit/")[1])||void 0,n.isChrome=parseFloat(d.split(" Chrome/")[1])||void 0,n.isSafari=parseFloat(d.split(" Safari/")[1])&&!n.isChrome||void 0,n.isEdge=parseFloat(d.split(" Edge/")[1])||void 0,n.isAIR=d.indexOf("AdobeAIR")>=0,n.isAndroid=d.indexOf("Android")>=0,n.isChromeOS=d.indexOf(" CrOS ")>=0,n.isIOS=/iPad|iPhone|iPod/.test(d)&&!window.MSStream,n.isIOS&&(n.isMac=!0),n.isMobile=n.isIOS||n.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(t,n,u){var i=t("./useragent"),s="http://www.w3.org/1999/xhtml";n.buildDom=function c(p,h,f){if(typeof p=="string"&&p){var g=document.createTextNode(p);return h&&h.appendChild(g),g}if(!Array.isArray(p))return p&&p.appendChild&&h&&h.appendChild(p),p;if(typeof p[0]!="string"||!p[0]){for(var v=[],b=0;b"u")){if(o){if(h)l();else if(h===!1)return o.push([c,p])}if(!d){var f=h;!h||!h.getRootNode?f=document:(f=h.getRootNode(),(!f||f==h)&&(f=document));var g=f.ownerDocument||f;if(p&&n.hasCssString(p,f))return null;p&&(c+=` -/*# sourceURL=ace/css/`+p+" */");var v=n.createElement("style");v.appendChild(g.createTextNode(c)),p&&(v.id=p),f==g&&(f=n.getDocumentHead(g)),f.insertBefore(v,f.firstChild)}}}if(n.importCssString=r,n.importCssStylsheet=function(c,p){n.buildDom(["link",{rel:"stylesheet",href:c}],n.getDocumentHead(p))},n.$fixPositionBug=function(c){var p=c.getBoundingClientRect();if(c.style.left){var h=parseFloat(c.style.left),f=+p.left;Math.abs(h-f)>1&&(c.style.left=2*h-f+"px")}if(c.style.right){var h=parseFloat(c.style.right),f=window.innerWidth-p.right;Math.abs(h-f)>1&&(c.style.right=2*h-f+"px")}if(c.style.top){var h=parseFloat(c.style.top),f=+p.top;Math.abs(h-f)>1&&(c.style.top=2*h-f+"px")}if(c.style.bottom){var h=parseFloat(c.style.bottom),f=window.innerHeight-p.bottom;Math.abs(h-f)>1&&(c.style.bottom=2*h-f+"px")}},n.scrollbarWidth=function(c){var p=n.createElement("ace_inner");p.style.width="100%",p.style.minWidth="0px",p.style.height="200px",p.style.display="block";var h=n.createElement("ace_outer"),f=h.style;f.position="absolute",f.left="-10000px",f.overflow="hidden",f.width="200px",f.minWidth="0px",f.height="150px",f.display="block",h.appendChild(p);var g=c&&c.documentElement||document&&document.documentElement;if(!g)return 0;g.appendChild(h);var v=p.offsetWidth;f.overflow="scroll";var b=p.offsetWidth;return v===b&&(b=h.clientWidth),g.removeChild(h),v-b},n.computedStyle=function(c,p){return window.getComputedStyle(c,"")||{}},n.setStyle=function(c,p,h){c[p]!==h&&(c[p]=h)},n.HAS_CSS_ANIMATION=!1,n.HAS_CSS_TRANSFORMS=!1,n.HI_DPI=i.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,i.isChromeOS&&(n.HI_DPI=!1),typeof document<"u"){var a=document.createElement("div");n.HI_DPI&&a.style.transform!==void 0&&(n.HAS_CSS_TRANSFORMS=!0),!i.isEdge&&typeof a.style.animationName<"u"&&(n.HAS_CSS_ANIMATION=!0),a=null}n.HAS_CSS_TRANSFORMS?n.translate=function(c,p,h){c.style.transform="translate("+Math.round(p)+"px, "+Math.round(h)+"px)"}:n.translate=function(c,p,h){c.style.top=Math.round(h)+"px",c.style.left=Math.round(p)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(t,n,u){var i=t("./dom");n.get=function(s,d){var o=new XMLHttpRequest;o.open("GET",s,!0),o.onreadystatechange=function(){o.readyState===4&&d(o.responseText)},o.send(null)},n.loadScript=function(s,d){var o=i.getDocumentHead(),l=document.createElement("script");l.src=s,o.appendChild(l),l.onload=l.onreadystatechange=function(r,a){(a||!l.readyState||l.readyState=="loaded"||l.readyState=="complete")&&(l=l.onload=l.onreadystatechange=null,a||d())}},n.qualifyURL=function(s){var d=document.createElement("a");return d.href=s,d.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(t,n,u){n.inherits=function(i,s){i.super_=s,i.prototype=Object.create(s.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}})},n.mixin=function(i,s){for(var d in s)i[d]=s[d];return i},n.implement=function(i,s){n.mixin(i,s)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(t,n,u){var i={},s=function(){this.propagationStopped=!0},d=function(){this.defaultPrevented=!0};i._emit=i._dispatchEvent=function(o,l){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var r=this._eventRegistry[o]||[],a=this._defaultHandlers[o];if(!(!r.length&&!a)){(typeof l!="object"||!l)&&(l={}),l.type||(l.type=o),l.stopPropagation||(l.stopPropagation=s),l.preventDefault||(l.preventDefault=d),r=r.slice();for(var c=0;c>>2]>>>24-A%4*8&255;D[w+A>>>2]|=T<<24-(w+A)%4*8}else for(var x=0;x>>2]=E[x>>>2];return this.sigBytes+=y,this},clamp:function(){var b=this.words,D=this.sigBytes;b[D>>>2]&=4294967295<<32-D%4*8,b.length=n.ceil(D/4)},clone:function(){var b=r.clone.call(this);return b.words=this.words.slice(0),b},random:function(b){for(var D=[],E=0;E>>2]>>>24-y%4*8&255;w.push((A>>>4).toString(16)),w.push((A&15).toString(16))}return w.join("")},parse:function(b){for(var D=b.length,E=[],w=0;w>>3]|=parseInt(b.substr(w,2),16)<<24-w%8*4;return new a.init(E,D/2)}},u=c.Latin1={stringify:function(b){for(var D=b.words,E=b.sigBytes,w=[],y=0;y>>2]>>>24-y%4*8&255;w.push(String.fromCharCode(A))}return w.join("")},parse:function(b){for(var D=b.length,E=[],w=0;w>>2]|=(b.charCodeAt(w)&255)<<24-w%4*8;return new a.init(E,D)}},f=c.Utf8={stringify:function(b){try{return decodeURIComponent(escape(u.stringify(b)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(b){return u.parse(unescape(encodeURIComponent(b)))}},g=l.BufferedBlockAlgorithm=r.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(b){typeof b=="string"&&(b=f.parse(b)),this._data.concat(b),this._nDataBytes+=b.sigBytes},_process:function(b){var D,E=this._data,w=E.words,y=E.sigBytes,A=this.blockSize,T=A*4,x=y/T;b?x=n.ceil(x):x=n.max((x|0)-this._minBufferSize,0);var M=x*A,O=n.min(M*4,y);if(M){for(var _=0;_>>24)&16711935|(D<<24|D>>>8)&4278255360}var E=this._hash.words,w=f[g+0],y=f[g+1],A=f[g+2],T=f[g+3],x=f[g+4],M=f[g+5],O=f[g+6],_=f[g+7],k=f[g+8],S=f[g+9],C=f[g+10],L=f[g+11],I=f[g+12],F=f[g+13],R=f[g+14],B=f[g+15],N=E[0],z=E[1],W=E[2],j=E[3];N=a(N,z,W,j,w,7,l[0]),j=a(j,N,z,W,y,12,l[1]),W=a(W,j,N,z,A,17,l[2]),z=a(z,W,j,N,T,22,l[3]),N=a(N,z,W,j,x,7,l[4]),j=a(j,N,z,W,M,12,l[5]),W=a(W,j,N,z,O,17,l[6]),z=a(z,W,j,N,_,22,l[7]),N=a(N,z,W,j,k,7,l[8]),j=a(j,N,z,W,S,12,l[9]),W=a(W,j,N,z,C,17,l[10]),z=a(z,W,j,N,L,22,l[11]),N=a(N,z,W,j,I,7,l[12]),j=a(j,N,z,W,F,12,l[13]),W=a(W,j,N,z,R,17,l[14]),z=a(z,W,j,N,B,22,l[15]),N=c(N,z,W,j,y,5,l[16]),j=c(j,N,z,W,O,9,l[17]),W=c(W,j,N,z,L,14,l[18]),z=c(z,W,j,N,w,20,l[19]),N=c(N,z,W,j,M,5,l[20]),j=c(j,N,z,W,C,9,l[21]),W=c(W,j,N,z,B,14,l[22]),z=c(z,W,j,N,x,20,l[23]),N=c(N,z,W,j,S,5,l[24]),j=c(j,N,z,W,R,9,l[25]),W=c(W,j,N,z,T,14,l[26]),z=c(z,W,j,N,k,20,l[27]),N=c(N,z,W,j,F,5,l[28]),j=c(j,N,z,W,A,9,l[29]),W=c(W,j,N,z,_,14,l[30]),z=c(z,W,j,N,I,20,l[31]),N=p(N,z,W,j,M,4,l[32]),j=p(j,N,z,W,k,11,l[33]),W=p(W,j,N,z,L,16,l[34]),z=p(z,W,j,N,R,23,l[35]),N=p(N,z,W,j,y,4,l[36]),j=p(j,N,z,W,x,11,l[37]),W=p(W,j,N,z,_,16,l[38]),z=p(z,W,j,N,C,23,l[39]),N=p(N,z,W,j,F,4,l[40]),j=p(j,N,z,W,w,11,l[41]),W=p(W,j,N,z,T,16,l[42]),z=p(z,W,j,N,O,23,l[43]),N=p(N,z,W,j,S,4,l[44]),j=p(j,N,z,W,I,11,l[45]),W=p(W,j,N,z,B,16,l[46]),z=p(z,W,j,N,A,23,l[47]),N=u(N,z,W,j,w,6,l[48]),j=u(j,N,z,W,_,10,l[49]),W=u(W,j,N,z,R,15,l[50]),z=u(z,W,j,N,M,21,l[51]),N=u(N,z,W,j,I,6,l[52]),j=u(j,N,z,W,T,10,l[53]),W=u(W,j,N,z,C,15,l[54]),z=u(z,W,j,N,y,21,l[55]),N=u(N,z,W,j,k,6,l[56]),j=u(j,N,z,W,B,10,l[57]),W=u(W,j,N,z,O,15,l[58]),z=u(z,W,j,N,F,21,l[59]),N=u(N,z,W,j,x,6,l[60]),j=u(j,N,z,W,L,10,l[61]),W=u(W,j,N,z,A,15,l[62]),z=u(z,W,j,N,S,21,l[63]),E[0]=E[0]+N|0,E[1]=E[1]+z|0,E[2]=E[2]+W|0,E[3]=E[3]+j|0},_doFinalize:function(){var f=this._data,g=f.words,v=this._nDataBytes*8,b=f.sigBytes*8;g[b>>>5]|=128<<24-b%32;var D=n.floor(v/4294967296),E=v;g[(b+64>>>9<<4)+15]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360,g[(b+64>>>9<<4)+14]=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,f.sigBytes=(g.length+1)*4,this._process();for(var w=this._hash,y=w.words,A=0;A<4;A++){var T=y[A];y[A]=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360}return w},clone:function(){var f=d.clone.call(this);return f._hash=this._hash.clone(),f}});function a(f,g,v,b,D,E,w){var y=f+(g&v|~g&b)+D+w;return(y<>>32-E)+g}function c(f,g,v,b,D,E,w){var y=f+(g&b|v&~b)+D+w;return(y<>>32-E)+g}function p(f,g,v,b,D,E,w){var y=f+(g^v^b)+D+w;return(y<>>32-E)+g}function u(f,g,v,b,D,E,w){var y=f+(v^(g|~b))+D+w;return(y<>>32-E)+g}h.MD5=d._createHelper(r),h.HmacMD5=d._createHmacHelper(r)})(Math),t.MD5})})(Xs);var wh=Xs.exports;const jr=ql(wh),Ch=window.innerWidth<=600?12:void 0;function pi(m){return Object.prototype.toString.call(m)==="[object Object]"}class V extends xo{static DIFFERENT_VALUE="__different__";static DIFFERENT_LABEL="ra___different__";static NONE_VALUE="";static NONE_LABEL="ra_none";defaultValue;isError;lang;defaultSendToDone;sendToTimeout;noPlaceRequired;reportedHidden=!1;calculateTimeout=null;AsyncFunction;constructor(e){super(e),this.AsyncFunction=Object.getPrototypeOf(async function(){}).constructor,this.state={confirmDialog:!1,confirmNewValue:null,confirmAttr:null,confirmData:null,confirmCallback:null},this.isError={},this.lang=P.I18n.getLanguage(),e.schema&&(e.custom?e.schema.defaultFunc||(this.defaultValue=e.schema.default):e.schema.type!=="state"&&!e.schema.defaultFunc&&(this.defaultValue=e.schema.default))}async getCachedObject(e){return this.props.oContext.getCachedObject?this.props.oContext.getCachedObject(e):await this.props.oContext.socket.getObject(e)||null}async componentDidMount(){var t,n,h;(t=this.props.schema)!=null&&t.defaultFunc&&(this.props.custom?this.defaultValue=await this.executeCustom(this.props.schema.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):this.props.schema.type!=="state"&&(this.defaultValue=await this.execute(this.props.schema.defaultFunc,this.props.schema.default,this.props.data,this.props.arrayIndex,this.props.globalData))),(h=(n=this.props.oContext).registerOnForceUpdate)==null||h.call(n,this.props.attr,this.onUpdate);const e=["select","autocomplete","autocompleteSendTo"];if(this.defaultValue!==void 0){const i=V.getValue(this.props.data,this.props.attr);(i===void 0||e.includes(this.props.schema.type)&&(i===""||i===null))&&setTimeout(()=>{this.props.custom?this.props.onChange(this.props.attr,this.defaultValue,()=>setTimeout(()=>this.props.oContext.forceUpdate([this.props.attr],this.props.data),100)):(V.setValue(this.props.data,this.props.attr,this.defaultValue),this.props.onChange(this.props.data,void 0,()=>this.props.oContext.forceUpdate([this.props.attr],this.props.data)))},100)}else this.props.schema.defaultSendTo&&this.sendTo().catch(i=>console.error(i))}async sendTo(){if(this.props.alive){this.defaultSendToDone=!0;let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){const n=await this.getPatternAsync(this.props.schema.jsonData,null,!0);try{e=JSON.parse(n)}catch{console.error(`Cannot parse json data: ${n}`)}}else e={attr:this.props.attr,value:V.getValue(this.props.data,this.props.attr)};e===void 0&&(e=null);const t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){const n=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(n!=null&&n.val)){window.alert(P.I18n.t("ra_Instance %s is not alive",t));return}}this.props.oContext.socket.sendTo(t,this.props.schema.defaultSendTo,e).then(n=>{n!=null&&(this.props.custom?this.props.onChange(this.props.attr,n,()=>this.props.oContext.forceUpdate([this.props.attr],this.props.data)):(V.setValue(this.props.data,this.props.attr,n),this.props.onChange(this.props.data,void 0,()=>this.props.oContext.forceUpdate([this.props.attr],this.props.data))))})}else this.defaultSendToDone=!1,this.props.schema.allowSaveWithError||this.onError(this.props.attr,P.I18n.t("ra_Instance %s is not alive",this.props.oContext.instance.toString()))}componentWillUnmount(){this.props.oContext.registerOnForceUpdate&&this.props.oContext.registerOnForceUpdate(this.props.attr),this.sendToTimeout&&(clearTimeout(this.sendToTimeout),this.sendToTimeout=null),this.calculateTimeout&&(clearTimeout(this.calculateTimeout),this.calculateTimeout=null)}onUpdate=e=>{const t=V.getValue(e||this.props.data,this.props.attr)||"";this.state.value!==t?this.setState({value:t}):this.forceUpdate()};static getValue(e,t){if(typeof t=="string")return V.getValue(e,t.split("."));if(t.length===1)return e[t[0]];const n=t.shift();if(typeof n=="string"&&typeof e[n]=="object")return V.getValue(e[n],t)}static setValue(e,t,n){if(typeof t=="string"){V.setValue(e,t.split("."),n);return}if(t.length===1)n===null?delete e[t[0]]:e[t[0]]=n;else{const h=t.shift();if(typeof h!="string")return;(!e[h]||typeof e[h]=="object")&&(e[h]=e[h]||{}),V.setValue(e[h],t,n)}}getText(e,t){if(!e)return"";if(typeof e=="string"){const n=t?e:P.I18n.t(e);return n.includes("${")?this.getPattern(n,null,t):n}return pi(e)?e.func?typeof e.func=="object"?this.getPattern(e.func[this.lang]||e.func.en||"",null,!0):this.getPattern(e.func,null,t):e[this.lang]||e.en||"":e.toString()}async getTextAsync(e,t){if(!e)return"";if(typeof e=="string"){const n=t?e:P.I18n.t(e);return n.includes("${")?this.getPatternAsync(n,null,t):n}return pi(e)?e.func?typeof e.func=="object"?this.getPatternAsync(e.func[this.lang]||e.func.en||"",null,!0):this.getPatternAsync(e.func,null,t):e[this.lang]||e.en||"":e.toString()}renderDialogConfirm(){if(!this.state.confirmDialog)return null;const e=this.state.confirmData||this.props.schema.confirm;let t=null;return e.type==="warning"?t=$.createElement(zn,null):e.type==="error"?t=$.createElement(Jt,null):e.type==="info"&&(t=$.createElement(Mi,null)),$.createElement(P.DialogConfirm,{title:this.getText(e.title)||P.I18n.t("ra_Please confirm"),text:this.getText(e.text),ok:this.getText(e.ok)||P.I18n.t("ra_Ok"),cancel:this.getText(e.cancel)||P.I18n.t("ra_Cancel"),icon:t||void 0,onClose:n=>this.setState({confirmDialog:!1},()=>{if(n){if(this.state.confirmCallback){const i=this.state.confirmCallback;this.setState({confirmCallback:null},()=>i(!0));return}const h=JSON.parse(JSON.stringify(this.props.data));this.state.confirmDepAttr&&V.setValue(h,this.state.confirmDepAttr,this.state.confirmDepNewValue),V.setValue(h,this.state.confirmAttr,this.state.confirmNewValue),this.setState({confirmDialog:!1,confirmDepAttr:null,confirmDepNewValue:null,confirmNewValue:null,confirmAttr:null,confirmData:null},()=>this.props.onChange(h))}else{const h=this.state.confirmCallback;this.setState({confirmDialog:!1,confirmDepAttr:null,confirmDepNewValue:null,confirmNewValue:null,confirmAttr:null,confirmData:null,confirmCallback:null},()=>{h&&h(!1)})}})})}getIcon(e){e=e||this.props.schema.icon;let t=null;return e==="auth"?t=$.createElement(mc,null):e==="send"?t=$.createElement(Io,null):e==="web"?t=$.createElement(vc,null):e==="warning"?t=$.createElement(zn,null):e==="error"?t=$.createElement(Jt,null):e==="info"?t=$.createElement(Mi,null):e==="search"?t=$.createElement(Oo,null):e==="book"?t=$.createElement(yc,null):e==="help"?t=$.createElement(bc,null):e==="upload"?t=$.createElement(Vn,null):e==="edit"?t=$.createElement(Fo,null):e==="user"?t=$.createElement(Ro,null):e==="group"?t=$.createElement(No,null):e==="delete"?t=$.createElement(_t,null):e==="refresh"?t=$.createElement(Ks,null):e==="add"?t=$.createElement(Un,null):e==="unpair"?t=$.createElement(Bo,null):e==="pair"?t=$.createElement(Po,null):e==="save"?t=$.createElement(wc,null):e==="open"?t=$.createElement(Cc,null):e&&((e.endsWith(".png")||e.endsWith(".svg")||e.endsWith(".jpg"))&&!e.startsWith("http://")&&!e.startsWith("https://")&&(e=`${this.props.oContext.imagePrefix}/adapter/${this.props.oContext.adapterName}/${e}`),t=$.createElement(P.Icon,{src:e,style:{width:22,height:22}})),t}onChangeAsync(e,t){return new Promise(n=>{const h=this.onChange(e,t,n);h instanceof Promise&&h.catch(i=>console.error(`Cannot set value: ${i}`))})}async onChange(e,t,n){const h=JSON.parse(JSON.stringify(this.props.data));if(V.setValue(h,e,t),this.props.schema.confirm&&await this.execute(this.props.schema.confirm.condition,!1,h,this.props.arrayIndex,this.props.globalData))return new Promise(s=>{this.setState({confirmDialog:!0,confirmNewValue:t,confirmAttr:e,confirmData:null},()=>{typeof n=="function"?n():s()})});if(this.props.schema.confirmDependsOn)for(let s=0;s{this.setState({confirmDialog:!0,confirmNewValue:t,confirmAttr:e,confirmDepNewValue:o,confirmDepAttr:d.attr,confirmData:d.confirm},()=>{typeof n=="function"?n():l()})})}}const i=[];if(this.props.schema.onChangeDependsOn)for(let s=0;sn&&n()),i!=null&&i.length&&i.forEach((s,d)=>setTimeout(()=>this.props.onChange(s,V.getValue(h,s)),d*50))):this.props.onChange(h,void 0,()=>{i.length&&this.props.oContext.forceUpdate(i,h),n==null||n()}),Promise.resolve()}static ensureAwaitGetObject(e){return e.replace(/(?{const h=e.slice(Math.max(0,n-10),n);return/await\s+$/.test(h)?t:`await ${t}`})}async execute(e,t,n,h,i){let s;if(pi(e))s=e.func;else if(typeof e=="string")s=e;else return e;if(!s)return t;s.includes("getObject(")&&(s=V.ensureAwaitGetObject(s));try{return await new this.AsyncFunction("data","originalData","_system","_alive","_common","_socket","_instance","arrayIndex","globalData","_changed","_href","getObject",s.includes("return")?s:`return ${s}`)(n||this.props.data,this.props.originalData,this.props.oContext.systemConfig,this.props.alive,this.props.common,this.props.oContext.socket,this.props.oContext.instance,h,i,this.props.changed,window.location.href,this.getObject)}catch(d){return console.error(`Cannot execute ${JSON.stringify(e)}: ${d}`),t}}async executeCustom(e,t,n,h,i,s){let d;if(pi(e))d=e.func;else if(typeof e=="string")d=e;else return e;if(!d)return null;d.includes("getObject(")&&(d=V.ensureAwaitGetObject(d));try{return await new this.AsyncFunction("data","originalData","_system","instanceObj","customObj","_socket","arrayIndex","globalData","_changed","_href","getObject",d.includes("return")?d:`return ${d}`)(t||this.props.data,this.props.originalData,this.props.oContext.systemConfig,h,n,this.props.oContext.socket,i,s,this.props.changed,window.location.href,this.getObject)}catch(o){return console.error(`Cannot execute ${d}: ${o}`),null}}async calculate(e){let t,n,h,i;return this.props.custom?(t=e.validator?!await this.executeCustom(e.validator,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):!1,e.disabled===!0?n=!0:n=e.disabled?await this.executeCustom(e.disabled,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):!1,e.hidden===!0?h=!0:h=e.hidden?await this.executeCustom(e.hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):!1,i=e.defaultFunc?await this.executeCustom(e.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):e.default):(t=e.validator?!await this.execute(e.validator,!1,this.props.data,this.props.arrayIndex,this.props.globalData):!1,e.disabled===!0?n=!0:n=e.disabled?await this.execute(e.disabled,!1,this.props.data,this.props.arrayIndex,this.props.globalData):!1,e.hidden===!0?h=!0:h=e.hidden?await this.execute(e.hidden,!1,this.props.data,this.props.arrayIndex,this.props.globalData):!1,i=e.defaultFunc?await this.execute(e.defaultFunc,e.default,this.props.data,this.props.arrayIndex,this.props.globalData):e.default),{error:t,disabled:n,hidden:h,defaultValue:i}}onError(e,t){t?this.isError[e]=t:delete this.isError[e],this.props.onError&&this.props.onError(e,t)}renderItem(e,t,n){return this.getText(this.props.schema.label)||this.getText(this.props.schema.text)}renderHelp(e,t,n){return t?$.createElement("a",{href:t,target:"_blank",rel:"noreferrer",style:{color:this.props.oContext.themeType==="dark"?"#a147ff":"#5b238f",textDecoration:"underline"}},this.getText(e,n)):(e=this.getText(e,n)||"",e&&(e.includes("")||e.includes(""))?P.Utils.renderTextWithA(e):e)}async renderHelpAsync(e,t,n){return t?$.createElement("a",{href:t,target:"_blank",rel:"noreferrer",style:{color:this.props.oContext.themeType==="dark"?"#a147ff":"#5b238f",textDecoration:"underline"}},await this.getTextAsync(e,n)):(e=await this.getTextAsync(e,n)||"",e&&(e.includes("")||e.includes(""))?P.Utils.renderTextWithA(e):e)}static escapeString(e,t){return typeof e!="string"?"":(e=e.replace(/`/g,"\\`"),e=e.replace(/\${([^}]+)}/g,(n,h)=>{if(h&&typeof h=="string"&&h.startsWith("data.")){const i=V.getValue(t,h.replace(/^data\./,""));if(typeof i=="string"&&(i.includes("\\")||i.includes('"')))return`\${${h}.replace(/\\\\/g, '\\\\\\\\').replace(/"/g, '\\\\"')}`}return n}),e)}getObject=async e=>{try{return await this.props.oContext.getCachedObject(e)||null}catch(t){return console.error(t),null}};async getPatternAsync(e,t,n){if(t||=this.props.data,!e)return"";let h;typeof e=="object"?e.func?h=e.func:(console.log(`Object must be stringified: ${JSON.stringify(e)}`),h=JSON.stringify(e)):h=e,h.includes("getObject(")&&(h=V.ensureAwaitGetObject(h));try{if(this.props.custom){const o=await new this.AsyncFunction("data","originalData","arrayIndex","globalData","_system","instanceObj","customObj","_socket","_changed","_href","getObject",`return \`${V.escapeString(h,t)}\``)(t,this.props.originalData,this.props.arrayIndex,this.props.globalData,this.props.oContext.systemConfig,this.props.oContext.instanceObj,this.props.customObj,this.props.oContext.socket,this.props.changed,window.location.href,this.getObject);return n?o:P.I18n.t(o)}const s=await new this.AsyncFunction("data","originalData","arrayIndex","globalData","_system","_alive","_common","_socket","_changed","_href","getObject",`return \`${V.escapeString(h,t)}\``)(t,this.props.originalData,this.props.arrayIndex,this.props.globalData,this.props.oContext.systemConfig,this.props.alive,this.props.common,this.props.oContext.socket,this.props.changed,window.location.href,this.getObject);return n?s:P.I18n.t(s)}catch(i){return console.error(`Cannot execute ${h}: ${i}`),h}}getPattern(e,t,n){if(t||=this.props.data,!e)return"";let h;typeof e=="object"?e.func?h=e.func:(console.log(`Object must be stringified: ${JSON.stringify(e)}`),h=JSON.stringify(e)):h=e,h.includes("getObject(")&&console.warn(`It is not possible to use getObject function in text patterns: ${h}`);try{if(this.props.custom){const o=new Function("data","originalData","arrayIndex","globalData","_system","instanceObj","customObj","_socket","_changed","_href",`return \`${V.escapeString(h,t)}\``)(t,this.props.originalData,this.props.arrayIndex,this.props.globalData,this.props.oContext.systemConfig,this.props.oContext.instanceObj,this.props.customObj,this.props.oContext.socket,this.props.changed,window.location.href,this.getObject);return n?o:P.I18n.t(o)}const s=new Function("data","originalData","arrayIndex","globalData","_system","_alive","_common","_socket","_changed","_href",`return \`${V.escapeString(h,t)}\``)(t,this.props.originalData,this.props.arrayIndex,this.props.globalData,this.props.oContext.systemConfig,this.props.alive,this.props.common,this.props.oContext.socket,this.props.changed,window.location.href);return n?s:P.I18n.t(s)}catch(i){return console.error(`Cannot execute ${h}: ${i}`),h}}updateCalculatedValues(){this.calculateTimeout&&clearTimeout(this.calculateTimeout),this.calculateTimeout=setTimeout(async()=>{this.calculateTimeout=null;const e=this.props.schema;if(!e)return null;const{error:t,disabled:n,hidden:h,defaultValue:i}=await this.calculate(e);(!this.state.calculatedValues||this.state.calculatedValues.error!==t||this.state.calculatedValues.disabled!==n||this.state.calculatedValues.hidden!==h||this.state.calculatedValues.defaultValue!==i)&&this.setState({calculatedValues:{error:t,disabled:n,hidden:h,defaultValue:i}})},50)}render(){const e=this.props.schema;if(!e||this.props.expertMode===!1&&e.expertMode||(this.props.alive&&this.defaultSendToDone===!1&&(this.sendToTimeout=setTimeout(async()=>{this.sendToTimeout=null,await this.sendTo()},200)),this.updateCalculatedValues(),!this.state.calculatedValues))return null;if(this.state.calculatedValues.hidden){if(Object.keys(this.isError).length&&(setTimeout(h=>Object.keys(h).forEach(i=>this.props.onError(i)),100,JSON.parse(JSON.stringify(this.isError))),this.isError={}),e.hideOnlyControl){const h=$.createElement(ze,{size:{xs:e.xs||Ch,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0},style:{marginBottom:0,textAlign:"left",...e.style,...this.props.oContext.themeType==="dark"?e.darkStyle:{}}});return e.newLine?$.createElement($.Fragment,null,$.createElement("div",{style:{flexBasis:"100%",height:0}}),h):h}return this.props.onHiddenChanged&&!this.reportedHidden&&(this.reportedHidden=!0,setTimeout(()=>this.props.onHiddenChanged(this.props.attr,!0),10)),null}this.props.onHiddenChanged&&this.reportedHidden&&(this.reportedHidden=!1,setTimeout(()=>this.props.onHiddenChanged(this.props.attr,!1),10)),e.validatorNoSaveOnError&&(this.state.calculatedValues.error&&!Object.keys(this.isError).length?(this.isError={[this.props.attr]:e.validatorErrorText?P.I18n.t(e.validatorErrorText):!0},setTimeout(h=>Object.keys(h).forEach(i=>this.props.onError(i,h[i])),100,JSON.parse(JSON.stringify(this.isError)))):!this.state.calculatedValues.error&&Object.keys(this.isError).length&&(setTimeout(h=>Object.keys(h).forEach(i=>this.props.onError(i)),100,JSON.parse(JSON.stringify(this.isError))),this.isError={}));const t=this.renderItem(this.state.calculatedValues.error,this.state.calculatedValues.disabled||this.props.commandRunning||this.props.disabled,this.state.calculatedValues.defaultValue);if(this.noPlaceRequired)return t;const n=$.createElement(ze,{title:this.getText(e.tooltip),size:{xs:e.xs||12,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0},style:{marginBottom:0,textAlign:"left",width:e.type==="divider"||e.type==="header"?e.width||"100%":void 0,...e.style,...this.props.oContext.themeType==="dark"?e.darkStyle:{}}},this.props.schema.defaultSendTo&&this.props.schema.button?$.createElement(ze,{container:!0,style:{width:"100%"}},$.createElement(ze,{flex:1},t),$.createElement(ze,null,$.createElement(ve,{disabled:this.state.calculatedValues.disabled,variant:"outlined",onClick:()=>this.sendTo(),title:this.props.schema.buttonTooltip?this.getText(this.props.schema.buttonTooltip,this.props.schema.buttonTooltipNoTranslation):P.I18n.t("ra_Request data by instance")},this.getText(this.props.schema.button)))):t);return e.newLine?$.createElement($.Fragment,null,$.createElement("div",{style:{flexBasis:"100%",height:0}}),this.renderDialogConfirm(),n):this.state.confirmDialog?$.createElement($.Fragment,null,this.renderDialogConfirm(),n):n}}const tt={fullWidth:{width:"100%"},accordionSummary:m=>({backgroundColor:m.palette.mode==="dark"?"rgba(255, 255, 255, 0.08)":"rgba(0, 0, 0, 0.08)"}),accordionTitle:{},toolbar:m=>({backgroundColor:m.palette.mode==="dark"?"rgba(255, 255, 255, 0.08)":"rgba(0, 0, 0, 0.08)",borderRadius:"3px"}),tooltip:{pointerEvents:"none"}};class Sh extends V{typingTimer=null;constructor(e){super(e),this.props.schema.items||=[]}async componentDidMount(){await super.componentDidMount();let e=V.getValue(this.props.data,this.props.attr)||[];Array.isArray(e)||(e=[]),this.setState({value:e,activeIndex:-1,iteration:0,accordionErrors:{}})}componentWillUnmount(){this.typingTimer&&(clearTimeout(this.typingTimer),this.typingTimer=null),super.componentWillUnmount()}onAccordionError=e=>(t,n)=>{const h={...this.state.accordionErrors};h[e]||(h[e]={}),n?h[e][t]=n:(delete h[e][t],Object.keys(h[e]).length===0&&delete h[e]),this.setState({accordionErrors:h}),this.props.onError(t,n)};hasAccordionErrors=e=>!!(this.state.accordionErrors[e]&&Object.keys(this.state.accordionErrors[e]).length>0);itemAccordion(e,t){const{value:n}=this.state,{schema:h}=this.props,i={type:"panel",items:h.items.reduce((s,d)=>(s[d.attr]=d,s),{}),style:{marginLeft:"-8px",marginTop:"10px",marginBottom:"10px"}};return $.createElement(tn,{oContext:this.props.oContext,index:t+this.state.iteration,arrayIndex:t,changed:this.props.changed,expertMode:this.props.expertMode,globalData:this.props.data,common:this.props.common,alive:this.props.alive,themeName:this.props.themeName,data:e,custom:!0,schema:i,originalData:this.props.originalData,onChange:(s,d)=>{const o=JSON.parse(JSON.stringify(n));o[t][s]=d,this.setState({value:o},()=>this.onChangeWrapper(o))},onError:this.onAccordionError(t),onHiddenChanged:this.props.onHiddenChanged,table:this.props.table,customComponents:this.props.customComponents})}onDelete=e=>()=>{const t=JSON.parse(JSON.stringify(this.state.value));t.splice(e,1),this.setState({value:t,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(t))};onClone=e=>()=>{const t=JSON.parse(JSON.stringify(this.state.value)),n=JSON.parse(JSON.stringify(t[e]));if(typeof this.props.schema.clone=="string"&&typeof n[this.props.schema.clone]=="string"){let h=1,i=n[this.props.schema.clone];const s=i.match(/(\d+)$/);for(s?(i=i.replace(s[0],""),h=parseInt(s[0],10)+1):i+="_";t.find(d=>d[this.props.schema.clone]===i+h.toString());)h++;n[this.props.schema.clone]=`${n[this.props.schema.clone]}_${h}`}t.splice(e,0,n),this.setState({value:t,activeIndex:-1,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(t))};onChangeWrapper=e=>{this.typingTimer&&clearTimeout(this.typingTimer),this.typingTimer=setTimeout(t=>{this.typingTimer=null;const n=this.onChange(this.props.attr,t);n instanceof Promise&&n.catch(h=>this.onError(h))},300,e)};onAdd=async()=>{const{schema:e}=this.props,t=JSON.parse(JSON.stringify(this.state.value)),n={};if(e.items)for(const h of e.items){let i;h.defaultFunc?this.props.custom?i=h.defaultFunc?await this.executeCustom(h.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,t.length,this.props.data):this.props.schema.default:i=h.defaultFunc?await this.execute(h.defaultFunc,this.props.schema.default,this.props.data,t.length,this.props.data):this.props.schema.default:i=h.default??null,n[h.attr]=i}t.push(n),this.setState({value:t,activeIndex:t.length-1},()=>this.onChangeWrapper(t))};onMoveUp(e){const t=JSON.parse(JSON.stringify(this.state.value)),n=t[e];t.splice(e,1),t.splice(e-1,0,n);const h=this.state.activeIndex-1;this.setState({value:t,activeIndex:h,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(t))}onMoveDown(e){const t=JSON.parse(JSON.stringify(this.state.value)),n=t[e];t.splice(e,1),t.splice(e+1,0,n);const h=this.state.activeIndex+1;this.setState({value:t,activeIndex:h,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(t))}onExport=()=>{const{value:e}=this.state,t=JSON.stringify(e,null,2),n=`data:application/json;charset=utf-8,${encodeURIComponent(t)}`,h=`config_section_${new Date().toISOString().slice(0,19).replace(/:/g,"-")}.json`,i=document.createElement("a");i.setAttribute("href",n),i.setAttribute("download",h),i.click()};onImport=e=>{const t=document.createElement("input");t.type="file",t.accept=".json",t.onchange=n=>{var s;const h=(s=n.target.files)==null?void 0:s[0];if(!h)return;const i=new FileReader;i.onload=d=>{var o;try{const l=JSON.parse((o=d.target)==null?void 0:o.result);if(!Array.isArray(l)){alert(P.I18n.t("ra_Invalid JSON format. Expected an array."));return}let r;e?r=l:r=[...this.state.value,...l],this.setState({value:r,activeIndex:-1},()=>this.onChangeWrapper(r))}catch{alert(P.I18n.t("ra_Invalid JSON file."))}},i.readAsText(h)},t.click()};renderItem(){const{schema:e}=this.props,{value:t}=this.state;return t?$.createElement(In,null,e.label||!e.noDelete?$.createElement(Pn,{variant:"dense"},e.label?$.createElement(yt,{variant:"h6",id:"tableTitle",component:"div"},this.getText(e.label)):null,e.noDelete?null:$.createElement($.Fragment,null,$.createElement(me,{title:P.I18n.t("ra_Export configuration section")},$.createElement(se,{size:"small",color:"primary",onClick:this.onExport},$.createElement(Sc,null))),$.createElement(me,{title:P.I18n.t("ra_Import and replace configuration section")},$.createElement(se,{size:"small",color:"primary",onClick:()=>this.onImport(!0)},$.createElement(Ec,null))),$.createElement(me,{title:P.I18n.t("ra_Import and add configuration section")},$.createElement(se,{size:"small",color:"primary",onClick:()=>this.onImport(!1)},$.createElement(Ac,null))),$.createElement(se,{size:"small",color:"primary",onClick:this.onAdd},$.createElement(Un,null)))):null,t.map((n,h)=>$.createElement(js,{key:`${n}_${h}`,expanded:this.state.activeIndex===h,onChange:(i,s)=>this.setState({activeIndex:s?h:-1})},$.createElement(Hs,{expandIcon:$.createElement(Ii,null),sx:P.Utils.getStyle(this.props.oContext.theme,tt.fullWidth,tt.accordionSummary)},$.createElement(Ie,{sx:{display:"flex",alignItems:"center",gap:1,width:"100%"}},$.createElement(yt,{style:tt.accordionTitle},n[e.titleAttr]),this.hasAccordionErrors(h)&&$.createElement(Jt,{sx:{fontSize:20,color:"error.main"}}))),$.createElement(zs,{style:{...e.style,...this.props.oContext.themeType?e.darkStyle:void 0}},this.itemAccordion(t[h],h),$.createElement(Pn,{sx:tt.toolbar},h?$.createElement(me,{title:P.I18n.t("ra_Move up"),slotProps:{popper:{sx:tt.tooltip}}},$.createElement(se,{size:"small",onClick:()=>this.onMoveUp(h)},$.createElement(Ai,null))):$.createElement("div",{style:tt.buttonEmpty}),hthis.onMoveDown(h)},$.createElement(Di,null))):$.createElement("div",{style:tt.buttonEmpty}),e.noDelete?null:$.createElement(me,{title:P.I18n.t("ra_Delete current row"),slotProps:{popper:{sx:tt.tooltip}}},$.createElement(se,{size:"small",onClick:this.onDelete(h)},$.createElement(_t,null))),e.clone?$.createElement(me,{title:P.I18n.t("ra_Clone current row"),slotProps:{popper:{sx:tt.tooltip}}},$.createElement(se,{size:"small",onClick:this.onClone(h)},$.createElement(fn,null))):null)))),!e.noDelete&&t.length>0?$.createElement(Pn,{variant:"dense",sx:tt.rootTool},$.createElement(se,{size:"small",color:"primary",onClick:this.onAdd},$.createElement(Un,null))):null,e.help?$.createElement(ge,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null):null}}const Hr={root:{width:"100%"},notAlive:{color:"#a30000"}};class Eh extends V{aliveId=null;checkTimeout=null;async componentDidMount(){await super.componentDidMount();const e=await this.getInstance();this.aliveId=`${e}.alive`;const t=await this.props.oContext.socket.getState(this.aliveId);this.setState({alive:!!(t&&t.val),instance:e},async()=>{await this.props.oContext.socket.subscribeState(this.aliveId,this.onAliveChanged)})}componentWillUnmount(){this.checkTimeout&&(clearTimeout(this.checkTimeout),this.checkTimeout=null),this.props.oContext.socket.unsubscribeState(this.aliveId,this.onAliveChanged)}onAliveChanged=(e,t)=>{e===this.aliveId&&this.state.alive!==!!(t!=null&&t.val)&&this.setState({alive:!!(t!=null&&t.val)})};async getInstance(){let e=this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`;return e.includes("${")&&(e=await this.getPatternAsync(e,null,!0)),e&&!e.startsWith("system.adapter.")&&(e=`system.adapter.${e}`),e}checkIfInstanceChanged(){this.checkTimeout&&clearTimeout(this.checkTimeout),this.checkTimeout=setTimeout(async()=>{this.checkTimeout=null;const e=await this.getInstance();e!==this.state.instance&&(e?this.props.oContext.socket.getState(`${e}.alive`).then(t=>this.setState({alive:!!(t&&t.val),instance:e})):this.setState({alive:null,instance:e}))},200)}renderItem(){if(this.checkIfInstanceChanged(),this.state.alive!==!1&&this.state.alive!==!0)return null;const e=this.state.instance.replace(/^system\.adapter\./,"");return $.createElement("div",{style:{...Hr.root,...this.state.alive?void 0:Hr.notAlive}},this.state.alive?this.props.schema.textAlive!==void 0?this.props.schema.textAlive?P.I18n.t(this.props.schema.textAlive,e):"":P.I18n.t("ra_Instance %s is alive",e):this.props.schema.textNotAlive!==void 0?this.props.schema.textNotAlive?P.I18n.t(this.props.schema.textNotAlive,e):"":P.I18n.t("ra_Instance %s is not alive",e))}}class Ah extends V{async componentDidMount(){await super.componentDidMount();const e=V.getValue(this.props.data,this.props.attr),t=this.props.schema.options.map(n=>typeof n=="string"?{label:n,value:n}:JSON.parse(JSON.stringify(n)));if(this.props.onFilterLabelUpdate&&this.props.table){const n={};for(const h of t)h.value!==V.DIFFERENT_VALUE&&(n[h.value]=h.label);this.props.onFilterLabelUpdate(this.props.attr,n)}Array.isArray(e)?(t.unshift({label:P.I18n.t(V.DIFFERENT_LABEL),value:V.DIFFERENT_VALUE}),this.setState({value:V.DIFFERENT_VALUE,selectOptions:t})):this.setState({value:e,selectOptions:t})}renderItem(e,t){if(!this.state.selectOptions)return null;let n;const h=JSON.parse(JSON.stringify(this.state.selectOptions));return Array.isArray(this.state.value)||this.state.value===V.DIFFERENT_VALUE?([...this.state.value].filter(s=>!h.find(d=>typeof d=="object"?d.value===s:d===s)).forEach(s=>h.push({label:s.toString(),value:s})),n={label:P.I18n.t(V.DIFFERENT_LABEL),value:V.DIFFERENT_VALUE},h.unshift(n)):(n=this.state.value!==null&&this.state.value!==void 0&&h.find(s=>typeof s=="object"?s.value==this.state.value:s==this.state.value),this.state.value!==null&&this.state.value!==void 0&&!n&&this.props.schema.freeSolo&&(n={value:this.state.value,label:this.state.value},h.push(n))),$.createElement(Wi,{fullWidth:!0,freeSolo:!!this.props.schema.freeSolo,value:n,options:h,isOptionEqualToValue:(s,d)=>s.value===d.value,filterOptions:(s,d)=>{const o=s.filter(l=>d.inputValue===""?!0:l.label.toLowerCase().includes(d.inputValue.toLowerCase())||l.value.toLowerCase().includes(d.inputValue.toLowerCase()));return this.props.schema.freeSolo&&d.inputValue!==""&&o.push({label:d.inputValue,value:d.inputValue}),o},onInputChange:s=>{if(!s||!this.props.schema.freeSolo)return;const d=s.target.value;d!==this.state.value&&this.setState({value:d},()=>this.onChange(this.props.attr,d))},onChange:(s,d)=>{const o=typeof d=="object"?d?d.value:"":d;o!==this.state.value&&this.setState({value:o},()=>this.onChange(this.props.attr,o))},getOptionLabel:s=>typeof s=="object"?(s==null?void 0:s.label)??"":"",renderInput:s=>$.createElement(pe,{variant:"standard",...s,error:!!e,placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),disabled:t})})}}class Dh extends V{initialized=!1;localContext;async askInstance(){const e=V.getValue(this.props.data,this.props.attr),t=this.props.schema.options?this.props.schema.options.map(n=>typeof n=="string"?{label:n,value:n}:JSON.parse(JSON.stringify(n))):[];if(this.props.alive){let n=this.props.schema.data;if(n===void 0&&this.props.schema.jsonData){const i=await this.getPatternAsync(this.props.schema.jsonData,null,!0);try{typeof i=="string"&&(n=JSON.parse(i))}catch{console.error(`Cannot parse json data: ${JSON.stringify(n)}`)}}n===void 0&&(n=null),this.setState({loading:!0});const h=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(h!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){const i=await this.props.oContext.socket.getState(`system.adapter.${h}.alive`);if(!(i!=null&&i.val)){window.alert(P.I18n.t("ra_Instance %s is not alive",h));return}}this.props.oContext.socket.sendTo(h,this.props.schema.command||"send",n).then(i=>{i&&Array.isArray(i)&&i.forEach(s=>t.push(typeof s=="string"?{label:s,value:s}:JSON.parse(JSON.stringify(s)))),this.reportFilterLabels(t),Array.isArray(e)?(t.unshift({label:P.I18n.t(V.DIFFERENT_LABEL),value:V.DIFFERENT_VALUE}),this.setState({value:V.DIFFERENT_VALUE,selectOptions:t,loading:!1})):this.setState({value:e,selectOptions:t,loading:!1})}).catch(i=>{console.error("Error in autocompleteSendTo:",i),this.setState({loading:!1})})}else Array.isArray(e)?(t.unshift({label:P.I18n.t(V.DIFFERENT_LABEL),value:V.DIFFERENT_VALUE}),this.reportFilterLabels(t),this.setState({value:V.DIFFERENT_VALUE,selectOptions:t})):(this.reportFilterLabels(t),this.setState({value:e,selectOptions:t}))}reportFilterLabels(e){if(this.props.onFilterLabelUpdate&&this.props.table){const t={};for(const n of e)n.value!==V.DIFFERENT_VALUE&&(t[n.value]=n.label);this.props.onFilterLabelUpdate(this.props.attr,t)}}getContext(){const e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=V.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(e,t){if(this.props.alive){const s=this.getContext();(s!==this.localContext||!this.initialized)&&(this.localContext=s,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}let n;const h=this.state.selectOptions?JSON.parse(JSON.stringify(this.state.selectOptions)):[];return Array.isArray(this.state.value)||this.state.value===V.DIFFERENT_LABEL?([...this.state.value].filter(s=>!h.find(d=>d.value===s)).forEach(s=>h.push({label:s.toString(),value:s})),n={label:P.I18n.t(V.DIFFERENT_LABEL),value:V.DIFFERENT_VALUE},h.unshift(n)):(n=this.state.value!==null&&this.state.value!==void 0&&h.find(s=>s.value==this.state.value),this.state.value!==null&&this.state.value!==void 0&&!n&&this.props.schema.freeSolo&&(n={value:this.state.value,label:this.state.value},h.push(n)),n=n||null),h.length?$.createElement(Wi,{value:n,fullWidth:!0,freeSolo:!!this.props.schema.freeSolo,options:h,disabled:t,isOptionEqualToValue:(s,d)=>s.value===d.value,filterOptions:(s,d)=>{const o=s.filter(l=>d.inputValue===""?!0:l.label.toLowerCase().includes(d.inputValue.toLowerCase())||l.value.toLowerCase().includes(d.inputValue.toLowerCase()));return this.props.schema.freeSolo&&d.inputValue!==""&&o.push({label:d.inputValue,value:d.inputValue}),o},getOptionLabel:s=>(s==null?void 0:s.label)??"",onInputChange:s=>{if(!s||!this.props.schema.freeSolo)return;const d=s.target.value;d!==this.state.value&&this.setState({value:d},()=>this.onChange(this.props.attr,d))},onChange:(s,d)=>{const o=typeof d=="object"?d?d.value:"":d;o!==this.state.value&&this.setState({value:o},()=>this.onChange(this.props.attr,o))},renderInput:s=>$.createElement(pe,{variant:"standard",...s,error:!!e,placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),disabled:t,slotProps:{input:{...s.InputProps,endAdornment:$.createElement($.Fragment,null,this.state.loading?$.createElement(vn,{position:"end"},$.createElement(Tt,{size:20})):null,t?null:s.InputProps.endAdornment)}}})}):$.createElement(pe,{variant:"standard",fullWidth:!0,value:this.state.value??"",error:!!e,disabled:t,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0},input:{endAdornment:this.state.loading?$.createElement(vn,{position:"end"},$.createElement(Tt,{size:20})):null}},onChange:s=>{const d=s.target.value;this.setState({value:d},()=>this.onChange(this.props.attr,(d||"").trim()))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}}const us={fullWidth:{width:"100%"},flex:{display:"flex"},button:{height:48,marginLeft:4,minWidth:48}};class $h extends V{async componentDidMount(){await super.componentDidMount();const{data:e,attr:t}=this.props,n=V.getValue(e,t)||"";this.setState({value:n,showDialog:!1})}renderItem(e,t){const{schema:n,attr:h}=this.props,{value:i,showDialog:s}=this.state;return $.createElement(fe,{style:us.fullWidth,variant:"standard"},n.label?$.createElement(_e,{shrink:!0},this.getText(n.label)):null,$.createElement("div",{style:us.flex},$.createElement(pe,{variant:"standard",fullWidth:!0,value:i??"",error:!!e,disabled:t,placeholder:this.getText(n.placeholder),label:this.getText(n.label),helperText:this.renderHelp(n.help,n.helpLink,n.noTranslation),onChange:d=>{const o=d.target.value;this.setState({value:o},()=>this.onChange(h,o))}}),$.createElement(ve,{color:"grey",disabled:t,style:us.button,size:"small",variant:"outlined",onClick:()=>this.setState({showDialog:!0})},"...")),s?$.createElement(P.DialogCron,{title:P.I18n.t("ra_Define schedule"),simple:n.simple,complex:n.complex,cron:i,onClose:()=>this.setState({showDialog:!1}),cancel:P.I18n.t("ra_Cancel"),ok:P.I18n.t("ra_Ok"),theme:this.props.oContext.theme,onOk:d=>this.setState({showDialog:!1,value:d},()=>this.onChange(h,d))}):null)}}class xh extends V{async componentDidMount(){await super.componentDidMount();const e=V.getValue(this.props.data,this.props.attr),n=(await this.props.oContext.socket.getCertificates()).filter(h=>{const i=this.props.attr.toLowerCase();return i.includes(h.type)||h.type==="public"&&i.includes("cert")||h.type==="private"&&(i.includes("priv")||i.includes("key"))?!0:!!(h.type==="chained"&&(i.includes("chain")||i.includes("ca")))}).map(h=>({label:h.name,value:h.name}));n.unshift({label:P.I18n.t(V.NONE_LABEL),value:V.NONE_VALUE}),this.setState({value:e,selectOptions:n})}renderItem(e,t){var h,i;if(!this.state.selectOptions)return null;const n=(h=this.state.selectOptions)==null?void 0:h.find(s=>s.value===this.state.value);return $.createElement(fe,{style:{width:"100%"},variant:"standard"},this.props.schema.label?$.createElement(_e,{shrink:!0},this.getText(this.props.schema.label)):null,$.createElement(Ne,{variant:"standard",error:!!e,displayEmpty:!0,disabled:!!t,value:this.state.value,renderValue:()=>this.getText(n==null?void 0:n.label,this.props.schema.noTranslation!==!1),onChange:s=>this.setState({value:s.target.value},()=>this.onChange(this.props.attr,this.state.value))},(i=this.state.selectOptions)==null?void 0:i.map(s=>$.createElement($e,{key:s.value,value:s.value,style:s.value===V.NONE_VALUE?{opacity:.5}:{}},this.getText(s.label,this.props.schema.noTranslation!==!1)))),this.props.schema.help?$.createElement(ge,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const Ln={fullWidth:{width:"100%"},leWidth:{width:620,marginBottom:10},certWidth:{width:200,marginRight:10}};class _h extends V{async componentDidMount(){var d;await super.componentDidMount();const e=await this.props.oContext.socket.getCertificates(),t=[],n=[],h=[];let i=[];const s=await this.getCachedObject("system.certificates");(d=s==null?void 0:s.native)!=null&&d.collections?i=Object.keys(s.native.collections):i=null,e.forEach(o=>{o.type==="public"?t.push({label:o.name,value:o.name}):o.type==="private"?n.push({label:o.name,value:o.name}):o.type==="chained"?h.push({label:o.name,value:o.name}):(t.push({label:o.name,value:o.name}),n.push({label:o.name,value:o.name}),h.push({label:o.name,value:o.name}))}),t.unshift({label:P.I18n.t(V.NONE_LABEL),value:V.NONE_VALUE}),n.unshift({label:P.I18n.t(V.NONE_LABEL),value:V.NONE_VALUE}),h.unshift({label:P.I18n.t(V.NONE_LABEL),value:V.NONE_VALUE}),this.setState({certsPublicOptions:t,certsChainOptions:h,certsPrivateOptions:n,collectionsOptions:i})}renderItem(e,t){var r,a,c,p,u,f,g;if(!this.state.certsPublicOptions||!this.state.certsPrivateOptions||!this.state.certsChainOptions)return null;const n=(V.getValue(this.props.data,this.props.schema.leCollectionName||"leCollection")||"false").toString(),h=V.getValue(this.props.data,this.props.schema.certPublicName||"certPublic"),i=V.getValue(this.props.data,this.props.schema.certPrivateName||"certPrivate"),s=V.getValue(this.props.data,this.props.schema.certChainedName||"certChained"),d=(r=this.state.certsPublicOptions)==null?void 0:r.find(v=>v.value===h),o=(a=this.state.certsPrivateOptions)==null?void 0:a.find(v=>v.value===i),l=(c=this.state.certsChainOptions)==null?void 0:c.find(v=>v.value===s);return $.createElement("div",{style:Ln.fullWidth},this.state.collectionsOptions?$.createElement(fe,{style:Ln.leWidth,variant:"standard"},$.createElement(_e,{shrink:!0},"Let's encrypt"),$.createElement(Ne,{variant:"standard",error:!!e,displayEmpty:!0,disabled:!!t,value:n,onChange:v=>this.onChange(this.props.schema.leCollectionName||"leCollection",v.target.value==="false"?!1:v.target.value==="true"?!0:v.target.value)},$.createElement($e,{key:"_false",value:"false",style:{fontWeight:"bold"}},P.I18n.t("ra_Do not use let's encrypt")),$.createElement($e,{key:"_true",value:"true",style:{fontWeight:"bold"}},P.I18n.t("ra_Use all available let's encrypt certificates")),(p=this.state.collectionsOptions)==null?void 0:p.map(v=>$.createElement($e,{key:v,value:v},v)))):null,this.state.collectionsOptions?$.createElement("br",null):null,this.state.collectionsOptions&&n!=="false"?$.createElement("div",null,P.I18n.t("ra_Fallback custom certificates")):null,$.createElement(fe,{style:Ln.certWidth,variant:"standard"},$.createElement(_e,{shrink:!0},P.I18n.t("ra_Public certificate")),$.createElement(Ne,{variant:"standard",error:!!e,displayEmpty:!0,disabled:!!t,value:h||"",renderValue:()=>this.getText(d==null?void 0:d.label,!0),onChange:v=>this.onChange(this.props.schema.certPublicName||"certPublic",v.target.value)},(u=this.state.certsPublicOptions)==null?void 0:u.map((v,b)=>$.createElement($e,{key:`${v.value}_${b}`,value:v.value,style:v.value===V.NONE_VALUE?{opacity:.5}:{}},this.getText(v.label,!0))))),$.createElement(fe,{style:Ln.certWidth,variant:"standard"},$.createElement(_e,{shrink:!0},P.I18n.t("ra_Private certificate")),$.createElement(Ne,{variant:"standard",error:!!e,displayEmpty:!0,disabled:!!t,value:i||"",renderValue:()=>this.getText(o==null?void 0:o.label,!0),onChange:v=>this.onChange(this.props.schema.certPrivateName||"certPrivate",v.target.value)},(f=this.state.certsPrivateOptions)==null?void 0:f.map((v,b)=>$.createElement($e,{key:`${v.value}_${b}`,value:v.value,style:v.value===V.NONE_VALUE?{opacity:.5}:{}},this.getText(v.label,!0))))),$.createElement(fe,{style:Ln.certWidth,variant:"standard"},$.createElement(_e,{shrink:!0},P.I18n.t("ra_Chained certificate")),$.createElement(Ne,{variant:"standard",error:!!e,displayEmpty:!0,disabled:!!t,value:s||"",renderValue:()=>this.getText(l==null?void 0:l.label,!0),onChange:v=>this.onChange(this.props.schema.certChainedName||"certChained",v.target.value)},(g=this.state.certsChainOptions)==null?void 0:g.map((v,b)=>$.createElement($e,{key:`${v.value}_${b}`,value:v.value,style:v.value===V.NONE_VALUE?{opacity:.5}:{}},this.getText(v.label,!0))))))}}class kh extends V{async componentDidMount(){var n;await super.componentDidMount();let e;const t=await this.getCachedObject("system.certificates");(n=t==null?void 0:t.native)!=null&&n.collections?e=Object.keys(t.native.collections):e=[],this.setState({collectionsOptions:e})}renderItem(e,t){var h;if(!this.state.collectionsOptions)return null;const n=(V.getValue(this.props.data,this.props.schema.leCollectionName||"leCollection")||"false").toString();return $.createElement(fe,{style:{width:"100%"},variant:"standard"},this.props.schema.label?$.createElement(_e,{shrink:!0},this.getText(this.props.schema.label)):null,$.createElement(Ne,{variant:"standard",error:!!e,displayEmpty:!0,disabled:!!t,value:n,onChange:i=>this.onChange(this.props.schema.leCollectionName||"leCollection",i.target.value==="false"?!1:i.target.value==="true"?!0:i.target.value)},$.createElement($e,{key:"_false",value:"false",style:{fontWeight:"bold"}},P.I18n.t("ra_Do not use let's encrypt")),$.createElement($e,{key:"_true",value:"true",style:{fontWeight:"bold"}},P.I18n.t("ra_Use all available let's encrypt certificates")),(h=this.state.collectionsOptions)==null?void 0:h.map(i=>$.createElement($e,{key:i,value:i},i))),this.props.schema.help?$.createElement(ge,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}class Th extends V{async componentDidMount(){await super.componentDidMount();const e=await this.props.oContext.socket.getCurrentInstance();this.setState({requesting:!0},async()=>{const t=await this.props.oContext.socket.sendTo(e,"checkDocker",null);this.setState({requesting:!1,version:(t==null?void 0:t.version)||"",errorDocker:t?t.daemonRunning?"":P.I18n.t("ra_Docker is not installed or not running"):P.I18n.t("ra_No response from admin")})})}renderItem(e,t){const n=V.getValue(this.props.data,this.props.attr);return this.state.requesting?$.createElement(Tt,null):this.state.errorDocker&&!n?$.createElement(ge,{style:{color:"orange"}},P.I18n.t("ra_Docker is not available"),": ",P.I18n.t(`ra_${this.state.errorDocker}`).replace(/^ra_/,"")):$.createElement(fe,{style:{width:"100%"},variant:"standard"},$.createElement(Xn,{onClick:h=>{if(h.preventDefault(),h.stopPropagation(),!t){const i=this.onChange(this.props.attr,!n);i instanceof Promise&&i.catch(s=>console.error(`Cannot set value: ${s}`))}},control:$.createElement(Zt,{checked:!!n,onChange:h=>{this.onChange(this.props.attr,h.target.checked)},disabled:t||!!this.state.errorDocker&&!n}),label:this.getText(this.props.schema.label)}),this.props.schema.hideVersion?null:$.createElement(ge,null,this.state.errorDocker?this.state.errorDocker:this.state.version),this.props.schema.help?$.createElement(ge,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const ps="system.credentials.";function zr(m,e,t){return $.createElement("span",{style:{display:"flex",alignItems:"center",gap:8}},m!=null&&m.icon?$.createElement(P.Icon,{src:m.icon,style:{width:20,height:20}}):t?$.createElement("span",{style:{width:20,height:20,flexShrink:0}}):null,e)}class Zs extends V{async componentDidMount(){await super.componentDidMount();const e=V.getValue(this.props.data,this.props.attr);let t=[];try{const n=await this.props.oContext.socket.getObjectViewSystem("config",ps,`${ps}香`);t=Object.values(n).filter(h=>{var i;return!!h&&(!this.props.schema.credentialType||((i=h.native)==null?void 0:i.type)===this.props.schema.credentialType)}).map(h=>{var i;return{label:Zs.getCredentialName(h),value:h._id,icon:typeof((i=h.common)==null?void 0:i.icon)=="string"?h.common.icon:void 0}}).sort((h,i)=>h.label.localeCompare(i.label))}catch(n){console.error(`Cannot read credentials: ${n}`)}t.unshift({label:P.I18n.t(V.NONE_LABEL),value:V.NONE_VALUE}),this.setState({value:e,selectOptions:t})}static getCredentialName(e){var h;const t=(h=e.common)==null?void 0:h.name;let n;return t&&typeof t=="object"?n=t[P.I18n.getLanguage()]||t.en||Object.values(t)[0]||"":n=t||"",n||e._id.substring(ps.length)}renderItem(e,t){var s,d;if(!this.state.selectOptions)return null;const n=(s=this.state.selectOptions)==null?void 0:s.find(o=>o.value===this.state.value),h=this.state.value&&this.state.value!==V.NONE_VALUE&&!n?this.state.value:null,i=this.state.selectOptions.some(o=>!!o.icon);return $.createElement(fe,{style:{width:"100%"},variant:"standard"},this.props.schema.label?$.createElement(_e,{shrink:!0},this.getText(this.props.schema.label)):null,$.createElement(Ne,{variant:"standard",error:!!e||!!h,displayEmpty:!0,disabled:!!t,value:this.state.value||V.NONE_VALUE,renderValue:()=>h||zr(n,this.getText(n==null?void 0:n.label,this.props.schema.noTranslation!==!1),i),onChange:o=>this.setState({value:o.target.value===V.NONE_VALUE?"":o.target.value},()=>this.onChange(this.props.attr,this.state.value))},(d=this.state.selectOptions)==null?void 0:d.map(o=>$.createElement($e,{key:o.value,value:o.value,style:o.value===V.NONE_VALUE?{opacity:.5}:{}},zr(o,this.getText(o.label,this.props.schema.noTranslation!==!1),i)))),this.props.schema.help?$.createElement(ge,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const Ke={fullWidth:{width:"100%"},licLabel:{fontWeight:"bold",minWidth:100,marginRight:10,textTransform:"capitalize",display:"inline-block"},errorTitle:m=>({color:m.palette.mode==="dark"?"#e39191":"#b62020"}),okTitle:m=>({color:m.palette.mode==="dark"?"#6fd56f":"#007c00"}),errorText:m=>({color:m.palette.mode==="dark"?"#e39191":"#b62020",mb:"30px"})};class $t extends V{async componentDidMount(){await super.componentDidMount(),this.setState({_error:"",running:!1,showLicenseData:null,foundSuitableLicense:!1,licenseOfflineCheck:!1,result:null,allLicenses:null,askForUpdate:!1,showLinkToProfile:!1})}renderErrorDialog(){if(this.state._error&&!this.state.showLicenseData){let e=this.state._error;return this.state.allLicenses&&(e=[$.createElement("div",{key:"error"},e)],e.push($.createElement(ve,{key:"button",variant:"contained",onClick:()=>window.open("https://iobroker.net/www/account/licenses","_blank")},P.I18n.t("iobroker.net"))),this.state.allLicenses.length?e.push($.createElement(_o,{key:"table"},$.createElement(On,{size:"small"},$.createElement(ko,null,$.createElement(ct,null,$.createElement(Ee,null,P.I18n.t("ra_Product")),$.createElement(Ee,null,P.I18n.t("ra_Version")),$.createElement(Ee,null,"UUID"),$.createElement(Ee,null,P.I18n.t("ra_ValidTill")),$.createElement(Ee,null,P.I18n.t("ra_Commercial")),$.createElement(Ee,null,"ID"))),$.createElement(Fn,null,this.state.allLicenses.map(t=>$.createElement(ct,{key:t.id},$.createElement(Ee,{sx:t.validName?null:Ke.errorText},t.license.product),$.createElement(Ee,{sx:t.validVersion?null:Ke.errorText},t.license.version),$.createElement(Ee,{sx:t.validUuid?null:Ke.errorText},t.license.uuid||"--"),$.createElement(Ee,{sx:t.validTill?null:Ke.errorText},t.license.validTill&&t.license.validTill!=="0000-00-00 00:00:00"?new Date(t.license.validTill).toLocaleDateString():"--"),$.createElement(Ee,null,t.license.invoice!=="free"?t.license.invoice==="MANUALLY_CREATED"?"✓":t.license.invoice:"-"),$.createElement(Ee,null,t.id))))))):(e.push($.createElement("div",{key:"text1"},P.I18n.t("ra_No one license found in license manager"))),e.push($.createElement("div",{key:"text2"},P.I18n.t("ra_Please create license"))))),$.createElement(Lt,{open:!0,maxWidth:"xl",fullWidth:this.props.fullWidth!==void 0?this.props.fullWidth:!0,onClick:()=>this.setState({_error:"",allLicenses:null})},$.createElement(yn,null,P.I18n.t("ra_Error")),$.createElement(Kt,null,$.createElement(ec,null,e)),$.createElement(Gt,null,$.createElement(ve,{variant:"contained",onClick:()=>this.setState({_error:"",allLicenses:null}),color:"primary",autoFocus:!0,startIcon:$.createElement(Gs,null)},P.I18n.t("ra_Ok"))))}return null}renderMessageDialog(){if(this.state.showLicenseData){const e=[],t=this.state.showLicenseData;return Object.keys(t).forEach(n=>{if(!(t[n]===null||t[n]===void 0))if(typeof t[n]=="object"){const h=t[n];Object.keys(h).forEach(i=>{h[i]!==null&&h[i]!==void 0&&(typeof h[i]=="object"?e.push($.createElement("div",{key:i},$.createElement("div",{style:Ke.licLabel},i,":"),JSON.stringify(h[i],null,2))):e.push($.createElement("div",{key:i},$.createElement("div",{style:Ke.licLabel},n," -",i,":"),h[i].toString())))})}else e.push($.createElement("div",{key:n},$.createElement("div",{style:Ke.licLabel},n.replace(/_/g," "),":"),t[n].toString()))}),e.push($.createElement("div",{key:"checked"},$.createElement("div",{style:Ke.licLabel},P.I18n.t("ra_Checked"),":"),this.state.licenseOfflineCheck?P.I18n.t("ra_locally"):P.I18n.t("ra_via internet"))),$.createElement(Lt,{open:!0,onClose:()=>this.setState({showLicenseData:null})},$.createElement(yn,null,$.createElement(Ie,{component:"span",sx:this.state.result?Ke.okTitle:Ke.errorTitle},P.I18n.t("ra_License %s",this.state.result?"OK":"INVALID"))),$.createElement(Kt,null,this.state.showLinkToProfile?$.createElement(ve,{variant:"contained",onClick:()=>window.open("https://iobroker.net/www/account/licenses","_blank")},"https://iobroker.net"):null,this.state._error?$.createElement(Ie,{component:"div",sx:Ke.errorText},this.state._error):null,e),$.createElement(Gt,null,$.createElement(ve,{onClick:()=>this.setState({showLicenseData:null,_error:""}),color:"primary",variant:"contained"},P.I18n.t("ra_Close"))))}return null}static parseJwt(e){const n=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),h=decodeURIComponent(atob(n).split("").map(i=>`%${`00${i.charCodeAt(0).toString(16)}`.slice(-2)}`).join(""));try{return JSON.parse(h)}catch{return null}}static isVersionValid(e,t,n,h){if(!t||!e)return!0;let i=!0;const[s]=e.split(".");return t.startsWith(">=")?i=parseInt(s,10)>=parseInt(t.substring(2,10)):t.startsWith("<=")?i=parseInt(s,10)<=parseInt(t.substring(2,10)):t.startsWith(">")?i=parseInt(s,10)>parseInt(t.substring(1,10)):t.startsWith("<")?i=parseInt(s,10){const p=!c.validTill||c.validTill==="0000-00-00 00:00:00"||new Date(c.validTill).getTime()>l,u=(c.product||"").split("."),f=u[1]===e||e==="vis-2"&&u[1]==="vis",g=!r||!c.uuid||c.uuid===r,v=$t.isVersionValid(a,c.version,c.invoice,e);(!o||c.invoice!=="free")&&p&&f&&g&&v&&(o=c),n.push({id:c.id,validName:f,validUuid:g,validVersion:v,validTill:p,license:c})}),o&&(n.find(c=>c.id===o.id).used=!0)}return n}async checkLicense(e,t){var d,o,l;let n;if(this.props.schema.uuid){const r=await this.getCachedObject("system.meta.uuid");n=(d=r==null?void 0:r.native)==null?void 0:d.uuid}let h;if(this.props.schema.version){const r=await this.getCachedObject(`system.adapter.${t}`);h=(o=r==null?void 0:r.common)==null?void 0:o.version}const i=new AbortController;let s=setTimeout(()=>{s=null,i.abort()},5e3);try{const r=await window.fetch("https://iobroker.net/api/v1/public/cert/",{method:"POST",body:JSON.stringify({json:e,uuid:n}),headers:{"Content-Type":"text/plain"},signal:i.signal});s&&clearTimeout(s);const a=await r.text();let c;try{c=JSON.parse(a)}catch{}if(c!=null&&c.error)try{const p=$t.parseJwt(e),u=P.I18n.t(`ra_${p.error||c.error||"Unknown error"}`).replace(/^ra_/,"");return this.setState({_error:u,licenseOfflineCheck:!1,showLicenseData:p,result:!1,running:!1})}catch{return console.log("Cannot parse license"),this.setState({_error:c.error,result:!1,running:!1})}else{let p=null;try{p=$t.parseJwt(e)}catch{}if(c){const u=c.validTill||c.valid_till;if(u&&u!=="0000-00-00 00:00:00"&&new Date(u).getTime(){if(e){this.setState({askForUpdate:!1});try{await this.props.oContext.socket.updateLicenses(null,null)}catch(t){window.alert(P.I18n.t("ra_Cannot read licenses: %s",t));return}await this._onClick(!0)}else this.setState({askForUpdate:!1,running:!1})}}):null}async _onClick(e){const t=this.props.oContext.adapterName==="vis-2"?"vis":this.props.oContext.adapterName;this.setState({running:!0});let n,h;if(this.props.data.useLicenseManager){if(h=await this.findInLicenseManager(t),n=h.find(i=>i.used),n&&(n=n.license.json),!n&&!e){this.setState({askForUpdate:!0});return}}else n=this.props.data.license;n?await this.checkLicense(n,t):this.props.data.useLicenseManager?this.setState({_error:P.I18n.t("ra_Suitable license not found in license manager"),result:!1,running:!1,allLicenses:h}):this.setState({_error:P.I18n.t("ra_Please enter the license"),result:!1,running:!1})}renderItem(){return $.createElement("div",{style:Ke.fullWidth},$.createElement(ve,{variant:this.props.schema.variant||"outlined",color:this.props.schema.color||"primary",style:Ke.fullWidth,disabled:!this.props.data.license&&!this.props.data.useLicenseManager||this.state.running,startIcon:$.createElement(Io,null),onClick:()=>this._onClick()},this.state.running?$.createElement(Tt,{size:20,style:{marginRight:8}}):null,this.getText(this.props.schema.label||"ra_Check license",this.props.schema.noTranslation)),this.renderMessageDialog(),this.renderErrorDialog(),this.renderAskForUpdate())}}class Lh extends V{renderItem(e,t){const n=V.getValue(this.props.data,this.props.attr),h=Array.isArray(n);return $.createElement(fe,{style:{width:"100%"},variant:"standard"},$.createElement(Xn,{onClick:i=>{if(i.preventDefault(),i.stopPropagation(),!t){const s=this.onChange(this.props.attr,!n);s instanceof Promise&&s.catch(d=>console.error(`Cannot set value: ${d}`))}},control:$.createElement(Zt,{indeterminate:h,checked:!!n,onChange:i=>{let s;h?s=this.onChange(this.props.attr,!0):s=this.onChange(this.props.attr,i.target.checked),s instanceof Promise&&s.catch(d=>console.error(`Cannot set value: ${d}`))},disabled:t||this.props.schema.readOnly}),label:this.getText(this.props.schema.label)}),$.createElement(ge,{style:{color:"red"}},e?this.props.schema.validatorErrorText?P.I18n.t(this.props.schema.validatorErrorText):P.I18n.t("ra_Error"):null),this.props.schema.help?$.createElement(ge,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const Mh={standard:ic,filled:nc,outlined:tc},Ih=m=>{const e=m.palette.mode==="light",t=e?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return{root:{},inputRoot:{display:"inline-flex",flexWrap:"wrap",flex:1,marginTop:0,minWidth:70,"&.mui-variant-outlined,&.mui-variant-filled":{boxSizing:"border-box"},"&.mui-variant-outlined":{paddingTop:"14px"},"&.mui-variant-filled":{paddingTop:"28px"}},input:{display:"inline-block",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",appearance:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",float:"left",flex:1},chipContainer:{display:"flex",flexFlow:"row wrap",alignItems:"center",cursor:"text",marginBottom:"-2px",minHeight:40},outlined:{"& input":{height:16,paddingTop:"4px",paddingBottom:"12px",marginTop:"4px",marginBottom:"4px"}},standard:{marginTop:"18px"},filled:{"& input":{height:22,marginBottom:"4px",marginTop:"4px",paddingTop:0},"$marginDense & input":{height:26}},labeled:{},label:{top:4,"&$outlined&:not($labelShrink)":{top:2,"$marginDense &":{top:5}},"&$filled&:not($labelShrink)":{top:15,"$marginDense &":{top:20}}},labelShrink:{top:0},helperText:{marginBottom:-20},focused:{},disabled:{},underline:{"&:after":{borderBottom:`2px solid ${m.palette.primary[e?"dark":"light"]}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:m.transitions.create("transform",{duration:m.transitions.duration.shorter,easing:m.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:m.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:m.transitions.create("border-bottom-color",{duration:m.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:not($disabled):not($focused):not($error):before":{borderBottom:`2px solid ${m.palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},"&$disabled:before":{borderBottomStyle:"dotted"}},error:{"&:after":{backgroundColor:m.palette.error.main,transform:"scaleX(1)"}},chip:{margin:"0 8px 8px 0",float:"left"},marginDense:{}}},di={BACKSPACE:8,DELETE:46,LEFT_ARROW:37,RIGHT_ARROW:39},Oh=({value:m,isFocused:e,isDisabled:t,isReadOnly:n,handleClick:h,handleDelete:i,style:s},d)=>$.createElement(Vs,{key:d,style:{...s,pointerEvents:t||n?"none":void 0,backgroundColor:e?Xc[300]:void 0},onClick:h,onDelete:i,label:m});class Fh extends $.Component{labelRef;labelNode=null;input;newChipKeyCodes;newChipKeys;actualInput=null;inputBlurTimeout=null;_keyPressed;_preventChipCreation;styles={};styleTheme=null;constructor(e){super(e),this.state={chips:e.defaultValue||[],focusedChip:null,inputValue:"",isFocused:!1,chipsUpdated:!1,prevPropsValue:[],variant:this.props.variant||"standard"},this.newChipKeyCodes=e.newChipKeyCodes||[13],this.newChipKeys=e.newChipKeys||["Enter"],this.labelRef=$.createRef(),this.input=$.createRef()}componentDidMount(){this.state.variant==="outlined"&&(this.labelNode=Qc.findDOMNode(this.labelRef.current),this.forceUpdate())}componentWillUnmount(){this.inputBlurTimeout&&clearTimeout(this.inputBlurTimeout)}static getDerivedStateFromProps(e,t){let n=null;return e.value&&e.value.length!==t.prevPropsValue.length&&(n={prevPropsValue:e.value},e.clearInputValueOnChange&&(n.inputValue="")),e.clearInputValueOnChange&&e.value&&e.value.length!==t.prevPropsValue.length&&(n={prevPropsValue:e.value,inputValue:""}),e.disabled&&(n={...n,focusedChip:null}),!t.chipsUpdated&&e.defaultValue&&(n={...n,chips:e.defaultValue}),n}focus=()=>{var e;(e=this.actualInput)==null||e.focus(),this.state.focusedChip&&this.setState({focusedChip:null})};handleInputBlur=e=>{this.props.onBlur&&this.props.onBlur(e),this.setState({isFocused:!1}),this.state.focusedChip&&this.setState({focusedChip:null});const t=e.target.value;let n;switch(this.props.blurBehavior||"clear"){case"add-or-clear":n={clearInputOnFail:!0};case"add":if(this.props.delayBeforeAdd){const h=(this.props.value||this.state.chips).length;this.inputBlurTimeout=setTimeout(()=>{const i=(this.props.value||this.state.chips).length;h===i?this.handleAddChip(t,n):this.clearInput()},150)}else this.handleAddChip(t,n);break;case"clear":this.clearInput();break}};handleInputFocus=e=>{var t,n;this.setState({isFocused:!0}),(n=(t=this.props).onFocus)==null||n.call(t,e)};handleKeyDown=e=>{const{focusedChip:t}=this.state;if(this._keyPressed=!1,this._preventChipCreation=!1,this.props.onKeyDown&&(this.props.onKeyDown(e),e.isDefaultPrevented()))return;const n=this.props.value||this.state.chips;if(this.newChipKeyCodes.includes(e.keyCode)||this.newChipKeys.includes(e.key)){this.handleAddChip(e.target.value)!==!1&&e.preventDefault();return}switch(e.keyCode){case di.BACKSPACE:e.target.value===""&&(t?(this.handleDeleteChip(n[t],t),t&&this.setState({focusedChip:t-1})):this.setState({focusedChip:n.length-1}));break;case di.DELETE:e.target.value===""&&t&&(this.handleDeleteChip(n[t],t),t<=n.length-1&&this.setState({focusedChip:t}));break;case di.LEFT_ARROW:t===null&&e.target.value===""&&n.length?this.setState({focusedChip:n.length-1}):t!==null&&t>0&&this.setState({focusedChip:t-1});break;case di.RIGHT_ARROW:t!==null&&t{!this._preventChipCreation&&(this.newChipKeyCodes.includes(e.keyCode)||this.newChipKeys.includes(e.key))&&this._keyPressed?this.clearInput():this.updateInput(e.target.value),this.props.onKeyUp&&this.props.onKeyUp(e)};handleUpdateInput=e=>{(this.props.inputValue===null||this.props.inputValue===void 0)&&this.updateInput(e.target.value),this.props.onUpdateInput&&this.props.onUpdateInput(e)};handleAddChip(e,t){if(this.props.onBeforeAdd&&!this.props.onBeforeAdd(e))return this._preventChipCreation=!0,t&&t.clearInputOnFail&&this.clearInput(),!1;this.clearInput();const n=this.props.value||this.state.chips;return e.trim().length?((this.props.allowDuplicates||!n.includes(e))&&(this.props.value&&this.props.onAdd?this.props.onAdd(e):this.updateChips([...this.state.chips,e])),!0):!1}handleDeleteChip(e,t){if(this.props.value)this.props.onDelete&&this.props.onDelete(e,t);else{const n=this.state.chips.slice();if(n.splice(t,1)){let i=this.state.focusedChip;this.state.focusedChip===t?i=null:this.state.focusedChip!==null&&this.state.focusedChip>t&&(i=this.state.focusedChip-1),this.updateChips(n,{focusedChip:i})}}}updateChips(e,t={}){this.setState({chips:e,chipsUpdated:!0,...t}),this.props.onChange&&this.props.onChange(e)}clearInput(){this.updateInput("")}updateInput(e){this.setState({inputValue:e})}setActualInputRef=e=>{this.actualInput=e,this.props.inputRef&&this.props.inputRef(e)};render(){const{alwaysShowPlaceholder:e,chipRenderer:t=Oh,className:n,disabled:h,disableUnderline:i,error:s,FormHelperTextProps:d,fullWidth:o,fullWidthInput:l,helperText:r,id:a,InputProps:c={},InputLabelProps:p={},inputValue:u,label:f,placeholder:g,readOnly:v,required:b,rootRef:D,value:E,margin:w}=this.props,y=this.state.variant;this.styleTheme!==this.props.theme.palette.mode&&(this.styleTheme=this.props.theme.palette.mode,this.styles=P.Utils.getStyle(this.props.theme,Ih));let A=E||this.state.chips||[];Array.isArray(A)||(A=(A||"").toString().split(/[,\s]+/).map(S=>S.trim()));const T=u??this.state.inputValue,x=(this.props.value||T).length||T.length,M=typeof p.shrink=="boolean"?p.shrink:f!==null&&(x||this.state.isFocused||A.length),O=A.map((S,C)=>t({value:S,isDisabled:!!h,isReadOnly:!!v,isFocused:this.state.focusedChip===C,handleClick:()=>this.setState({focusedChip:C}),handleDelete:()=>this.handleDeleteChip(S,C),style:this.styles.chip},C.toString())),_={};y==="outlined"&&(_.notched=!!M,_.labelWidth=M&&this.labelNode&&this.labelNode.offsetWidth||0),y!=="standard"?_.startAdornment=O:c.disableUnderline=!0;const k=Mh[y];return $.createElement(fe,{ref:D,fullWidth:o,className:n,sx:{...this.styles.root,...w==="dense"?this.styles.marginDense:{}},error:s,required:A.length>0?void 0:b,onClick:this.focus,disabled:h,variant:y,component:"div",margin:w},f&&$.createElement(_e,{htmlFor:a,sx:{"&.MuiInputLabel-root":this.styles.label,"&.MuiInputLabel-shrink":this.styles.labelShrink},shrink:!!M,focused:this.state.isFocused,variant:y,ref:this.labelRef,required:b,component:"label",...p},f),$.createElement(Ie,{component:"div",id:"input-chip-container",sx:{...this.styles[y],...this.styles.chipContainer,...this.state.isFocused?this.styles.focused:void 0,...!i&&y==="standard"?this.styles.underline:void 0,...h?this.styles.disabled:void 0,...f?this.styles.labeled:void 0,...s?this.styles.error:void 0}},y==="standard"&&O,$.createElement(k,{ref:this.input,className:`mui-variant-${this.styles[y]} ${f?"mui-chip-with-label":"mui-chip-no-label"}`,sx:{"&.MuiInputBase-input":{...this.styles.input,...this.styles[y]},"&.MuiInputBase-root":{...this.styles.inputRoot}},id:a,value:T,onChange:this.handleUpdateInput,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,inputRef:this.setActualInputRef,disabled:h,fullWidth:l,placeholder:!x&&(M||f===null||f===void 0)||e?g:void 0,readOnly:v,...c,..._})),r&&$.createElement(ge,{...d,className:d==null?void 0:d.className,style:this.styles.helperText},r))}}class Vr extends V{async componentDidMount(){await super.componentDidMount();const{data:e,attr:t}=this.props,n=V.getValue(e,t);if(this.props.schema.delimiter&&typeof n=="string"){const h=n.split(this.props.schema.delimiter).map(i=>i.trim()).filter(i=>i);this.setState({value:h})}else this.setState({value:n||[]})}renderItem(e,t){const{attr:n,schema:h}=this.props,{value:i}=this.state;return $.createElement(fe,{fullWidth:!0,variant:"standard"},$.createElement(Fh,{value:i,disabled:!!t,label:this.getText(h.label),error:!!e,onAdd:s=>{const d=JSON.parse(JSON.stringify(i));d.push(s),this.setState({value:d},()=>{let o;this.props.schema.delimiter?o=this.onChange(n,d.join(`${this.props.schema.delimiter} `)):o=this.onChange(n,d),o instanceof Promise&&o.catch(l=>console.error(l))})},theme:this.props.oContext.theme,onDelete:(s,d)=>{const o=JSON.parse(JSON.stringify(i));o.splice(d,1),this.setState({value:o},()=>{let l;this.props.schema.delimiter?l=this.onChange(n,o.join(`${this.props.schema.delimiter} `)):l=this.onChange(n,o),l instanceof Promise&&l.catch(r=>console.error(r))})}}),$.createElement(ge,null,P.I18n.t("ra_Press ENTER Key to add new item")),this.props.schema.help?$.createElement(ge,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}class Rh extends V{renderColorDialog(){return!!this.state.showColorDialog&&$.createElement(Lt,{onClose:()=>this.setState({showColorDialog:!1}),open:this.state.showColorDialog},$.createElement(Zc,{color:this.state.colorDialogValue,onChange:e=>this.setState({colorDialogValue:e.hex},()=>this.onChange(this.props.attr,this.state.colorDialogValue))}))}renderItem(e,t){const n=V.getValue(this.props.data,this.props.attr);let h=P.Utils.isUseBright(n,null);return h===null&&(h=void 0),$.createElement($.Fragment,null,this.renderColorDialog(),$.createElement(pe,{variant:"standard",disabled:!!t,style:{minWidth:100,width:"calc(100% - 8px)"},label:this.getText(this.props.schema.label),value:n||"",onClick:()=>!this.props.schema.readOnly&&this.setState({showColorDialog:!0,colorDialogValue:n||""}),onChange:i=>{const s=i.target.value,d=this.onChange(this.props.attr,s);d instanceof Promise&&d.catch(o=>console.error(`Cannot set value: ${o}`))},slotProps:{htmlInput:{style:{backgroundColor:n,color:h?"#FFF":"#000"},readOnly:this.props.schema.readOnly||!1},input:{endAdornment:!this.props.schema.readOnly&&n&&!this.props.schema.noClearButton?$.createElement(se,{tabIndex:-1,size:"small",onClick:i=>{i.stopPropagation();const s=this.onChange(this.props.attr,"");s instanceof Promise&&s.catch(d=>console.error(`Cannot set value: ${d}`))}},$.createElement(ht,null)):void 0},inputLabel:{shrink:!0}}}))}}const ds={width:{width:"calc(100% - 85px)"},width50:{width:120,marginRight:5}};class Nh extends V{async componentDidMount(){await super.componentDidMount();const e=V.getValue(this.props.data,this.props.attr);this.setState({value:e});const t={};this.props.schema.useSystemName&&(t.useSystem=!!V.getValue(this.props.data,this.props.schema.useSystemName)),this.props.schema.longitudeName&&this.props.schema.latitudeName?(t.longitude=V.getValue(this.props.data,this.props.schema.longitudeName),t.latitude=V.getValue(this.props.data,this.props.schema.latitudeName),!t.longitude&&!t.latitude&&this.props.schema.autoInit&&setTimeout(()=>this.getCoordinates(),300)):!V.getValue(this.props.data,this.props.attr)&&this.props.schema.autoInit&&setTimeout(()=>this.getCoordinates(),300),Object.keys(t).length&&setTimeout(()=>this.setState(t),50)}async getSystemCoordinates(){let e;try{this.props.oContext.socket.getCompactSystemConfig?e=await this.props.oContext.socket.getCompactSystemConfig():e=await this.getCachedObject("system.config")}catch(t){console.error(`Cannot get system configuration: ${t}`)}if(e!=null&&e.common&&(e.common.longitude||e.common.latitude))if(window.alert(P.I18n.t("ra_Used system settings")),this.props.schema.longitudeName&&this.props.schema.latitudeName)this.setState({longitude:e.common.longitude,latitude:e.common.latitude},async()=>{await this.onChange(this.props.schema.longitudeName,e.common.longitude),await this.onChange(this.props.schema.latitudeName,e.common.latitude)});else{const t=e.common.latitude+(this.props.schema.divider||",")+e.common.longitude;this.setState({value:t},()=>{const n=this.onChange(this.props.attr,t);n instanceof Promise&&n.catch(h=>console.error(`Cannot set value: ${h}`))})}else window.alert(P.I18n.t("ra_Cannot determine position: System settings are empty and GPS detection is disabled in browser"))}getCoordinates(){navigator.geolocation?navigator.geolocation.getCurrentPosition(async e=>{if(e!=null&&e.coords)if(this.props.schema.longitudeName&&this.props.schema.latitudeName)this.setState({longitude:e.coords.longitude,latitude:e.coords.latitude},async()=>{await this.onChange(this.props.schema.longitudeName,e.coords.longitude||""),await this.onChange(this.props.schema.latitudeName,e.coords.latitude||"")});else{const t=e.coords.latitude+(this.props.schema.divider||",")+e.coords.longitude;this.setState({value:t},()=>{const n=this.onChange(this.props.attr,t);n instanceof Promise&&n.catch(h=>console.error(`Cannot set value: ${h}`))})}else await this.getSystemCoordinates()},async e=>{console.error(`Cannot determine coordinates from browser: ${e.message}`),await this.getSystemCoordinates()}):this.getSystemCoordinates().catch(e=>{console.error(`Cannot determine coordinates: ${e}`)})}renderItem(e,t){return $.createElement($.Fragment,null,this.props.schema.useSystemName?$.createElement(Xn,{control:$.createElement(Zt,{checked:!!this.state.useSystem,onChange:n=>{const h=n.target.checked;h&&this.getSystemCoordinates().catch(i=>console.error(`Cannot determine coordinates: ${i}`)),this.setState({useSystem:h},()=>this.onChange(this.props.schema.useSystemName,h))}}),label:P.I18n.t("ra_Use system settings for position")}):null,this.props.schema.longitudeName&&this.props.schema.latitudeName?$.createElement(pe,{variant:"standard",style:ds.width50,value:this.state.longitude??"",error:!!e,disabled:this.state.useSystem||!!t,onChange:n=>{const h=n.target.value;this.setState({longitude:h},()=>{const i=this.onChange(this.props.schema.longitudeName,(h||"").trim());i instanceof Promise&&i.catch(s=>console.error(`Cannot set value: ${s}`))})},label:P.I18n.t("ra_Longitude")}):null,this.props.schema.longitudeName&&this.props.schema.latitudeName?$.createElement(pe,{variant:"standard",style:ds.width50,value:this.state.latitude??"",error:!!e,disabled:this.state.useSystem||!!t,onChange:n=>{const h=n.target.value;this.setState({latitude:h},()=>this.onChange(this.props.schema.latitudeName,(h||"").trim()))},label:P.I18n.t("ra_Latitude")}):null,!this.props.schema.longitudeName||!this.props.schema.latitudeName?$.createElement(pe,{variant:"standard",style:ds.width,value:this.state.value??"",error:!!e,disabled:!!t,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:this.state.useSystem}},onChange:n=>{const h=n.target.value;this.setState({value:h},()=>this.onChange(this.props.attr,(h||"").trim()))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}):null,this.state.useSystem?null:$.createElement(Li,{size:"small",onClick:()=>this.getCoordinates(),title:P.I18n.t("ra_Take browser position"),style:{marginRight:4}},$.createElement(Dc,null)),this.state.useSystem?null:$.createElement(Li,{size:"small",onClick:()=>this.getSystemCoordinates(),title:P.I18n.t("ra_Take position from system settings")},$.createElement($c,null)))}}_s.init({name:"iobroker_admin",shared:{"@iobroker/adapter-react-v5":{lib:()=>Yc,version:"*"},"@mui/icons-material":{lib:()=>xc,version:"*"},"@iobroker/json-config":{lib:()=>th,version:"*"}},remotes:[]});class Kn extends V{static runningLoads={};constructor(e){super(e),Object.assign(this.state,{Component:null,error:""})}async componentDidMount(){if(!this.props.schema.url){console.error("URL is empty. Cannot load custom component!"),this.setState({error:"URL is empty. Cannot load custom component!"});return}let e;this.props.schema.url.startsWith("http:")||this.props.schema.url.startsWith("https:")?e=this.props.schema.url:this.props.schema.url.startsWith("./")?e=`${window.location.protocol}//${window.location.host}${this.props.schema.url.replace(/^\./,"")}`:e=`${window.location.protocol}//${window.location.host}/adapter/${this.props.oContext.adapterName}/${this.props.schema.url}`;const[t,n,...h]=this.props.schema.name.split("/"),i=h.join("/");if(!e){console.error('Cannot find URL for custom component! Please define "url" as "custom/customComponents.js" in the schema');return}if(!t||!n||!i){console.error('Invalid format of "name"! Please define "name" as "ConfigCustomBackItUpSet/Components/AdapterExist" in the schema');return}let s=Kn.runningLoads[`${e}!${n}`];if(!(s instanceof Promise)){let d;if(this.props.schema.i18n===!0){const o=e.lastIndexOf("/");let l;o!==-1?l=e.substring(0,o):l=e;const r=P.I18n.getLanguage(),a=`${l}/i18n/${r}.json`;d=fetch(a).then(c=>c.json()).then(c=>P.I18n.extendTranslations(c,r)).catch(c=>{if(r!=="en"){fetch(`${l}/i18n/en.json`).then(p=>p.json()).then(p=>P.I18n.extendTranslations(p,r)).catch(p=>console.log(`Cannot load i18n "${a}": ${p}`));return}console.log(`Cannot load i18n "${a}": ${c}`)})}else if(this.props.schema.i18n&&typeof this.props.schema.i18n=="object")try{P.I18n.extendTranslations(this.props.schema.i18n)}catch(o){console.error(`Cannot import i18n: ${o}`)}try{console.log(e,t,n,i),_s.registerRemotes([{name:t,entry:e,type:this.props.schema.bundlerType||void 0}]),s=_s.loadRemote(`${t}/${n}`),d instanceof Promise&&(s=Promise.all([s,d]).then(o=>o[0])),Kn.runningLoads[`${e}!${n}`]=s}catch(o){console.error(o),this.setState({error:`Cannot import from ${this.props.schema.url}: ${o}`})}}try{const d=(await s).default;if(d!=null&&d[i])this.setState({Component:d[i]});else{const o=Object.keys(d||{});console.error("URL is empty. Cannot load custom component!"),this.setState({error:`Component ${this.props.schema.name} not found in ${this.props.schema.url}. Found: ${o.join(", ")}`})}}catch(d){console.error(d),this.setState({error:`Cannot import from ${this.props.schema.url}: ${d}`})}}render(){const e=this.state.Component,t=this.props.schema||{},n=e?$.createElement(e,{...this.props,socket:this.props.oContext.socket,theme:this.props.oContext.theme,themeType:this.props.oContext.themeType,instance:this.props.oContext.instance,adapterName:this.props.oContext.adapterName,systemConfig:this.props.oContext.systemConfig,forceUpdate:this.props.oContext.forceUpdate}):this.state.error?$.createElement("div",null,this.state.error):$.createElement(ji,null);return t.newLine?$.createElement($.Fragment,null,$.createElement("div",{style:{flexBasis:"100%",height:0}}),n):n}}class Bh extends V{async componentDidMount(){await super.componentDidMount();const e=V.getValue(this.props.data,this.props.attr);if(e)try{const t=new Date(e);this.setState({value:t})}catch{}}renderItem(e,t){return $.createElement(qc,{sx:n=>({width:"100%",borderBottom:`1px solid ${e?"#F00":n.palette.text.primary}`,"& fieldset":{display:"none"},"& input":{padding:`${n.spacing(1.5)} 0 4px 0`},"& .MuiInputAdornment-root":{marginLeft:0,marginTop:1},"& label":{transform:"translate(0px, -9px) scale(0.75)"}}),format:this.props.oContext.systemConfig.dateFormat.toLowerCase().replace("mm","MM"),disabled:!!t,value:this.state.value||null,onChange:n=>this.setState({value:n},()=>{try{const h=this.state.value.toISOString();this.onChange(this.props.attr,h).catch(i=>console.warn(`Error saving value for ${this.props.attr}:`,i))}catch{}}),label:this.getText(this.props.schema.label)})}}class Ph extends V{renderItem(){if(!this.props.schema)return null;if(this.props.oContext.DeviceManager){const t=this.props.oContext.DeviceManager;return $.createElement(t,{uploadImagesToInstance:`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,title:this.getText(this.props.schema.label),socket:this.props.oContext.socket,selectedInstance:`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,themeName:this.props.themeName,theme:this.props.oContext.theme,themeType:this.props.oContext.themeType,isFloatComma:this.props.oContext.isFloatComma,dateFormat:this.props.oContext.dateFormat,smallCards:this.props.schema.smallCards})}return $.createElement("div",null,"DeviceManager not found")}}const nt={fullWidth:{width:"100%"},uploadDiv:{position:"relative",width:"100%"},uploadDivDragging:{opacity:1,background:"rgba(128,255,128,0.1)"},uploadCenterDiv:{margin:5,border:"3px dashed grey",borderRadius:5,width:"100%",height:"100%",position:"absolute",display:"flex"},uploadCenterIcon:{paddingTop:10,width:48,height:48},uploadCenterText:{fontSize:16},uploadCenterTextAndIcon:{textAlign:"center",position:"absolute",top:0,bottom:0,left:0,right:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},disabledOpacity:{opacity:.3,cursor:"default"},error:{border:"2px solid red"},deleteButton:{},selectedImage:{height:40,width:40,display:"inline-block",marginRight:8}},Wh=["jpg","jpeg","svg","png","webp","gif","apng","avif","webp"],jh=["mp3","ogg","wav","aac"],Hh=["avi","mp4","mov"],zh=["txt","log","html","htm"],Vh=["json","js","ts"];class Hi extends V{dropzoneRef;imagePrefix;objectID;path;constructor(e){super(e),this.dropzoneRef=$.createRef(),this.imagePrefix=this.props.oContext.imagePrefix??"./files"}async componentDidMount(){await super.componentDidMount(),this.objectID=(this.props.schema.objectID||"0_userdata.0").replace("%INSTANCE%",(this.props.oContext.instance||0).toString()),this.path=this.props.schema.upload,this.path&&(this.path==="/"?this.path="":this.path.endsWith("/")||(this.path=`${this.path}/`)),this.updateFiles().then(()=>{const e=V.getValue(this.props.data,this.props.attr);this.setState({value:e}),this.props.oContext.socket.subscribeFiles(this.objectID,`${this.path}/*`,this.onFolderChanged).catch(t=>console.error(`Cannot subscribe: ${t}`))})}onFolderChanged=(e,t)=>{this.path&&t.startsWith(this.path)&&this.updateFiles().catch(n=>console.error(`Cannot update files: ${n}`))};componentWillUnmount(){this.props.oContext.socket.subscribeFiles(this.objectID,`${this.path}/*`,this.onFolderChanged).catch(e=>console.error(`Cannot subscribe: ${e}`)),super.componentWillUnmount()}async updateFiles(){const e=await this.readFiles(this.props.schema.pattern);await new Promise(t=>this.setState({files:e},t))}async readFolder(e,t,n){try{const h=await this.props.oContext.socket.readDir(this.objectID,e.replace(/^\//,"")||null);for(let i=0;iconsole.log("file reading was aborted"),n.onerror=()=>console.log("file reading has failed"),n.onload=()=>{if(t.size>h){window.alert(P.I18n.t("File is too big. Max %sk allowed. Try use SVG.",Math.round(h/1024)));return}this.props.oContext.socket.writeFile64(this.objectID,this.path+t.name,n.result).then(()=>this.updateFiles()).then(()=>this.setState({value:this.path+t.name},()=>this.onChange(this.props.attr,this.path+t.name))).catch(i=>window.alert(`Cannot upload file: ${i}`))},n.readAsArrayBuffer(t)}renderDeleteDialog(){return this.state.deleteFile?$.createElement(P.DialogConfirm,{title:P.I18n.t("ra_Are you sure?"),text:P.I18n.t("ra_File will be deleted"),ok:P.I18n.t("ra_Delete"),cancel:P.I18n.t("ra_Cancel"),onClose:e=>{const t=this.state.deleteFile;this.setState({deleteFile:""},()=>{e&&this.props.oContext.socket.deleteFile(this.objectID,t).then(()=>this.updateFiles()).catch(n=>window.alert(`Cannot delete file: ${n}`))})}}):null}static base64ToArrayBuffer(e){const t=window.atob(e),n=t.length,h=new Uint8Array(n);for(let i=0;i{if(typeof AudioContext<"u"){const t=new AudioContext,n=Hi.base64ToArrayBuffer(e.file);t.decodeAudioData(n,h=>{const i=t.createBufferSource();i.buffer=h,i.connect(t.destination),i.start(0)},h=>window.alert(`Cannot play: ${h.message}`))}})}getFileIcon(e){return e!=null&&e.extension?Wh.includes(e.extension)?$.createElement("div",{style:{...nt.selectedImage,backgroundImage:`url(${this.imagePrefix}/${this.objectID}/${e.value})`,backgroundSize:"contain",backgroundRepeat:"no-repeat"}}):jh.includes(e.extension)?$.createElement(_c,null):zh.includes(e.extension)?$.createElement(Wo,null):Hh.includes(e.extension)?$.createElement(jo,null):Vh.includes(e.extension)?$.createElement(Ho,null):null:null}renderItem(e,t){if(!this.state.files)return null;const n=[];this.props.schema.withFolder||this.state.files.forEach(r=>{const a=r.name.lastIndexOf("/");if(a===-1)n.includes("/")||n.push("/");else{const c=r.name.substring(0,a+1);n.includes(c)||n.push(c)}});const h=this.state.files.map(r=>({value:r.name,label:!this.props.schema.withFolder&&n.length===1?`${r.name.substring(n[0].length)}`:`${r.name}${this.props.schema.noSize?"":`(${r.size})`}`,extension:r.name.toLowerCase().split(".").pop()}));this.props.schema.noNone||h.unshift({label:P.I18n.t("ra_none"),value:""});const i=h.find(r=>r.value===this.state.value);let s=0;this.props.schema.upload&&s++,this.props.schema.refresh&&s++;const d=this.state.value&&(this.state.value.endsWith(".mp3")||this.state.value.endsWith(".ogg")||this.state.value.endsWith(".wav"));d&&s++;const o=$.createElement("div",{style:nt.fullWidth},$.createElement(fe,{variant:"standard",style:{width:`calc(100% - ${s*42}px)`}},this.props.schema.label?$.createElement(_e,null,this.getText(this.props.schema.label)):null,$.createElement(Ne,{variant:"standard",error:!!e,disabled:!!t,value:this.state.value||"_",renderValue:()=>$.createElement($.Fragment,null,this.getFileIcon(i),$.createElement("span",null,(i==null?void 0:i.label)||"")),onChange:r=>{this.setState({value:r.target.value==="_"?"":r.target.value},()=>this.onChange(this.props.attr,this.state.value))}},h.map(r=>$.createElement($e,{key:r.value,value:r.value},$.createElement(To,null,this.getFileIcon(r)),$.createElement(Us,null,r.label),this.props.schema.delete&&i.value?$.createElement(se,{style:nt.deleteButton,size:"small",onClick:()=>this.setState({deleteFile:i.value})},$.createElement(_t,null)):null))),this.props.schema.help?$.createElement(ge,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null),this.props.schema.refresh&&$.createElement(se,{onClick:()=>this.updateFiles()},$.createElement(Ks,null)),this.props.schema.upload&&$.createElement(se,{onClick:()=>{var r;return(r=this.dropzoneRef.current)==null?void 0:r.open()}},$.createElement(Vn,null)),d&&$.createElement(se,{style:{color:"#00FF00"},onClick:()=>this.play()},$.createElement(Js,null)));if(!this.props.schema.upload)return $.createElement($.Fragment,null,o,this.renderDeleteDialog());let l={"*/*":[]};if(this.props.schema.fileTypes==="image"?l={"image/*":[".png",".jpg",".svg",".gif",".apng",".avif",".webp"]}:this.props.schema.fileTypes==="audio"?l={"audio/*":[".mp3",".ogg",".wav",".mp4"]}:this.props.schema.fileTypes==="text"&&(l={"text/plain":[".txt"]}),this.props.schema.pattern){const r=this.props.schema.pattern.split("/").pop().toLowerCase().replace(/.*\./,"");r==="png"||r==="jpg"||r==="svg"||r==="gif"||r==="apng"||r==="avif"||r==="webp"?l={"image/*":[".png",".jpg",".svg",".gif",".apng",".avif",".webp"]}:r==="mp3"||r==="ogg"||r==="wav"?l={"audio/*":[".mp3",".ogg",".wav",".mp4"]}:r==="ics"?l={"text/calendar":[".ics"]}:r==="txt"?l={"text/plain":[".txt"]}:r==="pem"?l={"text/plain":[".pem"]}:l={"*/*":[`.${r}`]}}return $.createElement(Vo,{ref:this.dropzoneRef,multiple:!1,accept:l,noKeyboard:!0,noClick:!0,maxSize:this.props.schema.maxSize||2*1024*1024,onDragEnter:()=>{this.setState({uploadFile:"dragging"})},onDragLeave:()=>this.setState({uploadFile:!0}),onDrop:(r,a)=>{var c,p,u;this.setState({uploadFile:!1}),r.length?this.onDrop(r):window.alert(((u=(p=(c=a==null?void 0:a[0])==null?void 0:c.errors)==null?void 0:p[0])==null?void 0:u.message)||P.I18n.t("Cannot upload"))}},({getRootProps:r,getInputProps:a})=>$.createElement("div",{style:{...nt.uploadDiv,...this.state.uploadFile==="dragging"?nt.uploadDivDragging:void 0,...t?nt.disabledOpacity:void 0},...r()},$.createElement("input",{...a()}),this.state.uploadFile==="dragging"?$.createElement("div",{style:{...nt.uploadCenterDiv,...this.state.uploadError?nt.error:void 0}},$.createElement("div",{style:nt.uploadCenterTextAndIcon},$.createElement(Vn,{style:nt.uploadCenterIcon}),$.createElement("div",{style:nt.uploadCenterText},this.state.uploadFile==="dragging"?P.I18n.t("ra_Drop file here"):P.I18n.t("ra_Place your files here or click here to open the browse dialog")))):null,o,this.renderDeleteDialog()))}}const fi={fullWidth:{width:"100%"},fullWidthOneButton:{width:"calc(100% - 69px)",marginRight:4},fullWidthIcon:{width:"calc(100% - 119px)",marginRight:4},selectedImage:{height:40,width:40,display:"inline-block",marginRight:8}},Uh=["jpg","jpeg","svg","png","webp","gif","apng","avif","webp"],Kh=["mp3","ogg","wav","aac"],Gh=["avi","mp4","mov"],Jh=["txt","log","html","htm"],Yh=["json","js","ts"];class Qh extends V{imagePrefix="../..";async componentDidMount(){await super.componentDidMount();const e=V.getValue(this.props.data,this.props.attr);this.imagePrefix=this.props.oContext.imagePrefix??"./files",this.setState({value:e??""})}static getDerivedStateFromProps(e,t){const n=V.getValue(e.data,e.attr);return n==null||n.toString().trim()!==(t.value||"").toString().trim()?{value:n??""}:null}loadFile(){const e=this.state.value.indexOf("/");if(e!==-1){const t=this.state.value.substring(0,e),n=this.state.value.substring(e+1);return this.props.oContext.socket.readFile(t,n,!0)}return Promise.resolve(null)}play(){this.loadFile().then(e=>{if(typeof AudioContext<"u"&&(e!=null&&e.file)){const t=new AudioContext,n=Hi.base64ToArrayBuffer(e.file);t.decodeAudioData(n,h=>{const i=t.createBufferSource();i.buffer=h,i.connect(t.destination),i.start(0)},h=>window.alert(`Cannot play: ${h.message}`))}})}getIcon(){const e=this.state.value.split(".").pop().toLowerCase();return Uh.includes(e)?$.createElement("div",{style:{...fi.selectedImage,backgroundImage:`url(${this.imagePrefix}/${this.state.value})`,backgroundSize:"contain",backgroundRepeat:"no-repeat"}}):Kh.includes(e)?$.createElement(se,{style:{color:"#00FF00"},onClick:()=>this.play()},$.createElement(Js,null)):Jh.includes(e)?$.createElement(Wo,null):Gh.includes(e)?$.createElement(jo,null):Yh.includes(e)?$.createElement(Ho,null):null}renderFileBrowser(){return this.state.showFileBrowser?$.createElement(P.DialogSelectFile,{imagePrefix:this.props.oContext.imagePrefix,socket:this.props.oContext.socket,selected:this.state.value,onClose:()=>this.setState({showFileBrowser:!1}),onOk:e=>{const t=Array.isArray(e)?e[0]:e;this.setState({value:t},()=>this.onChange(this.props.attr,this.props.schema.trim===!1?t:(t||"").trim()))},selectOnlyFolders:this.props.schema.selectOnlyFolders,allowUpload:this.props.schema.allowUpload,allowDownload:this.props.schema.allowDownload,allowCreateFolder:this.props.schema.allowCreateFolder,allowView:this.props.schema.allowView,showToolbar:this.props.schema.showToolbar,limitPath:this.props.schema.limitPath,theme:this.props.oContext.theme}):null}renderItem(e,t){const n=this.getIcon();return $.createElement("div",{style:fi.fullWidth},n,$.createElement(pe,{variant:"standard",style:n?fi.fullWidthIcon:fi.fullWidthOneButton,value:this.state.value??"",error:!!e,disabled:!!t,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:!!this.props.schema.disableEdit}},onChange:h=>{const i=h.target.value;this.setState({value:i},()=>this.onChange(this.props.attr,this.props.schema.trim===!1?i:(i||"").trim()))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}),$.createElement(ve,{disabled:t,variant:"outlined",onClick:()=>this.setState({showFileBrowser:!0})},"..."),this.renderFileBrowser())}}class Xh extends V{async componentDidMount(){await super.componentDidMount();const e=V.getValue(this.props.data,this.props.attr);this.props.oContext.socket.getEnums("functions").then(t=>{const n=Object.keys(t).map(h=>({value:this.props.schema.short?h.replace("enum.functions.",""):h,label:this.getText(t[h].common.name),obj:t[h]}));this.props.schema.allowDeactivate!==!1&&n.unshift({label:P.I18n.t(V.NONE_LABEL),value:V.NONE_VALUE}),this.setState({value:e,selectOptions:n})})}renderItem(e,t){if(!this.state.selectOptions)return null;const n=this.state.selectOptions.find(h=>h.value===this.state.value);return $.createElement(fe,{variant:"standard",fullWidth:!0},this.props.schema.label?$.createElement(_e,null,this.getText(this.props.schema.label)):null,$.createElement(Ne,{variant:"standard",error:!!e,disabled:!!t,value:this.state.value||"_",renderValue:()=>n?n.obj?$.createElement(P.TextWithIcon,{value:n.obj,themeType:this.props.oContext.themeType,lang:P.I18n.getLanguage()}):n.label:"",onChange:h=>{this.setState({value:h.target.value==="_"?"":h.target.value},()=>this.onChange(this.props.attr,this.state.value))}},this.state.selectOptions.map(h=>$.createElement($e,{key:h.value,value:h.value,style:h.value===V.DIFFERENT_VALUE?{opacity:.5}:{}},h.obj?$.createElement(P.TextWithIcon,{value:h.obj,themeType:this.props.oContext.themeType,lang:P.I18n.getLanguage()}):h.label))),this.props.schema.help?$.createElement(ge,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}class Zh extends V{iframeRef=$.createRef();observer=null;async componentDidMount(){await super.componentDidMount(),this.props.schema.reloadOnShow&&(this.observer=new IntersectionObserver(([e])=>{if(e.isIntersecting&&this.state.isVisible===!1&&this.iframeRef.current){const t=this.iframeRef.current.src;this.iframeRef.current.src="",setTimeout(()=>{this.iframeRef.current&&(this.iframeRef.current.src=t)},0)}this.setState({isVisible:e.isIntersecting})}),this.iframeRef.current&&this.observer.observe(this.iframeRef.current))}componentWillUnmount(){var e,t;(e=super.componentWillUnmount)==null||e.call(this),(t=this.observer)==null||t.disconnect()}renderItem(e,t){const n=this.props.schema.url||V.getValue(this.props.data,this.props.attr);return $.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},$.createElement("iframe",{style:{width:"100%",height:"100%",borderWidth:this.props.schema.frameBorder??0,...this.props.schema.innerStyle,border:e?"1px solid red":void 0},ref:this.iframeRef,src:n,allowFullScreen:this.props.schema.allowFullscreen??!1,sandbox:this.props.schema.sandbox,loading:this.props.schema.lazyLoad??"lazy"}),t&&$.createElement("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(255, 255, 255, 0.3)",cursor:"not-allowed",zIndex:1}}))}}class qh extends V{initialized=!1;localContext;iframeRef=$.createRef();observer=null;async componentDidMount(){await super.componentDidMount(),this.askInstance().catch(e=>console.error(e)),this.props.schema.reloadOnShow&&(this.observer=new IntersectionObserver(([e])=>{if(e.isIntersecting&&this.state.isVisible===!1&&this.iframeRef.current){const t=this.iframeRef.current.src;this.iframeRef.current.src="",setTimeout(()=>{this.iframeRef.current&&(this.iframeRef.current.src=t)},0)}this.setState({isVisible:e.isIntersecting})}),this.iframeRef.current&&this.observer.observe(this.iframeRef.current))}async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){const n=await this.getPatternAsync(this.props.schema.jsonData,null,!0);if(n)try{e=JSON.parse(n)}catch{console.error(`Cannot parse json data: ${JSON.stringify(e)}`)}}e===void 0&&(e=null);const t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){const n=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(n!=null&&n.val)){window.alert(P.I18n.t("ra_Instance %s is not alive",t));return}}this.props.oContext.socket.sendTo(t,this.props.schema.command||"send",e).then(n=>this.setState({url:n||""}))}}getContext(){const e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=V.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(e,t){if(this.props.alive){const n=this.getContext();(n!==this.localContext||!this.initialized)&&(this.localContext=n,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}return this.state.url===void 0?null:$.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},$.createElement("iframe",{style:{width:"100%",height:"100%",borderWidth:this.props.schema.frameBorder??0,...this.props.schema.innerStyle,border:e?"1px solid red":void 0},ref:this.iframeRef,src:this.state.url,allowFullScreen:this.props.schema.allowFullscreen??!1,sandbox:this.props.schema.sandbox,loading:this.props.schema.lazyLoad??"lazy"}),t&&$.createElement("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(255, 255, 255, 0.3)",cursor:"not-allowed",zIndex:1}}))}}class eu extends V{async componentDidMount(){await super.componentDidMount(),this.props.oContext.socket.getHostByIp(this.props.common.host).then(e=>{this.props.schema.listenOnAllPorts||(e=e.filter(t=>t.address!=="0.0.0.0"&&t.address!=="::")),this.props.schema.onlyIp4?e=e.filter(t=>t.family==="ipv4"):this.props.schema.onlyIp6&&(e=e.filter(t=>t.family==="ipv6")),this.props.schema.noInternal&&(e=e.filter(t=>!t.internal)),e.forEach(t=>{t.address==="0.0.0.0"?t.name=`[IPv4] 0.0.0.0 - ${P.I18n.t("ra_Listen on all IPs")}`:t.address==="::"&&(t.name=`[IPv6] :: - ${P.I18n.t("ra_Listen on all IPs")}`)}),this.setState({ips:e})}).catch(e=>console.error(e))}renderItem(e,t){var i,s;const n=V.getValue(this.props.data,this.props.attr),h=(i=this.state.ips)==null?void 0:i.find(d=>d.address===n);return $.createElement(fe,{fullWidth:!0,variant:"standard"},this.state.ips&&this.props.schema.label?$.createElement(_e,null,this.getText(this.props.schema.label)):null,this.state.ips?$.createElement(Ne,{variant:"standard",error:!!e,disabled:!!t,value:n,renderValue:d=>(h==null?void 0:h.name)||d,onChange:d=>this.onChange(this.props.attr,d.target.value)},(s=this.state.ips)==null?void 0:s.map((d,o)=>$.createElement($e,{key:o,value:d.address},d.name))):$.createElement(pe,{fullWidth:!0,variant:"standard",error:!!e,disabled:!!t,value:n,onChange:d=>this.onChange(this.props.attr,d.target.value),label:this.getText(this.props.schema.label)}),this.props.schema.help?$.createElement(ge,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}class tu extends V{initialized=!1;localContext;async componentDidMount(){await super.componentDidMount(),this.props.schema.sendFirstByClick||this.askInstance().catch(e=>console.error(e))}async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){const n=await this.getPatternAsync(this.props.schema.jsonData,null,!0);if(n)try{e=JSON.parse(n)}catch{console.error(`Cannot parse json data: ${JSON.stringify(e)}`)}}e===void 0&&(e=null);const t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){const n=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(n!=null&&n.val)){window.alert(P.I18n.t("ra_Instance %s is not alive",t));return}}this.setState({loading:!0},()=>this.props.oContext.socket.sendTo(t,this.props.schema.command||"send",e).then(n=>this.setState({image:n||""})))}}getContext(){const e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=V.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(){if(this.props.alive){const e=this.getContext();(e!==this.localContext||!this.initialized)&&(this.localContext=e,(!this.props.schema.sendFirstByClick||this.state.image!==void 0)&&setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}return!this.state.image&&this.props.schema.sendFirstByClick?$.createElement("div",{style:{width:this.props.schema.width||"100%",height:this.props.schema.height,display:"flex",alignItems:"center",justifyContent:"center",cursor:this.state.loading?"default":"pointer"},onClick:()=>!this.state.loading&&this.askInstance()},this.state.loading?$.createElement(Tt,null):typeof this.props.schema.sendFirstByClick=="boolean"?P.I18n.t("ra_Click to show"):this.getText(this.props.schema.sendFirstByClick,this.props.schema.noTranslation)):this.state.image===void 0?null:$.createElement(P.Icon,{title:this.getText(this.props.schema.tooltip),src:this.state.image,style:{width:this.props.schema.width||"100%",height:this.props.schema.height}})}}class nu extends V{index;constructor(e){super(e),this.index=Date.now()}async componentDidMount(){if(await super.componentDidMount(),this.props.schema.base64){const e=V.getValue(this.props.data,this.props.attr);this.setState({value:e})}else this.props.oContext.socket.fileExists(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.attr).then(e=>e&&this.loadImage())}_getUrl(e){e&&(this.index=Date.now());let t=`files/${this.props.oContext.adapterName}.${this.props.oContext.instance}/${this.props.attr}?t=${this.index}`;return window.location.port==="3000"&&(t=`${window.location.protocol}//${window.location.hostname}:8081/${t}`),t}loadImage(){fetch(this._getUrl()).then(e=>e.blob()).then(e=>{const t=new FileReader;t.onload=()=>{this.setState({value:t.result})},t.readAsDataURL(e)}).catch(e=>console.error(e))}renderItem(e,t){return $.createElement(fe,{fullWidth:!0,variant:"standard"},this.props.schema.label?$.createElement(_e,{shrink:!0},this.getText(this.props.schema.label)):null,$.createElement(P.UploadImage,{error:!!e,disabled:t,accept:this.props.schema.accept,crop:this.props.schema.crop,maxSize:this.props.schema.maxSize||256*1024,icon:this.state.value||void 0,removeIconFunc:()=>this.setState({value:null},()=>{if(this.props.schema.base64){const n=this.onChange(this.props.attr,this.state.value);n instanceof Promise&&n.catch(h=>console.error(`Cannot set value: ${h}`))}else this.props.oContext.socket.deleteFile(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.attr).catch(n=>console.error(n))}),onChange:n=>this.setState({value:n},()=>{if(this.props.schema.base64){const h=this.onChange(this.props.attr,this.state.value);h instanceof Promise&&h.catch(i=>console.error(`Cannot set value: ${i}`))}else n.startsWith("data")&&(n=n.split(",")[1]);this.props.oContext.socket.writeFile64(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.attr,n).catch(h=>console.error(h))})}),this.props.schema.help?$.createElement(ge,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}class iu extends V{renderItem(){return $.createElement(P.InfoBox,{type:this.props.schema.boxType||"info",closeable:this.props.schema.closeable!==void 0?this.props.schema.closeable:!0,storeId:this.props.schema.closed!==void 0?void 0:`${!!this.props.oContext.adapterName} ${this.props.attr}`,closed:this.props.schema.closed,style:{width:"100%",...this.props.schema.style}},this.props.schema.title?$.createElement(Ie,{component:"div",sx:{fontWeight:"bold",fontSize:"larger"}},this.getText(this.props.schema.title)):null,this.getText(this.props.schema.text))}}const Ur={icon:{width:20,height:20,marginRight:4}};class su extends V{async componentDidMount(){await super.componentDidMount();const e=V.getValue(this.props.data,this.props.attr);let t=this.props.schema.adapter;t==="_dataSources"&&(t=void 0),this.props.oContext.socket.getAdapterInstances(t,!0).then(async n=>{this.props.schema.adapter==="_dataSources"?n=n.filter(i=>{var s;return(s=i==null?void 0:i.common)==null?void 0:s.getHistory}):this.props.schema.adapter?n=n.filter(i=>i==null?void 0:i._id.startsWith(`system.adapter.${this.props.schema.adapter}.`)):this.props.schema.adapters&&Array.isArray(this.props.schema.adapters)&&(n=n.filter(i=>{var s;return this.props.schema.adapters.includes((s=i==null?void 0:i.common)==null?void 0:s.name)})),this.props.schema.onlyEnabled&&(n=n.filter(i=>{var s;return(s=i==null?void 0:i.common)==null?void 0:s.enabled}));const h=n.map(i=>({value:this.props.schema.long?i._id:this.props.schema.short?i._id.split(".").pop():i._id.replace(/^system\.adapter\./,""),label:`${i.common.name} [${i._id.replace(/^system\.adapter\./,"")}]`,icon:`${this.props.oContext.imagePrefix}/adapter/${i.common.name}/${i.common.icon}`}));h.sort((i,s)=>i.value>s.value?1:i.valueconsole.error(`Cannot get instances: ${n}`))}componentWillUnmount(){this.props.oContext.socket.unsubscribeObject("system.adapter.*",this.onInstancesUpdate).then(()=>{}),super.componentWillUnmount()}onInstancesUpdate=(e,t)=>{if(!e.match(/^system\.adapter\.[-_a-z\d]+\.\d+$/))return;const n=this.props.schema.long?e:this.props.schema.short?e.split(".").pop():e.replace(/^system\.adapter\./,""),h=this.state.selectOptions.findIndex(i=>i.value===n);if(t){if(this.props.schema.adapter==="_dataSources"&&(!t.common||!t.common.getHistory))return;if(h===-1){const i=JSON.parse(JSON.stringify(this.state.selectOptions)),s=typeof t.common.name=="object"?t.common.name[P.I18n.getLanguage()]||t.common.name.en:t.common.name;i.push({value:this.props.schema.long?t._id:this.props.schema.short?t._id.split(".").pop():t._id.replace(/^system\.adapter\./,""),label:`${s} [${t._id.replace(/^system\.adapter\./,"")}]`,icon:`${this.props.oContext.imagePrefix}/adapter/${s}/${t.common.icon}`}),i.sort((d,o)=>d.label>o.label?1:d.labeli.value===this.state.value);return $.createElement(fe,{fullWidth:!0,key:this.props.attr,variant:"standard"},this.props.schema.label?$.createElement(_e,{shrink:!0},this.getText(this.props.schema.label)):null,$.createElement(Ne,{variant:"standard",error:!!e,displayEmpty:!0,disabled:!!t,value:this.state.value,renderValue:()=>$.createElement("span",{style:{display:"flex"}},n!=null&&n.icon?$.createElement(P.Icon,{src:`./${n.icon}`,style:Ur.icon}):null,this.getText(n==null?void 0:n.label,!0)),onChange:i=>this.setState({value:i.target.value},()=>this.onChange(this.props.attr,this.state.value))},this.state.selectOptions.map(i=>$.createElement($e,{key:i.value,value:i.value,style:i.value===V.NONE_VALUE?{opacity:.5}:{}},i.icon?$.createElement(P.Icon,{src:`./${i.icon}`,style:Ur.icon}):null,this.getText(i.label,!0)))),this.props.schema.help?$.createElement(ge,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const Kr={address:{fontSize:"smaller",opacity:.5,marginLeft:8}};class ru extends V{async componentDidMount(){await super.componentDidMount(),this.props.oContext.getCachedObject(`system.host.${this.props.common.host}`).then(e=>{var n,h;const t=[];if((h=(n=e==null?void 0:e.native)==null?void 0:n.hardware)!=null&&h.networkInterfaces){const i=e.native.hardware.networkInterfaces;Object.keys(i).forEach(s=>{if(this.props.schema.ignoreInternal&&!i[s].find(o=>!o.internal)||this.props.schema.ignoreLoopback&&i[s].find(o=>o.address==="127.0.0.1"||o.address==="::1"))return;let d=i[s].find(o=>o.family==="IPv4");d||=i[s].find(o=>o.family==="IPv6"),t.push({value:s,address:d.address})})}this.setState({interfaces:t})}).catch(e=>window.alert(`Cannot read interfaces: ${e}`))}renderItem(e,t){var i,s,d;const n=V.getValue(this.props.data,this.props.attr),h=(i=this.state.interfaces)==null?void 0:i.find(o=>o.value===n);return $.createElement(fe,{fullWidth:!0,variant:"standard"},(s=this.state.interfaces)!=null&&s.length&&this.props.schema.label?$.createElement(_e,null,this.getText(this.props.schema.label)):null,(d=this.state.interfaces)!=null&&d.length?$.createElement(Ne,{variant:"standard",error:!!e,disabled:!!t,value:n,renderValue:o=>h?$.createElement("span",null,h.value,$.createElement("span",{style:Kr.address},h.address)):o,onChange:o=>this.onChange(this.props.attr,o.target.value)},this.state.interfaces.map((o,l)=>$.createElement($e,{key:l,value:o.value},$.createElement("span",null,o.value,$.createElement("span",{style:Kr.address},o.address))))):$.createElement(pe,{fullWidth:!0,variant:"standard",error:!!e,disabled:!!t,value:n,onChange:o=>this.onChange(this.props.attr,o.target.value),label:this.getText(this.props.schema.label)}),this.props.schema.help?$.createElement(ge,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const rn={modalDialog:{minWidth:400,maxWidth:800},overflowHidden:{display:"flex",overflow:"hidden"},titleIcon:{marginRight:5},content:{fontSize:16},languageButton:{position:"absolute",right:8,top:8},languageButtonActive:{color:"primary.main"}},qs=({toggleTranslation:m,noTranslation:e,title:t,fullWidth:n,help:h,maxWidth:i,progress:s,icon:d,applyDisabled:o,applyButton:l,onClose:r,children:a,titleButtonApply:c,titleButtonClose:p,onApply:u,textInput:f,defaultValue:g,overflowHidden:v})=>{const[b,D]=Yl(g);Ql(()=>{D(g)},[g]);const E=sc(),w=rc(E.breakpoints.down("md"));let y=null;return d&&(y=d),$.createElement(Lt,{open:!0,maxWidth:w?!1:i||"md",fullWidth:!!n,fullScreen:w,disableEscapeKeyDown:!1,onClose:r,sx:{"& .MuiPaper-root":w?{}:rn.modalDialog}},t&&$.createElement(yn,null,d?$.createElement(y,{style:rn.titleIcon}):null,t,P.I18n.getLanguage()!=="en"&&m?$.createElement(se,{size:"large",style:{...rn.languageButton,...e?rn.languageButtonActive:{}},onClick:()=>m(),title:P.I18n.t("ra_Disable/Enable translation")},$.createElement(kc,null)):null),$.createElement(Kt,{sx:{...v?rn.overflowHidden:{},...rn.content},style:{paddingTop:8}},f&&$.createElement(pe,{autoComplete:"off",fullWidth:!0,autoFocus:!0,variant:"outlined",size:"medium",multiline:!0,value:b,onChange:A=>D(A.target.value)}),a,h?$.createElement("div",null,h):null),$.createElement(Gt,null,l!==!1&&$.createElement(ve,{startIcon:$.createElement(Gs,null),disabled:s||o&&g===b,onClick:()=>u&&u(f?b:""),variant:"contained",color:"primary"},P.I18n.t(c||"ra_Ok")),$.createElement(ve,{color:"grey",onClick:()=>r&&r(),disabled:s,variant:"contained",startIcon:$.createElement(ht,null)},P.I18n.t(p||"ra_Cancel"))))};var bn={},Yt={},Yo={exports:{}};(function(m,e){(function(){var t="ace",n=(function(){return this})();!n&&typeof window<"u"&&(n=window);var h=function(r,a,c){if(typeof r!="string"){h.original?h.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(c=a),h.modules[r]||(h.payloads[r]=c,h.modules[r]=null)};h.modules={},h.payloads={};var i=function(r,a,c){if(typeof a=="string"){var p=o(r,a);if(p!=null)return c&&c(),p}else if(Object.prototype.toString.call(a)==="[object Array]"){for(var u=[],f=0,g=a.length;fo.length)&&(d=o.length),d-=s.length;var l=o.indexOf(s,d);return l!==-1&&l===d}),String.prototype.repeat||i(String.prototype,"repeat",function(s){for(var d="",o=this;s>0;)s&1&&(d+=o),(s>>=1)&&(o+=o);return d}),String.prototype.includes||i(String.prototype,"includes",function(s,d){return this.indexOf(s,d)!=-1}),Object.assign||(Object.assign=function(s){if(s==null)throw new TypeError("Cannot convert undefined or null to object");for(var d=Object(s),o=1;o>>0,l=arguments[1],r=l>>0,a=r<0?Math.max(o+r,0):Math.min(r,o),c=arguments[2],p=c===void 0?o:c>>0,u=p<0?Math.max(o+p,0):Math.min(p,o);a0;)o&1&&(l+=d),(o>>=1)&&(d+=d);return l};var i=/^\s\s*/,s=/\s\s*$/;n.stringTrimLeft=function(d){return d.replace(i,"")},n.stringTrimRight=function(d){return d.replace(s,"")},n.copyObject=function(d){var o={};for(var l in d)o[l]=d[l];return o},n.copyArray=function(d){for(var o=[],l=0,r=d.length;l65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(t,n,h){n.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},n.getOS=function(){return n.isMac?n.OS.MAC:n.isLinux?n.OS.LINUX:n.OS.WINDOWS};var i=typeof navigator=="object"?navigator:{},s=(/mac|win|linux/i.exec(i.platform)||["other"])[0].toLowerCase(),d=i.userAgent||"",o=i.appName||"";n.isWin=s=="win",n.isMac=s=="mac",n.isLinux=s=="linux",n.isIE=o=="Microsoft Internet Explorer"||o.indexOf("MSAppHost")>=0?parseFloat((d.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((d.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),n.isOldIE=n.isIE&&n.isIE<9,n.isGecko=n.isMozilla=d.match(/ Gecko\/\d+/),n.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",n.isWebKit=parseFloat(d.split("WebKit/")[1])||void 0,n.isChrome=parseFloat(d.split(" Chrome/")[1])||void 0,n.isSafari=parseFloat(d.split(" Safari/")[1])&&!n.isChrome||void 0,n.isEdge=parseFloat(d.split(" Edge/")[1])||void 0,n.isAIR=d.indexOf("AdobeAIR")>=0,n.isAndroid=d.indexOf("Android")>=0,n.isChromeOS=d.indexOf(" CrOS ")>=0,n.isIOS=/iPad|iPhone|iPod/.test(d)&&!window.MSStream,n.isIOS&&(n.isMac=!0),n.isMobile=n.isIOS||n.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(t,n,h){var i=t("./useragent"),s="http://www.w3.org/1999/xhtml";n.buildDom=function c(p,u,f){if(typeof p=="string"&&p){var g=document.createTextNode(p);return u&&u.appendChild(g),g}if(!Array.isArray(p))return p&&p.appendChild&&u&&u.appendChild(p),p;if(typeof p[0]!="string"||!p[0]){for(var v=[],b=0;b"u")){if(o){if(u)l();else if(u===!1)return o.push([c,p])}if(!d){var f=u;!u||!u.getRootNode?f=document:(f=u.getRootNode(),(!f||f==u)&&(f=document));var g=f.ownerDocument||f;if(p&&n.hasCssString(p,f))return null;p&&(c+=` +/*# sourceURL=ace/css/`+p+" */");var v=n.createElement("style");v.appendChild(g.createTextNode(c)),p&&(v.id=p),f==g&&(f=n.getDocumentHead(g)),f.insertBefore(v,f.firstChild)}}}if(n.importCssString=r,n.importCssStylsheet=function(c,p){n.buildDom(["link",{rel:"stylesheet",href:c}],n.getDocumentHead(p))},n.$fixPositionBug=function(c){var p=c.getBoundingClientRect();if(c.style.left){var u=parseFloat(c.style.left),f=+p.left;Math.abs(u-f)>1&&(c.style.left=2*u-f+"px")}if(c.style.right){var u=parseFloat(c.style.right),f=window.innerWidth-p.right;Math.abs(u-f)>1&&(c.style.right=2*u-f+"px")}if(c.style.top){var u=parseFloat(c.style.top),f=+p.top;Math.abs(u-f)>1&&(c.style.top=2*u-f+"px")}if(c.style.bottom){var u=parseFloat(c.style.bottom),f=window.innerHeight-p.bottom;Math.abs(u-f)>1&&(c.style.bottom=2*u-f+"px")}},n.scrollbarWidth=function(c){var p=n.createElement("ace_inner");p.style.width="100%",p.style.minWidth="0px",p.style.height="200px",p.style.display="block";var u=n.createElement("ace_outer"),f=u.style;f.position="absolute",f.left="-10000px",f.overflow="hidden",f.width="200px",f.minWidth="0px",f.height="150px",f.display="block",u.appendChild(p);var g=c&&c.documentElement||document&&document.documentElement;if(!g)return 0;g.appendChild(u);var v=p.offsetWidth;f.overflow="scroll";var b=p.offsetWidth;return v===b&&(b=u.clientWidth),g.removeChild(u),v-b},n.computedStyle=function(c,p){return window.getComputedStyle(c,"")||{}},n.setStyle=function(c,p,u){c[p]!==u&&(c[p]=u)},n.HAS_CSS_ANIMATION=!1,n.HAS_CSS_TRANSFORMS=!1,n.HI_DPI=i.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,i.isChromeOS&&(n.HI_DPI=!1),typeof document<"u"){var a=document.createElement("div");n.HI_DPI&&a.style.transform!==void 0&&(n.HAS_CSS_TRANSFORMS=!0),!i.isEdge&&typeof a.style.animationName<"u"&&(n.HAS_CSS_ANIMATION=!0),a=null}n.HAS_CSS_TRANSFORMS?n.translate=function(c,p,u){c.style.transform="translate("+Math.round(p)+"px, "+Math.round(u)+"px)"}:n.translate=function(c,p,u){c.style.top=Math.round(u)+"px",c.style.left=Math.round(p)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(t,n,h){var i=t("./dom");n.get=function(s,d){var o=new XMLHttpRequest;o.open("GET",s,!0),o.onreadystatechange=function(){o.readyState===4&&d(o.responseText)},o.send(null)},n.loadScript=function(s,d){var o=i.getDocumentHead(),l=document.createElement("script");l.src=s,o.appendChild(l),l.onload=l.onreadystatechange=function(r,a){(a||!l.readyState||l.readyState=="loaded"||l.readyState=="complete")&&(l=l.onload=l.onreadystatechange=null,a||d())}},n.qualifyURL=function(s){var d=document.createElement("a");return d.href=s,d.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(t,n,h){n.inherits=function(i,s){i.super_=s,i.prototype=Object.create(s.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}})},n.mixin=function(i,s){for(var d in s)i[d]=s[d];return i},n.implement=function(i,s){n.mixin(i,s)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(t,n,h){var i={},s=function(){this.propagationStopped=!0},d=function(){this.defaultPrevented=!0};i._emit=i._dispatchEvent=function(o,l){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var r=this._eventRegistry[o]||[],a=this._defaultHandlers[o];if(!(!r.length&&!a)){(typeof l!="object"||!l)&&(l={}),l.type||(l.type=o),l.stopPropagation||(l.stopPropagation=s),l.preventDefault||(l.preventDefault=d),r=r.slice();for(var c=0;c1&&(v=f[f.length-2]);var D=l[h+"Path"];return D==null?D=l.basePath:g=="/"&&(h=g=""),D&&D.slice(-1)!="/"&&(D+="/"),D+h+g+v+this.get("suffix")},n.setModuleUrl=function(p,h){return l.$moduleUrls[p]=h};var r=function(p,h){if(p==="ace/theme/textmate"||p==="./theme/textmate")return h(null,t("./theme/textmate"));if(a)return a(p,h);console.error("loader is not configured")},a;n.setLoader=function(p){a=p},n.dynamicModules=Object.create(null),n.$loading={},n.$loaded={},n.loadModule=function(p,h){var f;if(Array.isArray(p))var g=p[0],v=p[1];else if(typeof p=="string")var v=p;var b=function(D){if(D&&!n.$loading[v])return h&&h(D);if(n.$loading[v]||(n.$loading[v]=[]),n.$loading[v].push(h),!(n.$loading[v].length>1)){var E=function(){r(v,function(w,y){y&&(n.$loaded[v]=y),n._emit("load.module",{name:v,module:y});var A=n.$loading[v];n.$loading[v]=null,A.forEach(function(T){T&&T(y)})})};if(!n.get("packaged"))return E();s.loadScript(n.moduleUrl(v,g),E),c()}};if(n.dynamicModules[v])n.dynamicModules[v]().then(function(D){D.default?b(D.default):b(D)});else{try{f=this.$require(v)}catch{}b(f||n.$loaded[v])}},n.$require=function(p){if(typeof u.require=="function"){var h="require";return u[h](p)}},n.setModuleLoader=function(p,h){n.dynamicModules[p]=h};var c=function(){!l.basePath&&!l.workerPath&&!l.modePath&&!l.themePath&&!Object.keys(l.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),c=function(){})};n.version="1.43.4"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(t,n,u){t("./lib/fixoldbrowsers");var i=t("./config");i.setLoader(function(l,r){t([l],function(a){r(null,a)})});var s=(function(){return this||typeof window<"u"&&window})();u.exports=function(l){i.init=d,i.$require=t,l.require=t},d(!0);function d(l){if(!(!s||!s.document)){i.set("packaged",l||t.packaged||u.packaged||s.define&&(void 0).packaged);var r={},a="",c=document.currentScript||document._currentScript,p=c&&c.ownerDocument||document;c&&c.src&&(a=c.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var h=p.getElementsByTagName("script"),f=0;f ["+this.end.row+"/"+this.end.column+"]"},s.prototype.contains=function(d,o){return this.compare(d,o)==0},s.prototype.compareRange=function(d){var o,l=d.end,r=d.start;return o=this.compare(l.row,l.column),o==1?(o=this.compare(r.row,r.column),o==1?2:o==0?1:0):o==-1?-2:(o=this.compare(r.row,r.column),o==-1?-1:o==1?42:0)},s.prototype.comparePoint=function(d){return this.compare(d.row,d.column)},s.prototype.containsRange=function(d){return this.comparePoint(d.start)==0&&this.comparePoint(d.end)==0},s.prototype.intersects=function(d){var o=this.compareRange(d);return o==-1||o==0||o==1},s.prototype.isEnd=function(d,o){return this.end.row==d&&this.end.column==o},s.prototype.isStart=function(d,o){return this.start.row==d&&this.start.column==o},s.prototype.setStart=function(d,o){typeof d=="object"?(this.start.column=d.column,this.start.row=d.row):(this.start.row=d,this.start.column=o)},s.prototype.setEnd=function(d,o){typeof d=="object"?(this.end.column=d.column,this.end.row=d.row):(this.end.row=d,this.end.column=o)},s.prototype.inside=function(d,o){return this.compare(d,o)==0?!(this.isEnd(d,o)||this.isStart(d,o)):!1},s.prototype.insideStart=function(d,o){return this.compare(d,o)==0?!this.isEnd(d,o):!1},s.prototype.insideEnd=function(d,o){return this.compare(d,o)==0?!this.isStart(d,o):!1},s.prototype.compare=function(d,o){return!this.isMultiLine()&&d===this.start.row?othis.end.column?1:0:dthis.end.row?1:this.start.row===d?o>=this.start.column?0:-1:this.end.row===d?o<=this.end.column?0:1:0},s.prototype.compareStart=function(d,o){return this.start.row==d&&this.start.column==o?-1:this.compare(d,o)},s.prototype.compareEnd=function(d,o){return this.end.row==d&&this.end.column==o?1:this.compare(d,o)},s.prototype.compareInside=function(d,o){return this.end.row==d&&this.end.column==o?1:this.start.row==d&&this.start.column==o?-1:this.compare(d,o)},s.prototype.clipRows=function(d,o){if(this.end.row>o)var l={row:o+1,column:0};else if(this.end.rowo)var r={row:o+1,column:0};else if(this.start.row1?(T++,T>4&&(T=1)):T=1,s.isIE){var C=Math.abs(S.clientX-$)>5||Math.abs(S.clientY-M)>5;(!O||C)&&(T=1),O&&clearTimeout(O),O=setTimeout(function(){O=null},E[T-1]||600),T==1&&($=S.clientX,M=S.clientY)}if(S._clicks=T,w[y]("mousedown",S),T>4)T=0;else if(T>1)return w[y](_[T],S)}Array.isArray(D)||(D=[D]),D.forEach(function(S){p(S,"mousedown",k,A)})};function f(D){return 0|(D.ctrlKey?1:0)|(D.altKey?2:0)|(D.shiftKey?4:0)|(D.metaKey?8:0)}n.getModifierString=function(D){return i.KEY_MODS[f(D)]};function g(D,E,w){var y=f(E);if(!w&&E.code&&(w=i.$codeToKeyCode[E.code]||w),!s.isMac&&d){if(E.getModifierState&&(E.getModifierState("OS")||E.getModifierState("Win"))&&(y|=8),d.altGr)if((3&y)!=3)d.altGr=0;else return;if(w===18||w===17){var A=E.location;if(w===17&&A===1)d[w]==1&&(o=E.timeStamp);else if(w===18&&y===3&&A===2){var T=E.timeStamp-o;T<50&&(d.altGr=!0)}}}if(w in i.MODIFIER_KEYS&&(w=-1),!(!y&&w===13&&E.location===3&&(D(E,y,-w),E.defaultPrevented))){if(s.isChromeOS&&y&8){if(D(E,y,w),E.defaultPrevented)return;y&=-9}return!y&&!(w in i.FUNCTION_KEYS)&&!(w in i.PRINTABLE_KEYS)?!1:D(E,y,w)}}n.addCommandKeyListener=function(D,E,w){var y=null;p(D,"keydown",function(A){d[A.keyCode]=(d[A.keyCode]||0)+1;var T=g(E,A,A.keyCode);return y=A.defaultPrevented,T},w),p(D,"keypress",function(A){y&&(A.ctrlKey||A.altKey||A.shiftKey||A.metaKey)&&(n.stopEvent(A),y=null)},w),p(D,"keyup",function(A){d[A.keyCode]=null},w),d||(v(),p(window,"focus",v))};function v(){d=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!s.isOldIE){var b=1;n.nextTick=function(D,E){E=E||window;var w="zero-timeout-message-"+b++,y=function(A){A.data==w&&(n.stopPropagation(A),h(E,"message",y),D())};p(E,"message",y),E.postMessage(w,"*")}}n.$idleBlocked=!1,n.onIdle=function(D,E){return setTimeout(function w(){n.$idleBlocked?setTimeout(w,100):D()},E)},n.$idleBlockId=null,n.blockIdle=function(D){n.$idleBlockId&&clearTimeout(n.$idleBlockId),n.$idleBlocked=!0,n.$idleBlockId=setTimeout(function(){n.$idleBlocked=!1},D||100)},n.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),n.nextFrame?n.nextFrame=n.nextFrame.bind(window):n.nextFrame=function(D){setTimeout(D,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(t,n,u){var i;u.exports={lineMode:!1,pasteCancelled:function(){return i&&i>Date.now()-50?!0:i=!1},cancel:function(){i=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(t,n,u){var i=t("../lib/event"),s=t("../config").nls,d=t("../lib/useragent"),o=t("../lib/dom"),l=t("../lib/lang"),r=t("../clipboard"),a=d.isChrome<18,c=d.isIE,p=d.isChrome>63,h=400,f=t("../lib/keys"),g=f.KEY_MODS,v=d.isIOS,b=v?/\s/:/\n/,D=d.isMobile,E=(function(){function w(y,A){var T=this;this.host=A,this.text=o.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","off"),this.text.setAttribute("autocomplete","off"),this.text.setAttribute("autocorrect","off"),this.text.setAttribute("autocapitalize","off"),this.text.setAttribute("spellcheck","false"),this.text.style.opacity="0",y.insertBefore(this.text,y.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",D||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch{}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),i.addListener(this.text,"blur",function($){T.ignoreFocusEvents||(A.onBlur($),T.$isFocused=!1)},A),i.addListener(this.text,"focus",function($){if(!T.ignoreFocusEvents){if(T.$isFocused=!0,d.isEdge)try{if(!document.hasFocus())return}catch{}A.onFocus($),d.isEdge?setTimeout(T.resetSelection.bind(T)):T.resetSelection()}},A),this.$focusScroll=!1,A.on("beforeEndOperation",function(){var $=A.curOp,M=$&&$.command&&$.command.name;if(M!="insertstring"){var O=M&&($.docChanged||$.selectionChanged);T.inComposition&&O&&(T.lastValue=T.text.value="",T.onCompositionEnd()),T.resetSelection()}}),A.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=v?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&A.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,i.addCommandKeyListener(this.text,function($,M,O){if(!T.inComposition)return A.onCommandKey($,M,O)},A),i.addListener(this.text,"select",this.onSelect.bind(this),A),i.addListener(this.text,"input",this.onInput.bind(this),A),i.addListener(this.text,"cut",this.onCut.bind(this),A),i.addListener(this.text,"copy",this.onCopy.bind(this),A),i.addListener(this.text,"paste",this.onPaste.bind(this),A),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&i.addListener(y,"keydown",function($){if(!(d.isMac&&!$.metaKey||!$.ctrlKey))switch($.keyCode){case 67:T.onCopy($);break;case 86:T.onPaste($);break;case 88:T.onCut($);break}},A),this.syncComposition=l.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),i.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),A),i.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),A),i.addListener(this.text,"keyup",this.onKeyup.bind(this),A),i.addListener(this.text,"keydown",this.syncComposition.bind(this),A),i.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),A),this.closeTimeout,i.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),A),i.addListener(this.text,"mousedown",function($){$.preventDefault(),T.onContextMenuClose()},A),i.addListener(A.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),A),i.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),A),v&&this.addIosSelectionHandler(y,A,this.text)}return w.prototype.addIosSelectionHandler=function(y,A,T){var $=this,M=null,O=!1;T.addEventListener("keydown",function(k){M&&clearTimeout(M),O=!0},!0),T.addEventListener("keyup",function(k){M=setTimeout(function(){O=!1},100)},!0);var _=function(k){if(document.activeElement===T&&!(O||$.inComposition||A.$mouseHandler.isMousePressed)&&!$.copied){var S=T.selectionStart,C=T.selectionEnd,L=null,I=0;if(S==0?L=f.up:S==1?L=f.home:C>$.lastSelectionEnd&&$.lastValue[C]==` -`?L=f.end:S<$.lastSelectionStart&&$.lastValue[S-1]==" "?(L=f.left,I=g.option):S<$.lastSelectionStart||S==$.lastSelectionStart&&$.lastSelectionEnd!=$.lastSelectionStart&&S==C?L=f.left:C>$.lastSelectionEnd&&$.lastValue.slice(0,C).split(` -`).length>2?L=f.down:C>$.lastSelectionEnd&&$.lastValue[C-1]==" "?(L=f.right,I=g.option):(C>$.lastSelectionEnd||C==$.lastSelectionEnd&&$.lastSelectionEnd!=$.lastSelectionStart&&S==C)&&(L=f.right),S!==C&&(I|=g.shift),L){var F=A.onCommandKey({},I,L);if(!F&&A.commands){L=f.keyCodeToString(L);var R=A.commands.findKeyCommand(I,L);R&&A.execCommand(R)}$.lastSelectionStart=S,$.lastSelectionEnd=C,$.resetSelection("")}}};document.addEventListener("selectionchange",_),A.on("destroy",function(){document.removeEventListener("selectionchange",_)})},w.prototype.onContextMenuClose=function(){var y=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){y.tempStyle&&(y.text.style.cssText=y.tempStyle,y.tempStyle=""),y.host.renderer.$isMousePressed=!1,y.host.renderer.$keepTextAreaAtCursor&&y.host.renderer.$moveTextAreaToCursor()},0)},w.prototype.$onContextMenu=function(y){this.host.textInput.onContextMenu(y),this.onContextMenuClose()},w.prototype.onKeyup=function(y){y.keyCode==27&&this.text.value.lengthh+100||b.test(T)||D&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},w.prototype.sendText=function(y,A){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),y&&this.host.onPaste(y),this.pasted=!1,"";for(var T=this.text.selectionStart,$=this.text.selectionEnd,M=this.lastSelectionStart,O=this.lastValue.length-this.lastSelectionEnd,_=y,k=y.length-T,S=y.length-$,C=0;M>0&&this.lastValue[C]==y[C];)C++,M--;for(_=_.slice(C),C=1;O>0&&this.lastValue.length-C>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-C]==y[y.length-C];)C++,O--;k-=C-1,S-=C-1;var L=_.length-C+1;if(L<0&&(M=-L,L=0),_=_.slice(0,L),!A&&!_&&!k&&!M&&!O&&!S)return"";this.sendingText=!0;var I=!1;return d.isAndroid&&_==". "&&(_=" ",I=!0),_&&!M&&!O&&!k&&!S||this.commandMode?this.host.onTextInput(_):this.host.onTextInput(_,{extendLeft:M,extendRight:O,restoreStart:k,restoreEnd:S}),this.sendingText=!1,this.lastValue=y,this.lastSelectionStart=T,this.lastSelectionEnd=$,this.lastRestoreEnd=S,I?` -`:_},w.prototype.onSelect=function(y){var A=this;if(!this.inComposition){var T=function($){return $.selectionStart===0&&$.selectionEnd>=A.lastValue.length&&$.value===A.lastValue&&A.lastValue&&$.selectionEnd!==A.lastSelectionEnd};this.copied?this.copied=!1:T(this.text)?(this.host.selectAll(),this.resetSelection()):D&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},w.prototype.$resetSelectionIOS=function(y){if(!(!this.$isFocused||this.copied&&!y||this.sendingText)){y||(y="");var A=` +`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(t,n,h){n.isDark=!1,n.cssClass="ace-tm",n.cssText=t("./textmate-css"),n.$id="ace/theme/textmate";var i=t("../lib/dom");i.importCssString(n.cssText,n.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(t,n,h){"no use strict";var i=t("./lib/lang"),s=t("./lib/net"),d=t("./lib/dom"),o=t("./lib/app_config").AppConfig;h.exports=n=new o;var l={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};n.get=function(p){if(!l.hasOwnProperty(p))throw new Error("Unknown config key: "+p);return l[p]},n.set=function(p,u){if(l.hasOwnProperty(p))l[p]=u;else if(this.setDefaultValue("",p,u)==!1)throw new Error("Unknown config key: "+p);p=="useStrictCSP"&&d.useStrictCSP(u)},n.all=function(){return i.copyObject(l)},n.$modes={},n.moduleUrl=function(p,u){if(l.$moduleUrls[p])return l.$moduleUrls[p];var f=p.split("/");u=u||f[f.length-2]||"";var g=u=="snippets"?"/":"-",v=f[f.length-1];if(u=="worker"&&g=="-"){var b=new RegExp("^"+u+"[\\-_]|[\\-_]"+u+"$","g");v=v.replace(b,"")}(!v||v==u)&&f.length>1&&(v=f[f.length-2]);var D=l[u+"Path"];return D==null?D=l.basePath:g=="/"&&(u=g=""),D&&D.slice(-1)!="/"&&(D+="/"),D+u+g+v+this.get("suffix")},n.setModuleUrl=function(p,u){return l.$moduleUrls[p]=u};var r=function(p,u){if(p==="ace/theme/textmate"||p==="./theme/textmate")return u(null,t("./theme/textmate"));if(a)return a(p,u);console.error("loader is not configured")},a;n.setLoader=function(p){a=p},n.dynamicModules=Object.create(null),n.$loading={},n.$loaded={},n.loadModule=function(p,u){var f;if(Array.isArray(p))var g=p[0],v=p[1];else if(typeof p=="string")var v=p;var b=function(D){if(D&&!n.$loading[v])return u&&u(D);if(n.$loading[v]||(n.$loading[v]=[]),n.$loading[v].push(u),!(n.$loading[v].length>1)){var E=function(){r(v,function(w,y){y&&(n.$loaded[v]=y),n._emit("load.module",{name:v,module:y});var A=n.$loading[v];n.$loading[v]=null,A.forEach(function(T){T&&T(y)})})};if(!n.get("packaged"))return E();s.loadScript(n.moduleUrl(v,g),E),c()}};if(n.dynamicModules[v])n.dynamicModules[v]().then(function(D){D.default?b(D.default):b(D)});else{try{f=this.$require(v)}catch{}b(f||n.$loaded[v])}},n.$require=function(p){if(typeof h.require=="function"){var u="require";return h[u](p)}},n.setModuleLoader=function(p,u){n.dynamicModules[p]=u};var c=function(){!l.basePath&&!l.workerPath&&!l.modePath&&!l.themePath&&!Object.keys(l.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),c=function(){})};n.version="1.43.4"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(t,n,h){t("./lib/fixoldbrowsers");var i=t("./config");i.setLoader(function(l,r){t([l],function(a){r(null,a)})});var s=(function(){return this||typeof window<"u"&&window})();h.exports=function(l){i.init=d,i.$require=t,l.require=t},d(!0);function d(l){if(!(!s||!s.document)){i.set("packaged",l||t.packaged||h.packaged||s.define&&(void 0).packaged);var r={},a="",c=document.currentScript||document._currentScript,p=c&&c.ownerDocument||document;c&&c.src&&(a=c.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var u=p.getElementsByTagName("script"),f=0;f ["+this.end.row+"/"+this.end.column+"]"},s.prototype.contains=function(d,o){return this.compare(d,o)==0},s.prototype.compareRange=function(d){var o,l=d.end,r=d.start;return o=this.compare(l.row,l.column),o==1?(o=this.compare(r.row,r.column),o==1?2:o==0?1:0):o==-1?-2:(o=this.compare(r.row,r.column),o==-1?-1:o==1?42:0)},s.prototype.comparePoint=function(d){return this.compare(d.row,d.column)},s.prototype.containsRange=function(d){return this.comparePoint(d.start)==0&&this.comparePoint(d.end)==0},s.prototype.intersects=function(d){var o=this.compareRange(d);return o==-1||o==0||o==1},s.prototype.isEnd=function(d,o){return this.end.row==d&&this.end.column==o},s.prototype.isStart=function(d,o){return this.start.row==d&&this.start.column==o},s.prototype.setStart=function(d,o){typeof d=="object"?(this.start.column=d.column,this.start.row=d.row):(this.start.row=d,this.start.column=o)},s.prototype.setEnd=function(d,o){typeof d=="object"?(this.end.column=d.column,this.end.row=d.row):(this.end.row=d,this.end.column=o)},s.prototype.inside=function(d,o){return this.compare(d,o)==0?!(this.isEnd(d,o)||this.isStart(d,o)):!1},s.prototype.insideStart=function(d,o){return this.compare(d,o)==0?!this.isEnd(d,o):!1},s.prototype.insideEnd=function(d,o){return this.compare(d,o)==0?!this.isStart(d,o):!1},s.prototype.compare=function(d,o){return!this.isMultiLine()&&d===this.start.row?othis.end.column?1:0:dthis.end.row?1:this.start.row===d?o>=this.start.column?0:-1:this.end.row===d?o<=this.end.column?0:1:0},s.prototype.compareStart=function(d,o){return this.start.row==d&&this.start.column==o?-1:this.compare(d,o)},s.prototype.compareEnd=function(d,o){return this.end.row==d&&this.end.column==o?1:this.compare(d,o)},s.prototype.compareInside=function(d,o){return this.end.row==d&&this.end.column==o?1:this.start.row==d&&this.start.column==o?-1:this.compare(d,o)},s.prototype.clipRows=function(d,o){if(this.end.row>o)var l={row:o+1,column:0};else if(this.end.rowo)var r={row:o+1,column:0};else if(this.start.row1?(T++,T>4&&(T=1)):T=1,s.isIE){var C=Math.abs(S.clientX-x)>5||Math.abs(S.clientY-M)>5;(!O||C)&&(T=1),O&&clearTimeout(O),O=setTimeout(function(){O=null},E[T-1]||600),T==1&&(x=S.clientX,M=S.clientY)}if(S._clicks=T,w[y]("mousedown",S),T>4)T=0;else if(T>1)return w[y](_[T],S)}Array.isArray(D)||(D=[D]),D.forEach(function(S){p(S,"mousedown",k,A)})};function f(D){return 0|(D.ctrlKey?1:0)|(D.altKey?2:0)|(D.shiftKey?4:0)|(D.metaKey?8:0)}n.getModifierString=function(D){return i.KEY_MODS[f(D)]};function g(D,E,w){var y=f(E);if(!w&&E.code&&(w=i.$codeToKeyCode[E.code]||w),!s.isMac&&d){if(E.getModifierState&&(E.getModifierState("OS")||E.getModifierState("Win"))&&(y|=8),d.altGr)if((3&y)!=3)d.altGr=0;else return;if(w===18||w===17){var A=E.location;if(w===17&&A===1)d[w]==1&&(o=E.timeStamp);else if(w===18&&y===3&&A===2){var T=E.timeStamp-o;T<50&&(d.altGr=!0)}}}if(w in i.MODIFIER_KEYS&&(w=-1),!(!y&&w===13&&E.location===3&&(D(E,y,-w),E.defaultPrevented))){if(s.isChromeOS&&y&8){if(D(E,y,w),E.defaultPrevented)return;y&=-9}return!y&&!(w in i.FUNCTION_KEYS)&&!(w in i.PRINTABLE_KEYS)?!1:D(E,y,w)}}n.addCommandKeyListener=function(D,E,w){var y=null;p(D,"keydown",function(A){d[A.keyCode]=(d[A.keyCode]||0)+1;var T=g(E,A,A.keyCode);return y=A.defaultPrevented,T},w),p(D,"keypress",function(A){y&&(A.ctrlKey||A.altKey||A.shiftKey||A.metaKey)&&(n.stopEvent(A),y=null)},w),p(D,"keyup",function(A){d[A.keyCode]=null},w),d||(v(),p(window,"focus",v))};function v(){d=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!s.isOldIE){var b=1;n.nextTick=function(D,E){E=E||window;var w="zero-timeout-message-"+b++,y=function(A){A.data==w&&(n.stopPropagation(A),u(E,"message",y),D())};p(E,"message",y),E.postMessage(w,"*")}}n.$idleBlocked=!1,n.onIdle=function(D,E){return setTimeout(function w(){n.$idleBlocked?setTimeout(w,100):D()},E)},n.$idleBlockId=null,n.blockIdle=function(D){n.$idleBlockId&&clearTimeout(n.$idleBlockId),n.$idleBlocked=!0,n.$idleBlockId=setTimeout(function(){n.$idleBlocked=!1},D||100)},n.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),n.nextFrame?n.nextFrame=n.nextFrame.bind(window):n.nextFrame=function(D){setTimeout(D,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(t,n,h){var i;h.exports={lineMode:!1,pasteCancelled:function(){return i&&i>Date.now()-50?!0:i=!1},cancel:function(){i=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(t,n,h){var i=t("../lib/event"),s=t("../config").nls,d=t("../lib/useragent"),o=t("../lib/dom"),l=t("../lib/lang"),r=t("../clipboard"),a=d.isChrome<18,c=d.isIE,p=d.isChrome>63,u=400,f=t("../lib/keys"),g=f.KEY_MODS,v=d.isIOS,b=v?/\s/:/\n/,D=d.isMobile,E=(function(){function w(y,A){var T=this;this.host=A,this.text=o.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","off"),this.text.setAttribute("autocomplete","off"),this.text.setAttribute("autocorrect","off"),this.text.setAttribute("autocapitalize","off"),this.text.setAttribute("spellcheck","false"),this.text.style.opacity="0",y.insertBefore(this.text,y.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",D||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch{}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),i.addListener(this.text,"blur",function(x){T.ignoreFocusEvents||(A.onBlur(x),T.$isFocused=!1)},A),i.addListener(this.text,"focus",function(x){if(!T.ignoreFocusEvents){if(T.$isFocused=!0,d.isEdge)try{if(!document.hasFocus())return}catch{}A.onFocus(x),d.isEdge?setTimeout(T.resetSelection.bind(T)):T.resetSelection()}},A),this.$focusScroll=!1,A.on("beforeEndOperation",function(){var x=A.curOp,M=x&&x.command&&x.command.name;if(M!="insertstring"){var O=M&&(x.docChanged||x.selectionChanged);T.inComposition&&O&&(T.lastValue=T.text.value="",T.onCompositionEnd()),T.resetSelection()}}),A.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=v?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&A.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,i.addCommandKeyListener(this.text,function(x,M,O){if(!T.inComposition)return A.onCommandKey(x,M,O)},A),i.addListener(this.text,"select",this.onSelect.bind(this),A),i.addListener(this.text,"input",this.onInput.bind(this),A),i.addListener(this.text,"cut",this.onCut.bind(this),A),i.addListener(this.text,"copy",this.onCopy.bind(this),A),i.addListener(this.text,"paste",this.onPaste.bind(this),A),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&i.addListener(y,"keydown",function(x){if(!(d.isMac&&!x.metaKey||!x.ctrlKey))switch(x.keyCode){case 67:T.onCopy(x);break;case 86:T.onPaste(x);break;case 88:T.onCut(x);break}},A),this.syncComposition=l.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),i.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),A),i.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),A),i.addListener(this.text,"keyup",this.onKeyup.bind(this),A),i.addListener(this.text,"keydown",this.syncComposition.bind(this),A),i.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),A),this.closeTimeout,i.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),A),i.addListener(this.text,"mousedown",function(x){x.preventDefault(),T.onContextMenuClose()},A),i.addListener(A.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),A),i.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),A),v&&this.addIosSelectionHandler(y,A,this.text)}return w.prototype.addIosSelectionHandler=function(y,A,T){var x=this,M=null,O=!1;T.addEventListener("keydown",function(k){M&&clearTimeout(M),O=!0},!0),T.addEventListener("keyup",function(k){M=setTimeout(function(){O=!1},100)},!0);var _=function(k){if(document.activeElement===T&&!(O||x.inComposition||A.$mouseHandler.isMousePressed)&&!x.copied){var S=T.selectionStart,C=T.selectionEnd,L=null,I=0;if(S==0?L=f.up:S==1?L=f.home:C>x.lastSelectionEnd&&x.lastValue[C]==` +`?L=f.end:Sx.lastSelectionEnd&&x.lastValue.slice(0,C).split(` +`).length>2?L=f.down:C>x.lastSelectionEnd&&x.lastValue[C-1]==" "?(L=f.right,I=g.option):(C>x.lastSelectionEnd||C==x.lastSelectionEnd&&x.lastSelectionEnd!=x.lastSelectionStart&&S==C)&&(L=f.right),S!==C&&(I|=g.shift),L){var F=A.onCommandKey({},I,L);if(!F&&A.commands){L=f.keyCodeToString(L);var R=A.commands.findKeyCommand(I,L);R&&A.execCommand(R)}x.lastSelectionStart=S,x.lastSelectionEnd=C,x.resetSelection("")}}};document.addEventListener("selectionchange",_),A.on("destroy",function(){document.removeEventListener("selectionchange",_)})},w.prototype.onContextMenuClose=function(){var y=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){y.tempStyle&&(y.text.style.cssText=y.tempStyle,y.tempStyle=""),y.host.renderer.$isMousePressed=!1,y.host.renderer.$keepTextAreaAtCursor&&y.host.renderer.$moveTextAreaToCursor()},0)},w.prototype.$onContextMenu=function(y){this.host.textInput.onContextMenu(y),this.onContextMenuClose()},w.prototype.onKeyup=function(y){y.keyCode==27&&this.text.value.lengthu+100||b.test(T)||D&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},w.prototype.sendText=function(y,A){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),y&&this.host.onPaste(y),this.pasted=!1,"";for(var T=this.text.selectionStart,x=this.text.selectionEnd,M=this.lastSelectionStart,O=this.lastValue.length-this.lastSelectionEnd,_=y,k=y.length-T,S=y.length-x,C=0;M>0&&this.lastValue[C]==y[C];)C++,M--;for(_=_.slice(C),C=1;O>0&&this.lastValue.length-C>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-C]==y[y.length-C];)C++,O--;k-=C-1,S-=C-1;var L=_.length-C+1;if(L<0&&(M=-L,L=0),_=_.slice(0,L),!A&&!_&&!k&&!M&&!O&&!S)return"";this.sendingText=!0;var I=!1;return d.isAndroid&&_==". "&&(_=" ",I=!0),_&&!M&&!O&&!k&&!S||this.commandMode?this.host.onTextInput(_):this.host.onTextInput(_,{extendLeft:M,extendRight:O,restoreStart:k,restoreEnd:S}),this.sendingText=!1,this.lastValue=y,this.lastSelectionStart=T,this.lastSelectionEnd=x,this.lastRestoreEnd=S,I?` +`:_},w.prototype.onSelect=function(y){var A=this;if(!this.inComposition){var T=function(x){return x.selectionStart===0&&x.selectionEnd>=A.lastValue.length&&x.value===A.lastValue&&A.lastValue&&x.selectionEnd!==A.lastSelectionEnd};this.copied?this.copied=!1:T(this.text)?(this.host.selectAll(),this.resetSelection()):D&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},w.prototype.$resetSelectionIOS=function(y){if(!(!this.$isFocused||this.copied&&!y||this.sendingText)){y||(y="");var A=` ab`+y+`cde fg -`;A!=this.text.value&&(this.text.value=this.lastValue=A);var T=4,$=4+(y.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=T||this.lastSelectionEnd!=$)&&this.text.setSelectionRange(T,$),this.lastSelectionStart=T,this.lastSelectionEnd=$}},w.prototype.$resetSelection=function(){var y=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var A=0,T=0,$="",M=function(R,B){for(var N=B,H=1;H<=R-y.rowStart&&H<2*y.numberOfExtraLines+1;H++)N+=y.host.session.getLine(R-H).length+1;return N};if(this.host.session){var O=this.host.selection,_=O.getRange(),k=O.cursor.row;k===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):k===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(kthis.rowEnd+1)&&(this.rowStart=k>this.numberOfExtraLines?k-this.numberOfExtraLines:0,this.rowEnd=k>this.numberOfExtraLines?k+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var S=[],C=this.rowStart;C<=this.rowEnd;C++)S.push(this.host.session.getLine(C));if($=S.join(` -`),A=M(_.start.row,_.start.column),T=M(_.end.row,_.end.column),_.start.rowthis.rowEnd){var I=this.host.session.getLine(this.rowEnd+1);T=_.end.row>this.rowEnd+1?I.length:_.end.column,T+=$.length+1,$=$+` -`+I}else D&&k>0&&($=` -`+$,T+=1,A+=1);$.length>h&&(A1),c.preventDefault()},a.prototype.startSelect=function(c,p){c=c||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var h=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?h.selection.selectToPosition(c):p||h.selection.moveToPosition(c),p||this.select(),h.setStyle("ace_selecting"),this.setState("select"))},a.prototype.select=function(){var c,p=this.editor,h=p.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var f=this.$clickSelection.comparePoint(h);if(f==-1)c=this.$clickSelection.end;else if(f==1)c=this.$clickSelection.start;else{var g=r(this.$clickSelection,h,p.session);h=g.cursor,c=g.anchor}p.selection.setSelectionAnchor(c.row,c.column)}p.selection.selectToPosition(h),p.renderer.scrollCursorIntoView()},a.prototype.extendSelectionBy=function(c){var p,h=this.editor,f=h.renderer.screenToTextCoordinates(this.x,this.y),g=h.selection[c](f.row,f.column);if(this.$clickSelection){var v=this.$clickSelection.comparePoint(g.start),b=this.$clickSelection.comparePoint(g.end);if(v==-1&&b<=0)p=this.$clickSelection.end,(g.end.row!=f.row||g.end.column!=f.column)&&(f=g.start);else if(b==1&&v>=0)p=this.$clickSelection.start,(g.start.row!=f.row||g.start.column!=f.column)&&(f=g.end);else if(v==-1&&b==1)f=g.end,p=g.start;else{var D=r(this.$clickSelection,f,h.session);f=D.cursor,p=D.anchor}h.selection.setSelectionAnchor(p.row,p.column)}h.selection.selectToPosition(f),h.renderer.scrollCursorIntoView()},a.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},a.prototype.focusWait=function(){var c=l(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),p=Date.now();(c>s||p-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},a.prototype.onDoubleClick=function(c){var p=c.getDocumentPosition(),h=this.editor,f=h.session,g=f.getBracketRange(p);g?(g.isEmpty()&&(g.start.column--,g.end.column++),this.setState("select")):(g=h.selection.getWordRange(p.row,p.column),this.setState("selectByWords")),this.$clickSelection=g,this.select()},a.prototype.onTripleClick=function(c){var p=c.getDocumentPosition(),h=this.editor;this.setState("selectByLines");var f=h.getSelectionRange();f.isMultiLine()&&f.contains(p.row,p.column)?(this.$clickSelection=h.selection.getLineRange(f.start.row),this.$clickSelection.end=h.selection.getLineRange(f.end.row).end):this.$clickSelection=h.selection.getLineRange(p.row),this.select()},a.prototype.onQuadClick=function(c){var p=this.editor;p.selectAll(),this.$clickSelection=p.getSelectionRange(),this.setState("selectAll")},a.prototype.onMouseWheel=function(c){if(!c.getAccelKey()){c.getShiftKey()&&c.wheelY&&!c.wheelX&&(c.wheelX=c.wheelY,c.wheelY=0);var p=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var h=this.$lastScroll,f=c.domEvent.timeStamp,g=f-h.t,v=g?c.wheelX/g:h.vx,b=g?c.wheelY/g:h.vy;g=1&&p.renderer.isScrollableBy(c.wheelX*c.speed,0)&&(E=!0),D<=1&&p.renderer.isScrollableBy(0,c.wheelY*c.speed)&&(E=!0),E)h.allowed=f;else if(f-h.allowedd.clientHeight;o||s.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(t,n,u){var i=this&&this.__extends||(function(){var f=function(g,v){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,D){b.__proto__=D}||function(b,D){for(var E in D)Object.prototype.hasOwnProperty.call(D,E)&&(b[E]=D[E])},f(g,v)};return function(g,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");f(g,v);function b(){this.constructor=g}g.prototype=v===null?Object.create(v):(b.prototype=v.prototype,new b)}})(),s=this&&this.__values||function(f){var g=typeof Symbol=="function"&&Symbol.iterator,v=g&&f[g],b=0;if(v)return v.call(f);if(f&&typeof f.length=="number")return{next:function(){return f&&b>=f.length&&(f=void 0),{value:f&&f[b++],done:!f}}};throw new TypeError(g?"Object is not iterable.":"Symbol.iterator is not defined.")},d=t("./lib/dom");t("./lib/event");var o=t("./range").Range,l=t("./lib/scroll").preventParentScroll,r="ace_tooltip",a=(function(){function f(g){this.isOpen=!1,this.$element=null,this.$parentNode=g}return f.prototype.$init=function(){return this.$element=d.createElement("div"),this.$element.className=r,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},f.prototype.getElement=function(){return this.$element||this.$init()},f.prototype.setText=function(g){this.getElement().textContent=g},f.prototype.setHtml=function(g){this.getElement().innerHTML=g},f.prototype.setPosition=function(g,v){this.getElement().style.left=g+"px",this.getElement().style.top=v+"px"},f.prototype.setClassName=function(g){d.addCssClass(this.getElement(),g)},f.prototype.setTheme=function(g){this.theme&&(this.theme.isDark&&d.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&d.removeCssClass(this.getElement(),this.theme.cssClass)),g.isDark&&d.addCssClass(this.getElement(),"ace_dark"),g.cssClass&&d.addCssClass(this.getElement(),g.cssClass),this.theme={isDark:g.isDark,cssClass:g.cssClass}},f.prototype.show=function(g,v,b){g!=null&&this.setText(g),v!=null&&b!=null&&this.setPosition(v,b),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},f.prototype.hide=function(g){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=r,this.isOpen=!1)},f.prototype.getHeight=function(){return this.getElement().offsetHeight},f.prototype.getWidth=function(){return this.getElement().offsetWidth},f.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},f})(),c=(function(){function f(){this.popups=[]}return f.prototype.addPopup=function(g){this.popups.push(g),this.updatePopups()},f.prototype.removePopup=function(g){var v=this.popups.indexOf(g);v!==-1&&(this.popups.splice(v,1),this.updatePopups())},f.prototype.updatePopups=function(){var g,v,b,D;this.popups.sort(function(_,k){return k.priority-_.priority});var E=[];try{for(var w=s(this.popups),y=w.next();!y.done;y=w.next()){var A=y.value,T=!0;try{for(var $=(b=void 0,s(E)),M=$.next();!M.done;M=$.next()){var O=M.value;if(this.doPopupsOverlap(O,A)){T=!1;break}}}catch(_){b={error:_}}finally{try{M&&!M.done&&(D=$.return)&&D.call($)}finally{if(b)throw b.error}}T?E.push(A):A.hide()}}catch(_){g={error:_}}finally{try{y&&!y.done&&(v=w.return)&&v.call(w)}finally{if(g)throw g.error}}},f.prototype.doPopupsOverlap=function(g,v){var b=g.getElement().getBoundingClientRect(),D=v.getElement().getBoundingClientRect();return b.leftD.left&&b.topD.top},f})(),p=new c;n.popupManager=p,n.Tooltip=a;var h=(function(f){i(g,f);function g(v){v===void 0&&(v=document.body);var b=f.call(this,v)||this;b.timeout=void 0,b.lastT=0,b.idleTime=350,b.lastEvent=void 0,b.onMouseOut=b.onMouseOut.bind(b),b.onMouseMove=b.onMouseMove.bind(b),b.waitForHover=b.waitForHover.bind(b),b.hide=b.hide.bind(b);var D=b.getElement();return D.style.whiteSpace="pre-wrap",D.style.pointerEvents="auto",D.addEventListener("mouseout",b.onMouseOut),D.tabIndex=-1,D.addEventListener("blur",function(){D.contains(document.activeElement)||this.hide()}.bind(b)),D.addEventListener("wheel",l),b}return g.prototype.addToEditor=function(v){v.on("mousemove",this.onMouseMove),v.on("mousedown",this.hide);var b=v.renderer.getMouseEventTarget();b&&typeof b.removeEventListener=="function"&&b.addEventListener("mouseout",this.onMouseOut,!0)},g.prototype.removeFromEditor=function(v){v.off("mousemove",this.onMouseMove),v.off("mousedown",this.hide);var b=v.renderer.getMouseEventTarget();b&&typeof b.removeEventListener=="function"&&b.removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},g.prototype.onMouseMove=function(v,b){this.lastEvent=v,this.lastT=Date.now();var D=b.$mouseHandler.isMousePressed;if(this.isOpen){var E=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(E.row,E.column)||D||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||D||(this.lastEvent=v,this.timeout=setTimeout(this.waitForHover,this.idleTime))},g.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var v=Date.now()-this.lastT;if(this.idleTime-v>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-v);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},g.prototype.isOutsideOfText=function(v){var b=v.editor,D=v.getDocumentPosition(),E=b.session.getLine(D.row);if(D.column==E.length){var w=b.renderer.pixelToScreenCoordinates(v.clientX,v.clientY),y=b.session.documentToScreenPosition(D.row,D.column);if(y.column!=w.column||y.row!=w.row)return!0}return!1},g.prototype.setDataProvider=function(v){this.$gatherData=v},g.prototype.showForRange=function(v,b,D,E){if(!(E&&E!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var w=v.renderer;this.isOpen||(p.addPopup(this),this.$registerCloseEvents(),this.setTheme(w.theme)),this.isOpen=!0,this.range=o.fromPoints(b.start,b.end);var y=w.textToScreenCoordinates(b.start.row,b.start.column),A=w.scroller.getBoundingClientRect();y.pageX=h.length&&(h=void 0),{value:h&&h[v++],done:!h}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")},d=t("../lib/dom"),o=t("./mouse_event").MouseEvent,l=t("../tooltip").HoverTooltip,r=t("../config").nls,a=t("../range").Range;function c(h){var f=h.editor,g=f.renderer.$gutterLayer;h.$tooltip=new p(f),h.$tooltip.addToEditor(f),h.$tooltip.setDataProvider(function(v,b){var D=v.getDocumentPosition().row;h.$tooltip.showTooltip(D)}),h.editor.setDefaultHandler("guttermousedown",function(v){if(!(!f.isFocused()||v.getButton()!=0)){var b=g.getRegion(v);if(b!="foldWidgets"){var D=v.getDocumentPosition().row,E=f.session.selection;if(v.getShiftKey())E.selectTo(D,0);else{if(v.domEvent.detail==2)return f.selectAll(),v.preventDefault();h.$clickSelection=f.selection.getLineRange(D)}return h.setState("selectByLines"),h.captureMouse(v),v.preventDefault()}}})}n.GutterHandler=c;var p=(function(h){i(f,h);function f(g){var v=h.call(this,g.container)||this;v.id="gt"+ ++f.$uid,v.editor=g,v.visibleTooltipRow;var b=v.getElement();return b.setAttribute("role","tooltip"),b.setAttribute("id",v.id),b.style.pointerEvents="auto",v.idleTime=50,v.onDomMouseMove=v.onDomMouseMove.bind(v),v.onDomMouseOut=v.onDomMouseOut.bind(v),v.setClassName("ace_gutter-tooltip"),v}return f.prototype.onDomMouseMove=function(g){var v=new o(g,this.editor);this.onMouseMove(v,this.editor)},f.prototype.onDomMouseOut=function(g){var v=new o(g,this.editor);this.onMouseOut(v)},f.prototype.addToEditor=function(g){var v=g.renderer.$gutter;v.addEventListener("mousemove",this.onDomMouseMove),v.addEventListener("mouseout",this.onDomMouseOut),h.prototype.addToEditor.call(this,g)},f.prototype.removeFromEditor=function(g){var v=g.renderer.$gutter;v.removeEventListener("mousemove",this.onDomMouseMove),v.removeEventListener("mouseout",this.onDomMouseOut),h.prototype.removeFromEditor.call(this,g)},f.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),h.prototype.destroy.call(this)},Object.defineProperty(f,"annotationLabels",{get:function(){return{error:{singular:r("gutter-tooltip.aria-label.error.singular","error"),plural:r("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:r("gutter-tooltip.aria-label.security.singular","security finding"),plural:r("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:r("gutter-tooltip.aria-label.warning.singular","warning"),plural:r("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:r("gutter-tooltip.aria-label.info.singular","information message"),plural:r("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:r("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:r("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),f.prototype.showTooltip=function(g){var v,b=this.editor.renderer.$gutterLayer,D=b.$annotations[g],E;D?E={displayText:Array.from(D.displayText),type:Array.from(D.type)}:E={displayText:[],type:[]};var w=b.session.getFoldLine(g);if(w&&b.$showFoldedAnnotations){for(var y={error:[],security:[],warning:[],info:[],hint:[]},A={error:1,security:2,warning:3,info:4,hint:5},T,$=g+1;$<=w.end.row;$++)if(b.$annotations[$])for(var M=0;M2)return b.childNodes[2]}},f.prototype.$findCellByRow=function(g){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(v){return v.row===g})},f.prototype.hide=function(g){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.visibleTooltipRow!=null){var v=this.$findLinkedAnnotationNode(this.visibleTooltipRow);v&&v.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),h.prototype.hide.call(this,g)}},f.annotationsToSummaryString=function(g){var v,b,D=[],E=["error","security","warning","info","hint"];try{for(var w=s(E),y=w.next();!y.done;y=w.next()){var A=y.value;if(g[A].length){var T=g[A].length===1?f.annotationLabels[A].singular:f.annotationLabels[A].plural;D.push("".concat(g[A].length," ").concat(T))}}}catch($){v={error:$}}finally{try{y&&!y.done&&(b=w.return)&&b.call(w)}finally{if(v)throw v.error}}return D.join(", ")},f.prototype.isOutsideOfText=function(g){var v=g.editor,b=v.renderer.$gutter.getBoundingClientRect();return!(g.clientX>=b.left&&g.clientX<=b.right&&g.clientY>=b.top&&g.clientY<=b.bottom)},f})(l);p.$uid=0,n.GutterTooltip=p}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(t,n,u){var i=t("../lib/dom"),s=t("../lib/event"),d=t("../lib/useragent"),o=200,l=200,r=5;function a(p){var h=p.editor,f=i.createElement("div");f.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",f.textContent=" ";var g=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];g.forEach(function(W){p[W]=this[W]},this),h.on("mousedown",this.onMouseDown.bind(p));var v=h.container,b,D,E,w,y,A,T=0,$,M,O,_,k;this.onDragStart=function(W){if(this.cancelDrag||!v.draggable){var j=this;return setTimeout(function(){j.startSelect(),j.captureMouse(W)},0),W.preventDefault()}y=h.getSelectionRange();var U=W.dataTransfer;U.effectAllowed=h.getReadOnly()?"copy":"copyMove",h.container.appendChild(f),U.setDragImage&&U.setDragImage(f,0,0),setTimeout(function(){h.container.removeChild(f)}),U.clearData(),U.setData("Text",h.session.getTextRange()),M=!0,this.setState("drag")},this.onDragEnd=function(W){if(v.draggable=!1,M=!1,this.setState(null),!h.getReadOnly()){var j=W.dataTransfer.dropEffect;!$&&j=="move"&&h.session.remove(h.getSelectionRange()),h.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(W){if(!(h.getReadOnly()||!N(W.dataTransfer)))return D=W.clientX,E=W.clientY,b||I(),T++,W.dataTransfer.dropEffect=$=H(W),s.preventDefault(W)},this.onDragOver=function(W){if(!(h.getReadOnly()||!N(W.dataTransfer)))return D=W.clientX,E=W.clientY,b||(I(),T++),R!==null&&(R=null),W.dataTransfer.dropEffect=$=H(W),s.preventDefault(W)},this.onDragLeave=function(W){if(T--,T<=0&&b)return F(),$=null,s.preventDefault(W)},this.onDrop=function(W){if(A){var j=W.dataTransfer;if(M)switch($){case"move":y.contains(A.row,A.column)?y={start:A,end:A}:y=h.moveText(y,A);break;case"copy":y=h.moveText(y,A,!0);break}else{var U=j.getData("Text");y={start:A,end:h.session.insert(A,U)},h.focus(),$=null}return F(),s.preventDefault(W)}},s.addListener(v,"dragstart",this.onDragStart.bind(p),h),s.addListener(v,"dragend",this.onDragEnd.bind(p),h),s.addListener(v,"dragenter",this.onDragEnter.bind(p),h),s.addListener(v,"dragover",this.onDragOver.bind(p),h),s.addListener(v,"dragleave",this.onDragLeave.bind(p),h),s.addListener(v,"drop",this.onDrop.bind(p),h);function S(W,j){var U=Date.now(),K=!j||W.row!=j.row,J=!j||W.column!=j.column;if(!_||K||J)h.moveCursorToPosition(W),_=U,k={x:D,y:E};else{var Y=c(k.x,k.y,D,E);Y>r?_=null:U-_>=l&&(h.renderer.scrollCursorIntoView(),_=null)}}function C(W,j){var U=Date.now(),K=h.renderer.layerConfig.lineHeight,J=h.renderer.layerConfig.characterWidth,Y=h.renderer.scroller.getBoundingClientRect(),X={x:{left:D-Y.left,right:Y.right-D},y:{top:E-Y.top,bottom:Y.bottom-E}},q=Math.min(X.x.left,X.x.right),ne=Math.min(X.y.top,X.y.bottom),ue={row:W.row,column:W.column};q/J<=2&&(ue.column+=X.x.left=o&&h.renderer.scrollCursorIntoView(ue):O=U:O=null}function L(){var W=A;A=h.renderer.screenToTextCoordinates(D,E),S(A,W),C(A,W)}function I(){y=h.selection.toOrientedRange(),b=h.session.addMarker(y,"ace_selection",h.getSelectionStyle()),h.clearSelection(),h.isFocused()&&h.renderer.$cursorLayer.setBlinking(!1),clearInterval(w),L(),w=setInterval(L,20),T=0,s.addListener(document,"mousemove",B)}function F(){clearInterval(w),h.session.removeMarker(b),b=null,h.selection.fromOrientedRange(y),h.isFocused()&&!M&&h.$resetCursorStyle(),y=null,A=null,T=0,O=null,_=null,s.removeListener(document,"mousemove",B)}var R=null;function B(){R==null&&(R=setTimeout(function(){R!=null&&b&&F()},20))}function N(W){var j=W.types;return!j||Array.prototype.some.call(j,function(U){return U=="text/plain"||U=="Text"})}function H(W){var j=["copy","copymove","all","uninitialized"],U=["move","copymove","linkmove","all","uninitialized"],K=d.isMac?W.altKey:W.ctrlKey,J="uninitialized";try{J=W.dataTransfer.effectAllowed.toLowerCase()}catch{}var Y="none";return K&&j.indexOf(J)>=0?Y="copy":U.indexOf(J)>=0?Y="move":j.indexOf(J)>=0&&(Y="copy"),Y}}(function(){this.dragWait=function(){var p=Date.now()-this.mousedownEvent.time;p>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var p=this.editor.container;p.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(p){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var p=this.editor,h=p.container;h.draggable=!0,p.renderer.$cursorLayer.setBlinking(!1),p.setStyle("ace_dragging");var f=d.isWin?"default":"move";p.renderer.setCursorStyle(f),this.setState("dragReady")},this.onMouseDrag=function(p){var h=this.editor.container;if(d.isIE&&this.state=="dragReady"){var f=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);f>3&&h.dragDrop()}if(this.state==="dragWait"){var f=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);f>0&&(h.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(p){if(this.$dragEnabled){this.mousedownEvent=p;var h=this.editor,f=p.inSelection(),g=p.getButton(),v=p.domEvent.detail||1;if(v===1&&g===0&&f){if(p.editor.inMultiSelectMode&&(p.getAccelKey()||p.getShiftKey()))return;this.mousedownEvent.time=Date.now();var b=p.domEvent.target||p.domEvent.srcElement;if("unselectable"in b&&(b.unselectable="on"),h.getDragDelay()){if(d.isWebKit){this.cancelDrag=!0;var D=h.container;D.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(p,this.onMouseDrag.bind(this)),p.defaultPrevented=!0}}}}).call(a.prototype);function c(p,h,f,g){return Math.sqrt(Math.pow(f-p,2)+Math.pow(g-h,2))}n.DragdropHandler=a}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(t,n,u){var i=t("./mouse_event").MouseEvent,s=t("../lib/event"),d=t("../lib/dom");n.addTouchListeners=function(o,l){var r="scroll",a,c,p,h,f,g,v=0,b,D=0,E=0,w=0,y,A;function T(){var S=window.navigator&&window.navigator.clipboard,C=!1,L=function(){var R=l.getCopyText(),B=l.session.getUndoManager().hasUndo();A.replaceChild(d.buildDom(C?["span",!R&&I("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],R&&I("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],R&&I("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],S&&I("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],B&&I("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],I("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],I("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),A.firstChild)},I=function(R){return l.commands.canExecute(R,l)},F=function(R){var B=R.target.getAttribute("action");if(B=="more"||!C)return C=!C,L();B=="paste"?S.readText().then(function(N){l.execCommand(B,N)}):B&&((B=="cut"||B=="copy")&&(S?S.writeText(l.getCopyText()):document.execCommand("copy")),l.execCommand(B)),A.firstChild.style.display="none",C=!1,B!="openCommandPalette"&&l.focus()};A=d.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(R){r="menu",R.stopPropagation(),R.preventDefault(),l.textInput.focus()},ontouchend:function(R){R.stopPropagation(),R.preventDefault(),F(R)},onclick:F},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],l.container)}function $(){if(!l.getOption("enableMobileMenu")){A&&M();return}A||T();var S=l.selection.cursor,C=l.renderer.textToScreenCoordinates(S.row,S.column),L=l.renderer.textToScreenCoordinates(0,0).pageX,I=l.renderer.scrollLeft,F=l.container.getBoundingClientRect();A.style.top=C.pageY-F.top-3+"px",C.pageX-F.left=2?l.selection.getLineRange(b.row):l.session.getBracketRange(b);S&&!S.isEmpty()?l.selection.setRange(S):l.selection.selectWord(),r="wait"}s.addListener(o,"contextmenu",function(S){if(y){var C=l.textInput.getElement();C.focus()}},l),s.addListener(o,"touchstart",function(S){var C=S.touches;if(f||C.length>1){clearTimeout(f),f=null,p=-1,r="zoom";return}y=l.$mouseHandler.isMousePressed=!0;var L=l.renderer.layerConfig.lineHeight,I=l.renderer.layerConfig.lineHeight,F=S.timeStamp;h=F;var R=C[0],B=R.clientX,N=R.clientY;Math.abs(a-B)+Math.abs(c-N)>L&&(p=-1),a=S.clientX=B,c=S.clientY=N,E=w=0;var H=new i(S,l);if(b=H.getDocumentPosition(),F-p<500&&C.length==1&&!v)D++,S.preventDefault(),S.button=0,_();else{D=0;var W=l.selection.cursor,j=l.selection.isEmpty()?W:l.selection.anchor,U=l.renderer.$cursorLayer.getPixelPosition(W,!0),K=l.renderer.$cursorLayer.getPixelPosition(j,!0),J=l.renderer.scroller.getBoundingClientRect(),Y=l.renderer.layerConfig.offset,X=l.renderer.scrollLeft,q=function(Se,Oe){return Se=Se/I,Oe=Oe/L-.75,Se*Se+Oe*Oe};if(S.clientXue?"cursor":"anchor"),ue<3.5?r="anchor":ne<3.5?r="cursor":r="scroll",f=setTimeout(O,450)}p=F},l),s.addListener(o,"touchend",function(S){y=l.$mouseHandler.isMousePressed=!1,g&&clearInterval(g),r=="zoom"?(r="",v=0):f?(l.selection.moveToPosition(b),v=0,$()):r=="scroll"?(k(),M()):$(),clearTimeout(f),f=null},l),s.addListener(o,"touchmove",function(S){f&&(clearTimeout(f),f=null);var C=S.touches;if(!(C.length>1||r=="zoom")){var L=C[0],I=a-L.clientX,F=c-L.clientY;if(r=="wait")if(I*I+F*F>4)r="cursor";else return S.preventDefault();a=L.clientX,c=L.clientY,S.clientX=L.clientX,S.clientY=L.clientY;var R=S.timeStamp,B=R-h;if(h=R,r=="scroll"){var N=new i(S,l);N.speed=1,N.wheelX=I,N.wheelY=F,10*Math.abs(I)0)if(ue==16){for(Ae=Oe;Ae-1){for(Ae=Oe;Ae=0&&K[nn]==y;nn--)j[nn]=i}}}function B(W,j,U){if(!(s=W){for(Y=J+1;Y=W;)Y++;for(X=J,q=Y-1;X=j.length||(Y=U[K-1])!=g&&Y!=v||(X=j[K+1])!=g&&X!=v?b:(d&&(X=v),X==Y?X:b);case T:return Y=K>0?U[K-1]:D,Y==g&&K+10&&U[K-1]==g)return g;if(d)return b;for(ne=K+1,q=j.length;ne=1425&&ue<=2303||ue==64286;if(Y=j[ne],Se&&(Y==f||Y==w))return f}return K<1||(Y=j[K-1])==D?b:U[K-1];case D:return d=!1,o=!0,i;case E:return l=!0,b;case O:case _:case S:case C:case k:d=!1;case L:return b}}function H(W){var j=W.charCodeAt(0),U=j>>8;return U==0?j>191?h:I[j]:U==5?/[\u0591-\u05f4]/.test(W)?f:h:U==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(W)?M:/[\u0660-\u0669\u066b-\u066c]/.test(W)?v:j==1642?$:/[\u06f0-\u06f9]/.test(W)?g:w:U==32&&j<=8287?F[j&255]:U==254&&j>=65136?w:b}n.L=h,n.R=f,n.EN=g,n.ON_R=3,n.AN=4,n.R_H=5,n.B=6,n.RLE=7,n.DOT="·",n.doBidiReorder=function(W,j,U){if(W.length<2)return{};var K=W.split(""),J=new Array(K.length),Y=new Array(K.length),X=[];i=U?p:c,R(K,X,K.length,j);for(var q=0;qw&&j[q]0&&K[q-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(K[q])&&(X[q-1]=X[q]=n.R_H,q++);K[K.length-1]===n.DOT&&(X[K.length-1]=n.B),K[0]==="‫"&&(X[0]=n.RLE);for(var q=0;q=0&&(r=this.session.$docRowCache[c])}return r},l.prototype.getSplitIndex=function(){var r=0,a=this.session.$screenRowCache;if(a.length)for(var c,p=this.session.$getRowCacheIndex(a,this.currentRow);this.currentRow-r>0&&(c=this.session.$getRowCacheIndex(a,this.currentRow-r-1),c===p);)p=c,r++;else r=this.currentRow;return r},l.prototype.updateRowLine=function(r,a){r===void 0&&(r=this.getDocumentRow());var c=r===this.session.getLength()-1,p=c?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(r),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var h=this.session.$wrapData[r];h&&(a===void 0&&(a=this.getSplitIndex()),a>0&&h.length?(this.wrapIndent=h.indent,this.wrapOffset=this.wrapIndent*this.charWidths[i.L],this.line=aa?this.session.getOverwrite()?r:r-1:a,p=i.getVisualFromLogicalIdx(c,this.bidiMap),h=this.bidiMap.bidiLevels,f=0;!this.session.getOverwrite()&&r<=a&&h[p]%2!==0&&p++;for(var g=0;ga&&h[p]%2===0&&(f+=this.charWidths[h[p]]),this.wrapIndent&&(f+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(f+=this.rtlLineOffset),f},l.prototype.getSelections=function(r,a){var c=this.bidiMap,p=c.bidiLevels,h,f=[],g=0,v=Math.min(r,a)-this.wrapIndent,b=Math.max(r,a)-this.wrapIndent,D=!1,E=!1,w=0;this.wrapIndent&&(g+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var y,A=0;A=v&&yp+g/2;){if(p+=g,h===f.length-1){g=0;break}g=this.charWidths[f[++h]]}return h>0&&f[h-1]%2!==0&&f[h]%2===0?(c0&&f[h-1]%2===0&&f[h]%2!==0?a=1+(c>p?this.bidiMap.logicalFromVisual[h]:this.bidiMap.logicalFromVisual[h-1]):this.isRtlDir&&h===f.length-1&&g===0&&f[h-1]%2===0||!this.isRtlDir&&h===0&&f[h]%2!==0?a=1+this.bidiMap.logicalFromVisual[h]:(h>0&&f[h-1]%2!==0&&g!==0&&h--,a=this.bidiMap.logicalFromVisual[h]),a===0&&this.isRtlDir&&a++,a+this.wrapIndent},l})();n.BidiHandler=o}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(t,n,u){var i=t("./lib/oop"),s=t("./lib/lang"),d=t("./lib/event_emitter").EventEmitter,o=t("./range").Range,l=(function(){function r(a){this.session=a,this.doc=a.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var c=this;this.cursor.on("change",function(p){c.$cursorChanged=!0,c.$silent||c._emit("changeCursor"),!c.$isEmpty&&!c.$silent&&c._emit("changeSelection"),!c.$keepDesiredColumnOnChange&&p.old.column!=p.value.column&&(c.$desiredColumn=null)}),this.anchor.on("change",function(){c.$anchorChanged=!0,!c.$isEmpty&&!c.$silent&&c._emit("changeSelection")})}return r.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},r.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},r.prototype.getCursor=function(){return this.lead.getPosition()},r.prototype.setAnchor=function(a,c){this.$isEmpty=!1,this.anchor.setPosition(a,c)},r.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},r.prototype.getSelectionLead=function(){return this.lead.getPosition()},r.prototype.isBackwards=function(){var a=this.anchor,c=this.lead;return a.row>c.row||a.row==c.row&&a.column>c.column},r.prototype.getRange=function(){var a=this.anchor,c=this.lead;return this.$isEmpty?o.fromPoints(c,c):this.isBackwards()?o.fromPoints(c,a):o.fromPoints(a,c)},r.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},r.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},r.prototype.setRange=function(a,c){var p=c?a.end:a.start,h=c?a.start:a.end;this.$setSelection(p.row,p.column,h.row,h.column)},r.prototype.$setSelection=function(a,c,p,h){if(!this.$silent){var f=this.$isEmpty,g=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(a,c),this.cursor.setPosition(p,h),this.$isEmpty=!o.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||f!=this.$isEmpty||g)&&this._emit("changeSelection")}},r.prototype.$moveSelection=function(a){var c=this.lead;this.$isEmpty&&this.setSelectionAnchor(c.row,c.column),a.call(this)},r.prototype.selectTo=function(a,c){this.$moveSelection(function(){this.moveCursorTo(a,c)})},r.prototype.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})},r.prototype.moveTo=function(a,c){this.clearSelection(),this.moveCursorTo(a,c)},r.prototype.moveToPosition=function(a){this.clearSelection(),this.moveCursorToPosition(a)},r.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},r.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},r.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},r.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},r.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},r.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},r.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},r.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},r.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},r.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},r.prototype.getWordRange=function(a,c){if(typeof c>"u"){var p=a||this.lead;a=p.row,c=p.column}return this.session.getWordRange(a,c)},r.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},r.prototype.selectAWord=function(){var a=this.getCursor(),c=this.session.getAWordRange(a.row,a.column);this.setSelectionRange(c)},r.prototype.getLineRange=function(a,c){var p=typeof a=="number"?a:this.lead.row,h,f=this.session.getFoldLine(p);return f?(p=f.start.row,h=f.end.row):h=p,c===!0?new o(p,0,h,this.session.getLine(h).length):new o(p,0,h+1,0)},r.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},r.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},r.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},r.prototype.wouldMoveIntoSoftTab=function(a,c,p){var h=a.column,f=a.column+c;return p<0&&(h=a.column-c,f=a.column),this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(h,f).split(" ").length-1==c},r.prototype.moveCursorLeft=function(){var a=this.lead.getPosition(),c;if(c=this.session.getFoldAt(a.row,a.column,-1))this.moveCursorTo(c.start.row,c.start.column);else if(a.column===0)a.row>0&&this.moveCursorTo(a.row-1,this.doc.getLine(a.row-1).length);else{var p=this.session.getTabSize();this.wouldMoveIntoSoftTab(a,p,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-p):this.moveCursorBy(0,-1)}},r.prototype.moveCursorRight=function(){var a=this.lead.getPosition(),c;if(c=this.session.getFoldAt(a.row,a.column,1))this.moveCursorTo(c.end.row,c.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(c.column=h)}}this.moveCursorTo(c.row,c.column)},r.prototype.moveCursorFileEnd=function(){var a=this.doc.getLength()-1,c=this.doc.getLine(a).length;this.moveCursorTo(a,c)},r.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},r.prototype.moveCursorLongWordRight=function(){var a=this.lead.row,c=this.lead.column,p=this.doc.getLine(a),h=p.substring(c);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var f=this.session.getFoldAt(a,c,1);if(f){this.moveCursorTo(f.end.row,f.end.column);return}if(this.session.nonTokenRe.exec(h)&&(c+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,h=p.substring(c)),c>=p.length){this.moveCursorTo(a,p.length),this.moveCursorRight(),a0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(f)&&(c-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,c)},r.prototype.$shortWordEndIndex=function(a){var c=0,p,h=/\s/,f=this.session.tokenRe;if(f.lastIndex=0,this.session.tokenRe.exec(a))c=this.session.tokenRe.lastIndex;else{for(;(p=a[c])&&h.test(p);)c++;if(c<1){for(f.lastIndex=0;(p=a[c])&&!f.test(p);)if(f.lastIndex=0,c++,h.test(p))if(c>2){c--;break}else{for(;(p=a[c])&&h.test(p);)c++;if(c>2)break}}}return f.lastIndex=0,c},r.prototype.moveCursorShortWordRight=function(){var a=this.lead.row,c=this.lead.column,p=this.doc.getLine(a),h=p.substring(c),f=this.session.getFoldAt(a,c,1);if(f)return this.moveCursorTo(f.end.row,f.end.column);if(c==p.length){var g=this.doc.getLength();do a++,h=this.doc.getLine(a);while(a0&&/^\s*$/.test(h));c=h.length,/\s+$/.test(h)||(h="")}var f=s.stringReverse(h),g=this.$shortWordEndIndex(f);return this.moveCursorTo(a,c-g)},r.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},r.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},r.prototype.moveCursorBy=function(a,c){var p=this.session.documentToScreenPosition(this.lead.row,this.lead.column),h;if(c===0&&(a!==0&&(this.session.$bidiHandler.isBidiRow(p.row,this.lead.row)?(h=this.session.$bidiHandler.getPosLeft(p.column),p.column=Math.round(h/this.session.$bidiHandler.charWidths[0])):h=p.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?p.column=this.$desiredColumn:this.$desiredColumn=p.column),a!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var f=this.session.lineWidgets[this.lead.row];a<0?a-=f.rowsAbove||0:a>0&&(a+=f.rowCount-(f.rowsAbove||0))}var g=this.session.screenToDocumentPosition(p.row+a,p.column,h);a!==0&&c===0&&g.row===this.lead.row&&(g.column,this.lead.column),this.moveCursorTo(g.row,g.column+c,c===0)},r.prototype.moveCursorToPosition=function(a){this.moveCursorTo(a.row,a.column)},r.prototype.moveCursorTo=function(a,c,p){var h=this.session.getFoldAt(a,c,1);h&&(a=h.start.row,c=h.start.column),this.$keepDesiredColumnOnChange=!0;var f=this.session.getLine(a);/[\uDC00-\uDFFF]/.test(f.charAt(c))&&f.charAt(c-1)&&(this.lead.row==a&&this.lead.column==c+1?c=c-1:c=c+1),this.lead.setPosition(a,c),this.$keepDesiredColumnOnChange=!1,p||(this.$desiredColumn=null)},r.prototype.moveCursorToScreen=function(a,c,p){var h=this.session.screenToDocumentPosition(a,c);this.moveCursorTo(h.row,h.column,p)},r.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},r.prototype.fromOrientedRange=function(a){this.setSelectionRange(a,a.cursor==a.start),this.$desiredColumn=a.desiredColumn||this.$desiredColumn},r.prototype.toOrientedRange=function(a){var c=this.getRange();return a?(a.start.column=c.start.column,a.start.row=c.start.row,a.end.column=c.end.column,a.end.row=c.end.row):a=c,a.cursor=this.isBackwards()?a.start:a.end,a.desiredColumn=this.$desiredColumn,a},r.prototype.getRangeOfMovements=function(a){var c=this.getCursor();try{a(this);var p=this.getCursor();return o.fromPoints(c,p)}catch{return o.fromPoints(c,c)}finally{this.moveCursorToPosition(c)}},r.prototype.toJSON=function(){if(this.rangeCount)var a=this.ranges.map(function(c){var p=c.clone();return p.isBackwards=c.cursor==c.start,p});else{var a=this.getRange();a.isBackwards=this.isBackwards()}return a},r.prototype.fromJSON=function(a){if(a.start==null)if(this.rangeList&&a.length>1){this.toSingleRange(a[0]);for(var c=a.length;c--;){var p=o.fromPoints(a[c].start,a[c].end);a[c].isBackwards&&(p.cursor=p.start),this.addRange(p,!0)}return}else a=a[0];this.rangeList&&this.toSingleRange(a),this.setSelectionRange(a,a.isBackwards)},r.prototype.isEqual=function(a){if((a.length||this.rangeCount)&&a.length!=this.rangeCount)return!1;if(!a.length||!this.ranges)return this.getRange().isEqual(a);for(var c=this.ranges.length;c--;)if(!this.ranges[c].isEqual(a[c]))return!1;return!0},r})();l.prototype.setSelectionAnchor=l.prototype.setAnchor,l.prototype.getSelectionAnchor=l.prototype.getAnchor,l.prototype.setSelectionRange=l.prototype.setRange,i.implement(l.prototype,d),n.Selection=l}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(t,n,u){var i=t("./lib/report_error").reportError,s=2e3,d=(function(){function o(l){this.splitRegex,this.states=l,this.regExps={},this.matchMappings={};for(var r in this.states){for(var a=this.states[r],c=[],p=0,h=this.matchMappings[r]={defaultToken:"text"},f="g",g=[],v=0;v1?b.onMatch=this.$applyToken:b.onMatch=b.token),E>1&&(/\\\d/.test(b.regex)?D=b.regex.replace(/\\([0-9]+)/g,function(w,y){return"\\"+(parseInt(y,10)+p+1)}):(E=1,D=this.removeCapturingGroups(b.regex)),!b.splitRegex&&typeof b.token!="string"&&g.push(b)),h[p]=v,p+=E,c.push(D),b.onMatch||(b.onMatch=null)}}c.length||(h[0]=0,c.push("$")),g.forEach(function(w){w.splitRegex=this.createSplitterRegexp(w.regex,f)},this),this.regExps[r]=new RegExp("("+c.join(")|(")+")|($)",f)}}return o.prototype.$setMaxTokenCount=function(l){s=l|0},o.prototype.$applyToken=function(l){var r=this.splitRegex.exec(l).slice(1),a=this.token.apply(this,r);if(typeof a=="string")return[{type:a,value:l}];for(var c=[],p=0,h=a.length;pb){var $=l.substring(b,T-A.length);E.type==w?E.value+=$:(E.type&&v.push(E),E={type:w,value:$})}for(var M=0;Ms){for(D>2*l.length&&this.reportError("infinite loop with in ace tokenizer",{startState:r,line:l});b1&&a[0]!==c&&a.unshift("#tmp",c),{tokens:v,state:a.length?a:c}},o})();d.prototype.reportError=i,n.Tokenizer=d}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(t,n,u){var i=t("../lib/deep_copy").deepCopy,s;s=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(l,r){if(!r){for(var a in l)this.$rules[a]=l[a];return}for(var a in l){for(var c=l[a],p=0;p=this.$rowTokens.length;){if(this.$row+=1,o||(o=this.$session.getLength()),this.$row>=o)return this.$row=o-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},d.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},d.prototype.getCurrentTokenRow=function(){return this.$row},d.prototype.getCurrentTokenColumn=function(){var o=this.$rowTokens,l=this.$tokenIndex,r=o[l].start;if(r!==void 0)return r;for(r=0;l>0;)l-=1,r+=o[l].value.length;return r},d.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},d.prototype.getCurrentTokenRange=function(){var o=this.$rowTokens[this.$tokenIndex],l=this.getCurrentTokenColumn();return new i(this.$row,l,this.$row,l+o.value.length)},d})();n.TokenIterator=s}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(t,n,u){var i=t("../../lib/oop"),s=t("../behaviour").Behaviour,d=t("../../token_iterator").TokenIterator,o=t("../../lib/lang"),l=["text","paren.rparen","rparen","paren","punctuation.operator"],r=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],a,c={},p={'"':'"',"'":"'"},h=function(v){var b=-1;if(v.multiSelect&&(b=v.selection.index,c.rangeCount!=v.multiSelect.rangeCount&&(c={rangeCount:v.multiSelect.rangeCount})),c[b])return a=c[b];a=c[b]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},f=function(v,b,D,E){var w=v.end.row-v.start.row;return{text:D+b+E,selection:[0,v.start.column+1,w,v.end.column+(w?0:1)]}},g;g=function(v){v=v||{},this.add("braces","insertion",function(b,D,E,w,y){var A=E.getCursorPosition(),T=w.doc.getLine(A.row);if(y=="{"){h(E);var $=E.getSelectionRange(),M=w.doc.getTextRange($),O=w.getTokenAt(A.row,A.column);if(M!==""&&M!=="{"&&E.getWrapBehavioursEnabled())return f($,M,"{","}");if(O&&/(?:string)\.quasi|\.xml/.test(O.type)){var _=[/tag\-(?:open|name)/,/attribute\-name/];return _.some(function(R){return R.test(O.type)})||/(string)\.quasi/.test(O.type)&&O.value[A.column-O.start-1]!=="$"?void 0:(g.recordAutoInsert(E,w,"}"),{text:"{}",selection:[1,1]})}else if(g.isSaneInsertion(E,w))return/[\]\}\)]/.test(T[A.column])||E.inMultiSelectMode||v.braces?(g.recordAutoInsert(E,w,"}"),{text:"{}",selection:[1,1]}):(g.recordMaybeInsert(E,w,"{"),{text:"{",selection:[1,1]})}else if(y=="}"){h(E);var k=T.substring(A.column,A.column+1);if(k=="}"){var S=w.$findOpeningBracket("}",{column:A.column+1,row:A.row});if(S!==null&&g.isAutoInsertedClosing(A,T,y))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(y==` +`;A!=this.text.value&&(this.text.value=this.lastValue=A);var T=4,x=4+(y.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=T||this.lastSelectionEnd!=x)&&this.text.setSelectionRange(T,x),this.lastSelectionStart=T,this.lastSelectionEnd=x}},w.prototype.$resetSelection=function(){var y=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var A=0,T=0,x="",M=function(R,B){for(var N=B,z=1;z<=R-y.rowStart&&z<2*y.numberOfExtraLines+1;z++)N+=y.host.session.getLine(R-z).length+1;return N};if(this.host.session){var O=this.host.selection,_=O.getRange(),k=O.cursor.row;k===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):k===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(kthis.rowEnd+1)&&(this.rowStart=k>this.numberOfExtraLines?k-this.numberOfExtraLines:0,this.rowEnd=k>this.numberOfExtraLines?k+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var S=[],C=this.rowStart;C<=this.rowEnd;C++)S.push(this.host.session.getLine(C));if(x=S.join(` +`),A=M(_.start.row,_.start.column),T=M(_.end.row,_.end.column),_.start.rowthis.rowEnd){var I=this.host.session.getLine(this.rowEnd+1);T=_.end.row>this.rowEnd+1?I.length:_.end.column,T+=x.length+1,x=x+` +`+I}else D&&k>0&&(x=` +`+x,T+=1,A+=1);x.length>u&&(A1),c.preventDefault()},a.prototype.startSelect=function(c,p){c=c||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var u=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?u.selection.selectToPosition(c):p||u.selection.moveToPosition(c),p||this.select(),u.setStyle("ace_selecting"),this.setState("select"))},a.prototype.select=function(){var c,p=this.editor,u=p.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var f=this.$clickSelection.comparePoint(u);if(f==-1)c=this.$clickSelection.end;else if(f==1)c=this.$clickSelection.start;else{var g=r(this.$clickSelection,u,p.session);u=g.cursor,c=g.anchor}p.selection.setSelectionAnchor(c.row,c.column)}p.selection.selectToPosition(u),p.renderer.scrollCursorIntoView()},a.prototype.extendSelectionBy=function(c){var p,u=this.editor,f=u.renderer.screenToTextCoordinates(this.x,this.y),g=u.selection[c](f.row,f.column);if(this.$clickSelection){var v=this.$clickSelection.comparePoint(g.start),b=this.$clickSelection.comparePoint(g.end);if(v==-1&&b<=0)p=this.$clickSelection.end,(g.end.row!=f.row||g.end.column!=f.column)&&(f=g.start);else if(b==1&&v>=0)p=this.$clickSelection.start,(g.start.row!=f.row||g.start.column!=f.column)&&(f=g.end);else if(v==-1&&b==1)f=g.end,p=g.start;else{var D=r(this.$clickSelection,f,u.session);f=D.cursor,p=D.anchor}u.selection.setSelectionAnchor(p.row,p.column)}u.selection.selectToPosition(f),u.renderer.scrollCursorIntoView()},a.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},a.prototype.focusWait=function(){var c=l(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),p=Date.now();(c>s||p-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},a.prototype.onDoubleClick=function(c){var p=c.getDocumentPosition(),u=this.editor,f=u.session,g=f.getBracketRange(p);g?(g.isEmpty()&&(g.start.column--,g.end.column++),this.setState("select")):(g=u.selection.getWordRange(p.row,p.column),this.setState("selectByWords")),this.$clickSelection=g,this.select()},a.prototype.onTripleClick=function(c){var p=c.getDocumentPosition(),u=this.editor;this.setState("selectByLines");var f=u.getSelectionRange();f.isMultiLine()&&f.contains(p.row,p.column)?(this.$clickSelection=u.selection.getLineRange(f.start.row),this.$clickSelection.end=u.selection.getLineRange(f.end.row).end):this.$clickSelection=u.selection.getLineRange(p.row),this.select()},a.prototype.onQuadClick=function(c){var p=this.editor;p.selectAll(),this.$clickSelection=p.getSelectionRange(),this.setState("selectAll")},a.prototype.onMouseWheel=function(c){if(!c.getAccelKey()){c.getShiftKey()&&c.wheelY&&!c.wheelX&&(c.wheelX=c.wheelY,c.wheelY=0);var p=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var u=this.$lastScroll,f=c.domEvent.timeStamp,g=f-u.t,v=g?c.wheelX/g:u.vx,b=g?c.wheelY/g:u.vy;g=1&&p.renderer.isScrollableBy(c.wheelX*c.speed,0)&&(E=!0),D<=1&&p.renderer.isScrollableBy(0,c.wheelY*c.speed)&&(E=!0),E)u.allowed=f;else if(f-u.allowedd.clientHeight;o||s.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(t,n,h){var i=this&&this.__extends||(function(){var f=function(g,v){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,D){b.__proto__=D}||function(b,D){for(var E in D)Object.prototype.hasOwnProperty.call(D,E)&&(b[E]=D[E])},f(g,v)};return function(g,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");f(g,v);function b(){this.constructor=g}g.prototype=v===null?Object.create(v):(b.prototype=v.prototype,new b)}})(),s=this&&this.__values||function(f){var g=typeof Symbol=="function"&&Symbol.iterator,v=g&&f[g],b=0;if(v)return v.call(f);if(f&&typeof f.length=="number")return{next:function(){return f&&b>=f.length&&(f=void 0),{value:f&&f[b++],done:!f}}};throw new TypeError(g?"Object is not iterable.":"Symbol.iterator is not defined.")},d=t("./lib/dom");t("./lib/event");var o=t("./range").Range,l=t("./lib/scroll").preventParentScroll,r="ace_tooltip",a=(function(){function f(g){this.isOpen=!1,this.$element=null,this.$parentNode=g}return f.prototype.$init=function(){return this.$element=d.createElement("div"),this.$element.className=r,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},f.prototype.getElement=function(){return this.$element||this.$init()},f.prototype.setText=function(g){this.getElement().textContent=g},f.prototype.setHtml=function(g){this.getElement().innerHTML=g},f.prototype.setPosition=function(g,v){this.getElement().style.left=g+"px",this.getElement().style.top=v+"px"},f.prototype.setClassName=function(g){d.addCssClass(this.getElement(),g)},f.prototype.setTheme=function(g){this.theme&&(this.theme.isDark&&d.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&d.removeCssClass(this.getElement(),this.theme.cssClass)),g.isDark&&d.addCssClass(this.getElement(),"ace_dark"),g.cssClass&&d.addCssClass(this.getElement(),g.cssClass),this.theme={isDark:g.isDark,cssClass:g.cssClass}},f.prototype.show=function(g,v,b){g!=null&&this.setText(g),v!=null&&b!=null&&this.setPosition(v,b),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},f.prototype.hide=function(g){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=r,this.isOpen=!1)},f.prototype.getHeight=function(){return this.getElement().offsetHeight},f.prototype.getWidth=function(){return this.getElement().offsetWidth},f.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},f})(),c=(function(){function f(){this.popups=[]}return f.prototype.addPopup=function(g){this.popups.push(g),this.updatePopups()},f.prototype.removePopup=function(g){var v=this.popups.indexOf(g);v!==-1&&(this.popups.splice(v,1),this.updatePopups())},f.prototype.updatePopups=function(){var g,v,b,D;this.popups.sort(function(_,k){return k.priority-_.priority});var E=[];try{for(var w=s(this.popups),y=w.next();!y.done;y=w.next()){var A=y.value,T=!0;try{for(var x=(b=void 0,s(E)),M=x.next();!M.done;M=x.next()){var O=M.value;if(this.doPopupsOverlap(O,A)){T=!1;break}}}catch(_){b={error:_}}finally{try{M&&!M.done&&(D=x.return)&&D.call(x)}finally{if(b)throw b.error}}T?E.push(A):A.hide()}}catch(_){g={error:_}}finally{try{y&&!y.done&&(v=w.return)&&v.call(w)}finally{if(g)throw g.error}}},f.prototype.doPopupsOverlap=function(g,v){var b=g.getElement().getBoundingClientRect(),D=v.getElement().getBoundingClientRect();return b.leftD.left&&b.topD.top},f})(),p=new c;n.popupManager=p,n.Tooltip=a;var u=(function(f){i(g,f);function g(v){v===void 0&&(v=document.body);var b=f.call(this,v)||this;b.timeout=void 0,b.lastT=0,b.idleTime=350,b.lastEvent=void 0,b.onMouseOut=b.onMouseOut.bind(b),b.onMouseMove=b.onMouseMove.bind(b),b.waitForHover=b.waitForHover.bind(b),b.hide=b.hide.bind(b);var D=b.getElement();return D.style.whiteSpace="pre-wrap",D.style.pointerEvents="auto",D.addEventListener("mouseout",b.onMouseOut),D.tabIndex=-1,D.addEventListener("blur",function(){D.contains(document.activeElement)||this.hide()}.bind(b)),D.addEventListener("wheel",l),b}return g.prototype.addToEditor=function(v){v.on("mousemove",this.onMouseMove),v.on("mousedown",this.hide);var b=v.renderer.getMouseEventTarget();b&&typeof b.removeEventListener=="function"&&b.addEventListener("mouseout",this.onMouseOut,!0)},g.prototype.removeFromEditor=function(v){v.off("mousemove",this.onMouseMove),v.off("mousedown",this.hide);var b=v.renderer.getMouseEventTarget();b&&typeof b.removeEventListener=="function"&&b.removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},g.prototype.onMouseMove=function(v,b){this.lastEvent=v,this.lastT=Date.now();var D=b.$mouseHandler.isMousePressed;if(this.isOpen){var E=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(E.row,E.column)||D||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||D||(this.lastEvent=v,this.timeout=setTimeout(this.waitForHover,this.idleTime))},g.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var v=Date.now()-this.lastT;if(this.idleTime-v>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-v);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},g.prototype.isOutsideOfText=function(v){var b=v.editor,D=v.getDocumentPosition(),E=b.session.getLine(D.row);if(D.column==E.length){var w=b.renderer.pixelToScreenCoordinates(v.clientX,v.clientY),y=b.session.documentToScreenPosition(D.row,D.column);if(y.column!=w.column||y.row!=w.row)return!0}return!1},g.prototype.setDataProvider=function(v){this.$gatherData=v},g.prototype.showForRange=function(v,b,D,E){if(!(E&&E!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var w=v.renderer;this.isOpen||(p.addPopup(this),this.$registerCloseEvents(),this.setTheme(w.theme)),this.isOpen=!0,this.range=o.fromPoints(b.start,b.end);var y=w.textToScreenCoordinates(b.start.row,b.start.column),A=w.scroller.getBoundingClientRect();y.pageX=u.length&&(u=void 0),{value:u&&u[v++],done:!u}}};throw new TypeError(f?"Object is not iterable.":"Symbol.iterator is not defined.")},d=t("../lib/dom"),o=t("./mouse_event").MouseEvent,l=t("../tooltip").HoverTooltip,r=t("../config").nls,a=t("../range").Range;function c(u){var f=u.editor,g=f.renderer.$gutterLayer;u.$tooltip=new p(f),u.$tooltip.addToEditor(f),u.$tooltip.setDataProvider(function(v,b){var D=v.getDocumentPosition().row;u.$tooltip.showTooltip(D)}),u.editor.setDefaultHandler("guttermousedown",function(v){if(!(!f.isFocused()||v.getButton()!=0)){var b=g.getRegion(v);if(b!="foldWidgets"){var D=v.getDocumentPosition().row,E=f.session.selection;if(v.getShiftKey())E.selectTo(D,0);else{if(v.domEvent.detail==2)return f.selectAll(),v.preventDefault();u.$clickSelection=f.selection.getLineRange(D)}return u.setState("selectByLines"),u.captureMouse(v),v.preventDefault()}}})}n.GutterHandler=c;var p=(function(u){i(f,u);function f(g){var v=u.call(this,g.container)||this;v.id="gt"+ ++f.$uid,v.editor=g,v.visibleTooltipRow;var b=v.getElement();return b.setAttribute("role","tooltip"),b.setAttribute("id",v.id),b.style.pointerEvents="auto",v.idleTime=50,v.onDomMouseMove=v.onDomMouseMove.bind(v),v.onDomMouseOut=v.onDomMouseOut.bind(v),v.setClassName("ace_gutter-tooltip"),v}return f.prototype.onDomMouseMove=function(g){var v=new o(g,this.editor);this.onMouseMove(v,this.editor)},f.prototype.onDomMouseOut=function(g){var v=new o(g,this.editor);this.onMouseOut(v)},f.prototype.addToEditor=function(g){var v=g.renderer.$gutter;v.addEventListener("mousemove",this.onDomMouseMove),v.addEventListener("mouseout",this.onDomMouseOut),u.prototype.addToEditor.call(this,g)},f.prototype.removeFromEditor=function(g){var v=g.renderer.$gutter;v.removeEventListener("mousemove",this.onDomMouseMove),v.removeEventListener("mouseout",this.onDomMouseOut),u.prototype.removeFromEditor.call(this,g)},f.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),u.prototype.destroy.call(this)},Object.defineProperty(f,"annotationLabels",{get:function(){return{error:{singular:r("gutter-tooltip.aria-label.error.singular","error"),plural:r("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:r("gutter-tooltip.aria-label.security.singular","security finding"),plural:r("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:r("gutter-tooltip.aria-label.warning.singular","warning"),plural:r("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:r("gutter-tooltip.aria-label.info.singular","information message"),plural:r("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:r("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:r("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),f.prototype.showTooltip=function(g){var v,b=this.editor.renderer.$gutterLayer,D=b.$annotations[g],E;D?E={displayText:Array.from(D.displayText),type:Array.from(D.type)}:E={displayText:[],type:[]};var w=b.session.getFoldLine(g);if(w&&b.$showFoldedAnnotations){for(var y={error:[],security:[],warning:[],info:[],hint:[]},A={error:1,security:2,warning:3,info:4,hint:5},T,x=g+1;x<=w.end.row;x++)if(b.$annotations[x])for(var M=0;M2)return b.childNodes[2]}},f.prototype.$findCellByRow=function(g){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(v){return v.row===g})},f.prototype.hide=function(g){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.visibleTooltipRow!=null){var v=this.$findLinkedAnnotationNode(this.visibleTooltipRow);v&&v.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),u.prototype.hide.call(this,g)}},f.annotationsToSummaryString=function(g){var v,b,D=[],E=["error","security","warning","info","hint"];try{for(var w=s(E),y=w.next();!y.done;y=w.next()){var A=y.value;if(g[A].length){var T=g[A].length===1?f.annotationLabels[A].singular:f.annotationLabels[A].plural;D.push("".concat(g[A].length," ").concat(T))}}}catch(x){v={error:x}}finally{try{y&&!y.done&&(b=w.return)&&b.call(w)}finally{if(v)throw v.error}}return D.join(", ")},f.prototype.isOutsideOfText=function(g){var v=g.editor,b=v.renderer.$gutter.getBoundingClientRect();return!(g.clientX>=b.left&&g.clientX<=b.right&&g.clientY>=b.top&&g.clientY<=b.bottom)},f})(l);p.$uid=0,n.GutterTooltip=p}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(t,n,h){var i=t("../lib/dom"),s=t("../lib/event"),d=t("../lib/useragent"),o=200,l=200,r=5;function a(p){var u=p.editor,f=i.createElement("div");f.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",f.textContent=" ";var g=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];g.forEach(function(W){p[W]=this[W]},this),u.on("mousedown",this.onMouseDown.bind(p));var v=u.container,b,D,E,w,y,A,T=0,x,M,O,_,k;this.onDragStart=function(W){if(this.cancelDrag||!v.draggable){var j=this;return setTimeout(function(){j.startSelect(),j.captureMouse(W)},0),W.preventDefault()}y=u.getSelectionRange();var U=W.dataTransfer;U.effectAllowed=u.getReadOnly()?"copy":"copyMove",u.container.appendChild(f),U.setDragImage&&U.setDragImage(f,0,0),setTimeout(function(){u.container.removeChild(f)}),U.clearData(),U.setData("Text",u.session.getTextRange()),M=!0,this.setState("drag")},this.onDragEnd=function(W){if(v.draggable=!1,M=!1,this.setState(null),!u.getReadOnly()){var j=W.dataTransfer.dropEffect;!x&&j=="move"&&u.session.remove(u.getSelectionRange()),u.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(W){if(!(u.getReadOnly()||!N(W.dataTransfer)))return D=W.clientX,E=W.clientY,b||I(),T++,W.dataTransfer.dropEffect=x=z(W),s.preventDefault(W)},this.onDragOver=function(W){if(!(u.getReadOnly()||!N(W.dataTransfer)))return D=W.clientX,E=W.clientY,b||(I(),T++),R!==null&&(R=null),W.dataTransfer.dropEffect=x=z(W),s.preventDefault(W)},this.onDragLeave=function(W){if(T--,T<=0&&b)return F(),x=null,s.preventDefault(W)},this.onDrop=function(W){if(A){var j=W.dataTransfer;if(M)switch(x){case"move":y.contains(A.row,A.column)?y={start:A,end:A}:y=u.moveText(y,A);break;case"copy":y=u.moveText(y,A,!0);break}else{var U=j.getData("Text");y={start:A,end:u.session.insert(A,U)},u.focus(),x=null}return F(),s.preventDefault(W)}},s.addListener(v,"dragstart",this.onDragStart.bind(p),u),s.addListener(v,"dragend",this.onDragEnd.bind(p),u),s.addListener(v,"dragenter",this.onDragEnter.bind(p),u),s.addListener(v,"dragover",this.onDragOver.bind(p),u),s.addListener(v,"dragleave",this.onDragLeave.bind(p),u),s.addListener(v,"drop",this.onDrop.bind(p),u);function S(W,j){var U=Date.now(),K=!j||W.row!=j.row,J=!j||W.column!=j.column;if(!_||K||J)u.moveCursorToPosition(W),_=U,k={x:D,y:E};else{var Y=c(k.x,k.y,D,E);Y>r?_=null:U-_>=l&&(u.renderer.scrollCursorIntoView(),_=null)}}function C(W,j){var U=Date.now(),K=u.renderer.layerConfig.lineHeight,J=u.renderer.layerConfig.characterWidth,Y=u.renderer.scroller.getBoundingClientRect(),X={x:{left:D-Y.left,right:Y.right-D},y:{top:E-Y.top,bottom:Y.bottom-E}},q=Math.min(X.x.left,X.x.right),ne=Math.min(X.y.top,X.y.bottom),ue={row:W.row,column:W.column};q/J<=2&&(ue.column+=X.x.left=o&&u.renderer.scrollCursorIntoView(ue):O=U:O=null}function L(){var W=A;A=u.renderer.screenToTextCoordinates(D,E),S(A,W),C(A,W)}function I(){y=u.selection.toOrientedRange(),b=u.session.addMarker(y,"ace_selection",u.getSelectionStyle()),u.clearSelection(),u.isFocused()&&u.renderer.$cursorLayer.setBlinking(!1),clearInterval(w),L(),w=setInterval(L,20),T=0,s.addListener(document,"mousemove",B)}function F(){clearInterval(w),u.session.removeMarker(b),b=null,u.selection.fromOrientedRange(y),u.isFocused()&&!M&&u.$resetCursorStyle(),y=null,A=null,T=0,O=null,_=null,s.removeListener(document,"mousemove",B)}var R=null;function B(){R==null&&(R=setTimeout(function(){R!=null&&b&&F()},20))}function N(W){var j=W.types;return!j||Array.prototype.some.call(j,function(U){return U=="text/plain"||U=="Text"})}function z(W){var j=["copy","copymove","all","uninitialized"],U=["move","copymove","linkmove","all","uninitialized"],K=d.isMac?W.altKey:W.ctrlKey,J="uninitialized";try{J=W.dataTransfer.effectAllowed.toLowerCase()}catch{}var Y="none";return K&&j.indexOf(J)>=0?Y="copy":U.indexOf(J)>=0?Y="move":j.indexOf(J)>=0&&(Y="copy"),Y}}(function(){this.dragWait=function(){var p=Date.now()-this.mousedownEvent.time;p>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var p=this.editor.container;p.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(p){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var p=this.editor,u=p.container;u.draggable=!0,p.renderer.$cursorLayer.setBlinking(!1),p.setStyle("ace_dragging");var f=d.isWin?"default":"move";p.renderer.setCursorStyle(f),this.setState("dragReady")},this.onMouseDrag=function(p){var u=this.editor.container;if(d.isIE&&this.state=="dragReady"){var f=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);f>3&&u.dragDrop()}if(this.state==="dragWait"){var f=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);f>0&&(u.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(p){if(this.$dragEnabled){this.mousedownEvent=p;var u=this.editor,f=p.inSelection(),g=p.getButton(),v=p.domEvent.detail||1;if(v===1&&g===0&&f){if(p.editor.inMultiSelectMode&&(p.getAccelKey()||p.getShiftKey()))return;this.mousedownEvent.time=Date.now();var b=p.domEvent.target||p.domEvent.srcElement;if("unselectable"in b&&(b.unselectable="on"),u.getDragDelay()){if(d.isWebKit){this.cancelDrag=!0;var D=u.container;D.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(p,this.onMouseDrag.bind(this)),p.defaultPrevented=!0}}}}).call(a.prototype);function c(p,u,f,g){return Math.sqrt(Math.pow(f-p,2)+Math.pow(g-u,2))}n.DragdropHandler=a}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(t,n,h){var i=t("./mouse_event").MouseEvent,s=t("../lib/event"),d=t("../lib/dom");n.addTouchListeners=function(o,l){var r="scroll",a,c,p,u,f,g,v=0,b,D=0,E=0,w=0,y,A;function T(){var S=window.navigator&&window.navigator.clipboard,C=!1,L=function(){var R=l.getCopyText(),B=l.session.getUndoManager().hasUndo();A.replaceChild(d.buildDom(C?["span",!R&&I("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],R&&I("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],R&&I("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],S&&I("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],B&&I("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],I("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],I("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),A.firstChild)},I=function(R){return l.commands.canExecute(R,l)},F=function(R){var B=R.target.getAttribute("action");if(B=="more"||!C)return C=!C,L();B=="paste"?S.readText().then(function(N){l.execCommand(B,N)}):B&&((B=="cut"||B=="copy")&&(S?S.writeText(l.getCopyText()):document.execCommand("copy")),l.execCommand(B)),A.firstChild.style.display="none",C=!1,B!="openCommandPalette"&&l.focus()};A=d.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(R){r="menu",R.stopPropagation(),R.preventDefault(),l.textInput.focus()},ontouchend:function(R){R.stopPropagation(),R.preventDefault(),F(R)},onclick:F},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],l.container)}function x(){if(!l.getOption("enableMobileMenu")){A&&M();return}A||T();var S=l.selection.cursor,C=l.renderer.textToScreenCoordinates(S.row,S.column),L=l.renderer.textToScreenCoordinates(0,0).pageX,I=l.renderer.scrollLeft,F=l.container.getBoundingClientRect();A.style.top=C.pageY-F.top-3+"px",C.pageX-F.left=2?l.selection.getLineRange(b.row):l.session.getBracketRange(b);S&&!S.isEmpty()?l.selection.setRange(S):l.selection.selectWord(),r="wait"}s.addListener(o,"contextmenu",function(S){if(y){var C=l.textInput.getElement();C.focus()}},l),s.addListener(o,"touchstart",function(S){var C=S.touches;if(f||C.length>1){clearTimeout(f),f=null,p=-1,r="zoom";return}y=l.$mouseHandler.isMousePressed=!0;var L=l.renderer.layerConfig.lineHeight,I=l.renderer.layerConfig.lineHeight,F=S.timeStamp;u=F;var R=C[0],B=R.clientX,N=R.clientY;Math.abs(a-B)+Math.abs(c-N)>L&&(p=-1),a=S.clientX=B,c=S.clientY=N,E=w=0;var z=new i(S,l);if(b=z.getDocumentPosition(),F-p<500&&C.length==1&&!v)D++,S.preventDefault(),S.button=0,_();else{D=0;var W=l.selection.cursor,j=l.selection.isEmpty()?W:l.selection.anchor,U=l.renderer.$cursorLayer.getPixelPosition(W,!0),K=l.renderer.$cursorLayer.getPixelPosition(j,!0),J=l.renderer.scroller.getBoundingClientRect(),Y=l.renderer.layerConfig.offset,X=l.renderer.scrollLeft,q=function(Se,Oe){return Se=Se/I,Oe=Oe/L-.75,Se*Se+Oe*Oe};if(S.clientXue?"cursor":"anchor"),ue<3.5?r="anchor":ne<3.5?r="cursor":r="scroll",f=setTimeout(O,450)}p=F},l),s.addListener(o,"touchend",function(S){y=l.$mouseHandler.isMousePressed=!1,g&&clearInterval(g),r=="zoom"?(r="",v=0):f?(l.selection.moveToPosition(b),v=0,x()):r=="scroll"?(k(),M()):x(),clearTimeout(f),f=null},l),s.addListener(o,"touchmove",function(S){f&&(clearTimeout(f),f=null);var C=S.touches;if(!(C.length>1||r=="zoom")){var L=C[0],I=a-L.clientX,F=c-L.clientY;if(r=="wait")if(I*I+F*F>4)r="cursor";else return S.preventDefault();a=L.clientX,c=L.clientY,S.clientX=L.clientX,S.clientY=L.clientY;var R=S.timeStamp,B=R-u;if(u=R,r=="scroll"){var N=new i(S,l);N.speed=1,N.wheelX=I,N.wheelY=F,10*Math.abs(I)0)if(ue==16){for(Ae=Oe;Ae-1){for(Ae=Oe;Ae=0&&K[nn]==y;nn--)j[nn]=i}}}function B(W,j,U){if(!(s=W){for(Y=J+1;Y=W;)Y++;for(X=J,q=Y-1;X=j.length||(Y=U[K-1])!=g&&Y!=v||(X=j[K+1])!=g&&X!=v?b:(d&&(X=v),X==Y?X:b);case T:return Y=K>0?U[K-1]:D,Y==g&&K+10&&U[K-1]==g)return g;if(d)return b;for(ne=K+1,q=j.length;ne=1425&&ue<=2303||ue==64286;if(Y=j[ne],Se&&(Y==f||Y==w))return f}return K<1||(Y=j[K-1])==D?b:U[K-1];case D:return d=!1,o=!0,i;case E:return l=!0,b;case O:case _:case S:case C:case k:d=!1;case L:return b}}function z(W){var j=W.charCodeAt(0),U=j>>8;return U==0?j>191?u:I[j]:U==5?/[\u0591-\u05f4]/.test(W)?f:u:U==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(W)?M:/[\u0660-\u0669\u066b-\u066c]/.test(W)?v:j==1642?x:/[\u06f0-\u06f9]/.test(W)?g:w:U==32&&j<=8287?F[j&255]:U==254&&j>=65136?w:b}n.L=u,n.R=f,n.EN=g,n.ON_R=3,n.AN=4,n.R_H=5,n.B=6,n.RLE=7,n.DOT="·",n.doBidiReorder=function(W,j,U){if(W.length<2)return{};var K=W.split(""),J=new Array(K.length),Y=new Array(K.length),X=[];i=U?p:c,R(K,X,K.length,j);for(var q=0;qw&&j[q]0&&K[q-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(K[q])&&(X[q-1]=X[q]=n.R_H,q++);K[K.length-1]===n.DOT&&(X[K.length-1]=n.B),K[0]==="‫"&&(X[0]=n.RLE);for(var q=0;q=0&&(r=this.session.$docRowCache[c])}return r},l.prototype.getSplitIndex=function(){var r=0,a=this.session.$screenRowCache;if(a.length)for(var c,p=this.session.$getRowCacheIndex(a,this.currentRow);this.currentRow-r>0&&(c=this.session.$getRowCacheIndex(a,this.currentRow-r-1),c===p);)p=c,r++;else r=this.currentRow;return r},l.prototype.updateRowLine=function(r,a){r===void 0&&(r=this.getDocumentRow());var c=r===this.session.getLength()-1,p=c?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(r),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var u=this.session.$wrapData[r];u&&(a===void 0&&(a=this.getSplitIndex()),a>0&&u.length?(this.wrapIndent=u.indent,this.wrapOffset=this.wrapIndent*this.charWidths[i.L],this.line=aa?this.session.getOverwrite()?r:r-1:a,p=i.getVisualFromLogicalIdx(c,this.bidiMap),u=this.bidiMap.bidiLevels,f=0;!this.session.getOverwrite()&&r<=a&&u[p]%2!==0&&p++;for(var g=0;ga&&u[p]%2===0&&(f+=this.charWidths[u[p]]),this.wrapIndent&&(f+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(f+=this.rtlLineOffset),f},l.prototype.getSelections=function(r,a){var c=this.bidiMap,p=c.bidiLevels,u,f=[],g=0,v=Math.min(r,a)-this.wrapIndent,b=Math.max(r,a)-this.wrapIndent,D=!1,E=!1,w=0;this.wrapIndent&&(g+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var y,A=0;A=v&&yp+g/2;){if(p+=g,u===f.length-1){g=0;break}g=this.charWidths[f[++u]]}return u>0&&f[u-1]%2!==0&&f[u]%2===0?(c0&&f[u-1]%2===0&&f[u]%2!==0?a=1+(c>p?this.bidiMap.logicalFromVisual[u]:this.bidiMap.logicalFromVisual[u-1]):this.isRtlDir&&u===f.length-1&&g===0&&f[u-1]%2===0||!this.isRtlDir&&u===0&&f[u]%2!==0?a=1+this.bidiMap.logicalFromVisual[u]:(u>0&&f[u-1]%2!==0&&g!==0&&u--,a=this.bidiMap.logicalFromVisual[u]),a===0&&this.isRtlDir&&a++,a+this.wrapIndent},l})();n.BidiHandler=o}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(t,n,h){var i=t("./lib/oop"),s=t("./lib/lang"),d=t("./lib/event_emitter").EventEmitter,o=t("./range").Range,l=(function(){function r(a){this.session=a,this.doc=a.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var c=this;this.cursor.on("change",function(p){c.$cursorChanged=!0,c.$silent||c._emit("changeCursor"),!c.$isEmpty&&!c.$silent&&c._emit("changeSelection"),!c.$keepDesiredColumnOnChange&&p.old.column!=p.value.column&&(c.$desiredColumn=null)}),this.anchor.on("change",function(){c.$anchorChanged=!0,!c.$isEmpty&&!c.$silent&&c._emit("changeSelection")})}return r.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},r.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},r.prototype.getCursor=function(){return this.lead.getPosition()},r.prototype.setAnchor=function(a,c){this.$isEmpty=!1,this.anchor.setPosition(a,c)},r.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},r.prototype.getSelectionLead=function(){return this.lead.getPosition()},r.prototype.isBackwards=function(){var a=this.anchor,c=this.lead;return a.row>c.row||a.row==c.row&&a.column>c.column},r.prototype.getRange=function(){var a=this.anchor,c=this.lead;return this.$isEmpty?o.fromPoints(c,c):this.isBackwards()?o.fromPoints(c,a):o.fromPoints(a,c)},r.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},r.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},r.prototype.setRange=function(a,c){var p=c?a.end:a.start,u=c?a.start:a.end;this.$setSelection(p.row,p.column,u.row,u.column)},r.prototype.$setSelection=function(a,c,p,u){if(!this.$silent){var f=this.$isEmpty,g=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(a,c),this.cursor.setPosition(p,u),this.$isEmpty=!o.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||f!=this.$isEmpty||g)&&this._emit("changeSelection")}},r.prototype.$moveSelection=function(a){var c=this.lead;this.$isEmpty&&this.setSelectionAnchor(c.row,c.column),a.call(this)},r.prototype.selectTo=function(a,c){this.$moveSelection(function(){this.moveCursorTo(a,c)})},r.prototype.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})},r.prototype.moveTo=function(a,c){this.clearSelection(),this.moveCursorTo(a,c)},r.prototype.moveToPosition=function(a){this.clearSelection(),this.moveCursorToPosition(a)},r.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},r.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},r.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},r.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},r.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},r.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},r.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},r.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},r.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},r.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},r.prototype.getWordRange=function(a,c){if(typeof c>"u"){var p=a||this.lead;a=p.row,c=p.column}return this.session.getWordRange(a,c)},r.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},r.prototype.selectAWord=function(){var a=this.getCursor(),c=this.session.getAWordRange(a.row,a.column);this.setSelectionRange(c)},r.prototype.getLineRange=function(a,c){var p=typeof a=="number"?a:this.lead.row,u,f=this.session.getFoldLine(p);return f?(p=f.start.row,u=f.end.row):u=p,c===!0?new o(p,0,u,this.session.getLine(u).length):new o(p,0,u+1,0)},r.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},r.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},r.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},r.prototype.wouldMoveIntoSoftTab=function(a,c,p){var u=a.column,f=a.column+c;return p<0&&(u=a.column-c,f=a.column),this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(u,f).split(" ").length-1==c},r.prototype.moveCursorLeft=function(){var a=this.lead.getPosition(),c;if(c=this.session.getFoldAt(a.row,a.column,-1))this.moveCursorTo(c.start.row,c.start.column);else if(a.column===0)a.row>0&&this.moveCursorTo(a.row-1,this.doc.getLine(a.row-1).length);else{var p=this.session.getTabSize();this.wouldMoveIntoSoftTab(a,p,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-p):this.moveCursorBy(0,-1)}},r.prototype.moveCursorRight=function(){var a=this.lead.getPosition(),c;if(c=this.session.getFoldAt(a.row,a.column,1))this.moveCursorTo(c.end.row,c.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(c.column=u)}}this.moveCursorTo(c.row,c.column)},r.prototype.moveCursorFileEnd=function(){var a=this.doc.getLength()-1,c=this.doc.getLine(a).length;this.moveCursorTo(a,c)},r.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},r.prototype.moveCursorLongWordRight=function(){var a=this.lead.row,c=this.lead.column,p=this.doc.getLine(a),u=p.substring(c);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var f=this.session.getFoldAt(a,c,1);if(f){this.moveCursorTo(f.end.row,f.end.column);return}if(this.session.nonTokenRe.exec(u)&&(c+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,u=p.substring(c)),c>=p.length){this.moveCursorTo(a,p.length),this.moveCursorRight(),a0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(f)&&(c-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,c)},r.prototype.$shortWordEndIndex=function(a){var c=0,p,u=/\s/,f=this.session.tokenRe;if(f.lastIndex=0,this.session.tokenRe.exec(a))c=this.session.tokenRe.lastIndex;else{for(;(p=a[c])&&u.test(p);)c++;if(c<1){for(f.lastIndex=0;(p=a[c])&&!f.test(p);)if(f.lastIndex=0,c++,u.test(p))if(c>2){c--;break}else{for(;(p=a[c])&&u.test(p);)c++;if(c>2)break}}}return f.lastIndex=0,c},r.prototype.moveCursorShortWordRight=function(){var a=this.lead.row,c=this.lead.column,p=this.doc.getLine(a),u=p.substring(c),f=this.session.getFoldAt(a,c,1);if(f)return this.moveCursorTo(f.end.row,f.end.column);if(c==p.length){var g=this.doc.getLength();do a++,u=this.doc.getLine(a);while(a0&&/^\s*$/.test(u));c=u.length,/\s+$/.test(u)||(u="")}var f=s.stringReverse(u),g=this.$shortWordEndIndex(f);return this.moveCursorTo(a,c-g)},r.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},r.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},r.prototype.moveCursorBy=function(a,c){var p=this.session.documentToScreenPosition(this.lead.row,this.lead.column),u;if(c===0&&(a!==0&&(this.session.$bidiHandler.isBidiRow(p.row,this.lead.row)?(u=this.session.$bidiHandler.getPosLeft(p.column),p.column=Math.round(u/this.session.$bidiHandler.charWidths[0])):u=p.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?p.column=this.$desiredColumn:this.$desiredColumn=p.column),a!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var f=this.session.lineWidgets[this.lead.row];a<0?a-=f.rowsAbove||0:a>0&&(a+=f.rowCount-(f.rowsAbove||0))}var g=this.session.screenToDocumentPosition(p.row+a,p.column,u);a!==0&&c===0&&g.row===this.lead.row&&(g.column,this.lead.column),this.moveCursorTo(g.row,g.column+c,c===0)},r.prototype.moveCursorToPosition=function(a){this.moveCursorTo(a.row,a.column)},r.prototype.moveCursorTo=function(a,c,p){var u=this.session.getFoldAt(a,c,1);u&&(a=u.start.row,c=u.start.column),this.$keepDesiredColumnOnChange=!0;var f=this.session.getLine(a);/[\uDC00-\uDFFF]/.test(f.charAt(c))&&f.charAt(c-1)&&(this.lead.row==a&&this.lead.column==c+1?c=c-1:c=c+1),this.lead.setPosition(a,c),this.$keepDesiredColumnOnChange=!1,p||(this.$desiredColumn=null)},r.prototype.moveCursorToScreen=function(a,c,p){var u=this.session.screenToDocumentPosition(a,c);this.moveCursorTo(u.row,u.column,p)},r.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},r.prototype.fromOrientedRange=function(a){this.setSelectionRange(a,a.cursor==a.start),this.$desiredColumn=a.desiredColumn||this.$desiredColumn},r.prototype.toOrientedRange=function(a){var c=this.getRange();return a?(a.start.column=c.start.column,a.start.row=c.start.row,a.end.column=c.end.column,a.end.row=c.end.row):a=c,a.cursor=this.isBackwards()?a.start:a.end,a.desiredColumn=this.$desiredColumn,a},r.prototype.getRangeOfMovements=function(a){var c=this.getCursor();try{a(this);var p=this.getCursor();return o.fromPoints(c,p)}catch{return o.fromPoints(c,c)}finally{this.moveCursorToPosition(c)}},r.prototype.toJSON=function(){if(this.rangeCount)var a=this.ranges.map(function(c){var p=c.clone();return p.isBackwards=c.cursor==c.start,p});else{var a=this.getRange();a.isBackwards=this.isBackwards()}return a},r.prototype.fromJSON=function(a){if(a.start==null)if(this.rangeList&&a.length>1){this.toSingleRange(a[0]);for(var c=a.length;c--;){var p=o.fromPoints(a[c].start,a[c].end);a[c].isBackwards&&(p.cursor=p.start),this.addRange(p,!0)}return}else a=a[0];this.rangeList&&this.toSingleRange(a),this.setSelectionRange(a,a.isBackwards)},r.prototype.isEqual=function(a){if((a.length||this.rangeCount)&&a.length!=this.rangeCount)return!1;if(!a.length||!this.ranges)return this.getRange().isEqual(a);for(var c=this.ranges.length;c--;)if(!this.ranges[c].isEqual(a[c]))return!1;return!0},r})();l.prototype.setSelectionAnchor=l.prototype.setAnchor,l.prototype.getSelectionAnchor=l.prototype.getAnchor,l.prototype.setSelectionRange=l.prototype.setRange,i.implement(l.prototype,d),n.Selection=l}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(t,n,h){var i=t("./lib/report_error").reportError,s=2e3,d=(function(){function o(l){this.splitRegex,this.states=l,this.regExps={},this.matchMappings={};for(var r in this.states){for(var a=this.states[r],c=[],p=0,u=this.matchMappings[r]={defaultToken:"text"},f="g",g=[],v=0;v1?b.onMatch=this.$applyToken:b.onMatch=b.token),E>1&&(/\\\d/.test(b.regex)?D=b.regex.replace(/\\([0-9]+)/g,function(w,y){return"\\"+(parseInt(y,10)+p+1)}):(E=1,D=this.removeCapturingGroups(b.regex)),!b.splitRegex&&typeof b.token!="string"&&g.push(b)),u[p]=v,p+=E,c.push(D),b.onMatch||(b.onMatch=null)}}c.length||(u[0]=0,c.push("$")),g.forEach(function(w){w.splitRegex=this.createSplitterRegexp(w.regex,f)},this),this.regExps[r]=new RegExp("("+c.join(")|(")+")|($)",f)}}return o.prototype.$setMaxTokenCount=function(l){s=l|0},o.prototype.$applyToken=function(l){var r=this.splitRegex.exec(l).slice(1),a=this.token.apply(this,r);if(typeof a=="string")return[{type:a,value:l}];for(var c=[],p=0,u=a.length;pb){var x=l.substring(b,T-A.length);E.type==w?E.value+=x:(E.type&&v.push(E),E={type:w,value:x})}for(var M=0;Ms){for(D>2*l.length&&this.reportError("infinite loop with in ace tokenizer",{startState:r,line:l});b1&&a[0]!==c&&a.unshift("#tmp",c),{tokens:v,state:a.length?a:c}},o})();d.prototype.reportError=i,n.Tokenizer=d}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(t,n,h){var i=t("../lib/deep_copy").deepCopy,s;s=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(l,r){if(!r){for(var a in l)this.$rules[a]=l[a];return}for(var a in l){for(var c=l[a],p=0;p=this.$rowTokens.length;){if(this.$row+=1,o||(o=this.$session.getLength()),this.$row>=o)return this.$row=o-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},d.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},d.prototype.getCurrentTokenRow=function(){return this.$row},d.prototype.getCurrentTokenColumn=function(){var o=this.$rowTokens,l=this.$tokenIndex,r=o[l].start;if(r!==void 0)return r;for(r=0;l>0;)l-=1,r+=o[l].value.length;return r},d.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},d.prototype.getCurrentTokenRange=function(){var o=this.$rowTokens[this.$tokenIndex],l=this.getCurrentTokenColumn();return new i(this.$row,l,this.$row,l+o.value.length)},d})();n.TokenIterator=s}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(t,n,h){var i=t("../../lib/oop"),s=t("../behaviour").Behaviour,d=t("../../token_iterator").TokenIterator,o=t("../../lib/lang"),l=["text","paren.rparen","rparen","paren","punctuation.operator"],r=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],a,c={},p={'"':'"',"'":"'"},u=function(v){var b=-1;if(v.multiSelect&&(b=v.selection.index,c.rangeCount!=v.multiSelect.rangeCount&&(c={rangeCount:v.multiSelect.rangeCount})),c[b])return a=c[b];a=c[b]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},f=function(v,b,D,E){var w=v.end.row-v.start.row;return{text:D+b+E,selection:[0,v.start.column+1,w,v.end.column+(w?0:1)]}},g;g=function(v){v=v||{},this.add("braces","insertion",function(b,D,E,w,y){var A=E.getCursorPosition(),T=w.doc.getLine(A.row);if(y=="{"){u(E);var x=E.getSelectionRange(),M=w.doc.getTextRange(x),O=w.getTokenAt(A.row,A.column);if(M!==""&&M!=="{"&&E.getWrapBehavioursEnabled())return f(x,M,"{","}");if(O&&/(?:string)\.quasi|\.xml/.test(O.type)){var _=[/tag\-(?:open|name)/,/attribute\-name/];return _.some(function(R){return R.test(O.type)})||/(string)\.quasi/.test(O.type)&&O.value[A.column-O.start-1]!=="$"?void 0:(g.recordAutoInsert(E,w,"}"),{text:"{}",selection:[1,1]})}else if(g.isSaneInsertion(E,w))return/[\]\}\)]/.test(T[A.column])||E.inMultiSelectMode||v.braces?(g.recordAutoInsert(E,w,"}"),{text:"{}",selection:[1,1]}):(g.recordMaybeInsert(E,w,"{"),{text:"{",selection:[1,1]})}else if(y=="}"){u(E);var k=T.substring(A.column,A.column+1);if(k=="}"){var S=w.$findOpeningBracket("}",{column:A.column+1,row:A.row});if(S!==null&&g.isAutoInsertedClosing(A,T,y))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(y==` `||y==`\r -`){h(E);var C="";g.isMaybeInsertedClosing(A,T)&&(C=o.stringRepeat("}",a.maybeInsertedBrackets),g.clearMaybeInsertedClosing());var k=T.substring(A.column,A.column+1);if(k==="}"){var L=w.findMatchingBracket({row:A.row,column:A.column+1},"}");if(!L)return null;var I=this.$getIndent(w.getLine(L.row))}else if(C)var I=this.$getIndent(T);else{g.clearMaybeInsertedClosing();return}var F=I+w.getTabString();return{text:` +`){u(E);var C="";g.isMaybeInsertedClosing(A,T)&&(C=o.stringRepeat("}",a.maybeInsertedBrackets),g.clearMaybeInsertedClosing());var k=T.substring(A.column,A.column+1);if(k==="}"){var L=w.findMatchingBracket({row:A.row,column:A.column+1},"}");if(!L)return null;var I=this.$getIndent(w.getLine(L.row))}else if(C)var I=this.$getIndent(T);else{g.clearMaybeInsertedClosing();return}var F=I+w.getTabString();return{text:` `+F+` -`+I+C,selection:[1,F.length,1,F.length]}}else g.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(b,D,E,w,y){var A=w.doc.getTextRange(y);if(!y.isMultiLine()&&A=="{"){h(E);var T=w.doc.getLine(y.start.row),$=T.substring(y.end.column,y.end.column+1);if($=="}")return y.end.column++,y;a.maybeInsertedBrackets--}}),this.add("parens","insertion",function(b,D,E,w,y){if(y=="("){h(E);var A=E.getSelectionRange(),T=w.doc.getTextRange(A);if(T!==""&&E.getWrapBehavioursEnabled())return f(A,T,"(",")");if(g.isSaneInsertion(E,w))return g.recordAutoInsert(E,w,")"),{text:"()",selection:[1,1]}}else if(y==")"){h(E);var $=E.getCursorPosition(),M=w.doc.getLine($.row),O=M.substring($.column,$.column+1);if(O==")"){var _=w.$findOpeningBracket(")",{column:$.column+1,row:$.row});if(_!==null&&g.isAutoInsertedClosing($,M,y))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(b,D,E,w,y){var A=w.doc.getTextRange(y);if(!y.isMultiLine()&&A=="("){h(E);var T=w.doc.getLine(y.start.row),$=T.substring(y.start.column+1,y.start.column+2);if($==")")return y.end.column++,y}}),this.add("brackets","insertion",function(b,D,E,w,y){if(y=="["){h(E);var A=E.getSelectionRange(),T=w.doc.getTextRange(A);if(T!==""&&E.getWrapBehavioursEnabled())return f(A,T,"[","]");if(g.isSaneInsertion(E,w))return g.recordAutoInsert(E,w,"]"),{text:"[]",selection:[1,1]}}else if(y=="]"){h(E);var $=E.getCursorPosition(),M=w.doc.getLine($.row),O=M.substring($.column,$.column+1);if(O=="]"){var _=w.$findOpeningBracket("]",{column:$.column+1,row:$.row});if(_!==null&&g.isAutoInsertedClosing($,M,y))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(b,D,E,w,y){var A=w.doc.getTextRange(y);if(!y.isMultiLine()&&A=="["){h(E);var T=w.doc.getLine(y.start.row),$=T.substring(y.start.column+1,y.start.column+2);if($=="]")return y.end.column++,y}}),this.add("string_dquotes","insertion",function(b,D,E,w,y){var A=w.$mode.$quotes||p;if(y.length==1&&A[y]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(y)!=-1)return;h(E);var T=y,$=E.getSelectionRange(),M=w.doc.getTextRange($);if(M!==""&&(M.length!=1||!A[M])&&E.getWrapBehavioursEnabled())return f($,M,T,T);if(!M){var O=E.getCursorPosition(),_=w.doc.getLine(O.row),k=_.substring(O.column-1,O.column),S=_.substring(O.column,O.column+1),C=w.getTokenAt(O.row,O.column),L=w.getTokenAt(O.row,O.column+1);if(k=="\\"&&C&&/escape/.test(C.type))return null;var I=C&&/string|escape/.test(C.type),F=!L||/string|escape/.test(L.type),R;if(S==T)R=I!==F,R&&/string\.end/.test(L.type)&&(R=!1);else{if(I&&!F||I&&F)return null;var B=w.$mode.tokenRe;B.lastIndex=0;var N=B.test(k);B.lastIndex=0;var H=B.test(S),W=w.$mode.$pairQuotesAfter,j=W&&W[T]&&W[T].test(k);if(!j&&N||H||S&&!/[\s;,.})\]\\]/.test(S))return null;var U=_[O.column-2];if(k==T&&(U==T||B.test(U)))return null;R=!0}return{text:R?T+T:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(b,D,E,w,y){var A=w.$mode.$quotes||p,T=w.doc.getTextRange(y);if(!y.isMultiLine()&&A.hasOwnProperty(T)){h(E);var $=w.doc.getLine(y.start.row),M=$.substring(y.start.column+1,y.start.column+2);if(M==T)return y.end.column++,y}}),v.closeDocComment!==!1&&this.add("doc comment end","insertion",function(b,D,E,w,y){if(b==="doc-start"&&(y===` +`+I+C,selection:[1,F.length,1,F.length]}}else g.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(b,D,E,w,y){var A=w.doc.getTextRange(y);if(!y.isMultiLine()&&A=="{"){u(E);var T=w.doc.getLine(y.start.row),x=T.substring(y.end.column,y.end.column+1);if(x=="}")return y.end.column++,y;a.maybeInsertedBrackets--}}),this.add("parens","insertion",function(b,D,E,w,y){if(y=="("){u(E);var A=E.getSelectionRange(),T=w.doc.getTextRange(A);if(T!==""&&E.getWrapBehavioursEnabled())return f(A,T,"(",")");if(g.isSaneInsertion(E,w))return g.recordAutoInsert(E,w,")"),{text:"()",selection:[1,1]}}else if(y==")"){u(E);var x=E.getCursorPosition(),M=w.doc.getLine(x.row),O=M.substring(x.column,x.column+1);if(O==")"){var _=w.$findOpeningBracket(")",{column:x.column+1,row:x.row});if(_!==null&&g.isAutoInsertedClosing(x,M,y))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(b,D,E,w,y){var A=w.doc.getTextRange(y);if(!y.isMultiLine()&&A=="("){u(E);var T=w.doc.getLine(y.start.row),x=T.substring(y.start.column+1,y.start.column+2);if(x==")")return y.end.column++,y}}),this.add("brackets","insertion",function(b,D,E,w,y){if(y=="["){u(E);var A=E.getSelectionRange(),T=w.doc.getTextRange(A);if(T!==""&&E.getWrapBehavioursEnabled())return f(A,T,"[","]");if(g.isSaneInsertion(E,w))return g.recordAutoInsert(E,w,"]"),{text:"[]",selection:[1,1]}}else if(y=="]"){u(E);var x=E.getCursorPosition(),M=w.doc.getLine(x.row),O=M.substring(x.column,x.column+1);if(O=="]"){var _=w.$findOpeningBracket("]",{column:x.column+1,row:x.row});if(_!==null&&g.isAutoInsertedClosing(x,M,y))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(b,D,E,w,y){var A=w.doc.getTextRange(y);if(!y.isMultiLine()&&A=="["){u(E);var T=w.doc.getLine(y.start.row),x=T.substring(y.start.column+1,y.start.column+2);if(x=="]")return y.end.column++,y}}),this.add("string_dquotes","insertion",function(b,D,E,w,y){var A=w.$mode.$quotes||p;if(y.length==1&&A[y]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(y)!=-1)return;u(E);var T=y,x=E.getSelectionRange(),M=w.doc.getTextRange(x);if(M!==""&&(M.length!=1||!A[M])&&E.getWrapBehavioursEnabled())return f(x,M,T,T);if(!M){var O=E.getCursorPosition(),_=w.doc.getLine(O.row),k=_.substring(O.column-1,O.column),S=_.substring(O.column,O.column+1),C=w.getTokenAt(O.row,O.column),L=w.getTokenAt(O.row,O.column+1);if(k=="\\"&&C&&/escape/.test(C.type))return null;var I=C&&/string|escape/.test(C.type),F=!L||/string|escape/.test(L.type),R;if(S==T)R=I!==F,R&&/string\.end/.test(L.type)&&(R=!1);else{if(I&&!F||I&&F)return null;var B=w.$mode.tokenRe;B.lastIndex=0;var N=B.test(k);B.lastIndex=0;var z=B.test(S),W=w.$mode.$pairQuotesAfter,j=W&&W[T]&&W[T].test(k);if(!j&&N||z||S&&!/[\s;,.})\]\\]/.test(S))return null;var U=_[O.column-2];if(k==T&&(U==T||B.test(U)))return null;R=!0}return{text:R?T+T:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(b,D,E,w,y){var A=w.$mode.$quotes||p,T=w.doc.getTextRange(y);if(!y.isMultiLine()&&A.hasOwnProperty(T)){u(E);var x=w.doc.getLine(y.start.row),M=x.substring(y.start.column+1,y.start.column+2);if(M==T)return y.end.column++,y}}),v.closeDocComment!==!1&&this.add("doc comment end","insertion",function(b,D,E,w,y){if(b==="doc-start"&&(y===` `||y===`\r -`)&&E.selection.isEmpty()){var A=E.getCursorPosition();if(A.column===0)return;for(var T=w.doc.getLine(A.row),$=w.doc.getLine(A.row+1),M=w.getTokens(A.row),O=0,_=0;_=A.column){if(O===A.column){if(!/\.doc/.test(k.type))return;if(/\*\//.test(k.value)){var S=M[_+1];if(!S||!/\.doc/.test(S.type))return}}var C=A.column-(O-k.value.length),L=k.value.indexOf("*/"),I=k.value.indexOf("/**",L>-1?L+2:0);if(I!==-1&&C>I&&C=L&&C<=I||!/\.doc/.test(k.type))return;break}}var F=this.$getIndent(T);if(/\s*\*/.test($))return/^\s*\*/.test(T)?{text:y+F+"* ",selection:[1,2+F.length,1,2+F.length]}:{text:y+F+" * ",selection:[1,3+F.length,1,3+F.length]};if(/\/\*\*/.test(T.substring(0,A.column)))return{text:y+F+" * "+y+" "+F+"*/",selection:[1,4+F.length,1,4+F.length]}}})},g.isSaneInsertion=function(v,b){var D=v.getCursorPosition(),E=new d(b,D.row,D.column);if(!this.$matchTokenType(E.getCurrentToken()||"text",l)){if(/[)}\]]/.test(v.session.getLine(D.row)[D.column]))return!0;var w=new d(b,D.row,D.column+1);if(!this.$matchTokenType(w.getCurrentToken()||"text",l))return!1}return E.stepForward(),E.getCurrentTokenRow()!==D.row||this.$matchTokenType(E.getCurrentToken()||"text",r)},g.$matchTokenType=function(v,b){return b.indexOf(v.type||v)>-1},g.recordAutoInsert=function(v,b,D){var E=v.getCursorPosition(),w=b.doc.getLine(E.row);this.isAutoInsertedClosing(E,w,a.autoInsertedLineEnd[0])||(a.autoInsertedBrackets=0),a.autoInsertedRow=E.row,a.autoInsertedLineEnd=D+w.substr(E.column),a.autoInsertedBrackets++},g.recordMaybeInsert=function(v,b,D){var E=v.getCursorPosition(),w=b.doc.getLine(E.row);this.isMaybeInsertedClosing(E,w)||(a.maybeInsertedBrackets=0),a.maybeInsertedRow=E.row,a.maybeInsertedLineStart=w.substr(0,E.column)+D,a.maybeInsertedLineEnd=w.substr(E.column),a.maybeInsertedBrackets++},g.isAutoInsertedClosing=function(v,b,D){return a.autoInsertedBrackets>0&&v.row===a.autoInsertedRow&&D===a.autoInsertedLineEnd[0]&&b.substr(v.column)===a.autoInsertedLineEnd},g.isMaybeInsertedClosing=function(v,b){return a.maybeInsertedBrackets>0&&v.row===a.maybeInsertedRow&&b.substr(v.column)===a.maybeInsertedLineEnd&&b.substr(0,v.column)==a.maybeInsertedLineStart},g.popAutoInsertedClosing=function(){a.autoInsertedLineEnd=a.autoInsertedLineEnd.substr(1),a.autoInsertedBrackets--},g.clearMaybeInsertedClosing=function(){a&&(a.maybeInsertedBrackets=0,a.maybeInsertedRow=-1)},i.inherits(g,s),n.CstyleBehaviour=g}),ace.define("ace/unicode",["require","exports","module"],function(t,n,u){for(var i=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],s=0,d=[],o=0;o2?U%y!=y-1:U%y==0}}else{if(!this.blockComment)return!1;var T=this.blockComment.start,$=this.blockComment.end,M=new RegExp("^(\\s*)(?:"+r.escapeRegExp(T)+")"),O=new RegExp("(?:"+r.escapeRegExp($)+")\\s*$"),_=function(R,B){S(R,B)||(!D||/\S/.test(R))&&(b.insertInLine({row:B,column:R.length},$),b.insertInLine({row:B,column:w},T))},k=function(R,B){var N;(N=R.match(O))&&b.removeInLine(B,R.length-N[0].length,R.length),(N=R.match(M))&&b.removeInLine(B,N[1].length,N[0].length)},S=function(R,B){if(M.test(R))return!0;for(var N=f.getTokens(B),H=0;HR.length&&(F=R.length)}),w==1/0&&(w=F,D=!1,E=!1),A&&w%y!=0&&(w=Math.floor(w/y)*y),I(E?k:_)},this.toggleBlockComment=function(h,f,g,v){var b=this.blockComment;if(b){!b.start&&b[0]&&(b=b[0]);var D=new a(f,v.row,v.column),E=D.getCurrentToken();f.selection;var w=f.selection.toOrientedRange(),y,A;if(E&&/comment/.test(E.type)){for(var T,$;E&&/comment/.test(E.type);){var M=E.value.indexOf(b.start);if(M!=-1){var O=D.getCurrentTokenRow(),_=D.getCurrentTokenColumn()+M;T=new c(O,_,O,_+b.start.length);break}E=D.stepBackward()}for(var D=new a(f,v.row,v.column),E=D.getCurrentToken();E&&/comment/.test(E.type);){var M=E.value.indexOf(b.end);if(M!=-1){var O=D.getCurrentTokenRow(),_=D.getCurrentTokenColumn()+M;$=new c(O,_,O,_+b.end.length);break}E=D.stepForward()}$&&f.remove($),T&&(f.remove(T),y=T.start.row,A=-b.start.length)}else A=b.start.length,y=g.start.row,f.insert(g.end,b.end),f.insert(g.start,b.start);w.start.row==y&&(w.start.column+=A),w.end.row==y&&(w.end.column+=A),f.selection.fromOrientedRange(w)}},this.getNextLineIndent=function(h,f,g){return this.$getIndent(f)},this.checkOutdent=function(h,f,g){return!1},this.autoOutdent=function(h,f,g){},this.$getIndent=function(h){return h.match(/^\s*/)[0]},this.createWorker=function(h){return null},this.createModeDelegates=function(h){this.$embeds=[],this.$modes={};for(var f in h)if(h[f]){var g=h[f],v=g.prototype.$id,b=i.$modes[v];b||(i.$modes[v]=b=new g),i.$modes[f]||(i.$modes[f]=b),this.$embeds.push(f),this.$modes[f]=b}for(var D=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],E=function(y){(function(A){var T=D[y],$=A[T];A[D[y]]=function(){return this.$delegator(T,arguments,$)}})(w)},w=this,f=0;fl[r].column&&r++,p.unshift(r,0),l.splice.apply(l,p),this.$updateRows()}}},d.prototype.$updateRows=function(){var o=this.session.lineWidgets;if(o){var l=!0;o.forEach(function(r,a){if(r)for(l=!1,r.row=a;r.$oldWidget;)r.$oldWidget.row=a,r=r.$oldWidget}),l&&(this.session.lineWidgets=null)}},d.prototype.$registerLineWidget=function(o){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var l=this.session.lineWidgets[o.row];return l&&(o.$oldWidget=l,l.el&&l.el.parentNode&&(l.el.parentNode.removeChild(l.el),l._inDocument=!1)),this.session.lineWidgets[o.row]=o,o},d.prototype.addLineWidget=function(o){if(this.$registerLineWidget(o),o.session=this.session,!this.editor)return o;var l=this.editor.renderer;o.html&&!o.el&&(o.el=i.createElement("div"),o.el.innerHTML=o.html),o.text&&!o.el&&(o.el=i.createElement("div"),o.el.textContent=o.text),o.el&&(i.addCssClass(o.el,"ace_lineWidgetContainer"),o.className&&i.addCssClass(o.el,o.className),o.el.style.position="absolute",o.el.style.zIndex="5",l.container.appendChild(o.el),o._inDocument=!0,o.coverGutter||(o.el.style.zIndex="3"),o.pixelHeight==null&&(o.pixelHeight=o.el.offsetHeight)),o.rowCount==null&&(o.rowCount=o.pixelHeight/l.layerConfig.lineHeight);var r=this.session.getFoldAt(o.row,0);if(o.$fold=r,r){var a=this.session.lineWidgets;o.row==r.end.row&&!a[r.start.row]?a[r.start.row]=o:o.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:o.row}}}),this.$updateRows(),this.renderWidgets(null,l),this.onWidgetChanged(o),o},d.prototype.removeLineWidget=function(o){if(o._inDocument=!1,o.session=null,o.el&&o.el.parentNode&&o.el.parentNode.removeChild(o.el),o.editor&&o.editor.destroy)try{o.editor.destroy()}catch{}if(this.session.lineWidgets){var l=this.session.lineWidgets[o.row];if(l==o)this.session.lineWidgets[o.row]=o.$oldWidget,o.$oldWidget&&this.onWidgetChanged(o.$oldWidget);else for(;l;){if(l.$oldWidget==o){l.$oldWidget=o.$oldWidget;break}l=l.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:o.row}}}),this.$updateRows()},d.prototype.getWidgetsAtRow=function(o){for(var l=this.session.lineWidgets,r=l&&l[o],a=[];r;)a.push(r),r=r.$oldWidget;return a},d.prototype.onWidgetChanged=function(o){this.session._changedWidgets.push(o),this.editor&&this.editor.renderer.updateFull()},d.prototype.measureWidgets=function(o,l){var r=this.session._changedWidgets,a=l.layerConfig;if(!(!r||!r.length)){for(var c=1/0,p=0;p0&&!a[c];)c--;this.firstRow=r.firstRow,this.lastRow=r.lastRow,l.$cursorLayer.config=r;for(var h=c;h<=p;h++){var f=a[h];if(!(!f||!f.el)){if(f.hidden){f.el.style.top=-100-(f.pixelHeight||0)+"px";continue}f._inDocument||(f._inDocument=!0,l.container.appendChild(f.el));var g=l.$cursorLayer.getPixelPosition({row:h,column:0},!0).top;f.coverLine||(g+=r.lineHeight*this.session.getRowLineCount(f.row)),f.el.style.top=g-r.offset+"px";var v=f.coverGutter?0:l.gutterWidth;f.fixedWidth||(v-=l.scrollLeft),f.el.style.left=v+"px",f.fullWidth&&f.screenWidth&&(f.el.style.minWidth=r.width+2*r.padding+"px"),f.fixedWidth?f.el.style.right=l.scrollBar.getWidth()+"px":f.el.style.right=""}}}},d})();n.LineWidgets=s}),ace.define("ace/apply_delta",["require","exports","module"],function(t,n,u){n.applyDelta=function(i,s,d){var o=s.start.row,l=s.start.column,r=i[o]||"";switch(s.action){case"insert":var a=s.lines;if(a.length===1)i[o]=r.substring(0,l)+s.lines[0]+r.substring(l);else{var c=[o,1].concat(s.lines);i.splice.apply(i,c),i[o]=r.substring(0,l)+i[o],i[o+s.lines.length-1]+=r.substring(l)}break;case"remove":var p=s.end.column,h=s.end.row;o===h?i[o]=r.substring(0,l)+r.substring(p):i.splice(o,h-o+1,r.substring(0,l)+i[h].substring(p));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(t,n,u){var i=t("./lib/oop"),s=t("./lib/event_emitter").EventEmitter,d=(function(){function r(a,c,p){this.$onChange=this.onChange.bind(this),this.attach(a),typeof c!="number"?this.setPosition(c.row,c.column):this.setPosition(c,p)}return r.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},r.prototype.getDocument=function(){return this.document},r.prototype.onChange=function(a){if(!(a.start.row==a.end.row&&a.start.row!=this.row)&&!(a.start.row>this.row)){var c=l(a,{row:this.row,column:this.column},this.$insertRight);this.setPosition(c.row,c.column,!0)}},r.prototype.setPosition=function(a,c,p){var h;if(p?h={row:a,column:c}:h=this.$clipPositionToDocument(a,c),!(this.row==h.row&&this.column==h.column)){var f={row:this.row,column:this.column};this.row=h.row,this.column=h.column,this._signal("change",{old:f,value:h})}},r.prototype.detach=function(){this.document.off("change",this.$onChange)},r.prototype.attach=function(a){this.document=a||this.document,this.document.on("change",this.$onChange)},r.prototype.$clipPositionToDocument=function(a,c){var p={};return a>=this.document.getLength()?(p.row=Math.max(0,this.document.getLength()-1),p.column=this.document.getLine(p.row).length):a<0?(p.row=0,p.column=0):(p.row=a,p.column=Math.min(this.document.getLine(p.row).length,Math.max(0,c))),c<0&&(p.column=0),p},r})();d.prototype.$insertRight=!1,i.implement(d.prototype,s);function o(r,a,c){var p=c?r.column<=a.column:r.column=A.column){if(O===A.column){if(!/\.doc/.test(k.type))return;if(/\*\//.test(k.value)){var S=M[_+1];if(!S||!/\.doc/.test(S.type))return}}var C=A.column-(O-k.value.length),L=k.value.indexOf("*/"),I=k.value.indexOf("/**",L>-1?L+2:0);if(I!==-1&&C>I&&C=L&&C<=I||!/\.doc/.test(k.type))return;break}}var F=this.$getIndent(T);if(/\s*\*/.test(x))return/^\s*\*/.test(T)?{text:y+F+"* ",selection:[1,2+F.length,1,2+F.length]}:{text:y+F+" * ",selection:[1,3+F.length,1,3+F.length]};if(/\/\*\*/.test(T.substring(0,A.column)))return{text:y+F+" * "+y+" "+F+"*/",selection:[1,4+F.length,1,4+F.length]}}})},g.isSaneInsertion=function(v,b){var D=v.getCursorPosition(),E=new d(b,D.row,D.column);if(!this.$matchTokenType(E.getCurrentToken()||"text",l)){if(/[)}\]]/.test(v.session.getLine(D.row)[D.column]))return!0;var w=new d(b,D.row,D.column+1);if(!this.$matchTokenType(w.getCurrentToken()||"text",l))return!1}return E.stepForward(),E.getCurrentTokenRow()!==D.row||this.$matchTokenType(E.getCurrentToken()||"text",r)},g.$matchTokenType=function(v,b){return b.indexOf(v.type||v)>-1},g.recordAutoInsert=function(v,b,D){var E=v.getCursorPosition(),w=b.doc.getLine(E.row);this.isAutoInsertedClosing(E,w,a.autoInsertedLineEnd[0])||(a.autoInsertedBrackets=0),a.autoInsertedRow=E.row,a.autoInsertedLineEnd=D+w.substr(E.column),a.autoInsertedBrackets++},g.recordMaybeInsert=function(v,b,D){var E=v.getCursorPosition(),w=b.doc.getLine(E.row);this.isMaybeInsertedClosing(E,w)||(a.maybeInsertedBrackets=0),a.maybeInsertedRow=E.row,a.maybeInsertedLineStart=w.substr(0,E.column)+D,a.maybeInsertedLineEnd=w.substr(E.column),a.maybeInsertedBrackets++},g.isAutoInsertedClosing=function(v,b,D){return a.autoInsertedBrackets>0&&v.row===a.autoInsertedRow&&D===a.autoInsertedLineEnd[0]&&b.substr(v.column)===a.autoInsertedLineEnd},g.isMaybeInsertedClosing=function(v,b){return a.maybeInsertedBrackets>0&&v.row===a.maybeInsertedRow&&b.substr(v.column)===a.maybeInsertedLineEnd&&b.substr(0,v.column)==a.maybeInsertedLineStart},g.popAutoInsertedClosing=function(){a.autoInsertedLineEnd=a.autoInsertedLineEnd.substr(1),a.autoInsertedBrackets--},g.clearMaybeInsertedClosing=function(){a&&(a.maybeInsertedBrackets=0,a.maybeInsertedRow=-1)},i.inherits(g,s),n.CstyleBehaviour=g}),ace.define("ace/unicode",["require","exports","module"],function(t,n,h){for(var i=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],s=0,d=[],o=0;o2?U%y!=y-1:U%y==0}}else{if(!this.blockComment)return!1;var T=this.blockComment.start,x=this.blockComment.end,M=new RegExp("^(\\s*)(?:"+r.escapeRegExp(T)+")"),O=new RegExp("(?:"+r.escapeRegExp(x)+")\\s*$"),_=function(R,B){S(R,B)||(!D||/\S/.test(R))&&(b.insertInLine({row:B,column:R.length},x),b.insertInLine({row:B,column:w},T))},k=function(R,B){var N;(N=R.match(O))&&b.removeInLine(B,R.length-N[0].length,R.length),(N=R.match(M))&&b.removeInLine(B,N[1].length,N[0].length)},S=function(R,B){if(M.test(R))return!0;for(var N=f.getTokens(B),z=0;zR.length&&(F=R.length)}),w==1/0&&(w=F,D=!1,E=!1),A&&w%y!=0&&(w=Math.floor(w/y)*y),I(E?k:_)},this.toggleBlockComment=function(u,f,g,v){var b=this.blockComment;if(b){!b.start&&b[0]&&(b=b[0]);var D=new a(f,v.row,v.column),E=D.getCurrentToken();f.selection;var w=f.selection.toOrientedRange(),y,A;if(E&&/comment/.test(E.type)){for(var T,x;E&&/comment/.test(E.type);){var M=E.value.indexOf(b.start);if(M!=-1){var O=D.getCurrentTokenRow(),_=D.getCurrentTokenColumn()+M;T=new c(O,_,O,_+b.start.length);break}E=D.stepBackward()}for(var D=new a(f,v.row,v.column),E=D.getCurrentToken();E&&/comment/.test(E.type);){var M=E.value.indexOf(b.end);if(M!=-1){var O=D.getCurrentTokenRow(),_=D.getCurrentTokenColumn()+M;x=new c(O,_,O,_+b.end.length);break}E=D.stepForward()}x&&f.remove(x),T&&(f.remove(T),y=T.start.row,A=-b.start.length)}else A=b.start.length,y=g.start.row,f.insert(g.end,b.end),f.insert(g.start,b.start);w.start.row==y&&(w.start.column+=A),w.end.row==y&&(w.end.column+=A),f.selection.fromOrientedRange(w)}},this.getNextLineIndent=function(u,f,g){return this.$getIndent(f)},this.checkOutdent=function(u,f,g){return!1},this.autoOutdent=function(u,f,g){},this.$getIndent=function(u){return u.match(/^\s*/)[0]},this.createWorker=function(u){return null},this.createModeDelegates=function(u){this.$embeds=[],this.$modes={};for(var f in u)if(u[f]){var g=u[f],v=g.prototype.$id,b=i.$modes[v];b||(i.$modes[v]=b=new g),i.$modes[f]||(i.$modes[f]=b),this.$embeds.push(f),this.$modes[f]=b}for(var D=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],E=function(y){(function(A){var T=D[y],x=A[T];A[D[y]]=function(){return this.$delegator(T,arguments,x)}})(w)},w=this,f=0;fl[r].column&&r++,p.unshift(r,0),l.splice.apply(l,p),this.$updateRows()}}},d.prototype.$updateRows=function(){var o=this.session.lineWidgets;if(o){var l=!0;o.forEach(function(r,a){if(r)for(l=!1,r.row=a;r.$oldWidget;)r.$oldWidget.row=a,r=r.$oldWidget}),l&&(this.session.lineWidgets=null)}},d.prototype.$registerLineWidget=function(o){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var l=this.session.lineWidgets[o.row];return l&&(o.$oldWidget=l,l.el&&l.el.parentNode&&(l.el.parentNode.removeChild(l.el),l._inDocument=!1)),this.session.lineWidgets[o.row]=o,o},d.prototype.addLineWidget=function(o){if(this.$registerLineWidget(o),o.session=this.session,!this.editor)return o;var l=this.editor.renderer;o.html&&!o.el&&(o.el=i.createElement("div"),o.el.innerHTML=o.html),o.text&&!o.el&&(o.el=i.createElement("div"),o.el.textContent=o.text),o.el&&(i.addCssClass(o.el,"ace_lineWidgetContainer"),o.className&&i.addCssClass(o.el,o.className),o.el.style.position="absolute",o.el.style.zIndex="5",l.container.appendChild(o.el),o._inDocument=!0,o.coverGutter||(o.el.style.zIndex="3"),o.pixelHeight==null&&(o.pixelHeight=o.el.offsetHeight)),o.rowCount==null&&(o.rowCount=o.pixelHeight/l.layerConfig.lineHeight);var r=this.session.getFoldAt(o.row,0);if(o.$fold=r,r){var a=this.session.lineWidgets;o.row==r.end.row&&!a[r.start.row]?a[r.start.row]=o:o.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:o.row}}}),this.$updateRows(),this.renderWidgets(null,l),this.onWidgetChanged(o),o},d.prototype.removeLineWidget=function(o){if(o._inDocument=!1,o.session=null,o.el&&o.el.parentNode&&o.el.parentNode.removeChild(o.el),o.editor&&o.editor.destroy)try{o.editor.destroy()}catch{}if(this.session.lineWidgets){var l=this.session.lineWidgets[o.row];if(l==o)this.session.lineWidgets[o.row]=o.$oldWidget,o.$oldWidget&&this.onWidgetChanged(o.$oldWidget);else for(;l;){if(l.$oldWidget==o){l.$oldWidget=o.$oldWidget;break}l=l.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:o.row}}}),this.$updateRows()},d.prototype.getWidgetsAtRow=function(o){for(var l=this.session.lineWidgets,r=l&&l[o],a=[];r;)a.push(r),r=r.$oldWidget;return a},d.prototype.onWidgetChanged=function(o){this.session._changedWidgets.push(o),this.editor&&this.editor.renderer.updateFull()},d.prototype.measureWidgets=function(o,l){var r=this.session._changedWidgets,a=l.layerConfig;if(!(!r||!r.length)){for(var c=1/0,p=0;p0&&!a[c];)c--;this.firstRow=r.firstRow,this.lastRow=r.lastRow,l.$cursorLayer.config=r;for(var u=c;u<=p;u++){var f=a[u];if(!(!f||!f.el)){if(f.hidden){f.el.style.top=-100-(f.pixelHeight||0)+"px";continue}f._inDocument||(f._inDocument=!0,l.container.appendChild(f.el));var g=l.$cursorLayer.getPixelPosition({row:u,column:0},!0).top;f.coverLine||(g+=r.lineHeight*this.session.getRowLineCount(f.row)),f.el.style.top=g-r.offset+"px";var v=f.coverGutter?0:l.gutterWidth;f.fixedWidth||(v-=l.scrollLeft),f.el.style.left=v+"px",f.fullWidth&&f.screenWidth&&(f.el.style.minWidth=r.width+2*r.padding+"px"),f.fixedWidth?f.el.style.right=l.scrollBar.getWidth()+"px":f.el.style.right=""}}}},d})();n.LineWidgets=s}),ace.define("ace/apply_delta",["require","exports","module"],function(t,n,h){n.applyDelta=function(i,s,d){var o=s.start.row,l=s.start.column,r=i[o]||"";switch(s.action){case"insert":var a=s.lines;if(a.length===1)i[o]=r.substring(0,l)+s.lines[0]+r.substring(l);else{var c=[o,1].concat(s.lines);i.splice.apply(i,c),i[o]=r.substring(0,l)+i[o],i[o+s.lines.length-1]+=r.substring(l)}break;case"remove":var p=s.end.column,u=s.end.row;o===u?i[o]=r.substring(0,l)+r.substring(p):i.splice(o,u-o+1,r.substring(0,l)+i[u].substring(p));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(t,n,h){var i=t("./lib/oop"),s=t("./lib/event_emitter").EventEmitter,d=(function(){function r(a,c,p){this.$onChange=this.onChange.bind(this),this.attach(a),typeof c!="number"?this.setPosition(c.row,c.column):this.setPosition(c,p)}return r.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},r.prototype.getDocument=function(){return this.document},r.prototype.onChange=function(a){if(!(a.start.row==a.end.row&&a.start.row!=this.row)&&!(a.start.row>this.row)){var c=l(a,{row:this.row,column:this.column},this.$insertRight);this.setPosition(c.row,c.column,!0)}},r.prototype.setPosition=function(a,c,p){var u;if(p?u={row:a,column:c}:u=this.$clipPositionToDocument(a,c),!(this.row==u.row&&this.column==u.column)){var f={row:this.row,column:this.column};this.row=u.row,this.column=u.column,this._signal("change",{old:f,value:u})}},r.prototype.detach=function(){this.document.off("change",this.$onChange)},r.prototype.attach=function(a){this.document=a||this.document,this.document.on("change",this.$onChange)},r.prototype.$clipPositionToDocument=function(a,c){var p={};return a>=this.document.getLength()?(p.row=Math.max(0,this.document.getLength()-1),p.column=this.document.getLine(p.row).length):a<0?(p.row=0,p.column=0):(p.row=a,p.column=Math.min(this.document.getLine(p.row).length,Math.max(0,c))),c<0&&(p.column=0),p},r})();d.prototype.$insertRight=!1,i.implement(d.prototype,s);function o(r,a,c){var p=c?r.column<=a.column:r.column=h&&(c=h-1,p=void 0);var f=this.getLine(c);return p==null&&(p=f.length),p=Math.min(Math.max(p,0),f.length),{row:c,column:p}},a.prototype.clonePos=function(c){return{row:c.row,column:c.column}},a.prototype.pos=function(c,p){return{row:c,column:p}},a.prototype.$clipPosition=function(c){var p=this.getLength();return c.row>=p?(c.row=Math.max(0,p-1),c.column=this.getLine(p-1).length):(c.row=Math.max(0,c.row),c.column=Math.min(Math.max(c.column,0),this.getLine(c.row).length)),c},a.prototype.insertFullLines=function(c,p){c=Math.min(Math.max(c,0),this.getLength());var h=0;c0,f=p=0&&this.applyDelta({start:this.pos(c,this.getLine(c).length),end:this.pos(c+1,0),action:"remove",lines:["",""]})},a.prototype.replace=function(c,p){if(c instanceof o||(c=o.fromPoints(c.start,c.end)),p.length===0&&c.isEmpty())return c.start;if(p==this.getTextRange(c))return c.end;this.remove(c);var h;return p?h=this.insert(c.start,p):h=c.start,h},a.prototype.applyDeltas=function(c){for(var p=0;p=0;p--)this.revertDelta(c[p])},a.prototype.applyDelta=function(c,p){var h=c.action=="insert";(h?c.lines.length<=1&&!c.lines[0]:!o.comparePoints(c.start,c.end))||(h&&c.lines.length>2e4?this.$splitAndapplyLargeDelta(c,2e4):(s(this.$lines,c,p),this._signal("change",c)))},a.prototype.$safeApplyDelta=function(c){var p=this.$lines.length;(c.action=="remove"&&c.start.row20){a.running=setTimeout(a.$worker,20);break}}a.currentLine=p,h==-1&&(h=p),g<=h&&a.fireUpdateEvent(g,h)}}}return o.prototype.setTokenizer=function(l){this.tokenizer=l,this.lines=[],this.states=[],this.start(0)},o.prototype.setDocument=function(l){this.doc=l,this.lines=[],this.states=[],this.stop()},o.prototype.fireUpdateEvent=function(l,r){var a={first:l,last:r};this._signal("update",{data:a})},o.prototype.start=function(l){this.currentLine=Math.min(l||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},o.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},o.prototype.$updateOnChange=function(l){var r=l.start.row,a=l.end.row-r;if(a===0)this.lines[r]=null;else if(l.action=="remove")this.lines.splice(r,a+1,null),this.states.splice(r,a+1,null);else{var c=Array(a+1);c.unshift(r,1),this.lines.splice.apply(this.lines,c),this.states.splice.apply(this.states,c)}this.currentLine=Math.min(r,this.currentLine,this.doc.getLength()),this.stop()},o.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},o.prototype.getTokens=function(l){return this.lines[l]||this.$tokenizeRow(l)},o.prototype.getState=function(l){return this.currentLine==l&&this.$tokenizeRow(l),this.states[l]||"start"},o.prototype.$tokenizeRow=function(l){var r=this.doc.getLine(l),a=this.states[l-1],c=this.tokenizer.getLineTokens(r,a,l);return this.states[l]+""!=c.state+""?(this.states[l]=c.state,this.lines[l+1]=null,this.currentLine>l+1&&(this.currentLine=l+1)):this.currentLine==l&&(this.currentLine=l+1),this.lines[l]=c.tokens},o.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},o})();i.implement(d.prototype,s),n.BackgroundTokenizer=d}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(t,n,u){var i=t("./lib/lang"),s=t("./range").Range,d=(function(){function o(l,r,a){a===void 0&&(a="text"),this.setRegexp(l),this.clazz=r,this.type=a,this.docLen=0}return o.prototype.setRegexp=function(l){this.regExp+""!=l+""&&(this.regExp=l,this.cache=[])},o.prototype.update=function(l,r,a,c){if(this.regExp){for(var p=c.firstRow,h=c.lastRow,f={},g=a.$editor&&a.$editor.$search,v=g&&g.$isMultilineSearch(a.$editor.getLastSearchOptions()),b=p;b<=h;b++){var D=this.cache[b];if(D==null||a.getValue().length!=this.docLen){if(v){D=[];var E=g.$multiLineForward(a,this.regExp,b,h);if(E){var w=E.endRow<=h?E.endRow-1:h;w>b&&(b=w),D.push(new s(E.startRow,E.startCol,E.endRow,E.endCol))}D.length>this.MAX_RANGES&&(D=D.slice(0,this.MAX_RANGES))}else D=i.getMatchOffsets(a.getLine(b),this.regExp),D.length>this.MAX_RANGES&&(D=D.slice(0,this.MAX_RANGES)),D=D.map(function($){return new s(b,$.offset,b,$.offset+$.length)});this.cache[b]=D.length?D:""}if(D.length!==0)for(var y=D.length;y--;){var A=D[y].toScreenRange(a),T=A.toString();f[T]||(f[T]=!0,r.drawSingleLineMarker(l,A,this.clazz,c))}}this.docLen=a.getValue().length}},o})();d.prototype.MAX_RANGES=500,n.SearchHighlight=d}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(t,n,u){var i=(function(){function w(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return w.prototype.addSession=function(y){this.$session=y},w.prototype.add=function(y,A,T){if(!this.$fromUndo&&y!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),A===!1||!this.lastDeltas){this.lastDeltas=[];var $=this.$undoStack.length;$>this.$undoDepth-1&&this.$undoStack.splice(0,$-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),y.id=this.$rev=++this.$maxRev}(y.action=="remove"||y.action=="insert")&&(this.$lastDelta=y),this.lastDeltas.push(y)}},w.prototype.addSelection=function(y,A){this.selections.push({value:y,rev:A||this.$rev})},w.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},w.prototype.markIgnored=function(y,A){A==null&&(A=this.$rev+1);for(var T=this.$undoStack,$=T.length;$--;){var M=T[$][0];if(M.id<=y)break;M.id0},w.prototype.canRedo=function(){return this.$redoStack.length>0},w.prototype.bookmark=function(y){y==null&&(y=this.$rev),this.mark=y},w.prototype.isAtBookmark=function(){return this.$rev===this.mark},w.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},w.prototype.fromJSON=function(y){this.reset(),this.$undoStack=y.$undoStack,this.$redoStack=y.$redoStack},w.prototype.$prettyPrint=function(y){return y?a(y):a(this.$undoStack)+` +`},a.prototype.getLine=function(c){return this.$lines[c]||""},a.prototype.getLines=function(c,p){return this.$lines.slice(c,p+1)},a.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},a.prototype.getLength=function(){return this.$lines.length},a.prototype.getTextRange=function(c){return this.getLinesForRange(c).join(this.getNewLineCharacter())},a.prototype.getLinesForRange=function(c){var p;if(c.start.row===c.end.row)p=[this.getLine(c.start.row).substring(c.start.column,c.end.column)];else{p=this.getLines(c.start.row,c.end.row),p[0]=(p[0]||"").substring(c.start.column);var u=p.length-1;c.end.row-c.start.row==u&&(p[u]=p[u].substring(0,c.end.column))}return p},a.prototype.insertLines=function(c,p){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(c,p)},a.prototype.removeLines=function(c,p){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(c,p)},a.prototype.insertNewLine=function(c){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(c,["",""])},a.prototype.insert=function(c,p){return this.getLength()<=1&&this.$detectNewLine(p),this.insertMergedLines(c,this.$split(p))},a.prototype.insertInLine=function(c,p){var u=this.clippedPos(c.row,c.column),f=this.pos(c.row,c.column+p.length);return this.applyDelta({start:u,end:f,action:"insert",lines:[p]},!0),this.clonePos(f)},a.prototype.clippedPos=function(c,p){var u=this.getLength();c===void 0?c=u:c<0?c=0:c>=u&&(c=u-1,p=void 0);var f=this.getLine(c);return p==null&&(p=f.length),p=Math.min(Math.max(p,0),f.length),{row:c,column:p}},a.prototype.clonePos=function(c){return{row:c.row,column:c.column}},a.prototype.pos=function(c,p){return{row:c,column:p}},a.prototype.$clipPosition=function(c){var p=this.getLength();return c.row>=p?(c.row=Math.max(0,p-1),c.column=this.getLine(p-1).length):(c.row=Math.max(0,c.row),c.column=Math.min(Math.max(c.column,0),this.getLine(c.row).length)),c},a.prototype.insertFullLines=function(c,p){c=Math.min(Math.max(c,0),this.getLength());var u=0;c0,f=p=0&&this.applyDelta({start:this.pos(c,this.getLine(c).length),end:this.pos(c+1,0),action:"remove",lines:["",""]})},a.prototype.replace=function(c,p){if(c instanceof o||(c=o.fromPoints(c.start,c.end)),p.length===0&&c.isEmpty())return c.start;if(p==this.getTextRange(c))return c.end;this.remove(c);var u;return p?u=this.insert(c.start,p):u=c.start,u},a.prototype.applyDeltas=function(c){for(var p=0;p=0;p--)this.revertDelta(c[p])},a.prototype.applyDelta=function(c,p){var u=c.action=="insert";(u?c.lines.length<=1&&!c.lines[0]:!o.comparePoints(c.start,c.end))||(u&&c.lines.length>2e4?this.$splitAndapplyLargeDelta(c,2e4):(s(this.$lines,c,p),this._signal("change",c)))},a.prototype.$safeApplyDelta=function(c){var p=this.$lines.length;(c.action=="remove"&&c.start.row20){a.running=setTimeout(a.$worker,20);break}}a.currentLine=p,u==-1&&(u=p),g<=u&&a.fireUpdateEvent(g,u)}}}return o.prototype.setTokenizer=function(l){this.tokenizer=l,this.lines=[],this.states=[],this.start(0)},o.prototype.setDocument=function(l){this.doc=l,this.lines=[],this.states=[],this.stop()},o.prototype.fireUpdateEvent=function(l,r){var a={first:l,last:r};this._signal("update",{data:a})},o.prototype.start=function(l){this.currentLine=Math.min(l||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},o.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},o.prototype.$updateOnChange=function(l){var r=l.start.row,a=l.end.row-r;if(a===0)this.lines[r]=null;else if(l.action=="remove")this.lines.splice(r,a+1,null),this.states.splice(r,a+1,null);else{var c=Array(a+1);c.unshift(r,1),this.lines.splice.apply(this.lines,c),this.states.splice.apply(this.states,c)}this.currentLine=Math.min(r,this.currentLine,this.doc.getLength()),this.stop()},o.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},o.prototype.getTokens=function(l){return this.lines[l]||this.$tokenizeRow(l)},o.prototype.getState=function(l){return this.currentLine==l&&this.$tokenizeRow(l),this.states[l]||"start"},o.prototype.$tokenizeRow=function(l){var r=this.doc.getLine(l),a=this.states[l-1],c=this.tokenizer.getLineTokens(r,a,l);return this.states[l]+""!=c.state+""?(this.states[l]=c.state,this.lines[l+1]=null,this.currentLine>l+1&&(this.currentLine=l+1)):this.currentLine==l&&(this.currentLine=l+1),this.lines[l]=c.tokens},o.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},o})();i.implement(d.prototype,s),n.BackgroundTokenizer=d}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(t,n,h){var i=t("./lib/lang"),s=t("./range").Range,d=(function(){function o(l,r,a){a===void 0&&(a="text"),this.setRegexp(l),this.clazz=r,this.type=a,this.docLen=0}return o.prototype.setRegexp=function(l){this.regExp+""!=l+""&&(this.regExp=l,this.cache=[])},o.prototype.update=function(l,r,a,c){if(this.regExp){for(var p=c.firstRow,u=c.lastRow,f={},g=a.$editor&&a.$editor.$search,v=g&&g.$isMultilineSearch(a.$editor.getLastSearchOptions()),b=p;b<=u;b++){var D=this.cache[b];if(D==null||a.getValue().length!=this.docLen){if(v){D=[];var E=g.$multiLineForward(a,this.regExp,b,u);if(E){var w=E.endRow<=u?E.endRow-1:u;w>b&&(b=w),D.push(new s(E.startRow,E.startCol,E.endRow,E.endCol))}D.length>this.MAX_RANGES&&(D=D.slice(0,this.MAX_RANGES))}else D=i.getMatchOffsets(a.getLine(b),this.regExp),D.length>this.MAX_RANGES&&(D=D.slice(0,this.MAX_RANGES)),D=D.map(function(x){return new s(b,x.offset,b,x.offset+x.length)});this.cache[b]=D.length?D:""}if(D.length!==0)for(var y=D.length;y--;){var A=D[y].toScreenRange(a),T=A.toString();f[T]||(f[T]=!0,r.drawSingleLineMarker(l,A,this.clazz,c))}}this.docLen=a.getValue().length}},o})();d.prototype.MAX_RANGES=500,n.SearchHighlight=d}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(t,n,h){var i=(function(){function w(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return w.prototype.addSession=function(y){this.$session=y},w.prototype.add=function(y,A,T){if(!this.$fromUndo&&y!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),A===!1||!this.lastDeltas){this.lastDeltas=[];var x=this.$undoStack.length;x>this.$undoDepth-1&&this.$undoStack.splice(0,x-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),y.id=this.$rev=++this.$maxRev}(y.action=="remove"||y.action=="insert")&&(this.$lastDelta=y),this.lastDeltas.push(y)}},w.prototype.addSelection=function(y,A){this.selections.push({value:y,rev:A||this.$rev})},w.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},w.prototype.markIgnored=function(y,A){A==null&&(A=this.$rev+1);for(var T=this.$undoStack,x=T.length;x--;){var M=T[x][0];if(M.id<=y)break;M.id0},w.prototype.canRedo=function(){return this.$redoStack.length>0},w.prototype.bookmark=function(y){y==null&&(y=this.$rev),this.mark=y},w.prototype.isAtBookmark=function(){return this.$rev===this.mark},w.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},w.prototype.fromJSON=function(y){this.reset(),this.$undoStack=y.$undoStack,this.$redoStack=y.$redoStack},w.prototype.$prettyPrint=function(y){return y?a(y):a(this.$undoStack)+` --- -`+a(this.$redoStack)},w})();i.prototype.hasUndo=i.prototype.canUndo,i.prototype.hasRedo=i.prototype.canRedo,i.prototype.isClean=i.prototype.isAtBookmark,i.prototype.markClean=i.prototype.bookmark;function s(w,y){for(var A=y;A--;){var T=w[A];if(T&&!T[0].ignore){for(;A"+w.end.row+":"+w.end.column}function p(w,y){var A=w.action=="insert",T=y.action=="insert";if(A&&T)if(o(y.start,w.end)>=0)g(y,w,-1);else if(o(y.start,w.start)<=0)g(w,y,1);else return null;else if(A&&!T)if(o(y.start,w.end)>=0)g(y,w,-1);else if(o(y.end,w.start)<=0)g(w,y,-1);else return null;else if(!A&&T)if(o(y.start,w.start)>=0)g(y,w,1);else if(o(y.start,w.start)<=0)g(w,y,1);else return null;else if(!A&&!T)if(o(y.start,w.start)>=0)g(y,w,1);else if(o(y.end,w.start)<=0)g(w,y,-1);else return null;return[y,w]}function h(w,y){for(var A=w.length;A--;)for(var T=0;T=0?g(w,y,-1):(o(w.start,y.start)<=0||g(w,d.fromPoints(y.start,w.start),-1),g(y,w,1));else if(!A&&T)o(y.start,w.end)>=0?g(y,w,-1):(o(y.start,w.start)<=0||g(y,d.fromPoints(w.start,y.start),-1),g(w,y,1));else if(!A&&!T)if(o(y.start,w.end)>=0)g(y,w,-1);else if(o(y.end,w.start)<=0)g(w,y,-1);else{var $,M;return o(w.start,y.start)<0&&($=w,w=b(w,y.start)),o(w.end,y.end)>0&&(M=b(w,y.end)),v(y.end,w.start,w.end,-1),M&&!$&&(w.lines=M.lines,w.start=M.start,w.end=M.end,M=w),[y,$,M].filter(Boolean)}return[y,w]}function g(w,y,A){v(w.start,y.start,y.end,A),v(w.end,y.start,y.end,A)}function v(w,y,A,T){w.row==(T==1?y:A).row&&(w.column+=T*(A.column-y.column)),w.row+=T*(A.row-y.row)}function b(w,y){var A=w.lines,T=w.end;w.end=l(y);var $=w.end.row-w.start.row,M=A.splice($,A.length),O=$?y.column:y.column-w.start.column;A.push(M[0].substring(0,O)),M[0]=M[0].substr(O);var _={start:l(y),end:T,lines:M,action:w.action};return _}function D(w,y){y=r(y);for(var A=w.length;A--;){for(var T=w[A],$=0;$this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(o),this.folds.sort(function(l,r){return-l.range.compareEnd(r.start.row,r.start.column)}),this.range.compareEnd(o.start.row,o.start.column)>0?(this.end.row=o.end.row,this.end.column=o.end.column):this.range.compareStart(o.end.row,o.end.column)<0&&(this.start.row=o.start.row,this.start.column=o.start.column)}else if(o.start.row==this.end.row)this.folds.push(o),this.end.row=o.end.row,this.end.column=o.end.column;else if(o.end.row==this.start.row)this.folds.unshift(o),this.start.row=o.start.row,this.start.column=o.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");o.foldLine=this},d.prototype.containsRow=function(o){return o>=this.start.row&&o<=this.end.row},d.prototype.walk=function(o,l,r){var a=0,c=this.folds,p,h,f,g=!0;l==null&&(l=this.end.row,r=this.end.column);for(var v=0;v0)){var g=s(l,h.start);return f===0?r&&g!==0?-p-2:p:g>0||g===0&&!r?p:-p-1}}return-p-1},o.prototype.add=function(l){var r=!l.isEmpty(),a=this.pointIndex(l.start,r);a<0&&(a=-a-1);var c=this.pointIndex(l.end,r,a);return c<0?c=-c-1:c++,this.ranges.splice(a,c-a,l)},o.prototype.addList=function(l){for(var r=[],a=l.length;a--;)r.push.apply(r,this.add(l[a]));return r},o.prototype.substractPoint=function(l){var r=this.pointIndex(l);if(r>=0)return this.ranges.splice(r,1)},o.prototype.merge=function(){var l=[],r=this.ranges;r=r.sort(function(f,g){return s(f.start,g.start)});for(var a=r[0],c,p=1;p=0},o.prototype.containsPoint=function(l){return this.pointIndex(l)>=0},o.prototype.rangeAtPoint=function(l){var r=this.pointIndex(l);if(r>=0)return this.ranges[r]},o.prototype.clipRows=function(l,r){var a=this.ranges;if(a[0].start.row>r||a[a.length-1].start.row=c)break}if(l.action=="insert")for(var b=p-c,D=-r.column+a.column;fc)break;if(v.start.row==c&&v.start.column>=r.column&&(v.start.column==r.column&&this.$bias<=0||(v.start.column+=D,v.start.row+=b)),v.end.row==c&&v.end.column>=r.column){if(v.end.column==r.column&&this.$bias<0)continue;v.end.column==r.column&&D>0&&fv.start.column&&v.end.column==h[f+1].start.column&&(v.end.column-=D),v.end.column+=D,v.end.row+=b}}else for(var b=c-p,D=r.column-a.column;fp)break;v.end.rowr.column)&&(v.end.column=r.column,v.end.row=r.row):(v.end.column+=D,v.end.row+=b):v.end.row>p&&(v.end.row+=b),v.start.rowr.column)&&(v.start.column=r.column,v.start.row=r.row):(v.start.column+=D,v.start.row+=b):v.start.row>p&&(v.start.row+=b)}if(b!=0&&f=a)return f;if(f.end.row>a)return null}return null},this.getNextFoldLine=function(a,c){var p=this.$foldData,h=0;for(c&&(h=p.indexOf(c)),h==-1&&(h=0),h;h=a)return f}return null},this.getFoldedRowCount=function(a,c){for(var p=this.$foldData,h=c-a+1,f=0;f=c){b=a?h-=c-b:h=0);break}else v>=a&&(b>=a?h-=v-b:h-=v-a+1)}return h},this.$addFoldLine=function(a){return this.$foldData.push(a),this.$foldData.sort(function(c,p){return c.start.row-p.start.row}),a},this.addFold=function(a,c){var p=this.$foldData,h=!1,f;a instanceof d?f=a:(f=new d(c,a),f.collapseChildren=c.collapseChildren),this.$clipRangeToDocument(f.range);var g=f.start.row,v=f.start.column,b=f.end.row,D=f.end.column,E=this.getFoldAt(g,v,1),w=this.getFoldAt(b,D,-1);if(E&&w==E)return E.addSubFold(f);E&&!E.range.isStart(g,v)&&this.removeFold(E),w&&!w.range.isEnd(b,D)&&this.removeFold(w);var y=this.getFoldsInRange(f.range);y.length>0&&(this.removeFolds(y),f.collapseChildren||y.forEach(function(M){f.addSubFold(M)}));for(var A=0;A0&&this.foldAll(a.start.row+1,a.end.row,a.collapseChildren-1),a.subFolds=[]},this.expandFolds=function(a){a.forEach(function(c){this.expandFold(c)},this)},this.unfold=function(a,c){var p,h;if(a==null)p=new i(0,0,this.getLength(),0),c==null&&(c=!0);else if(typeof a=="number")p=new i(a,0,a,this.getLine(a).length);else if("row"in a)p=i.fromPoints(a,a);else{if(Array.isArray(a))return h=[],a.forEach(function(g){h=h.concat(this.unfold(g))},this),h;p=a}h=this.getFoldsInRangeList(p);for(var f=h;h.length==1&&i.comparePoints(h[0].start,p.start)<0&&i.comparePoints(h[0].end,p.end)>0;)this.expandFolds(h),h=this.getFoldsInRangeList(p);if(c!=!1?this.removeFolds(h):this.expandFolds(h),f.length)return f},this.isRowFolded=function(a,c){return!!this.getFoldLine(a,c)},this.getRowFoldEnd=function(a,c){var p=this.getFoldLine(a,c);return p?p.end.row:a},this.getRowFoldStart=function(a,c){var p=this.getFoldLine(a,c);return p?p.start.row:a},this.getFoldDisplayLine=function(a,c,p,h,f){h==null&&(h=a.start.row),f==null&&(f=0),c==null&&(c=a.end.row),p==null&&(p=this.getLine(c).length);var g=this.doc,v="";return a.walk(function(b,D,E,w){if(!(DE)break;while(f&&v.test(f.type));f=h.stepBackward()}else f=h.getCurrentToken();return b.end.row=h.getCurrentTokenRow(),b.end.column=h.getCurrentTokenColumn(),b.start.row==b.end.row&&b.start.column>b.end.column?void 0:b}},this.foldAll=function(a,c,p,h){p==null&&(p=1e5);var f=this.foldWidgets;if(f){c=c||this.getLength(),a=a||0;for(var g=a;g=a&&(g=v.end.row,v.collapseChildren=p,this.addFold("...",v))}}},this.foldToLevel=function(a){for(this.foldAll();a-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var a=this;this.foldAll(null,null,null,function(c){for(var p=a.getTokens(c),h=0;h=0;){var g=p[h];if(g==null&&(g=p[h]=this.getFoldWidget(h)),g=="start"){var v=this.getFoldWidgetRange(h);if(f||(f=v),v&&v.end.row>=a)break}h--}return{range:h!==-1&&v,firstRange:f}},this.onFoldWidgetClick=function(a,c){c instanceof l&&(c=c.domEvent);var p={children:c.shiftKey,all:c.ctrlKey||c.metaKey,siblings:c.altKey},h=this.$toggleFoldWidget(a,p);if(!h){var f=c.target||c.srcElement;f&&/ace_fold-widget/.test(f.className)&&(f.className+=" ace_invalid")}},this.$toggleFoldWidget=function(a,c){if(this.getFoldWidget){var p=this.getFoldWidget(a),h=this.getLine(a),f=p==="end"?-1:1,g=this.getFoldAt(a,f===-1?0:h.length,f);if(g)return c.children||c.all?this.removeFold(g):this.expandFold(g),g;var v=this.getFoldWidgetRange(a,!0);if(v&&!v.isMultiLine()&&(g=this.getFoldAt(v.start.row,v.start.column,1),g&&v.isEqual(g.range)))return this.removeFold(g),g;if(c.siblings){var b=this.getParentFoldRangeData(a);if(b.range)var D=b.range.start.row+1,E=b.range.end.row;this.foldAll(D,E,c.all?1e4:0)}else c.children?(E=v?v.end.row:this.getLength(),this.foldAll(a+1,E,c.all?1e4:0)):v&&(c.all&&(v.collapseChildren=1e4),this.addFold("...",v));return v}},this.toggleFoldWidget=function(a){var c=this.selection.getCursor().row;c=this.getRowFoldStart(c);var p=this.$toggleFoldWidget(c,{});if(!p){var h=this.getParentFoldRangeData(c,!0);if(p=h.range||h.firstRange,p){c=p.start.row;var f=this.getFoldAt(c,this.getLine(c).length,1);f?this.removeFold(f):this.addFold("...",p)}}},this.updateFoldWidgets=function(a){var c=a.start.row,p=a.end.row-c;if(p===0)this.foldWidgets[c]=null;else if(a.action=="remove")this.foldWidgets.splice(c,p+1,null);else{var h=Array(p+1);h.unshift(c,1),this.foldWidgets.splice.apply(this.foldWidgets,h)}},this.tokenizerUpdateFoldWidgets=function(a){var c=a.data;c.first!=c.last&&this.foldWidgets.length>c.first&&this.foldWidgets.splice(c.first,this.foldWidgets.length)}}n.Folding=r}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(t,n,u){var i=t("../token_iterator").TokenIterator,s=t("../range").Range;function d(){this.findMatchingBracket=function(o,l){if(o.column==0)return null;var r=l||this.getLine(o.row).charAt(o.column-1);if(r=="")return null;var a=r.match(/([\(\[\{])|([\)\]\}])/);return a?a[1]?this.$findClosingBracket(a[1],o):this.$findOpeningBracket(a[2],o):null},this.getBracketRange=function(o){var l=this.getLine(o.row),r=!0,a,c=l.charAt(o.column-1),p=c&&c.match(/([\(\[\{])|([\)\]\}])/);if(p||(c=l.charAt(o.column),o={row:o.row,column:o.column+1},p=c&&c.match(/([\(\[\{])|([\)\]\}])/),r=!1),!p)return null;if(p[1]){var h=this.$findClosingBracket(p[1],o);if(!h)return null;a=s.fromPoints(o,h),r||(a.end.column++,a.start.column--),a.cursor=a.end}else{var h=this.$findOpeningBracket(p[2],o);if(!h)return null;a=s.fromPoints(h,o),r||(a.start.column++,a.end.column--),a.cursor=a.start}return a},this.getMatchingBracketRanges=function(o,l){var r=this.getLine(o.row),a=/([\(\[\{])|([\)\]\}])/,c=!l&&r.charAt(o.column-1),p=c&&c.match(a);if(p||(c=(l===void 0||l)&&r.charAt(o.column),o={row:o.row,column:o.column+1},p=c&&c.match(a)),!p)return null;var h=new s(o.row,o.column-1,o.row,o.column),f=p[1]?this.$findClosingBracket(p[1],o):this.$findOpeningBracket(p[2],o);if(!f)return[h];var g=new s(f.row,f.column,f.row,f.column+1);return[h,g]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(o,l,r){var a=this.$brackets[o],c=1,p=new i(this,l.row,l.column),h=p.getCurrentToken();if(h||(h=p.stepForward()),!!h){r||(r=new RegExp("(\\.?"+h.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var f=l.column-p.getCurrentTokenColumn()-2,g=h.value;;){for(;f>=0;){var v=g.charAt(f);if(v==a){if(c-=1,c==0)return{row:p.getCurrentTokenRow(),column:f+p.getCurrentTokenColumn()}}else v==o&&(c+=1);f-=1}do h=p.stepBackward();while(h&&!r.test(h.type));if(h==null)break;g=h.value,f=g.length-1}return null}},this.$findClosingBracket=function(o,l,r){var a=this.$brackets[o],c=1,p=new i(this,l.row,l.column),h=p.getCurrentToken();if(h||(h=p.stepForward()),!!h){r||(r=new RegExp("(\\.?"+h.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var f=l.column-p.getCurrentTokenColumn();;){for(var g=h.value,v=g.length;f"?a=!0:l.type.indexOf("tag-name")!==-1&&(r=!0));while(l&&!r);return l},this.$findClosingTag=function(o,l){var r,a=l.value,c=l.value,p=0,h=new s(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);l=o.stepForward();var f=new s(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+l.value.length),g=!1;do{if(r=l,r.type.indexOf("tag-close")!==-1&&!g){var v=new s(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);g=!0}if(l=o.stepForward(),l){if(l.value===">"&&!g){var v=new s(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);g=!0}if(l.type.indexOf("tag-name")!==-1){if(a=l.value,c===a){if(r.value==="<")p++;else if(r.value==="")var E=new s(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);else return}}}else if(c===a&&l.value==="/>"&&(p--,p<0))var b=new s(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+2),D=b,E=D,v=new s(f.end.row,f.end.column,f.end.row,f.end.column+1)}}while(l&&p>=0);if(h&&v&&b&&E&&f&&D)return{openTag:new s(h.start.row,h.start.column,v.end.row,v.end.column),closeTag:new s(b.start.row,b.start.column,E.end.row,E.end.column),openTagName:f,closeTagName:D}},this.$findOpeningTag=function(o,l){var r=o.getCurrentToken(),a=l.value,c=0,p=o.getCurrentTokenRow(),h=o.getCurrentTokenColumn(),f=h+2,g=new s(p,h,p,f);o.stepForward();var v=new s(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+l.value.length);if(l.type.indexOf("tag-close")===-1&&(l=o.stepForward()),!(!l||l.value!==">")){var b=new s(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);o.stepBackward(),o.stepBackward();do if(l=r,p=o.getCurrentTokenRow(),h=o.getCurrentTokenColumn(),f=h+l.value.length,r=o.stepBackward(),l){if(l.type.indexOf("tag-name")!==-1){if(a===l.value)if(r.value==="<"){if(c++,c>0){var D=new s(p,h,p,f),E=new s(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);do l=o.stepForward();while(l&&l.value!==">");var w=new s(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1)}}else r.value===""){for(var y=0,A=r;A;){if(A.type.indexOf("tag-name")!==-1&&A.value===a){c--;break}else if(A.value==="<")break;A=o.stepBackward(),y++}for(var T=0;TC&&(this.$docRowCache.splice(C,S),this.$screenRowCache.splice(C,S))},_.prototype.$getRowCacheIndex=function(k,S){for(var C=0,L=k.length-1;C<=L;){var I=C+L>>1,F=k[I];if(S>F)C=I+1;else if(S=S));F++);return L=C[F],L?(L.index=F,L.start=I-L.value.length,L):null},_.prototype.setUndoManager=function(k){if(this.$undoManager=k,this.$informUndoManager&&this.$informUndoManager.cancel(),k){var S=this;k.addSession(this),this.$syncInformUndoManager=function(){S.$informUndoManager.cancel(),S.mergeUndoDeltas=!1},this.$informUndoManager=s.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},_.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},_.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},_.prototype.getTabString=function(){return this.getUseSoftTabs()?s.stringRepeat(" ",this.getTabSize()):" "},_.prototype.setUseSoftTabs=function(k){this.setOption("useSoftTabs",k)},_.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},_.prototype.setTabSize=function(k){this.setOption("tabSize",k)},_.prototype.getTabSize=function(){return this.$tabSize},_.prototype.isTabStop=function(k){return this.$useSoftTabs&&k.column%this.$tabSize===0},_.prototype.setNavigateWithinSoftTabs=function(k){this.setOption("navigateWithinSoftTabs",k)},_.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},_.prototype.setOverwrite=function(k){this.setOption("overwrite",k)},_.prototype.getOverwrite=function(){return this.$overwrite},_.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},_.prototype.addGutterDecoration=function(k,S){this.$decorations[k]||(this.$decorations[k]=""),this.$decorations[k]+=" "+S,this._signal("changeBreakpoint",{})},_.prototype.removeGutterCustomWidget=function(k){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(k)},_.prototype.addGutterCustomWidget=function(k,S){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(k,S)},_.prototype.removeGutterDecoration=function(k,S){this.$decorations[k]=(this.$decorations[k]||"").replace(" "+S,""),this._signal("changeBreakpoint",{})},_.prototype.getBreakpoints=function(){return this.$breakpoints},_.prototype.setBreakpoints=function(k){this.$breakpoints=[];for(var S=0;S0&&(L=!!C.charAt(S-1).match(this.tokenRe)),L||(L=!!C.charAt(S).match(this.tokenRe)),L)var I=this.tokenRe;else if(/^\s+$/.test(C.slice(S-1,S+1)))var I=/\s/;else var I=this.nonTokenRe;var F=S;if(F>0){do F--;while(F>=0&&C.charAt(F).match(I));F++}for(var R=S;Rk&&(k=S.screenWidth)}),this.lineWidgetWidth=k},_.prototype.$computeWidth=function(k){if(this.$modified||k){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var S=this.doc.getAllLines(),C=this.$rowLengthCache,L=0,I=0,F=this.$foldData[I],R=F?F.start.row:1/0,B=S.length,N=0;NR){if(N=F.end.row+1,N>=B)break;F=this.$foldData[I++],R=F?F.start.row:1/0}C[N]==null&&(C[N]=this.$getStringScreenWidth(S[N])[0]),C[N]>L&&(L=C[N])}this.screenWidth=L}},_.prototype.getLine=function(k){return this.doc.getLine(k)},_.prototype.getLines=function(k,S){return this.doc.getLines(k,S)},_.prototype.getLength=function(){return this.doc.getLength()},_.prototype.getTextRange=function(k){return this.doc.getTextRange(k||this.selection.getRange())},_.prototype.insert=function(k,S){return this.doc.insert(k,S)},_.prototype.remove=function(k){return this.doc.remove(k)},_.prototype.removeFullLines=function(k,S){return this.doc.removeFullLines(k,S)},_.prototype.undoChanges=function(k,S){if(k.length){this.$fromUndo=!0;for(var C=k.length-1;C!=-1;C--){var L=k[C];L.action=="insert"||L.action=="remove"?this.doc.revertDelta(L):L.folds&&this.addFolds(L.folds)}!S&&this.$undoSelect&&(k.selectionBefore?this.selection.fromJSON(k.selectionBefore):this.selection.setRange(this.$getUndoSelection(k,!0))),this.$fromUndo=!1}},_.prototype.redoChanges=function(k,S){if(k.length){this.$fromUndo=!0;for(var C=0;Ck.end.column&&(F.start.column+=B),F.end.row==k.end.row&&F.end.column>k.end.column&&(F.end.column+=B)),R&&F.start.row>=k.end.row&&(F.start.row+=R,F.end.row+=R)}if(F.end=this.insert(F.start,L),I.length){var N=k.start,H=F.start,R=H.row-N.row,B=H.column-N.column;this.addFolds(I.map(function(U){return U=U.clone(),U.start.row==N.row&&(U.start.column+=B),U.end.row==N.row&&(U.end.column+=B),U.start.row+=R,U.end.row+=R,U}))}return F},_.prototype.indentRows=function(k,S,C){C=C.replace(/\t/g,this.getTabString());for(var L=k;L<=S;L++)this.doc.insertInLine({row:L,column:0},C)},_.prototype.outdentRows=function(k){for(var S=k.collapseRows(),C=new c(0,0,0,0),L=this.getTabSize(),I=S.start.row;I<=S.end.row;++I){var F=this.getLine(I);C.start.row=I,C.end.row=I;for(var R=0;R0){var L=this.getRowFoldEnd(S+C);if(L>this.doc.getLength()-1)return 0;var I=L-S}else{k=this.$clipRowToDocument(k),S=this.$clipRowToDocument(S);var I=S-k+1}var F=new c(k,0,S,Number.MAX_VALUE),R=this.getFoldsInRange(F).map(function(N){return N=N.clone(),N.start.row+=I,N.end.row+=I,N}),B=C==0?this.doc.getLines(k,S):this.doc.removeFullLines(k,S);return this.doc.insertFullLines(k+I,B),R.length&&this.addFolds(R),I},_.prototype.moveLinesUp=function(k,S){return this.$moveLines(k,S,-1)},_.prototype.moveLinesDown=function(k,S){return this.$moveLines(k,S,1)},_.prototype.duplicateLines=function(k,S){return this.$moveLines(k,S,0)},_.prototype.$clipRowToDocument=function(k){return Math.max(0,Math.min(k,this.doc.getLength()-1))},_.prototype.$clipColumnToRow=function(k,S){return S<0?0:Math.min(this.doc.getLine(k).length,S)},_.prototype.$clipPositionToDocument=function(k,S){if(S=Math.max(0,S),k<0)k=0,S=0;else{var C=this.doc.getLength();k>=C?(k=C-1,S=this.doc.getLine(C-1).length):S=Math.min(this.doc.getLine(k).length,S)}return{row:k,column:S}},_.prototype.$clipRangeToDocument=function(k){k.start.row<0?(k.start.row=0,k.start.column=0):k.start.column=this.$clipColumnToRow(k.start.row,k.start.column);var S=this.doc.getLength()-1;return k.end.row>S?(k.end.row=S,k.end.column=this.doc.getLine(S).length):k.end.column=this.$clipColumnToRow(k.end.row,k.end.column),k},_.prototype.setUseWrapMode=function(k){if(k!=this.$useWrapMode){if(this.$useWrapMode=k,this.$modified=!0,this.$resetRowCache(0),k){var S=this.getLength();this.$wrapData=Array(S),this.$updateWrapData(0,S-1)}this._signal("changeWrapMode")}},_.prototype.getUseWrapMode=function(){return this.$useWrapMode},_.prototype.setWrapLimitRange=function(k,S){(this.$wrapLimitRange.min!==k||this.$wrapLimitRange.max!==S)&&(this.$wrapLimitRange={min:k,max:S},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},_.prototype.adjustWrapLimit=function(k,S){var C=this.$wrapLimitRange;C.max<0&&(C={min:S,max:S});var L=this.$constrainWrapLimit(k,C.min,C.max);return L!=this.$wrapLimit&&L>1?(this.$wrapLimit=L,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},_.prototype.$constrainWrapLimit=function(k,S,C){return S&&(k=Math.max(S,k)),C&&(k=Math.min(C,k)),k},_.prototype.getWrapLimit=function(){return this.$wrapLimit},_.prototype.setWrapLimit=function(k){this.setWrapLimitRange(k,k)},_.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},_.prototype.$updateInternalDataOnChange=function(k){var S=this.$useWrapMode,C=k.action,L=k.start,I=k.end,F=L.row,R=I.row,B=R-F,N=null;if(this.$updating=!0,B!=0)if(C==="remove"){this[S?"$wrapData":"$rowLengthCache"].splice(F,B);var H=this.$foldData;N=this.getFoldsInRange(k),this.removeFolds(N);var W=this.getFoldLine(I.row),j=0;if(W){W.addRemoveChars(I.row,I.column,L.column-I.column),W.shiftRow(-B);var U=this.getFoldLine(F);U&&U!==W&&(U.merge(W),W=U),j=H.indexOf(W)+1}for(j;j=I.row&&W.shiftRow(-B)}R=F}else{var K=Array(B);K.unshift(F,0);var J=S?this.$wrapData:this.$rowLengthCache;J.splice.apply(J,K);var H=this.$foldData,W=this.getFoldLine(F),j=0;if(W){var Y=W.range.compareInside(L.row,L.column);Y==0?(W=W.split(L.row,L.column),W&&(W.shiftRow(B),W.addRemoveChars(R,0,I.column-L.column))):Y==-1&&(W.addRemoveChars(F,0,I.column-L.column),W.shiftRow(B)),j=H.indexOf(W)+1}for(j;j=F&&W.shiftRow(B)}}else{B=Math.abs(k.start.column-k.end.column),C==="remove"&&(N=this.getFoldsInRange(k),this.removeFolds(N),B=-B);var W=this.getFoldLine(F);W&&W.addRemoveChars(F,L.column,B)}return S&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,S?this.$updateWrapData(F,R):this.$updateRowLengthCache(F,R),N},_.prototype.$updateRowLengthCache=function(k,S){this.$rowLengthCache[k]=null,this.$rowLengthCache[S]=null},_.prototype.$updateWrapData=function(k,S){var C=this.doc.getAllLines(),L=this.getTabSize(),I=this.$wrapData,F=this.$wrapLimit,R,B,N=k;for(S=Math.min(S,C.length-1);N<=S;)B=this.getFoldLine(N,B),B?(R=[],B.walk(function(H,W,j,U){var K;if(H!=null){K=this.$getDisplayTokens(H,R.length),K[0]=w;for(var J=1;JS-U;){var K=F+S-U;if(k[K-1]>=T&&k[K]>=T){j(K);continue}if(k[K]==w||k[K]==y){for(K;K!=F-1&&k[K]!=w;K--);if(K>F){j(K);continue}for(K=F+S,K;K>2)),F-1);K>J&&k[K]J&&k[K]J&&k[K]==A;)K--}else for(;K>J&&k[K]J){j(++K);continue}K=F+S,k[K]==E&&K--,j(K-U)}return L},_.prototype.$getDisplayTokens=function(k,S){var C=[],L;S=S||0;for(var I=0;I39&&F<48||F>57&&F<64?C.push(A):F>=4352&&O(F)?C.push(D,E):C.push(D)}return C},_.prototype.$getStringScreenWidth=function(k,S,C){if(S==0)return[0,0];S==null&&(S=1/0),C=C||0;var L,I;for(I=0;I=4352&&O(L)?C+=2:C+=1,!(C>S));I++);return[C,I]},_.prototype.getRowLength=function(k){var S=1;return this.lineWidgets&&(S+=this.lineWidgets[k]&&this.lineWidgets[k].rowCount||0),!this.$useWrapMode||!this.$wrapData[k]?S:this.$wrapData[k].length+S},_.prototype.getRowLineCount=function(k){return!this.$useWrapMode||!this.$wrapData[k]?1:this.$wrapData[k].length+1},_.prototype.getRowWrapIndent=function(k){if(this.$useWrapMode){var S=this.screenToDocumentPosition(k,Number.MAX_VALUE),C=this.$wrapData[S.row];return C.length&&C[0]=0)var B=H[W],I=this.$docRowCache[W],U=k>H[j-1];else var U=!j;for(var K=this.getLength()-1,J=this.getNextFoldLine(I),Y=J?J.start.row:1/0;B<=k&&(N=this.getRowLength(I),!(B+N>k||I>=K));)B+=N,I++,I>Y&&(I=J.end.row+1,J=this.getNextFoldLine(I,J),Y=J?J.start.row:1/0),U&&(this.$docRowCache.push(I),this.$screenRowCache.push(B));if(J&&J.start.row<=I)L=this.getFoldDisplayLine(J),I=J.start.row;else{if(B+N<=k||I>K)return{row:K,column:this.getLine(K).length};L=this.getLine(I),J=null}var X=0,q=Math.floor(k-B);if(this.$useWrapMode){var ne=this.$wrapData[I];ne&&(R=ne[q],q>0&&ne.length&&(X=ne.indent,F=ne[q-1]||ne[ne.length-1],L=L.substring(F)))}return C!==void 0&&this.$bidiHandler.isBidiRow(B+q,I,q)&&(S=this.$bidiHandler.offsetToCol(C)),F+=this.$getStringScreenWidth(L,S-X)[1],this.$useWrapMode&&F>=R&&(F=R-1),J?J.idxToPosition(F):{row:I,column:F}},_.prototype.documentToScreenPosition=function(k,S){if(typeof S>"u")var C=this.$clipPositionToDocument(k.row,k.column);else C=this.$clipPositionToDocument(k,S);k=C.row,S=C.column;var L=0,I=null,F=null;F=this.getFoldAt(k,S,1),F&&(k=F.start.row,S=F.start.column);var R,B=0,N=this.$docRowCache,H=this.$getRowCacheIndex(N,k),W=N.length;if(W&&H>=0)var B=N[H],L=this.$screenRowCache[H],j=k>N[W-1];else var j=!W;for(var U=this.getNextFoldLine(B),K=U?U.start.row:1/0;B=K){if(R=U.end.row+1,R>k)break;U=this.getNextFoldLine(R,U),K=U?U.start.row:1/0}else R=B+1;L+=this.getRowLength(B),B=R,j&&(this.$docRowCache.push(B),this.$screenRowCache.push(L))}var J="";U&&B>=K?(J=this.getFoldDisplayLine(U,k,S),I=U.start.row):(J=this.getLine(k).substring(0,S),I=k);var Y=0;if(this.$useWrapMode){var X=this.$wrapData[I];if(X){for(var q=0;J.length>=X[q];)L++,q++;J=J.substring(X[q-1]||0,J.length),Y=q>0?X.indent:0}}return this.lineWidgets&&this.lineWidgets[B]&&this.lineWidgets[B].rowsAbove&&(L+=this.lineWidgets[B].rowsAbove),{row:L,column:Y+this.$getStringScreenWidth(J)[0]}},_.prototype.documentToScreenColumn=function(k,S){return this.documentToScreenPosition(k,S).column},_.prototype.documentToScreenRow=function(k,S){return this.documentToScreenPosition(k,S).row},_.prototype.getScreenLength=function(){var k=0,S=null;if(this.$useWrapMode)for(var I=this.$wrapData.length,F=0,L=0,S=this.$foldData[L++],R=S?S.start.row:1/0;FR&&(F=S.end.row+1,S=this.$foldData[L++],R=S?S.start.row:1/0)}else{k=this.getLength();for(var C=this.$foldData,L=0;LC));F++);return[L,F]})},_.prototype.getPrecedingCharacter=function(){var k=this.selection.getCursor();if(k.column===0)return k.row===0?"":this.doc.getNewLineCharacter();var S=this.getLine(k.row);return S[k.column-1]},_.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},_})();b.$uid=0,b.prototype.$modes=o.$modes,b.prototype.getValue=b.prototype.toString,b.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},b.prototype.$overwrite=!1,b.prototype.$mode=null,b.prototype.$modeId=null,b.prototype.$scrollTop=0,b.prototype.$scrollLeft=0,b.prototype.$wrapLimit=80,b.prototype.$useWrapMode=!1,b.prototype.$wrapLimitRange={min:null,max:null},b.prototype.lineWidgets=null,b.prototype.isFullWidth=O,i.implement(b.prototype,l);var D=1,E=2,w=3,y=4,A=9,T=10,$=11,M=12;function O(_){return _<4352?!1:_>=4352&&_<=4447||_>=4515&&_<=4519||_>=4602&&_<=4607||_>=9001&&_<=9002||_>=11904&&_<=11929||_>=11931&&_<=12019||_>=12032&&_<=12245||_>=12272&&_<=12283||_>=12288&&_<=12350||_>=12353&&_<=12438||_>=12441&&_<=12543||_>=12549&&_<=12589||_>=12593&&_<=12686||_>=12688&&_<=12730||_>=12736&&_<=12771||_>=12784&&_<=12830||_>=12832&&_<=12871||_>=12880&&_<=13054||_>=13056&&_<=19903||_>=19968&&_<=42124||_>=42128&&_<=42182||_>=43360&&_<=43388||_>=44032&&_<=55203||_>=55216&&_<=55238||_>=55243&&_<=55291||_>=63744&&_<=64255||_>=65040&&_<=65049||_>=65072&&_<=65106||_>=65108&&_<=65126||_>=65128&&_<=65131||_>=65281&&_<=65376||_>=65504&&_<=65510}t("./edit_session/folding").Folding.call(b.prototype),t("./edit_session/bracket_match").BracketMatch.call(b.prototype),o.defineOptions(b.prototype,"session",{wrap:{set:function(_){if(!_||_=="off"?_=!1:_=="free"?_=!0:_=="printMargin"?_=-1:typeof _=="string"&&(_=parseInt(_,10)||!1),this.$wrap!=_)if(this.$wrap=_,!_)this.setUseWrapMode(!1);else{var k=typeof _=="number"?_:null;this.setWrapLimitRange(k,k),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(_){_=_=="auto"?this.$mode.type!="text":_!="text",_!=this.$wrapAsCode&&(this.$wrapAsCode=_,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(_){this.$useWorker=_,this.$stopWorker(),_&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(_){_=parseInt(_),_>0&&this.$tabSize!==_&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=_,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(_){this.setFoldStyle(_)},handlesSet:!0},overwrite:{set:function(_){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(_){this.doc.setNewLineMode(_)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(_){this.setMode(_)},get:function(){return this.$modeId},handlesSet:!0}}),n.EditSession=b}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(t,n,u){var i=t("./lib/lang"),s=t("./lib/oop"),d=t("./range").Range,o=(function(){function c(){this.$options={}}return c.prototype.set=function(p){return s.mixin(this.$options,p),this},c.prototype.getOptions=function(){return i.copyObject(this.$options)},c.prototype.setOptions=function(p){this.$options=p},c.prototype.find=function(p){var h=this.$options,f=this.$matchIterator(p,h);if(!f)return!1;var g=null;return f.forEach(function(v,b,D,E){return g=new d(v,b,D,E),b==E&&h.start&&h.start.start&&h.skipCurrent!=!1&&g.isEqual(h.start)?(g=null,!1):!0}),g},c.prototype.findAll=function(p){var h=this.$options;if(!h.needle)return[];this.$assembleRegExp(h);var f=h.range,g=f?p.getLines(f.start.row,f.end.row):p.doc.getAllLines(),v=[],b=h.re;if(h.$isMultiLine){var D=b.length,E=g.length-D,w;e:for(var y=b.offset||0;y<=E;y++){for(var A=0;AM||(v.push(w=new d(y,M,y+D-1,O)),D>2&&(y=y+D-2))}}else for(var _,k=0;kk&&(k=C),v.push(new d(_.startRow,_.startCol,_.endRow,_.endCol))}}else{_=i.getMatchOffsets(g[k],b);for(var A=0;A<_.length;A++){var L=_[A];v.push(new d(k,L.offset,k,L.offset+L.length))}}if(f){for(var I=f.start.column,F=f.end.column,k=0,A=v.length-1;kF&&v[A].end.row==R;)A--;for(v=v.slice(k,A+1),k=0,A=v.length;k=v){f+="\\";break}var D=p.charCodeAt(g);switch(D){case h.Backslash:f+="\\";break;case h.n:f+=` -`;break;case h.t:f+=" ";break}continue}if(b===h.DollarSign){if(g++,g>=v){f+="$";break}var E=p.charCodeAt(g);if(E===h.DollarSign){f+="$$";continue}if(E===h.Digit0||E===h.Ampersand){f+="$&";continue}if(h.Digit1<=E&&E<=h.Digit9){f+="$"+p[g];continue}}f+=p[g]}return f||p},c.prototype.replace=function(p,h){var f=this.$options,g=this.$assembleRegExp(f);if(f.$isMultiLine)return h;if(g){var v=this.$isMultilineSearch(f);v&&(p=p.replace(/\r\n|\r|\n/g,` -`));var b=g.exec(p);if(!b||!v&&b[0].length!=p.length)return null;if(h=f.regExp?this.parseReplaceString(h):h.replace(/\$/g,"$$$$"),h=p.replace(g,h),f.preserveCase){h=h.split("");for(var D=Math.min(p.length,p.length);D--;){var E=p[D];E&&E.toLowerCase()!=E?h[D]=h[D].toUpperCase():h[D]=h[D].toLowerCase()}h=h.join("")}return h}},c.prototype.$assembleRegExp=function(p,h){if(p.needle instanceof RegExp)return p.re=p.needle;var f=p.needle;if(!p.needle)return p.re=!1;p.regExp||(f=i.escapeRegExp(f));var g=p.caseSensitive?"gm":"gmi";try{new RegExp(f,"u"),p.$supportsUnicodeFlag=!0,g+="u"}catch{p.$supportsUnicodeFlag=!1}if(p.wholeWord&&(f=l(f,p)),p.$isMultiLine=!h&&/[\n\r]/.test(f),p.$isMultiLine)return p.re=this.$assembleMultilineRegExp(f,g);try{var v=new RegExp(f,g)}catch{v=!1}return p.re=v},c.prototype.$assembleMultilineRegExp=function(p,h){for(var f=p.replace(/\r\n|\r|\n/g,`$ +`):y=c(w.value)),w.start&&(y+=c(w)),(w.id||w.rev)&&(y+=" ("+(w.id||w.rev)+")"),y}function c(w){return w.start.row+":"+w.start.column+"=>"+w.end.row+":"+w.end.column}function p(w,y){var A=w.action=="insert",T=y.action=="insert";if(A&&T)if(o(y.start,w.end)>=0)g(y,w,-1);else if(o(y.start,w.start)<=0)g(w,y,1);else return null;else if(A&&!T)if(o(y.start,w.end)>=0)g(y,w,-1);else if(o(y.end,w.start)<=0)g(w,y,-1);else return null;else if(!A&&T)if(o(y.start,w.start)>=0)g(y,w,1);else if(o(y.start,w.start)<=0)g(w,y,1);else return null;else if(!A&&!T)if(o(y.start,w.start)>=0)g(y,w,1);else if(o(y.end,w.start)<=0)g(w,y,-1);else return null;return[y,w]}function u(w,y){for(var A=w.length;A--;)for(var T=0;T=0?g(w,y,-1):(o(w.start,y.start)<=0||g(w,d.fromPoints(y.start,w.start),-1),g(y,w,1));else if(!A&&T)o(y.start,w.end)>=0?g(y,w,-1):(o(y.start,w.start)<=0||g(y,d.fromPoints(w.start,y.start),-1),g(w,y,1));else if(!A&&!T)if(o(y.start,w.end)>=0)g(y,w,-1);else if(o(y.end,w.start)<=0)g(w,y,-1);else{var x,M;return o(w.start,y.start)<0&&(x=w,w=b(w,y.start)),o(w.end,y.end)>0&&(M=b(w,y.end)),v(y.end,w.start,w.end,-1),M&&!x&&(w.lines=M.lines,w.start=M.start,w.end=M.end,M=w),[y,x,M].filter(Boolean)}return[y,w]}function g(w,y,A){v(w.start,y.start,y.end,A),v(w.end,y.start,y.end,A)}function v(w,y,A,T){w.row==(T==1?y:A).row&&(w.column+=T*(A.column-y.column)),w.row+=T*(A.row-y.row)}function b(w,y){var A=w.lines,T=w.end;w.end=l(y);var x=w.end.row-w.start.row,M=A.splice(x,A.length),O=x?y.column:y.column-w.start.column;A.push(M[0].substring(0,O)),M[0]=M[0].substr(O);var _={start:l(y),end:T,lines:M,action:w.action};return _}function D(w,y){y=r(y);for(var A=w.length;A--;){for(var T=w[A],x=0;xthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(o),this.folds.sort(function(l,r){return-l.range.compareEnd(r.start.row,r.start.column)}),this.range.compareEnd(o.start.row,o.start.column)>0?(this.end.row=o.end.row,this.end.column=o.end.column):this.range.compareStart(o.end.row,o.end.column)<0&&(this.start.row=o.start.row,this.start.column=o.start.column)}else if(o.start.row==this.end.row)this.folds.push(o),this.end.row=o.end.row,this.end.column=o.end.column;else if(o.end.row==this.start.row)this.folds.unshift(o),this.start.row=o.start.row,this.start.column=o.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");o.foldLine=this},d.prototype.containsRow=function(o){return o>=this.start.row&&o<=this.end.row},d.prototype.walk=function(o,l,r){var a=0,c=this.folds,p,u,f,g=!0;l==null&&(l=this.end.row,r=this.end.column);for(var v=0;v0)){var g=s(l,u.start);return f===0?r&&g!==0?-p-2:p:g>0||g===0&&!r?p:-p-1}}return-p-1},o.prototype.add=function(l){var r=!l.isEmpty(),a=this.pointIndex(l.start,r);a<0&&(a=-a-1);var c=this.pointIndex(l.end,r,a);return c<0?c=-c-1:c++,this.ranges.splice(a,c-a,l)},o.prototype.addList=function(l){for(var r=[],a=l.length;a--;)r.push.apply(r,this.add(l[a]));return r},o.prototype.substractPoint=function(l){var r=this.pointIndex(l);if(r>=0)return this.ranges.splice(r,1)},o.prototype.merge=function(){var l=[],r=this.ranges;r=r.sort(function(f,g){return s(f.start,g.start)});for(var a=r[0],c,p=1;p=0},o.prototype.containsPoint=function(l){return this.pointIndex(l)>=0},o.prototype.rangeAtPoint=function(l){var r=this.pointIndex(l);if(r>=0)return this.ranges[r]},o.prototype.clipRows=function(l,r){var a=this.ranges;if(a[0].start.row>r||a[a.length-1].start.row=c)break}if(l.action=="insert")for(var b=p-c,D=-r.column+a.column;fc)break;if(v.start.row==c&&v.start.column>=r.column&&(v.start.column==r.column&&this.$bias<=0||(v.start.column+=D,v.start.row+=b)),v.end.row==c&&v.end.column>=r.column){if(v.end.column==r.column&&this.$bias<0)continue;v.end.column==r.column&&D>0&&fv.start.column&&v.end.column==u[f+1].start.column&&(v.end.column-=D),v.end.column+=D,v.end.row+=b}}else for(var b=c-p,D=r.column-a.column;fp)break;v.end.rowr.column)&&(v.end.column=r.column,v.end.row=r.row):(v.end.column+=D,v.end.row+=b):v.end.row>p&&(v.end.row+=b),v.start.rowr.column)&&(v.start.column=r.column,v.start.row=r.row):(v.start.column+=D,v.start.row+=b):v.start.row>p&&(v.start.row+=b)}if(b!=0&&f=a)return f;if(f.end.row>a)return null}return null},this.getNextFoldLine=function(a,c){var p=this.$foldData,u=0;for(c&&(u=p.indexOf(c)),u==-1&&(u=0),u;u=a)return f}return null},this.getFoldedRowCount=function(a,c){for(var p=this.$foldData,u=c-a+1,f=0;f=c){b=a?u-=c-b:u=0);break}else v>=a&&(b>=a?u-=v-b:u-=v-a+1)}return u},this.$addFoldLine=function(a){return this.$foldData.push(a),this.$foldData.sort(function(c,p){return c.start.row-p.start.row}),a},this.addFold=function(a,c){var p=this.$foldData,u=!1,f;a instanceof d?f=a:(f=new d(c,a),f.collapseChildren=c.collapseChildren),this.$clipRangeToDocument(f.range);var g=f.start.row,v=f.start.column,b=f.end.row,D=f.end.column,E=this.getFoldAt(g,v,1),w=this.getFoldAt(b,D,-1);if(E&&w==E)return E.addSubFold(f);E&&!E.range.isStart(g,v)&&this.removeFold(E),w&&!w.range.isEnd(b,D)&&this.removeFold(w);var y=this.getFoldsInRange(f.range);y.length>0&&(this.removeFolds(y),f.collapseChildren||y.forEach(function(M){f.addSubFold(M)}));for(var A=0;A0&&this.foldAll(a.start.row+1,a.end.row,a.collapseChildren-1),a.subFolds=[]},this.expandFolds=function(a){a.forEach(function(c){this.expandFold(c)},this)},this.unfold=function(a,c){var p,u;if(a==null)p=new i(0,0,this.getLength(),0),c==null&&(c=!0);else if(typeof a=="number")p=new i(a,0,a,this.getLine(a).length);else if("row"in a)p=i.fromPoints(a,a);else{if(Array.isArray(a))return u=[],a.forEach(function(g){u=u.concat(this.unfold(g))},this),u;p=a}u=this.getFoldsInRangeList(p);for(var f=u;u.length==1&&i.comparePoints(u[0].start,p.start)<0&&i.comparePoints(u[0].end,p.end)>0;)this.expandFolds(u),u=this.getFoldsInRangeList(p);if(c!=!1?this.removeFolds(u):this.expandFolds(u),f.length)return f},this.isRowFolded=function(a,c){return!!this.getFoldLine(a,c)},this.getRowFoldEnd=function(a,c){var p=this.getFoldLine(a,c);return p?p.end.row:a},this.getRowFoldStart=function(a,c){var p=this.getFoldLine(a,c);return p?p.start.row:a},this.getFoldDisplayLine=function(a,c,p,u,f){u==null&&(u=a.start.row),f==null&&(f=0),c==null&&(c=a.end.row),p==null&&(p=this.getLine(c).length);var g=this.doc,v="";return a.walk(function(b,D,E,w){if(!(DE)break;while(f&&v.test(f.type));f=u.stepBackward()}else f=u.getCurrentToken();return b.end.row=u.getCurrentTokenRow(),b.end.column=u.getCurrentTokenColumn(),b.start.row==b.end.row&&b.start.column>b.end.column?void 0:b}},this.foldAll=function(a,c,p,u){p==null&&(p=1e5);var f=this.foldWidgets;if(f){c=c||this.getLength(),a=a||0;for(var g=a;g=a&&(g=v.end.row,v.collapseChildren=p,this.addFold("...",v))}}},this.foldToLevel=function(a){for(this.foldAll();a-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var a=this;this.foldAll(null,null,null,function(c){for(var p=a.getTokens(c),u=0;u=0;){var g=p[u];if(g==null&&(g=p[u]=this.getFoldWidget(u)),g=="start"){var v=this.getFoldWidgetRange(u);if(f||(f=v),v&&v.end.row>=a)break}u--}return{range:u!==-1&&v,firstRange:f}},this.onFoldWidgetClick=function(a,c){c instanceof l&&(c=c.domEvent);var p={children:c.shiftKey,all:c.ctrlKey||c.metaKey,siblings:c.altKey},u=this.$toggleFoldWidget(a,p);if(!u){var f=c.target||c.srcElement;f&&/ace_fold-widget/.test(f.className)&&(f.className+=" ace_invalid")}},this.$toggleFoldWidget=function(a,c){if(this.getFoldWidget){var p=this.getFoldWidget(a),u=this.getLine(a),f=p==="end"?-1:1,g=this.getFoldAt(a,f===-1?0:u.length,f);if(g)return c.children||c.all?this.removeFold(g):this.expandFold(g),g;var v=this.getFoldWidgetRange(a,!0);if(v&&!v.isMultiLine()&&(g=this.getFoldAt(v.start.row,v.start.column,1),g&&v.isEqual(g.range)))return this.removeFold(g),g;if(c.siblings){var b=this.getParentFoldRangeData(a);if(b.range)var D=b.range.start.row+1,E=b.range.end.row;this.foldAll(D,E,c.all?1e4:0)}else c.children?(E=v?v.end.row:this.getLength(),this.foldAll(a+1,E,c.all?1e4:0)):v&&(c.all&&(v.collapseChildren=1e4),this.addFold("...",v));return v}},this.toggleFoldWidget=function(a){var c=this.selection.getCursor().row;c=this.getRowFoldStart(c);var p=this.$toggleFoldWidget(c,{});if(!p){var u=this.getParentFoldRangeData(c,!0);if(p=u.range||u.firstRange,p){c=p.start.row;var f=this.getFoldAt(c,this.getLine(c).length,1);f?this.removeFold(f):this.addFold("...",p)}}},this.updateFoldWidgets=function(a){var c=a.start.row,p=a.end.row-c;if(p===0)this.foldWidgets[c]=null;else if(a.action=="remove")this.foldWidgets.splice(c,p+1,null);else{var u=Array(p+1);u.unshift(c,1),this.foldWidgets.splice.apply(this.foldWidgets,u)}},this.tokenizerUpdateFoldWidgets=function(a){var c=a.data;c.first!=c.last&&this.foldWidgets.length>c.first&&this.foldWidgets.splice(c.first,this.foldWidgets.length)}}n.Folding=r}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(t,n,h){var i=t("../token_iterator").TokenIterator,s=t("../range").Range;function d(){this.findMatchingBracket=function(o,l){if(o.column==0)return null;var r=l||this.getLine(o.row).charAt(o.column-1);if(r=="")return null;var a=r.match(/([\(\[\{])|([\)\]\}])/);return a?a[1]?this.$findClosingBracket(a[1],o):this.$findOpeningBracket(a[2],o):null},this.getBracketRange=function(o){var l=this.getLine(o.row),r=!0,a,c=l.charAt(o.column-1),p=c&&c.match(/([\(\[\{])|([\)\]\}])/);if(p||(c=l.charAt(o.column),o={row:o.row,column:o.column+1},p=c&&c.match(/([\(\[\{])|([\)\]\}])/),r=!1),!p)return null;if(p[1]){var u=this.$findClosingBracket(p[1],o);if(!u)return null;a=s.fromPoints(o,u),r||(a.end.column++,a.start.column--),a.cursor=a.end}else{var u=this.$findOpeningBracket(p[2],o);if(!u)return null;a=s.fromPoints(u,o),r||(a.start.column++,a.end.column--),a.cursor=a.start}return a},this.getMatchingBracketRanges=function(o,l){var r=this.getLine(o.row),a=/([\(\[\{])|([\)\]\}])/,c=!l&&r.charAt(o.column-1),p=c&&c.match(a);if(p||(c=(l===void 0||l)&&r.charAt(o.column),o={row:o.row,column:o.column+1},p=c&&c.match(a)),!p)return null;var u=new s(o.row,o.column-1,o.row,o.column),f=p[1]?this.$findClosingBracket(p[1],o):this.$findOpeningBracket(p[2],o);if(!f)return[u];var g=new s(f.row,f.column,f.row,f.column+1);return[u,g]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(o,l,r){var a=this.$brackets[o],c=1,p=new i(this,l.row,l.column),u=p.getCurrentToken();if(u||(u=p.stepForward()),!!u){r||(r=new RegExp("(\\.?"+u.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var f=l.column-p.getCurrentTokenColumn()-2,g=u.value;;){for(;f>=0;){var v=g.charAt(f);if(v==a){if(c-=1,c==0)return{row:p.getCurrentTokenRow(),column:f+p.getCurrentTokenColumn()}}else v==o&&(c+=1);f-=1}do u=p.stepBackward();while(u&&!r.test(u.type));if(u==null)break;g=u.value,f=g.length-1}return null}},this.$findClosingBracket=function(o,l,r){var a=this.$brackets[o],c=1,p=new i(this,l.row,l.column),u=p.getCurrentToken();if(u||(u=p.stepForward()),!!u){r||(r=new RegExp("(\\.?"+u.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var f=l.column-p.getCurrentTokenColumn();;){for(var g=u.value,v=g.length;f"?a=!0:l.type.indexOf("tag-name")!==-1&&(r=!0));while(l&&!r);return l},this.$findClosingTag=function(o,l){var r,a=l.value,c=l.value,p=0,u=new s(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);l=o.stepForward();var f=new s(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+l.value.length),g=!1;do{if(r=l,r.type.indexOf("tag-close")!==-1&&!g){var v=new s(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);g=!0}if(l=o.stepForward(),l){if(l.value===">"&&!g){var v=new s(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);g=!0}if(l.type.indexOf("tag-name")!==-1){if(a=l.value,c===a){if(r.value==="<")p++;else if(r.value==="")var E=new s(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);else return}}}else if(c===a&&l.value==="/>"&&(p--,p<0))var b=new s(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+2),D=b,E=D,v=new s(f.end.row,f.end.column,f.end.row,f.end.column+1)}}while(l&&p>=0);if(u&&v&&b&&E&&f&&D)return{openTag:new s(u.start.row,u.start.column,v.end.row,v.end.column),closeTag:new s(b.start.row,b.start.column,E.end.row,E.end.column),openTagName:f,closeTagName:D}},this.$findOpeningTag=function(o,l){var r=o.getCurrentToken(),a=l.value,c=0,p=o.getCurrentTokenRow(),u=o.getCurrentTokenColumn(),f=u+2,g=new s(p,u,p,f);o.stepForward();var v=new s(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+l.value.length);if(l.type.indexOf("tag-close")===-1&&(l=o.stepForward()),!(!l||l.value!==">")){var b=new s(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);o.stepBackward(),o.stepBackward();do if(l=r,p=o.getCurrentTokenRow(),u=o.getCurrentTokenColumn(),f=u+l.value.length,r=o.stepBackward(),l){if(l.type.indexOf("tag-name")!==-1){if(a===l.value)if(r.value==="<"){if(c++,c>0){var D=new s(p,u,p,f),E=new s(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);do l=o.stepForward();while(l&&l.value!==">");var w=new s(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1)}}else r.value===""){for(var y=0,A=r;A;){if(A.type.indexOf("tag-name")!==-1&&A.value===a){c--;break}else if(A.value==="<")break;A=o.stepBackward(),y++}for(var T=0;TC&&(this.$docRowCache.splice(C,S),this.$screenRowCache.splice(C,S))},_.prototype.$getRowCacheIndex=function(k,S){for(var C=0,L=k.length-1;C<=L;){var I=C+L>>1,F=k[I];if(S>F)C=I+1;else if(S=S));F++);return L=C[F],L?(L.index=F,L.start=I-L.value.length,L):null},_.prototype.setUndoManager=function(k){if(this.$undoManager=k,this.$informUndoManager&&this.$informUndoManager.cancel(),k){var S=this;k.addSession(this),this.$syncInformUndoManager=function(){S.$informUndoManager.cancel(),S.mergeUndoDeltas=!1},this.$informUndoManager=s.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},_.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},_.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},_.prototype.getTabString=function(){return this.getUseSoftTabs()?s.stringRepeat(" ",this.getTabSize()):" "},_.prototype.setUseSoftTabs=function(k){this.setOption("useSoftTabs",k)},_.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},_.prototype.setTabSize=function(k){this.setOption("tabSize",k)},_.prototype.getTabSize=function(){return this.$tabSize},_.prototype.isTabStop=function(k){return this.$useSoftTabs&&k.column%this.$tabSize===0},_.prototype.setNavigateWithinSoftTabs=function(k){this.setOption("navigateWithinSoftTabs",k)},_.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},_.prototype.setOverwrite=function(k){this.setOption("overwrite",k)},_.prototype.getOverwrite=function(){return this.$overwrite},_.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},_.prototype.addGutterDecoration=function(k,S){this.$decorations[k]||(this.$decorations[k]=""),this.$decorations[k]+=" "+S,this._signal("changeBreakpoint",{})},_.prototype.removeGutterCustomWidget=function(k){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(k)},_.prototype.addGutterCustomWidget=function(k,S){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(k,S)},_.prototype.removeGutterDecoration=function(k,S){this.$decorations[k]=(this.$decorations[k]||"").replace(" "+S,""),this._signal("changeBreakpoint",{})},_.prototype.getBreakpoints=function(){return this.$breakpoints},_.prototype.setBreakpoints=function(k){this.$breakpoints=[];for(var S=0;S0&&(L=!!C.charAt(S-1).match(this.tokenRe)),L||(L=!!C.charAt(S).match(this.tokenRe)),L)var I=this.tokenRe;else if(/^\s+$/.test(C.slice(S-1,S+1)))var I=/\s/;else var I=this.nonTokenRe;var F=S;if(F>0){do F--;while(F>=0&&C.charAt(F).match(I));F++}for(var R=S;Rk&&(k=S.screenWidth)}),this.lineWidgetWidth=k},_.prototype.$computeWidth=function(k){if(this.$modified||k){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var S=this.doc.getAllLines(),C=this.$rowLengthCache,L=0,I=0,F=this.$foldData[I],R=F?F.start.row:1/0,B=S.length,N=0;NR){if(N=F.end.row+1,N>=B)break;F=this.$foldData[I++],R=F?F.start.row:1/0}C[N]==null&&(C[N]=this.$getStringScreenWidth(S[N])[0]),C[N]>L&&(L=C[N])}this.screenWidth=L}},_.prototype.getLine=function(k){return this.doc.getLine(k)},_.prototype.getLines=function(k,S){return this.doc.getLines(k,S)},_.prototype.getLength=function(){return this.doc.getLength()},_.prototype.getTextRange=function(k){return this.doc.getTextRange(k||this.selection.getRange())},_.prototype.insert=function(k,S){return this.doc.insert(k,S)},_.prototype.remove=function(k){return this.doc.remove(k)},_.prototype.removeFullLines=function(k,S){return this.doc.removeFullLines(k,S)},_.prototype.undoChanges=function(k,S){if(k.length){this.$fromUndo=!0;for(var C=k.length-1;C!=-1;C--){var L=k[C];L.action=="insert"||L.action=="remove"?this.doc.revertDelta(L):L.folds&&this.addFolds(L.folds)}!S&&this.$undoSelect&&(k.selectionBefore?this.selection.fromJSON(k.selectionBefore):this.selection.setRange(this.$getUndoSelection(k,!0))),this.$fromUndo=!1}},_.prototype.redoChanges=function(k,S){if(k.length){this.$fromUndo=!0;for(var C=0;Ck.end.column&&(F.start.column+=B),F.end.row==k.end.row&&F.end.column>k.end.column&&(F.end.column+=B)),R&&F.start.row>=k.end.row&&(F.start.row+=R,F.end.row+=R)}if(F.end=this.insert(F.start,L),I.length){var N=k.start,z=F.start,R=z.row-N.row,B=z.column-N.column;this.addFolds(I.map(function(U){return U=U.clone(),U.start.row==N.row&&(U.start.column+=B),U.end.row==N.row&&(U.end.column+=B),U.start.row+=R,U.end.row+=R,U}))}return F},_.prototype.indentRows=function(k,S,C){C=C.replace(/\t/g,this.getTabString());for(var L=k;L<=S;L++)this.doc.insertInLine({row:L,column:0},C)},_.prototype.outdentRows=function(k){for(var S=k.collapseRows(),C=new c(0,0,0,0),L=this.getTabSize(),I=S.start.row;I<=S.end.row;++I){var F=this.getLine(I);C.start.row=I,C.end.row=I;for(var R=0;R0){var L=this.getRowFoldEnd(S+C);if(L>this.doc.getLength()-1)return 0;var I=L-S}else{k=this.$clipRowToDocument(k),S=this.$clipRowToDocument(S);var I=S-k+1}var F=new c(k,0,S,Number.MAX_VALUE),R=this.getFoldsInRange(F).map(function(N){return N=N.clone(),N.start.row+=I,N.end.row+=I,N}),B=C==0?this.doc.getLines(k,S):this.doc.removeFullLines(k,S);return this.doc.insertFullLines(k+I,B),R.length&&this.addFolds(R),I},_.prototype.moveLinesUp=function(k,S){return this.$moveLines(k,S,-1)},_.prototype.moveLinesDown=function(k,S){return this.$moveLines(k,S,1)},_.prototype.duplicateLines=function(k,S){return this.$moveLines(k,S,0)},_.prototype.$clipRowToDocument=function(k){return Math.max(0,Math.min(k,this.doc.getLength()-1))},_.prototype.$clipColumnToRow=function(k,S){return S<0?0:Math.min(this.doc.getLine(k).length,S)},_.prototype.$clipPositionToDocument=function(k,S){if(S=Math.max(0,S),k<0)k=0,S=0;else{var C=this.doc.getLength();k>=C?(k=C-1,S=this.doc.getLine(C-1).length):S=Math.min(this.doc.getLine(k).length,S)}return{row:k,column:S}},_.prototype.$clipRangeToDocument=function(k){k.start.row<0?(k.start.row=0,k.start.column=0):k.start.column=this.$clipColumnToRow(k.start.row,k.start.column);var S=this.doc.getLength()-1;return k.end.row>S?(k.end.row=S,k.end.column=this.doc.getLine(S).length):k.end.column=this.$clipColumnToRow(k.end.row,k.end.column),k},_.prototype.setUseWrapMode=function(k){if(k!=this.$useWrapMode){if(this.$useWrapMode=k,this.$modified=!0,this.$resetRowCache(0),k){var S=this.getLength();this.$wrapData=Array(S),this.$updateWrapData(0,S-1)}this._signal("changeWrapMode")}},_.prototype.getUseWrapMode=function(){return this.$useWrapMode},_.prototype.setWrapLimitRange=function(k,S){(this.$wrapLimitRange.min!==k||this.$wrapLimitRange.max!==S)&&(this.$wrapLimitRange={min:k,max:S},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},_.prototype.adjustWrapLimit=function(k,S){var C=this.$wrapLimitRange;C.max<0&&(C={min:S,max:S});var L=this.$constrainWrapLimit(k,C.min,C.max);return L!=this.$wrapLimit&&L>1?(this.$wrapLimit=L,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},_.prototype.$constrainWrapLimit=function(k,S,C){return S&&(k=Math.max(S,k)),C&&(k=Math.min(C,k)),k},_.prototype.getWrapLimit=function(){return this.$wrapLimit},_.prototype.setWrapLimit=function(k){this.setWrapLimitRange(k,k)},_.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},_.prototype.$updateInternalDataOnChange=function(k){var S=this.$useWrapMode,C=k.action,L=k.start,I=k.end,F=L.row,R=I.row,B=R-F,N=null;if(this.$updating=!0,B!=0)if(C==="remove"){this[S?"$wrapData":"$rowLengthCache"].splice(F,B);var z=this.$foldData;N=this.getFoldsInRange(k),this.removeFolds(N);var W=this.getFoldLine(I.row),j=0;if(W){W.addRemoveChars(I.row,I.column,L.column-I.column),W.shiftRow(-B);var U=this.getFoldLine(F);U&&U!==W&&(U.merge(W),W=U),j=z.indexOf(W)+1}for(j;j=I.row&&W.shiftRow(-B)}R=F}else{var K=Array(B);K.unshift(F,0);var J=S?this.$wrapData:this.$rowLengthCache;J.splice.apply(J,K);var z=this.$foldData,W=this.getFoldLine(F),j=0;if(W){var Y=W.range.compareInside(L.row,L.column);Y==0?(W=W.split(L.row,L.column),W&&(W.shiftRow(B),W.addRemoveChars(R,0,I.column-L.column))):Y==-1&&(W.addRemoveChars(F,0,I.column-L.column),W.shiftRow(B)),j=z.indexOf(W)+1}for(j;j=F&&W.shiftRow(B)}}else{B=Math.abs(k.start.column-k.end.column),C==="remove"&&(N=this.getFoldsInRange(k),this.removeFolds(N),B=-B);var W=this.getFoldLine(F);W&&W.addRemoveChars(F,L.column,B)}return S&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,S?this.$updateWrapData(F,R):this.$updateRowLengthCache(F,R),N},_.prototype.$updateRowLengthCache=function(k,S){this.$rowLengthCache[k]=null,this.$rowLengthCache[S]=null},_.prototype.$updateWrapData=function(k,S){var C=this.doc.getAllLines(),L=this.getTabSize(),I=this.$wrapData,F=this.$wrapLimit,R,B,N=k;for(S=Math.min(S,C.length-1);N<=S;)B=this.getFoldLine(N,B),B?(R=[],B.walk(function(z,W,j,U){var K;if(z!=null){K=this.$getDisplayTokens(z,R.length),K[0]=w;for(var J=1;JS-U;){var K=F+S-U;if(k[K-1]>=T&&k[K]>=T){j(K);continue}if(k[K]==w||k[K]==y){for(K;K!=F-1&&k[K]!=w;K--);if(K>F){j(K);continue}for(K=F+S,K;K>2)),F-1);K>J&&k[K]J&&k[K]J&&k[K]==A;)K--}else for(;K>J&&k[K]J){j(++K);continue}K=F+S,k[K]==E&&K--,j(K-U)}return L},_.prototype.$getDisplayTokens=function(k,S){var C=[],L;S=S||0;for(var I=0;I39&&F<48||F>57&&F<64?C.push(A):F>=4352&&O(F)?C.push(D,E):C.push(D)}return C},_.prototype.$getStringScreenWidth=function(k,S,C){if(S==0)return[0,0];S==null&&(S=1/0),C=C||0;var L,I;for(I=0;I=4352&&O(L)?C+=2:C+=1,!(C>S));I++);return[C,I]},_.prototype.getRowLength=function(k){var S=1;return this.lineWidgets&&(S+=this.lineWidgets[k]&&this.lineWidgets[k].rowCount||0),!this.$useWrapMode||!this.$wrapData[k]?S:this.$wrapData[k].length+S},_.prototype.getRowLineCount=function(k){return!this.$useWrapMode||!this.$wrapData[k]?1:this.$wrapData[k].length+1},_.prototype.getRowWrapIndent=function(k){if(this.$useWrapMode){var S=this.screenToDocumentPosition(k,Number.MAX_VALUE),C=this.$wrapData[S.row];return C.length&&C[0]=0)var B=z[W],I=this.$docRowCache[W],U=k>z[j-1];else var U=!j;for(var K=this.getLength()-1,J=this.getNextFoldLine(I),Y=J?J.start.row:1/0;B<=k&&(N=this.getRowLength(I),!(B+N>k||I>=K));)B+=N,I++,I>Y&&(I=J.end.row+1,J=this.getNextFoldLine(I,J),Y=J?J.start.row:1/0),U&&(this.$docRowCache.push(I),this.$screenRowCache.push(B));if(J&&J.start.row<=I)L=this.getFoldDisplayLine(J),I=J.start.row;else{if(B+N<=k||I>K)return{row:K,column:this.getLine(K).length};L=this.getLine(I),J=null}var X=0,q=Math.floor(k-B);if(this.$useWrapMode){var ne=this.$wrapData[I];ne&&(R=ne[q],q>0&&ne.length&&(X=ne.indent,F=ne[q-1]||ne[ne.length-1],L=L.substring(F)))}return C!==void 0&&this.$bidiHandler.isBidiRow(B+q,I,q)&&(S=this.$bidiHandler.offsetToCol(C)),F+=this.$getStringScreenWidth(L,S-X)[1],this.$useWrapMode&&F>=R&&(F=R-1),J?J.idxToPosition(F):{row:I,column:F}},_.prototype.documentToScreenPosition=function(k,S){if(typeof S>"u")var C=this.$clipPositionToDocument(k.row,k.column);else C=this.$clipPositionToDocument(k,S);k=C.row,S=C.column;var L=0,I=null,F=null;F=this.getFoldAt(k,S,1),F&&(k=F.start.row,S=F.start.column);var R,B=0,N=this.$docRowCache,z=this.$getRowCacheIndex(N,k),W=N.length;if(W&&z>=0)var B=N[z],L=this.$screenRowCache[z],j=k>N[W-1];else var j=!W;for(var U=this.getNextFoldLine(B),K=U?U.start.row:1/0;B=K){if(R=U.end.row+1,R>k)break;U=this.getNextFoldLine(R,U),K=U?U.start.row:1/0}else R=B+1;L+=this.getRowLength(B),B=R,j&&(this.$docRowCache.push(B),this.$screenRowCache.push(L))}var J="";U&&B>=K?(J=this.getFoldDisplayLine(U,k,S),I=U.start.row):(J=this.getLine(k).substring(0,S),I=k);var Y=0;if(this.$useWrapMode){var X=this.$wrapData[I];if(X){for(var q=0;J.length>=X[q];)L++,q++;J=J.substring(X[q-1]||0,J.length),Y=q>0?X.indent:0}}return this.lineWidgets&&this.lineWidgets[B]&&this.lineWidgets[B].rowsAbove&&(L+=this.lineWidgets[B].rowsAbove),{row:L,column:Y+this.$getStringScreenWidth(J)[0]}},_.prototype.documentToScreenColumn=function(k,S){return this.documentToScreenPosition(k,S).column},_.prototype.documentToScreenRow=function(k,S){return this.documentToScreenPosition(k,S).row},_.prototype.getScreenLength=function(){var k=0,S=null;if(this.$useWrapMode)for(var I=this.$wrapData.length,F=0,L=0,S=this.$foldData[L++],R=S?S.start.row:1/0;FR&&(F=S.end.row+1,S=this.$foldData[L++],R=S?S.start.row:1/0)}else{k=this.getLength();for(var C=this.$foldData,L=0;LC));F++);return[L,F]})},_.prototype.getPrecedingCharacter=function(){var k=this.selection.getCursor();if(k.column===0)return k.row===0?"":this.doc.getNewLineCharacter();var S=this.getLine(k.row);return S[k.column-1]},_.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},_})();b.$uid=0,b.prototype.$modes=o.$modes,b.prototype.getValue=b.prototype.toString,b.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},b.prototype.$overwrite=!1,b.prototype.$mode=null,b.prototype.$modeId=null,b.prototype.$scrollTop=0,b.prototype.$scrollLeft=0,b.prototype.$wrapLimit=80,b.prototype.$useWrapMode=!1,b.prototype.$wrapLimitRange={min:null,max:null},b.prototype.lineWidgets=null,b.prototype.isFullWidth=O,i.implement(b.prototype,l);var D=1,E=2,w=3,y=4,A=9,T=10,x=11,M=12;function O(_){return _<4352?!1:_>=4352&&_<=4447||_>=4515&&_<=4519||_>=4602&&_<=4607||_>=9001&&_<=9002||_>=11904&&_<=11929||_>=11931&&_<=12019||_>=12032&&_<=12245||_>=12272&&_<=12283||_>=12288&&_<=12350||_>=12353&&_<=12438||_>=12441&&_<=12543||_>=12549&&_<=12589||_>=12593&&_<=12686||_>=12688&&_<=12730||_>=12736&&_<=12771||_>=12784&&_<=12830||_>=12832&&_<=12871||_>=12880&&_<=13054||_>=13056&&_<=19903||_>=19968&&_<=42124||_>=42128&&_<=42182||_>=43360&&_<=43388||_>=44032&&_<=55203||_>=55216&&_<=55238||_>=55243&&_<=55291||_>=63744&&_<=64255||_>=65040&&_<=65049||_>=65072&&_<=65106||_>=65108&&_<=65126||_>=65128&&_<=65131||_>=65281&&_<=65376||_>=65504&&_<=65510}t("./edit_session/folding").Folding.call(b.prototype),t("./edit_session/bracket_match").BracketMatch.call(b.prototype),o.defineOptions(b.prototype,"session",{wrap:{set:function(_){if(!_||_=="off"?_=!1:_=="free"?_=!0:_=="printMargin"?_=-1:typeof _=="string"&&(_=parseInt(_,10)||!1),this.$wrap!=_)if(this.$wrap=_,!_)this.setUseWrapMode(!1);else{var k=typeof _=="number"?_:null;this.setWrapLimitRange(k,k),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(_){_=_=="auto"?this.$mode.type!="text":_!="text",_!=this.$wrapAsCode&&(this.$wrapAsCode=_,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(_){this.$useWorker=_,this.$stopWorker(),_&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(_){_=parseInt(_),_>0&&this.$tabSize!==_&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=_,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(_){this.setFoldStyle(_)},handlesSet:!0},overwrite:{set:function(_){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(_){this.doc.setNewLineMode(_)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(_){this.setMode(_)},get:function(){return this.$modeId},handlesSet:!0}}),n.EditSession=b}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(t,n,h){var i=t("./lib/lang"),s=t("./lib/oop"),d=t("./range").Range,o=(function(){function c(){this.$options={}}return c.prototype.set=function(p){return s.mixin(this.$options,p),this},c.prototype.getOptions=function(){return i.copyObject(this.$options)},c.prototype.setOptions=function(p){this.$options=p},c.prototype.find=function(p){var u=this.$options,f=this.$matchIterator(p,u);if(!f)return!1;var g=null;return f.forEach(function(v,b,D,E){return g=new d(v,b,D,E),b==E&&u.start&&u.start.start&&u.skipCurrent!=!1&&g.isEqual(u.start)?(g=null,!1):!0}),g},c.prototype.findAll=function(p){var u=this.$options;if(!u.needle)return[];this.$assembleRegExp(u);var f=u.range,g=f?p.getLines(f.start.row,f.end.row):p.doc.getAllLines(),v=[],b=u.re;if(u.$isMultiLine){var D=b.length,E=g.length-D,w;e:for(var y=b.offset||0;y<=E;y++){for(var A=0;AM||(v.push(w=new d(y,M,y+D-1,O)),D>2&&(y=y+D-2))}}else for(var _,k=0;kk&&(k=C),v.push(new d(_.startRow,_.startCol,_.endRow,_.endCol))}}else{_=i.getMatchOffsets(g[k],b);for(var A=0;A<_.length;A++){var L=_[A];v.push(new d(k,L.offset,k,L.offset+L.length))}}if(f){for(var I=f.start.column,F=f.end.column,k=0,A=v.length-1;kF&&v[A].end.row==R;)A--;for(v=v.slice(k,A+1),k=0,A=v.length;k=v){f+="\\";break}var D=p.charCodeAt(g);switch(D){case u.Backslash:f+="\\";break;case u.n:f+=` +`;break;case u.t:f+=" ";break}continue}if(b===u.DollarSign){if(g++,g>=v){f+="$";break}var E=p.charCodeAt(g);if(E===u.DollarSign){f+="$$";continue}if(E===u.Digit0||E===u.Ampersand){f+="$&";continue}if(u.Digit1<=E&&E<=u.Digit9){f+="$"+p[g];continue}}f+=p[g]}return f||p},c.prototype.replace=function(p,u){var f=this.$options,g=this.$assembleRegExp(f);if(f.$isMultiLine)return u;if(g){var v=this.$isMultilineSearch(f);v&&(p=p.replace(/\r\n|\r|\n/g,` +`));var b=g.exec(p);if(!b||!v&&b[0].length!=p.length)return null;if(u=f.regExp?this.parseReplaceString(u):u.replace(/\$/g,"$$$$"),u=p.replace(g,u),f.preserveCase){u=u.split("");for(var D=Math.min(p.length,p.length);D--;){var E=p[D];E&&E.toLowerCase()!=E?u[D]=u[D].toUpperCase():u[D]=u[D].toLowerCase()}u=u.join("")}return u}},c.prototype.$assembleRegExp=function(p,u){if(p.needle instanceof RegExp)return p.re=p.needle;var f=p.needle;if(!p.needle)return p.re=!1;p.regExp||(f=i.escapeRegExp(f));var g=p.caseSensitive?"gm":"gmi";try{new RegExp(f,"u"),p.$supportsUnicodeFlag=!0,g+="u"}catch{p.$supportsUnicodeFlag=!1}if(p.wholeWord&&(f=l(f,p)),p.$isMultiLine=!u&&/[\n\r]/.test(f),p.$isMultiLine)return p.re=this.$assembleMultilineRegExp(f,g);try{var v=new RegExp(f,g)}catch{v=!1}return p.re=v},c.prototype.$assembleMultilineRegExp=function(p,u){for(var f=p.replace(/\r\n|\r|\n/g,`$ ^`).split(` -`),g=[],v=0;vg);E++){var w=p.getLine(D++);v=v==null?w:v+` -`+w}var y=h.exec(v);if(h.lastIndex=0,y){var A=v.slice(0,y.index).split(` +`),g=[],v=0;vg);E++){var w=p.getLine(D++);v=v==null?w:v+` +`+w}var y=u.exec(v);if(u.lastIndex=0,y){var A=v.slice(0,y.index).split(` `),T=y[0].split(` -`),$=f+A.length-1,M=A[A.length-1].length,O=$+T.length-1,_=T.length==1?M+T[0].length:T[T.length-1].length;return{startRow:$,startCol:M,endRow:O,endCol:_}}}return null},c.prototype.$multiLineBackward=function(p,h,f,g,v){for(var b,D=a(p,g),E=p.getLine(g).length-f,w=g;w>=v;){for(var y=0;y=v;y++){var A=p.getLine(w--);b=b==null?A:A+` -`+b}var T=r(b,h,E);if(T){var $=b.slice(0,T.index).split(` +`),x=f+A.length-1,M=A[A.length-1].length,O=x+T.length-1,_=T.length==1?M+T[0].length:T[T.length-1].length;return{startRow:x,startCol:M,endRow:O,endCol:_}}}return null},c.prototype.$multiLineBackward=function(p,u,f,g,v){for(var b,D=a(p,g),E=p.getLine(g).length-f,w=g;w>=v;){for(var y=0;y=v;y++){var A=p.getLine(w--);b=b==null?A:A+` +`+b}var T=r(b,u,E);if(T){var x=b.slice(0,T.index).split(` `),M=T[0].split(` -`),O=w+$.length,_=$[$.length-1].length,k=O+M.length-1,S=M.length==1?_+M[0].length:M[M.length-1].length;return{startRow:O,startCol:_,endRow:k,endCol:S}}}return null},c.prototype.$matchIterator=function(p,h){var f=this.$assembleRegExp(h);if(!f)return!1;var g=this.$isMultilineSearch(h),v=this.$multiLineForward,b=this.$multiLineBackward,D=h.backwards==!0,E=h.skipCurrent!=!1,w=f.unicode,y=h.range,A=h.start;A||(A=y?y[D?"end":"start"]:p.selection.getRange()),A.start&&(A=A[E!=D?"end":"start"]);var T=y?y.start.row:0,$=y?y.end.row:p.getLength()-1;if(D)var M=function(k){var S=A.row;if(!_(S,A.column,k)){for(S--;S>=T;S--)if(_(S,Number.MAX_VALUE,k))return;if(h.wrap!=!1){for(S=$,T=A.row;S>=T;S--)if(_(S,Number.MAX_VALUE,k))return}}};else var M=function(S){var C=A.row;if(!_(C,A.column,S)){for(C=C+1;C<=$;C++)if(_(C,0,S))return;if(h.wrap!=!1){for(C=T,$=A.row;C<=$;C++)if(_(C,0,S))return}}};if(h.$isMultiLine)var O=f.length,_=function(k,S,C){var L=D?k-O+1:k;if(!(L<0||L+O>p.getLength())){var I=p.getLine(L),F=I.search(f[0]);if(!(!D&&FS)&&C(L,F,L+O-1,B))return!0}}};else if(D)var _=function(S,C,L){if(g){var I=b(p,f,C,S,T);if(!I)return!1;if(L(I.startRow,I.startCol,I.endRow,I.endCol))return!0}else{var F=p.getLine(S),R=[],B,N=0;for(f.lastIndex=0;B=f.exec(F);){var H=B[0].length;if(N=B.index,!H){if(N>=F.length)break;f.lastIndex=N+=i.skipEmptyMatch(F,N,w)}if(B.index+H>C)break;R.push(B.index,H)}for(var W=R.length-1;W>=0;W-=2){var j=R[W-1],H=R[W];if(L(S,j,S,j+H))return!0}}};else var _=function(S,C,L){if(f.lastIndex=C,g){var I=v(p,f,S,$);if(I){var F=I.endRow<=$?I.endRow-1:$;F>S&&(S=F)}if(!I)return!1;if(L(I.startRow,I.startCol,I.endRow,I.endCol))return!0}else for(var R=p.getLine(S),B,N;N=f.exec(R);){var H=N[0].length;if(B=N.index,L(S,B,S,B+H))return!0;if(!H&&(f.lastIndex=B+=i.skipEmptyMatch(R,B,w),B>=R.length))return!1}};return{forEach:M}},c})();function l(c,p){var h=i.supportsLookbehind();function f(D,E){E===void 0&&(E=!0);var w=h&&p.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return w.test(D)||p.regExp?h&&p.$supportsUnicodeFlag?E?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var g=Array.from(c),v=g[0],b=g[g.length-1];return f(v)+c+f(b,!1)}function r(c,p,h){for(var f=null,g=0;g<=c.length;){p.lastIndex=g;var v=p.exec(c);if(!v)break;var b=v.index+v[0].length;if(b>c.length-h)break;(!f||b>f.index+f[0].length)&&(f=v),g=v.index+1}return f}function a(c,p){var h=5e3,f={row:p,column:0},g=c.doc.positionToIndex(f),v=g+h,b=c.doc.indexToPosition(v),D=b.row;return D+1}n.Search=o}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(t,n,u){var i=this&&this.__extends||(function(){var c=function(p,h){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,g){f.__proto__=g}||function(f,g){for(var v in g)Object.prototype.hasOwnProperty.call(g,v)&&(f[v]=g[v])},c(p,h)};return function(p,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");c(p,h);function f(){this.constructor=p}p.prototype=h===null?Object.create(h):(f.prototype=h.prototype,new f)}})(),s=t("../lib/keys"),d=t("../lib/useragent"),o=s.KEY_MODS,l=(function(){function c(p,h){this.$init(p,h,!1)}return c.prototype.$init=function(p,h,f){this.platform=h||(d.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(p),this.$singleCommand=f},c.prototype.addCommand=function(p){this.commands[p.name]&&this.removeCommand(p),this.commands[p.name]=p,p.bindKey&&this._buildKeyHash(p)},c.prototype.removeCommand=function(p,h){var f=p&&(typeof p=="string"?p:p.name);p=this.commands[f],h||delete this.commands[f];var g=this.commandKeyBinding;for(var v in g){var b=g[v];if(b==p)delete g[v];else if(Array.isArray(b)){var D=b.indexOf(p);D!=-1&&(b.splice(D,1),b.length==1&&(g[v]=b[0]))}}},c.prototype.bindKey=function(p,h,f){if(typeof p=="object"&&p&&(f==null&&(f=p.position),p=p[this.platform]),!!p){if(typeof h=="function")return this.addCommand({exec:h,bindKey:p,name:h.name||p});p.split("|").forEach(function(g){var v="";if(g.indexOf(" ")!=-1){var b=g.split(/\s+/);g=b.pop(),b.forEach(function(w){var y=this.parseKeys(w),A=o[y.hashId]+y.key;v+=(v?" ":"")+A,this._addCommandToBinding(v,"chainKeys")},this),v+=" "}var D=this.parseKeys(g),E=o[D.hashId]+D.key;this._addCommandToBinding(v+E,h,f)},this)}},c.prototype._addCommandToBinding=function(p,h,f){var g=this.commandKeyBinding,v;if(!h)delete g[p];else if(!g[p]||this.$singleCommand)g[p]=h;else{Array.isArray(g[p])?(v=g[p].indexOf(h))!=-1&&g[p].splice(v,1):g[p]=[g[p]],typeof f!="number"&&(f=r(h));var b=g[p];for(v=0;vf)break}b.splice(v,0,h)}},c.prototype.addCommands=function(p){p&&Object.keys(p).forEach(function(h){var f=p[h];if(f){if(typeof f=="string")return this.bindKey(f,h);typeof f=="function"&&(f={exec:f}),typeof f=="object"&&(f.name||(f.name=h),this.addCommand(f))}},this)},c.prototype.removeCommands=function(p){Object.keys(p).forEach(function(h){this.removeCommand(p[h])},this)},c.prototype.bindKeys=function(p){Object.keys(p).forEach(function(h){this.bindKey(h,p[h])},this)},c.prototype._buildKeyHash=function(p){this.bindKey(p.bindKey,p)},c.prototype.parseKeys=function(p){var h=p.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(E){return E}),f=h.pop(),g=s[f];if(s.FUNCTION_KEYS[g])f=s.FUNCTION_KEYS[g].toLowerCase();else if(h.length){if(h.length==1&&h[0]=="shift")return{key:f.toUpperCase(),hashId:-1}}else return{key:f,hashId:-1};for(var v=0,b=h.length;b--;){var D=s.KEY_MODS[h[b]];if(D==null)return typeof console<"u"&&console.error("invalid modifier "+h[b]+" in "+p),!1;v|=D}return{key:f,hashId:v}},c.prototype.findKeyCommand=function(p,h){var f=o[p]+h;return this.commandKeyBinding[f]},c.prototype.handleKeyboard=function(p,h,f,g){if(!(g<0)){var v=o[h]+f,b=this.commandKeyBinding[v];return p.$keyChain&&(p.$keyChain+=" "+v,b=this.commandKeyBinding[p.$keyChain]||b),b&&(b=="chainKeys"||b[b.length-1]=="chainKeys")?(p.$keyChain=p.$keyChain||v,{command:"null"}):(p.$keyChain&&((!h||h==4)&&f.length==1?p.$keyChain=p.$keyChain.slice(0,-v.length-1):(h==-1||g>0)&&(p.$keyChain="")),{command:b})}},c.prototype.getStatusText=function(p,h){return h.$keyChain||""},c})();function r(c){return typeof c=="object"&&c.bindKey&&c.bindKey.position||(c.isDefault?-100:0)}var a=(function(c){i(p,c);function p(h,f){var g=c.call(this,h,f)||this;return g.$singleCommand=!0,g}return p})(l);a.call=function(c,p,h){l.prototype.$init.call(c,p,h,!0)},l.call=function(c,p,h){l.prototype.$init.call(c,p,h,!1)},n.HashHandler=a,n.MultiHashHandler=l}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(t,n,u){var i=this&&this.__extends||(function(){var r=function(a,c){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,h){p.__proto__=h}||function(p,h){for(var f in h)Object.prototype.hasOwnProperty.call(h,f)&&(p[f]=h[f])},r(a,c)};return function(a,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");r(a,c);function p(){this.constructor=a}a.prototype=c===null?Object.create(c):(p.prototype=c.prototype,new p)}})(),s=t("../lib/oop"),d=t("../keyboard/hash_handler").MultiHashHandler,o=t("../lib/event_emitter").EventEmitter,l=(function(r){i(a,r);function a(c,p){var h=r.call(this,p,c)||this;return h.byName=h.commands,h.setDefaultHandler("exec",function(f){return f.args?f.command.exec(f.editor,f.args,f.event,!1):f.command.exec(f.editor,{},f.event,!0)}),h}return a.prototype.exec=function(c,p,h){if(Array.isArray(c)){for(var f=c.length;f--;)if(this.exec(c[f],p,h))return!0;return!1}typeof c=="string"&&(c=this.commands[c]);var g={editor:p,command:c,args:h};return this.canExecute(c,p)?(g.returnValue=this._emit("exec",g),this._signal("afterExec",g),g.returnValue!==!1):(this._signal("commandUnavailable",g),!1)},a.prototype.canExecute=function(c,p){return typeof c=="string"&&(c=this.commands[c]),!(!c||p&&p.$readOnly&&!c.readOnly||this.$checkCommandState!=!1&&c.isAvailable&&!c.isAvailable(p))},a.prototype.toggleRecording=function(c){if(!this.$inReplay)return c&&c._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(p){this.macro.push([p.command,p.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},a.prototype.replay=function(c){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(c);try{this.$inReplay=!0,this.macro.forEach(function(p){typeof p=="string"?this.exec(p,c):this.exec(p[0],c,p[1])},this)}finally{this.$inReplay=!1}}},a.prototype.trimMacro=function(c){return c.map(function(p){return typeof p[0]!="string"&&(p[0]=p[0].name),p[1]||(p=p[0]),p})},a})(d);s.implement(l.prototype,o),n.CommandManager=l}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(t,n,u){var i=t("../lib/lang"),s=t("../config"),d=t("../range").Range;function o(r,a){return{win:r,mac:a}}n.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:o("Ctrl-,","Command-,"),exec:function(r){s.loadModule("ace/ext/settings_menu",function(a){a.init(r),r.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:o("Alt-E","F4"),exec:function(r){s.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(r,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:o("Alt-Shift-E","Shift-F4"),exec:function(r){s.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(r,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:o("Ctrl-A","Command-A"),exec:function(r){r.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:o(null,"Ctrl-L"),exec:function(r){r.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:o("Ctrl-L","Command-L"),exec:function(r,a){typeof a=="number"&&!isNaN(a)&&r.gotoLine(a),r.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:o("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(r){r.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:o("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(r){r.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:o("F2","F2"),exec:function(r){r.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:o("Alt-F2","Alt-F2"),exec:function(r){r.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(r){r.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(r){r.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:o("Alt-0","Command-Option-0"),exec:function(r){r.session.foldAll(),r.session.unfold(r.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:o("Alt-Shift-0","Command-Option-Shift-0"),exec:function(r){r.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:o("Ctrl-K","Command-G"),exec:function(r){r.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:o("Ctrl-Shift-K","Command-Shift-G"),exec:function(r){r.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:o("Alt-K","Ctrl-G"),exec:function(r){r.selection.isEmpty()?r.selection.selectWord():r.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:o("Alt-Shift-K","Ctrl-Shift-G"),exec:function(r){r.selection.isEmpty()?r.selection.selectWord():r.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:o("Ctrl-F","Command-F"),exec:function(r){s.loadModule("ace/ext/searchbox",function(a){a.Search(r)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(r){r.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:o("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(r){r.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:o("Ctrl-Home","Command-Home|Command-Up"),exec:function(r){r.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:o("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(r){r.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:o("Up","Up|Ctrl-P"),exec:function(r,a){r.navigateUp(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:o("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(r){r.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:o("Ctrl-End","Command-End|Command-Down"),exec:function(r){r.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:o("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(r){r.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:o("Down","Down|Ctrl-N"),exec:function(r,a){r.navigateDown(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:o("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(r){r.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:o("Ctrl-Left","Option-Left"),exec:function(r){r.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:o("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(r){r.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:o("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(r){r.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:o("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(r){r.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:o("Left","Left|Ctrl-B"),exec:function(r,a){r.navigateLeft(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:o("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(r){r.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:o("Ctrl-Right","Option-Right"),exec:function(r){r.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:o("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(r){r.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:o("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(r){r.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:o("Shift-Right","Shift-Right"),exec:function(r){r.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:o("Right","Right|Ctrl-F"),exec:function(r,a){r.navigateRight(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(r){r.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:o(null,"Option-PageDown"),exec:function(r){r.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:o("PageDown","PageDown|Ctrl-V"),exec:function(r){r.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(r){r.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:o(null,"Option-PageUp"),exec:function(r){r.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(r){r.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:o("Ctrl-Up",null),exec:function(r){r.renderer.scrollBy(0,-2*r.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:o("Ctrl-Down",null),exec:function(r){r.renderer.scrollBy(0,2*r.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(r){r.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(r){r.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:o("Ctrl-Alt-E","Command-Option-E"),exec:function(r){r.commands.toggleRecording(r)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:o("Ctrl-Shift-E","Command-Shift-E"),exec:function(r){r.commands.replay(r)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:o("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(r){r.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:o("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(r){r.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:o("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(r){r.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:o(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(r){},readOnly:!0},{name:"cut",description:"Cut",exec:function(r){var a=r.$copyWithEmptySelection&&r.selection.isEmpty(),c=a?r.selection.getLineRange():r.selection.getRange();r._emit("cut",c),c.isEmpty()||r.session.remove(c),r.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(r,a){r.$handlePaste(a)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:o("Ctrl-D","Command-D"),exec:function(r){r.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:o("Ctrl-Shift-D","Command-Shift-D"),exec:function(r){r.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:o("Ctrl-Alt-S","Command-Alt-S"),exec:function(r){r.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:o("Ctrl-/","Command-/"),exec:function(r){r.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:o("Ctrl-Shift-/","Command-Shift-/"),exec:function(r){r.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:o("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(r){r.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:o("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(r){r.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:o("Ctrl-H","Command-Option-F"),exec:function(r){s.loadModule("ace/ext/searchbox",function(a){a.Search(r,!0)})}},{name:"undo",description:"Undo",bindKey:o("Ctrl-Z","Command-Z"),exec:function(r){r.undo()}},{name:"redo",description:"Redo",bindKey:o("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(r){r.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:o("Alt-Shift-Up","Command-Option-Up"),exec:function(r){r.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:o("Alt-Up","Option-Up"),exec:function(r){r.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:o("Alt-Shift-Down","Command-Option-Down"),exec:function(r){r.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:o("Alt-Down","Option-Down"),exec:function(r){r.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:o("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(r){r.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:o("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(r){r.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:o("Shift-Delete",null),exec:function(r){if(r.selection.isEmpty())r.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:o("Alt-Backspace","Command-Backspace"),exec:function(r){r.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:o("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(r){r.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:o("Ctrl-Shift-Backspace",null),exec:function(r){var a=r.selection.getRange();a.start.column=0,r.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:o("Ctrl-Shift-Delete",null),exec:function(r){var a=r.selection.getRange();a.end.column=Number.MAX_VALUE,r.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:o("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(r){r.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:o("Ctrl-Delete","Alt-Delete"),exec:function(r){r.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:o("Shift-Tab","Shift-Tab"),exec:function(r){r.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:o("Tab","Tab"),exec:function(r){r.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:o("Ctrl-[","Ctrl-["),exec:function(r){r.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:o("Ctrl-]","Ctrl-]"),exec:function(r){r.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(r,a){r.insert(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(r,a){r.insert(i.stringRepeat(a.text||"",a.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:o(null,"Ctrl-O"),exec:function(r){r.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:o("Alt-Shift-X","Ctrl-T"),exec:function(r){r.transposeLetters()},multiSelectAction:function(r){r.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:o("Ctrl-U","Ctrl-U"),exec:function(r){r.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:o("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(r){r.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:o(null,null),exec:function(r){r.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:o("Ctrl-Shift-L","Command-Shift-L"),exec:function(r){var a=r.selection.getRange();a.start.column=a.end.column=0,a.end.row++,r.selection.setRange(a,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:o("Ctrl+F3","F3"),exec:function(r){r.openLink()}},{name:"joinlines",description:"Join lines",bindKey:o(null,null),exec:function(r){for(var a=r.selection.isBackwards(),c=a?r.selection.getSelectionLead():r.selection.getSelectionAnchor(),p=a?r.selection.getSelectionAnchor():r.selection.getSelectionLead(),h=r.session.doc.getLine(c.row).length,f=r.session.doc.getTextRange(r.selection.getRange()),g=f.replace(/\n\s*/," ").length,v=r.session.doc.getLine(c.row),b=c.row+1;b<=p.row+1;b++){var D=i.stringTrimLeft(i.stringTrimRight(r.session.doc.getLine(b)));D.length!==0&&(D=" "+D),v+=D}p.row+10?(r.selection.moveCursorTo(c.row,c.column),r.selection.selectTo(c.row,c.column+g)):(h=r.session.doc.getLine(c.row).length>h?h+1:h,r.selection.moveCursorTo(c.row,h))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:o(null,null),exec:function(r){var a=r.session.doc.getLength()-1,c=r.session.doc.getLine(a).length,p=r.selection.rangeList.ranges,h=[];p.length<1&&(p=[r.selection.getRange()]);for(var f=0;f=T;S--)if(_(S,Number.MAX_VALUE,k))return;if(u.wrap!=!1){for(S=x,T=A.row;S>=T;S--)if(_(S,Number.MAX_VALUE,k))return}}};else var M=function(S){var C=A.row;if(!_(C,A.column,S)){for(C=C+1;C<=x;C++)if(_(C,0,S))return;if(u.wrap!=!1){for(C=T,x=A.row;C<=x;C++)if(_(C,0,S))return}}};if(u.$isMultiLine)var O=f.length,_=function(k,S,C){var L=D?k-O+1:k;if(!(L<0||L+O>p.getLength())){var I=p.getLine(L),F=I.search(f[0]);if(!(!D&&FS)&&C(L,F,L+O-1,B))return!0}}};else if(D)var _=function(S,C,L){if(g){var I=b(p,f,C,S,T);if(!I)return!1;if(L(I.startRow,I.startCol,I.endRow,I.endCol))return!0}else{var F=p.getLine(S),R=[],B,N=0;for(f.lastIndex=0;B=f.exec(F);){var z=B[0].length;if(N=B.index,!z){if(N>=F.length)break;f.lastIndex=N+=i.skipEmptyMatch(F,N,w)}if(B.index+z>C)break;R.push(B.index,z)}for(var W=R.length-1;W>=0;W-=2){var j=R[W-1],z=R[W];if(L(S,j,S,j+z))return!0}}};else var _=function(S,C,L){if(f.lastIndex=C,g){var I=v(p,f,S,x);if(I){var F=I.endRow<=x?I.endRow-1:x;F>S&&(S=F)}if(!I)return!1;if(L(I.startRow,I.startCol,I.endRow,I.endCol))return!0}else for(var R=p.getLine(S),B,N;N=f.exec(R);){var z=N[0].length;if(B=N.index,L(S,B,S,B+z))return!0;if(!z&&(f.lastIndex=B+=i.skipEmptyMatch(R,B,w),B>=R.length))return!1}};return{forEach:M}},c})();function l(c,p){var u=i.supportsLookbehind();function f(D,E){E===void 0&&(E=!0);var w=u&&p.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return w.test(D)||p.regExp?u&&p.$supportsUnicodeFlag?E?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var g=Array.from(c),v=g[0],b=g[g.length-1];return f(v)+c+f(b,!1)}function r(c,p,u){for(var f=null,g=0;g<=c.length;){p.lastIndex=g;var v=p.exec(c);if(!v)break;var b=v.index+v[0].length;if(b>c.length-u)break;(!f||b>f.index+f[0].length)&&(f=v),g=v.index+1}return f}function a(c,p){var u=5e3,f={row:p,column:0},g=c.doc.positionToIndex(f),v=g+u,b=c.doc.indexToPosition(v),D=b.row;return D+1}n.Search=o}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(t,n,h){var i=this&&this.__extends||(function(){var c=function(p,u){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,g){f.__proto__=g}||function(f,g){for(var v in g)Object.prototype.hasOwnProperty.call(g,v)&&(f[v]=g[v])},c(p,u)};return function(p,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");c(p,u);function f(){this.constructor=p}p.prototype=u===null?Object.create(u):(f.prototype=u.prototype,new f)}})(),s=t("../lib/keys"),d=t("../lib/useragent"),o=s.KEY_MODS,l=(function(){function c(p,u){this.$init(p,u,!1)}return c.prototype.$init=function(p,u,f){this.platform=u||(d.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(p),this.$singleCommand=f},c.prototype.addCommand=function(p){this.commands[p.name]&&this.removeCommand(p),this.commands[p.name]=p,p.bindKey&&this._buildKeyHash(p)},c.prototype.removeCommand=function(p,u){var f=p&&(typeof p=="string"?p:p.name);p=this.commands[f],u||delete this.commands[f];var g=this.commandKeyBinding;for(var v in g){var b=g[v];if(b==p)delete g[v];else if(Array.isArray(b)){var D=b.indexOf(p);D!=-1&&(b.splice(D,1),b.length==1&&(g[v]=b[0]))}}},c.prototype.bindKey=function(p,u,f){if(typeof p=="object"&&p&&(f==null&&(f=p.position),p=p[this.platform]),!!p){if(typeof u=="function")return this.addCommand({exec:u,bindKey:p,name:u.name||p});p.split("|").forEach(function(g){var v="";if(g.indexOf(" ")!=-1){var b=g.split(/\s+/);g=b.pop(),b.forEach(function(w){var y=this.parseKeys(w),A=o[y.hashId]+y.key;v+=(v?" ":"")+A,this._addCommandToBinding(v,"chainKeys")},this),v+=" "}var D=this.parseKeys(g),E=o[D.hashId]+D.key;this._addCommandToBinding(v+E,u,f)},this)}},c.prototype._addCommandToBinding=function(p,u,f){var g=this.commandKeyBinding,v;if(!u)delete g[p];else if(!g[p]||this.$singleCommand)g[p]=u;else{Array.isArray(g[p])?(v=g[p].indexOf(u))!=-1&&g[p].splice(v,1):g[p]=[g[p]],typeof f!="number"&&(f=r(u));var b=g[p];for(v=0;vf)break}b.splice(v,0,u)}},c.prototype.addCommands=function(p){p&&Object.keys(p).forEach(function(u){var f=p[u];if(f){if(typeof f=="string")return this.bindKey(f,u);typeof f=="function"&&(f={exec:f}),typeof f=="object"&&(f.name||(f.name=u),this.addCommand(f))}},this)},c.prototype.removeCommands=function(p){Object.keys(p).forEach(function(u){this.removeCommand(p[u])},this)},c.prototype.bindKeys=function(p){Object.keys(p).forEach(function(u){this.bindKey(u,p[u])},this)},c.prototype._buildKeyHash=function(p){this.bindKey(p.bindKey,p)},c.prototype.parseKeys=function(p){var u=p.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(E){return E}),f=u.pop(),g=s[f];if(s.FUNCTION_KEYS[g])f=s.FUNCTION_KEYS[g].toLowerCase();else if(u.length){if(u.length==1&&u[0]=="shift")return{key:f.toUpperCase(),hashId:-1}}else return{key:f,hashId:-1};for(var v=0,b=u.length;b--;){var D=s.KEY_MODS[u[b]];if(D==null)return typeof console<"u"&&console.error("invalid modifier "+u[b]+" in "+p),!1;v|=D}return{key:f,hashId:v}},c.prototype.findKeyCommand=function(p,u){var f=o[p]+u;return this.commandKeyBinding[f]},c.prototype.handleKeyboard=function(p,u,f,g){if(!(g<0)){var v=o[u]+f,b=this.commandKeyBinding[v];return p.$keyChain&&(p.$keyChain+=" "+v,b=this.commandKeyBinding[p.$keyChain]||b),b&&(b=="chainKeys"||b[b.length-1]=="chainKeys")?(p.$keyChain=p.$keyChain||v,{command:"null"}):(p.$keyChain&&((!u||u==4)&&f.length==1?p.$keyChain=p.$keyChain.slice(0,-v.length-1):(u==-1||g>0)&&(p.$keyChain="")),{command:b})}},c.prototype.getStatusText=function(p,u){return u.$keyChain||""},c})();function r(c){return typeof c=="object"&&c.bindKey&&c.bindKey.position||(c.isDefault?-100:0)}var a=(function(c){i(p,c);function p(u,f){var g=c.call(this,u,f)||this;return g.$singleCommand=!0,g}return p})(l);a.call=function(c,p,u){l.prototype.$init.call(c,p,u,!0)},l.call=function(c,p,u){l.prototype.$init.call(c,p,u,!1)},n.HashHandler=a,n.MultiHashHandler=l}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(t,n,h){var i=this&&this.__extends||(function(){var r=function(a,c){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,u){p.__proto__=u}||function(p,u){for(var f in u)Object.prototype.hasOwnProperty.call(u,f)&&(p[f]=u[f])},r(a,c)};return function(a,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");r(a,c);function p(){this.constructor=a}a.prototype=c===null?Object.create(c):(p.prototype=c.prototype,new p)}})(),s=t("../lib/oop"),d=t("../keyboard/hash_handler").MultiHashHandler,o=t("../lib/event_emitter").EventEmitter,l=(function(r){i(a,r);function a(c,p){var u=r.call(this,p,c)||this;return u.byName=u.commands,u.setDefaultHandler("exec",function(f){return f.args?f.command.exec(f.editor,f.args,f.event,!1):f.command.exec(f.editor,{},f.event,!0)}),u}return a.prototype.exec=function(c,p,u){if(Array.isArray(c)){for(var f=c.length;f--;)if(this.exec(c[f],p,u))return!0;return!1}typeof c=="string"&&(c=this.commands[c]);var g={editor:p,command:c,args:u};return this.canExecute(c,p)?(g.returnValue=this._emit("exec",g),this._signal("afterExec",g),g.returnValue!==!1):(this._signal("commandUnavailable",g),!1)},a.prototype.canExecute=function(c,p){return typeof c=="string"&&(c=this.commands[c]),!(!c||p&&p.$readOnly&&!c.readOnly||this.$checkCommandState!=!1&&c.isAvailable&&!c.isAvailable(p))},a.prototype.toggleRecording=function(c){if(!this.$inReplay)return c&&c._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(p){this.macro.push([p.command,p.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},a.prototype.replay=function(c){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(c);try{this.$inReplay=!0,this.macro.forEach(function(p){typeof p=="string"?this.exec(p,c):this.exec(p[0],c,p[1])},this)}finally{this.$inReplay=!1}}},a.prototype.trimMacro=function(c){return c.map(function(p){return typeof p[0]!="string"&&(p[0]=p[0].name),p[1]||(p=p[0]),p})},a})(d);s.implement(l.prototype,o),n.CommandManager=l}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(t,n,h){var i=t("../lib/lang"),s=t("../config"),d=t("../range").Range;function o(r,a){return{win:r,mac:a}}n.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:o("Ctrl-,","Command-,"),exec:function(r){s.loadModule("ace/ext/settings_menu",function(a){a.init(r),r.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:o("Alt-E","F4"),exec:function(r){s.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(r,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:o("Alt-Shift-E","Shift-F4"),exec:function(r){s.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(r,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:o("Ctrl-A","Command-A"),exec:function(r){r.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:o(null,"Ctrl-L"),exec:function(r){r.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:o("Ctrl-L","Command-L"),exec:function(r,a){typeof a=="number"&&!isNaN(a)&&r.gotoLine(a),r.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:o("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(r){r.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:o("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(r){r.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:o("F2","F2"),exec:function(r){r.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:o("Alt-F2","Alt-F2"),exec:function(r){r.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(r){r.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(r){r.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:o("Alt-0","Command-Option-0"),exec:function(r){r.session.foldAll(),r.session.unfold(r.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:o("Alt-Shift-0","Command-Option-Shift-0"),exec:function(r){r.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:o("Ctrl-K","Command-G"),exec:function(r){r.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:o("Ctrl-Shift-K","Command-Shift-G"),exec:function(r){r.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:o("Alt-K","Ctrl-G"),exec:function(r){r.selection.isEmpty()?r.selection.selectWord():r.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:o("Alt-Shift-K","Ctrl-Shift-G"),exec:function(r){r.selection.isEmpty()?r.selection.selectWord():r.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:o("Ctrl-F","Command-F"),exec:function(r){s.loadModule("ace/ext/searchbox",function(a){a.Search(r)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(r){r.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:o("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(r){r.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:o("Ctrl-Home","Command-Home|Command-Up"),exec:function(r){r.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:o("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(r){r.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:o("Up","Up|Ctrl-P"),exec:function(r,a){r.navigateUp(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:o("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(r){r.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:o("Ctrl-End","Command-End|Command-Down"),exec:function(r){r.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:o("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(r){r.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:o("Down","Down|Ctrl-N"),exec:function(r,a){r.navigateDown(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:o("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(r){r.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:o("Ctrl-Left","Option-Left"),exec:function(r){r.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:o("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(r){r.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:o("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(r){r.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:o("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(r){r.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:o("Left","Left|Ctrl-B"),exec:function(r,a){r.navigateLeft(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:o("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(r){r.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:o("Ctrl-Right","Option-Right"),exec:function(r){r.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:o("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(r){r.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:o("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(r){r.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:o("Shift-Right","Shift-Right"),exec:function(r){r.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:o("Right","Right|Ctrl-F"),exec:function(r,a){r.navigateRight(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(r){r.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:o(null,"Option-PageDown"),exec:function(r){r.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:o("PageDown","PageDown|Ctrl-V"),exec:function(r){r.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(r){r.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:o(null,"Option-PageUp"),exec:function(r){r.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(r){r.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:o("Ctrl-Up",null),exec:function(r){r.renderer.scrollBy(0,-2*r.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:o("Ctrl-Down",null),exec:function(r){r.renderer.scrollBy(0,2*r.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(r){r.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(r){r.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:o("Ctrl-Alt-E","Command-Option-E"),exec:function(r){r.commands.toggleRecording(r)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:o("Ctrl-Shift-E","Command-Shift-E"),exec:function(r){r.commands.replay(r)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:o("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(r){r.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:o("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(r){r.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:o("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(r){r.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:o(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(r){},readOnly:!0},{name:"cut",description:"Cut",exec:function(r){var a=r.$copyWithEmptySelection&&r.selection.isEmpty(),c=a?r.selection.getLineRange():r.selection.getRange();r._emit("cut",c),c.isEmpty()||r.session.remove(c),r.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(r,a){r.$handlePaste(a)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:o("Ctrl-D","Command-D"),exec:function(r){r.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:o("Ctrl-Shift-D","Command-Shift-D"),exec:function(r){r.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:o("Ctrl-Alt-S","Command-Alt-S"),exec:function(r){r.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:o("Ctrl-/","Command-/"),exec:function(r){r.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:o("Ctrl-Shift-/","Command-Shift-/"),exec:function(r){r.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:o("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(r){r.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:o("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(r){r.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:o("Ctrl-H","Command-Option-F"),exec:function(r){s.loadModule("ace/ext/searchbox",function(a){a.Search(r,!0)})}},{name:"undo",description:"Undo",bindKey:o("Ctrl-Z","Command-Z"),exec:function(r){r.undo()}},{name:"redo",description:"Redo",bindKey:o("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(r){r.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:o("Alt-Shift-Up","Command-Option-Up"),exec:function(r){r.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:o("Alt-Up","Option-Up"),exec:function(r){r.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:o("Alt-Shift-Down","Command-Option-Down"),exec:function(r){r.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:o("Alt-Down","Option-Down"),exec:function(r){r.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:o("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(r){r.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:o("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(r){r.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:o("Shift-Delete",null),exec:function(r){if(r.selection.isEmpty())r.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:o("Alt-Backspace","Command-Backspace"),exec:function(r){r.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:o("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(r){r.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:o("Ctrl-Shift-Backspace",null),exec:function(r){var a=r.selection.getRange();a.start.column=0,r.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:o("Ctrl-Shift-Delete",null),exec:function(r){var a=r.selection.getRange();a.end.column=Number.MAX_VALUE,r.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:o("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(r){r.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:o("Ctrl-Delete","Alt-Delete"),exec:function(r){r.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:o("Shift-Tab","Shift-Tab"),exec:function(r){r.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:o("Tab","Tab"),exec:function(r){r.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:o("Ctrl-[","Ctrl-["),exec:function(r){r.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:o("Ctrl-]","Ctrl-]"),exec:function(r){r.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(r,a){r.insert(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(r,a){r.insert(i.stringRepeat(a.text||"",a.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:o(null,"Ctrl-O"),exec:function(r){r.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:o("Alt-Shift-X","Ctrl-T"),exec:function(r){r.transposeLetters()},multiSelectAction:function(r){r.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:o("Ctrl-U","Ctrl-U"),exec:function(r){r.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:o("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(r){r.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:o(null,null),exec:function(r){r.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:o("Ctrl-Shift-L","Command-Shift-L"),exec:function(r){var a=r.selection.getRange();a.start.column=a.end.column=0,a.end.row++,r.selection.setRange(a,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:o("Ctrl+F3","F3"),exec:function(r){r.openLink()}},{name:"joinlines",description:"Join lines",bindKey:o(null,null),exec:function(r){for(var a=r.selection.isBackwards(),c=a?r.selection.getSelectionLead():r.selection.getSelectionAnchor(),p=a?r.selection.getSelectionAnchor():r.selection.getSelectionLead(),u=r.session.doc.getLine(c.row).length,f=r.session.doc.getTextRange(r.selection.getRange()),g=f.replace(/\n\s*/," ").length,v=r.session.doc.getLine(c.row),b=c.row+1;b<=p.row+1;b++){var D=i.stringTrimLeft(i.stringTrimRight(r.session.doc.getLine(b)));D.length!==0&&(D=" "+D),v+=D}p.row+10?(r.selection.moveCursorTo(c.row,c.column),r.selection.selectTo(c.row,c.column+g)):(u=r.session.doc.getLine(c.row).length>u?u+1:u,r.selection.moveCursorTo(c.row,u))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:o(null,null),exec:function(r){var a=r.session.doc.getLength()-1,c=r.session.doc.getLine(a).length,p=r.selection.rangeList.ranges,u=[];p.length<1&&(p=[r.selection.getRange()]);for(var f=0;f0||l+r=0&&this.$isCustomWidgetVisible(l-r))return l-r;if(l+r<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(l+r))return l+r;if(l-r>=0&&this.$isFoldWidgetVisible(l-r))return l-r;if(l+r<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(l+r))return l+r}return null},o.prototype.$findNearestAnnotation=function(l){if(this.$isAnnotationVisible(l))return l;for(var r=0;l-r>0||l+r=0&&this.$isAnnotationVisible(l-r))return l-r;if(l+r<=this.lines.getLength()-1&&this.$isAnnotationVisible(l+r))return l+r}return null},o.prototype.$focusFoldWidget=function(l){if(l!=null){var r=this.$getFoldWidget(l);r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus()}},o.prototype.$focusCustomWidget=function(l){if(l!=null){var r=this.$getCustomWidget(l);r&&(r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus())}},o.prototype.$focusAnnotation=function(l){if(l!=null){var r=this.$getAnnotation(l);r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus()}},o.prototype.$blurFoldWidget=function(l){var r=this.$getFoldWidget(l);r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.blur()},o.prototype.$blurCustomWidget=function(l){var r=this.$getCustomWidget(l);r&&(r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.blur())},o.prototype.$blurAnnotation=function(l){var r=this.$getAnnotation(l);r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.blur()},o.prototype.$moveFoldWidgetUp=function(){for(var l=this.activeRowIndex;l>0;)if(l--,this.$isFoldWidgetVisible(l)||this.$isCustomWidgetVisible(l)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=l,this.$isFoldWidgetVisible(l)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},o.prototype.$moveFoldWidgetDown=function(){for(var l=this.activeRowIndex;l0;)if(l--,this.$isAnnotationVisible(l)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=l,this.$focusAnnotation(this.activeRowIndex);return}},o.prototype.$moveAnnotationDown=function(){for(var l=this.activeRowIndex;l=S.length&&(S=void 0),{value:S&&S[I++],done:!S}}};throw new TypeError(C?"Object is not iterable.":"Symbol.iterator is not defined.")},s=t("./lib/oop"),d=t("./lib/dom"),o=t("./lib/lang"),l=t("./lib/useragent"),r=t("./keyboard/textinput").TextInput,a=t("./mouse/mouse_handler").MouseHandler,c=t("./mouse/fold_handler").FoldHandler,p=t("./keyboard/keybinding").KeyBinding,h=t("./edit_session").EditSession,f=t("./search").Search,g=t("./range").Range,v=t("./lib/event_emitter").EventEmitter,b=t("./commands/command_manager").CommandManager,D=t("./commands/default_commands").commands,E=t("./config"),w=t("./token_iterator").TokenIterator,y=t("./keyboard/gutter_handler").GutterKeyboardHandler,A=t("./config").nls,T=t("./clipboard"),$=t("./lib/keys"),M=t("./lib/event"),O=t("./tooltip").HoverTooltip,_=(function(){function S(C,L,I){this.id="editor"+ ++S.$uid,this.session,this.$toDestroy=[];var F=C.getContainerElement();this.container=F,this.renderer=C,this.commands=new b(l.isMac?"mac":"win",D),typeof document=="object"&&(this.textInput=new r(C.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new a(this),new c(this)),this.keyBinding=new p(this),this.$search=new f().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=o.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(R,B){B._$emitInputEvent.schedule(31)}),this.setSession(L||I&&I.session||new h("")),E.resetOptions(this),I&&this.setOptions(I),E._signal("editor",this)}return S.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},S.prototype.startOperation=function(C){this.session.startOperation(C)},S.prototype.endOperation=function(C){this.session.endOperation(C)},S.prototype.onStartOperation=function(C){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,C||(this.previousCommand=null)},S.prototype.onEndOperation=function(C){if(this.curOp&&this.session){if(C&&C.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var L=this.curOp.command,I=L&&L.scrollIntoView;if(I){switch(I){case"center-animate":I="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var F=this.selection.getRange(),R=this.renderer.layerConfig;(F.start.row>=R.lastRow||F.end.row<=R.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}I=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},S.prototype.$historyTracker=function(C){if(this.$mergeUndoDeltas){var L=this.prevOp,I=this.$mergeableCommands,F=L.command&&C.command.name==L.command.name;if(C.command.name=="insertstring"){var R=C.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),F=F&&this.mergeNextCommand&&(!/\s/.test(R)||/\s/.test(L.args)),this.mergeNextCommand=!0}else F=F&&I.indexOf(C.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(F=!1),F?this.session.mergeUndoDeltas=!0:I.indexOf(C.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},S.prototype.setKeyboardHandler=function(C,L){if(C&&typeof C=="string"&&C!="ace"){this.$keybindingId=C;var I=this;E.loadModule(["keybinding",C],function(F){I.$keybindingId==C&&I.keyBinding.setKeyboardHandler(F&&F.handler),L&&L()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(C),L&&L()},S.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},S.prototype.setSession=function(C){if(this.session!=C){this.curOp&&this.endOperation(),this.curOp={};var L=this.session;if(L){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var I=this.session.getSelection();I.off("changeCursor",this.$onCursorChange),I.off("changeSelection",this.$onSelectionChange)}this.session=C,C?(this.$onDocumentChange=this.onDocumentChange.bind(this),C.on("change",this.$onDocumentChange),this.renderer.setSession(C),this.$onChangeMode=this.onChangeMode.bind(this),C.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),C.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),C.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),C.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),C.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),C.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=C.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(C)),this._signal("changeSession",{session:C,oldSession:L}),this.curOp=null,L&&L._signal("changeEditor",{oldEditor:this}),L&&(L.$editor=null),C&&C._signal("changeEditor",{editor:this}),C&&(C.$editor=this),C&&!C.destroyed&&C.bgTokenizer.scheduleStart()}},S.prototype.getSession=function(){return this.session},S.prototype.setValue=function(C,L){return this.session.doc.setValue(C),L?L==1?this.navigateFileEnd():L==-1&&this.navigateFileStart():this.selectAll(),C},S.prototype.getValue=function(){return this.session.getValue()},S.prototype.getSelection=function(){return this.selection},S.prototype.resize=function(C){this.renderer.onResize(C)},S.prototype.setTheme=function(C,L){this.renderer.setTheme(C,L)},S.prototype.getTheme=function(){return this.renderer.getTheme()},S.prototype.setStyle=function(C,L){this.renderer.setStyle(C,L)},S.prototype.unsetStyle=function(C){this.renderer.unsetStyle(C)},S.prototype.getFontSize=function(){return this.getOption("fontSize")||d.computedStyle(this.container).fontSize},S.prototype.setFontSize=function(C){this.setOption("fontSize",C)},S.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var C=this;this.$highlightPending=!0,setTimeout(function(){C.$highlightPending=!1;var L=C.session;if(!(!L||L.destroyed)){L.$bracketHighlight&&(L.$bracketHighlight.markerIds.forEach(function(U){L.removeMarker(U)}),L.$bracketHighlight=null);var I=C.getCursorPosition(),F=C.getKeyboardHandler(),R=F&&F.$getDirectionForHighlight&&F.$getDirectionForHighlight(C),B=L.getMatchingBracketRanges(I,R);if(!B){var N=new w(L,I.row,I.column),H=N.getCurrentToken();if(H&&/\b(?:tag-open|tag-name)/.test(H.type)){var W=L.getMatchingTags(I);W&&(B=[W.openTagName.isEmpty()?W.openTag:W.openTagName,W.closeTagName.isEmpty()?W.closeTag:W.closeTagName])}}if(!B&&L.$mode.getMatching&&(B=L.$mode.getMatching(C.session)),!B){C.getHighlightIndentGuides()&&C.renderer.$textLayer.$highlightIndentGuide();return}var j="ace_bracket";Array.isArray(B)?B.length==1&&(j="ace_error_bracket"):B=[B],B.length==2&&(g.comparePoints(B[0].end,B[1].start)==0?B=[g.fromPoints(B[0].start,B[1].end)]:g.comparePoints(B[0].start,B[1].end)==0&&(B=[g.fromPoints(B[1].start,B[0].end)])),L.$bracketHighlight={ranges:B,markerIds:B.map(function(U){return L.addMarker(U,j,"text")})},C.getHighlightIndentGuides()&&C.renderer.$textLayer.$highlightIndentGuide()}},50)}},S.prototype.focus=function(){this.textInput.focus()},S.prototype.isFocused=function(){return this.textInput.isFocused()},S.prototype.blur=function(){this.textInput.blur()},S.prototype.onFocus=function(C){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",C))},S.prototype.onBlur=function(C){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",C))},S.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},S.prototype.onDocumentChange=function(C){var L=this.session.$useWrapMode,I=C.start.row==C.end.row?C.end.row:1/0;this.renderer.updateLines(C.start.row,I,L),this._signal("change",C),this.$cursorChange()},S.prototype.onTokenizerUpdate=function(C){var L=C.data;this.renderer.updateLines(L.first,L.last)},S.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},S.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},S.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},S.prototype.$updateHighlightActiveLine=function(){var C=this.getSession(),L;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(L=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(L=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(L=!1)),C.$highlightLineMarker&&!L)C.removeMarker(C.$highlightLineMarker.id),C.$highlightLineMarker=null;else if(!C.$highlightLineMarker&&L){var I=new g(L.row,L.column,L.row,1/0);I.id=C.addMarker(I,"ace_active-line","screenLine"),C.$highlightLineMarker=I}else L&&(C.$highlightLineMarker.start.row=L.row,C.$highlightLineMarker.end.row=L.row,C.$highlightLineMarker.start.column=L.column,C._signal("changeBackMarker"))},S.prototype.onSelectionChange=function(C){var L=this.session;if(L.$selectionMarker&&L.removeMarker(L.$selectionMarker),L.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var I=this.selection.getRange(),F=this.getSelectionStyle();L.$selectionMarker=L.addMarker(I,"ace_selection",F)}var R=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(R),this._signal("changeSelection")},S.prototype.$getSelectionHighLightRegexp=function(){var C=this.session,L=this.getSelectionRange();if(!(L.isEmpty()||L.isMultiLine())){var I=L.start.column,F=L.end.column,R=C.getLine(L.start.row),B=R.substring(I,F);if(!(B.length>5e3||!/[\w\d]/.test(B))){var N=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:B}),H=R.substring(I-1,F+1);if(N.test(H))return N}}},S.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},S.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},S.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},S.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},S.prototype.onChangeMode=function(C){this.renderer.updateText(),this._emit("changeMode",C)},S.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},S.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},S.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},S.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},S.prototype.getCopyText=function(){var C=this.getSelectedText(),L=this.session.doc.getNewLineCharacter(),I=!1;if(!C&&this.$copyWithEmptySelection){I=!0;for(var F=this.selection.getAllRanges(),R=0;R0||l+r=0&&this.$isCustomWidgetVisible(l-r))return l-r;if(l+r<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(l+r))return l+r;if(l-r>=0&&this.$isFoldWidgetVisible(l-r))return l-r;if(l+r<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(l+r))return l+r}return null},o.prototype.$findNearestAnnotation=function(l){if(this.$isAnnotationVisible(l))return l;for(var r=0;l-r>0||l+r=0&&this.$isAnnotationVisible(l-r))return l-r;if(l+r<=this.lines.getLength()-1&&this.$isAnnotationVisible(l+r))return l+r}return null},o.prototype.$focusFoldWidget=function(l){if(l!=null){var r=this.$getFoldWidget(l);r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus()}},o.prototype.$focusCustomWidget=function(l){if(l!=null){var r=this.$getCustomWidget(l);r&&(r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus())}},o.prototype.$focusAnnotation=function(l){if(l!=null){var r=this.$getAnnotation(l);r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus()}},o.prototype.$blurFoldWidget=function(l){var r=this.$getFoldWidget(l);r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.blur()},o.prototype.$blurCustomWidget=function(l){var r=this.$getCustomWidget(l);r&&(r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.blur())},o.prototype.$blurAnnotation=function(l){var r=this.$getAnnotation(l);r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.blur()},o.prototype.$moveFoldWidgetUp=function(){for(var l=this.activeRowIndex;l>0;)if(l--,this.$isFoldWidgetVisible(l)||this.$isCustomWidgetVisible(l)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=l,this.$isFoldWidgetVisible(l)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},o.prototype.$moveFoldWidgetDown=function(){for(var l=this.activeRowIndex;l0;)if(l--,this.$isAnnotationVisible(l)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=l,this.$focusAnnotation(this.activeRowIndex);return}},o.prototype.$moveAnnotationDown=function(){for(var l=this.activeRowIndex;l=S.length&&(S=void 0),{value:S&&S[I++],done:!S}}};throw new TypeError(C?"Object is not iterable.":"Symbol.iterator is not defined.")},s=t("./lib/oop"),d=t("./lib/dom"),o=t("./lib/lang"),l=t("./lib/useragent"),r=t("./keyboard/textinput").TextInput,a=t("./mouse/mouse_handler").MouseHandler,c=t("./mouse/fold_handler").FoldHandler,p=t("./keyboard/keybinding").KeyBinding,u=t("./edit_session").EditSession,f=t("./search").Search,g=t("./range").Range,v=t("./lib/event_emitter").EventEmitter,b=t("./commands/command_manager").CommandManager,D=t("./commands/default_commands").commands,E=t("./config"),w=t("./token_iterator").TokenIterator,y=t("./keyboard/gutter_handler").GutterKeyboardHandler,A=t("./config").nls,T=t("./clipboard"),x=t("./lib/keys"),M=t("./lib/event"),O=t("./tooltip").HoverTooltip,_=(function(){function S(C,L,I){this.id="editor"+ ++S.$uid,this.session,this.$toDestroy=[];var F=C.getContainerElement();this.container=F,this.renderer=C,this.commands=new b(l.isMac?"mac":"win",D),typeof document=="object"&&(this.textInput=new r(C.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new a(this),new c(this)),this.keyBinding=new p(this),this.$search=new f().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=o.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(R,B){B._$emitInputEvent.schedule(31)}),this.setSession(L||I&&I.session||new u("")),E.resetOptions(this),I&&this.setOptions(I),E._signal("editor",this)}return S.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},S.prototype.startOperation=function(C){this.session.startOperation(C)},S.prototype.endOperation=function(C){this.session.endOperation(C)},S.prototype.onStartOperation=function(C){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,C||(this.previousCommand=null)},S.prototype.onEndOperation=function(C){if(this.curOp&&this.session){if(C&&C.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var L=this.curOp.command,I=L&&L.scrollIntoView;if(I){switch(I){case"center-animate":I="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var F=this.selection.getRange(),R=this.renderer.layerConfig;(F.start.row>=R.lastRow||F.end.row<=R.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}I=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},S.prototype.$historyTracker=function(C){if(this.$mergeUndoDeltas){var L=this.prevOp,I=this.$mergeableCommands,F=L.command&&C.command.name==L.command.name;if(C.command.name=="insertstring"){var R=C.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),F=F&&this.mergeNextCommand&&(!/\s/.test(R)||/\s/.test(L.args)),this.mergeNextCommand=!0}else F=F&&I.indexOf(C.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(F=!1),F?this.session.mergeUndoDeltas=!0:I.indexOf(C.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},S.prototype.setKeyboardHandler=function(C,L){if(C&&typeof C=="string"&&C!="ace"){this.$keybindingId=C;var I=this;E.loadModule(["keybinding",C],function(F){I.$keybindingId==C&&I.keyBinding.setKeyboardHandler(F&&F.handler),L&&L()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(C),L&&L()},S.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},S.prototype.setSession=function(C){if(this.session!=C){this.curOp&&this.endOperation(),this.curOp={};var L=this.session;if(L){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var I=this.session.getSelection();I.off("changeCursor",this.$onCursorChange),I.off("changeSelection",this.$onSelectionChange)}this.session=C,C?(this.$onDocumentChange=this.onDocumentChange.bind(this),C.on("change",this.$onDocumentChange),this.renderer.setSession(C),this.$onChangeMode=this.onChangeMode.bind(this),C.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),C.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),C.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),C.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),C.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),C.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=C.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(C)),this._signal("changeSession",{session:C,oldSession:L}),this.curOp=null,L&&L._signal("changeEditor",{oldEditor:this}),L&&(L.$editor=null),C&&C._signal("changeEditor",{editor:this}),C&&(C.$editor=this),C&&!C.destroyed&&C.bgTokenizer.scheduleStart()}},S.prototype.getSession=function(){return this.session},S.prototype.setValue=function(C,L){return this.session.doc.setValue(C),L?L==1?this.navigateFileEnd():L==-1&&this.navigateFileStart():this.selectAll(),C},S.prototype.getValue=function(){return this.session.getValue()},S.prototype.getSelection=function(){return this.selection},S.prototype.resize=function(C){this.renderer.onResize(C)},S.prototype.setTheme=function(C,L){this.renderer.setTheme(C,L)},S.prototype.getTheme=function(){return this.renderer.getTheme()},S.prototype.setStyle=function(C,L){this.renderer.setStyle(C,L)},S.prototype.unsetStyle=function(C){this.renderer.unsetStyle(C)},S.prototype.getFontSize=function(){return this.getOption("fontSize")||d.computedStyle(this.container).fontSize},S.prototype.setFontSize=function(C){this.setOption("fontSize",C)},S.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var C=this;this.$highlightPending=!0,setTimeout(function(){C.$highlightPending=!1;var L=C.session;if(!(!L||L.destroyed)){L.$bracketHighlight&&(L.$bracketHighlight.markerIds.forEach(function(U){L.removeMarker(U)}),L.$bracketHighlight=null);var I=C.getCursorPosition(),F=C.getKeyboardHandler(),R=F&&F.$getDirectionForHighlight&&F.$getDirectionForHighlight(C),B=L.getMatchingBracketRanges(I,R);if(!B){var N=new w(L,I.row,I.column),z=N.getCurrentToken();if(z&&/\b(?:tag-open|tag-name)/.test(z.type)){var W=L.getMatchingTags(I);W&&(B=[W.openTagName.isEmpty()?W.openTag:W.openTagName,W.closeTagName.isEmpty()?W.closeTag:W.closeTagName])}}if(!B&&L.$mode.getMatching&&(B=L.$mode.getMatching(C.session)),!B){C.getHighlightIndentGuides()&&C.renderer.$textLayer.$highlightIndentGuide();return}var j="ace_bracket";Array.isArray(B)?B.length==1&&(j="ace_error_bracket"):B=[B],B.length==2&&(g.comparePoints(B[0].end,B[1].start)==0?B=[g.fromPoints(B[0].start,B[1].end)]:g.comparePoints(B[0].start,B[1].end)==0&&(B=[g.fromPoints(B[1].start,B[0].end)])),L.$bracketHighlight={ranges:B,markerIds:B.map(function(U){return L.addMarker(U,j,"text")})},C.getHighlightIndentGuides()&&C.renderer.$textLayer.$highlightIndentGuide()}},50)}},S.prototype.focus=function(){this.textInput.focus()},S.prototype.isFocused=function(){return this.textInput.isFocused()},S.prototype.blur=function(){this.textInput.blur()},S.prototype.onFocus=function(C){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",C))},S.prototype.onBlur=function(C){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",C))},S.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},S.prototype.onDocumentChange=function(C){var L=this.session.$useWrapMode,I=C.start.row==C.end.row?C.end.row:1/0;this.renderer.updateLines(C.start.row,I,L),this._signal("change",C),this.$cursorChange()},S.prototype.onTokenizerUpdate=function(C){var L=C.data;this.renderer.updateLines(L.first,L.last)},S.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},S.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},S.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},S.prototype.$updateHighlightActiveLine=function(){var C=this.getSession(),L;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(L=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(L=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(L=!1)),C.$highlightLineMarker&&!L)C.removeMarker(C.$highlightLineMarker.id),C.$highlightLineMarker=null;else if(!C.$highlightLineMarker&&L){var I=new g(L.row,L.column,L.row,1/0);I.id=C.addMarker(I,"ace_active-line","screenLine"),C.$highlightLineMarker=I}else L&&(C.$highlightLineMarker.start.row=L.row,C.$highlightLineMarker.end.row=L.row,C.$highlightLineMarker.start.column=L.column,C._signal("changeBackMarker"))},S.prototype.onSelectionChange=function(C){var L=this.session;if(L.$selectionMarker&&L.removeMarker(L.$selectionMarker),L.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var I=this.selection.getRange(),F=this.getSelectionStyle();L.$selectionMarker=L.addMarker(I,"ace_selection",F)}var R=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(R),this._signal("changeSelection")},S.prototype.$getSelectionHighLightRegexp=function(){var C=this.session,L=this.getSelectionRange();if(!(L.isEmpty()||L.isMultiLine())){var I=L.start.column,F=L.end.column,R=C.getLine(L.start.row),B=R.substring(I,F);if(!(B.length>5e3||!/[\w\d]/.test(B))){var N=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:B}),z=R.substring(I-1,F+1);if(N.test(z))return N}}},S.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},S.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},S.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},S.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},S.prototype.onChangeMode=function(C){this.renderer.updateText(),this._emit("changeMode",C)},S.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},S.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},S.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},S.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},S.prototype.getCopyText=function(){var C=this.getSelectedText(),L=this.session.doc.getNewLineCharacter(),I=!1;if(!C&&this.$copyWithEmptySelection){I=!0;for(var F=this.selection.getAllRanges(),R=0;RU.search(/\S|$/)){var H=U.substr(R.column).search(/\S|$/);I.doc.removeInLine(R.row,R.column,R.column+H)}}this.clearSelection();var W=R.column,j=I.getState(R.row),U=I.getLine(R.row),K=F.checkOutdent(j,U,C);if(I.insert(R,C),B&&B.selection&&(B.selection.length==2?this.selection.setSelectionRange(new g(R.row,W+B.selection[0],R.row,W+B.selection[1])):this.selection.setSelectionRange(new g(R.row+B.selection[0],B.selection[1],R.row+B.selection[2],B.selection[3]))),this.$enableAutoIndent){if(I.getDocument().isNewLine(C)){var J=F.getNextLineIndent(j,U.slice(0,R.column),I.getTabString());I.insert({row:R.row+1,column:0},J)}K&&F.autoOutdent(j,I,R.row)}},S.prototype.autoIndent=function(){for(var C=this.session,L=C.getMode(),I=this.selection.isEmpty()?[new g(0,0,C.doc.getLength()-1,0)]:this.selection.getAllRanges(),F="",R="",B="",N=C.getTabString(),H=0;H0&&(F=C.getState(U-1),R=C.getLine(U-1),B=L.getNextLineIndent(F,R,N));var K=C.getLine(U),J=L.$getIndent(K);if(B!==J){if(J.length>0){var Y=new g(U,0,U,J.length);C.remove(Y)}B.length>0&&C.insert({row:U,column:0},B)}L.autoOutdent(F,C,U)}},S.prototype.onTextInput=function(C,L){if(!L)return this.keyBinding.onTextInput(C);this.startOperation({command:{name:"insertstring"}});var I=this.applyComposition.bind(this,C,L);this.selection.rangeCount?this.forEachSelection(I):I(),this.endOperation()},S.prototype.applyComposition=function(C,L){if(L.extendLeft||L.extendRight){var I=this.selection.getRange();I.start.column-=L.extendLeft,I.end.column+=L.extendRight,I.start.column<0&&(I.start.row--,I.start.column+=this.session.getLine(I.start.row).length+1),this.selection.setRange(I),!C&&!I.isEmpty()&&this.remove()}if((C||!this.selection.isEmpty())&&this.insert(C,!0),L.restoreStart||L.restoreEnd){var I=this.selection.getRange();I.start.column-=L.restoreStart,I.end.column-=L.restoreEnd,this.selection.setRange(I)}},S.prototype.onCommandKey=function(C,L,I){return this.keyBinding.onCommandKey(C,L,I)},S.prototype.setOverwrite=function(C){this.session.setOverwrite(C)},S.prototype.getOverwrite=function(){return this.session.getOverwrite()},S.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},S.prototype.setScrollSpeed=function(C){this.setOption("scrollSpeed",C)},S.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},S.prototype.setDragDelay=function(C){this.setOption("dragDelay",C)},S.prototype.getDragDelay=function(){return this.getOption("dragDelay")},S.prototype.setSelectionStyle=function(C){this.setOption("selectionStyle",C)},S.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},S.prototype.setHighlightActiveLine=function(C){this.setOption("highlightActiveLine",C)},S.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},S.prototype.setHighlightGutterLine=function(C){this.setOption("highlightGutterLine",C)},S.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},S.prototype.setHighlightSelectedWord=function(C){this.setOption("highlightSelectedWord",C)},S.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},S.prototype.setAnimatedScroll=function(C){this.renderer.setAnimatedScroll(C)},S.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},S.prototype.setShowInvisibles=function(C){this.renderer.setShowInvisibles(C)},S.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},S.prototype.setDisplayIndentGuides=function(C){this.renderer.setDisplayIndentGuides(C)},S.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},S.prototype.setHighlightIndentGuides=function(C){this.renderer.setHighlightIndentGuides(C)},S.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},S.prototype.setShowPrintMargin=function(C){this.renderer.setShowPrintMargin(C)},S.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},S.prototype.setPrintMarginColumn=function(C){this.renderer.setPrintMarginColumn(C)},S.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},S.prototype.setReadOnly=function(C){this.setOption("readOnly",C)},S.prototype.getReadOnly=function(){return this.getOption("readOnly")},S.prototype.setBehavioursEnabled=function(C){this.setOption("behavioursEnabled",C)},S.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},S.prototype.setWrapBehavioursEnabled=function(C){this.setOption("wrapBehavioursEnabled",C)},S.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},S.prototype.setShowFoldWidgets=function(C){this.setOption("showFoldWidgets",C)},S.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},S.prototype.setFadeFoldWidgets=function(C){this.setOption("fadeFoldWidgets",C)},S.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},S.prototype.remove=function(C){this.selection.isEmpty()&&(C=="left"?this.selection.selectLeft():this.selection.selectRight());var L=this.getSelectionRange();if(this.getBehavioursEnabled()){var I=this.session,F=I.getState(L.start.row),R=I.getMode().transformAction(F,"deletion",this,I,L);if(L.end.column===0){var B=I.getTextRange(L);if(B[B.length-1]==` +`){var U=I.getLine(R.row);if(R.column>U.search(/\S|$/)){var z=U.substr(R.column).search(/\S|$/);I.doc.removeInLine(R.row,R.column,R.column+z)}}this.clearSelection();var W=R.column,j=I.getState(R.row),U=I.getLine(R.row),K=F.checkOutdent(j,U,C);if(I.insert(R,C),B&&B.selection&&(B.selection.length==2?this.selection.setSelectionRange(new g(R.row,W+B.selection[0],R.row,W+B.selection[1])):this.selection.setSelectionRange(new g(R.row+B.selection[0],B.selection[1],R.row+B.selection[2],B.selection[3]))),this.$enableAutoIndent){if(I.getDocument().isNewLine(C)){var J=F.getNextLineIndent(j,U.slice(0,R.column),I.getTabString());I.insert({row:R.row+1,column:0},J)}K&&F.autoOutdent(j,I,R.row)}},S.prototype.autoIndent=function(){for(var C=this.session,L=C.getMode(),I=this.selection.isEmpty()?[new g(0,0,C.doc.getLength()-1,0)]:this.selection.getAllRanges(),F="",R="",B="",N=C.getTabString(),z=0;z0&&(F=C.getState(U-1),R=C.getLine(U-1),B=L.getNextLineIndent(F,R,N));var K=C.getLine(U),J=L.$getIndent(K);if(B!==J){if(J.length>0){var Y=new g(U,0,U,J.length);C.remove(Y)}B.length>0&&C.insert({row:U,column:0},B)}L.autoOutdent(F,C,U)}},S.prototype.onTextInput=function(C,L){if(!L)return this.keyBinding.onTextInput(C);this.startOperation({command:{name:"insertstring"}});var I=this.applyComposition.bind(this,C,L);this.selection.rangeCount?this.forEachSelection(I):I(),this.endOperation()},S.prototype.applyComposition=function(C,L){if(L.extendLeft||L.extendRight){var I=this.selection.getRange();I.start.column-=L.extendLeft,I.end.column+=L.extendRight,I.start.column<0&&(I.start.row--,I.start.column+=this.session.getLine(I.start.row).length+1),this.selection.setRange(I),!C&&!I.isEmpty()&&this.remove()}if((C||!this.selection.isEmpty())&&this.insert(C,!0),L.restoreStart||L.restoreEnd){var I=this.selection.getRange();I.start.column-=L.restoreStart,I.end.column-=L.restoreEnd,this.selection.setRange(I)}},S.prototype.onCommandKey=function(C,L,I){return this.keyBinding.onCommandKey(C,L,I)},S.prototype.setOverwrite=function(C){this.session.setOverwrite(C)},S.prototype.getOverwrite=function(){return this.session.getOverwrite()},S.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},S.prototype.setScrollSpeed=function(C){this.setOption("scrollSpeed",C)},S.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},S.prototype.setDragDelay=function(C){this.setOption("dragDelay",C)},S.prototype.getDragDelay=function(){return this.getOption("dragDelay")},S.prototype.setSelectionStyle=function(C){this.setOption("selectionStyle",C)},S.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},S.prototype.setHighlightActiveLine=function(C){this.setOption("highlightActiveLine",C)},S.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},S.prototype.setHighlightGutterLine=function(C){this.setOption("highlightGutterLine",C)},S.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},S.prototype.setHighlightSelectedWord=function(C){this.setOption("highlightSelectedWord",C)},S.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},S.prototype.setAnimatedScroll=function(C){this.renderer.setAnimatedScroll(C)},S.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},S.prototype.setShowInvisibles=function(C){this.renderer.setShowInvisibles(C)},S.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},S.prototype.setDisplayIndentGuides=function(C){this.renderer.setDisplayIndentGuides(C)},S.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},S.prototype.setHighlightIndentGuides=function(C){this.renderer.setHighlightIndentGuides(C)},S.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},S.prototype.setShowPrintMargin=function(C){this.renderer.setShowPrintMargin(C)},S.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},S.prototype.setPrintMarginColumn=function(C){this.renderer.setPrintMarginColumn(C)},S.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},S.prototype.setReadOnly=function(C){this.setOption("readOnly",C)},S.prototype.getReadOnly=function(){return this.getOption("readOnly")},S.prototype.setBehavioursEnabled=function(C){this.setOption("behavioursEnabled",C)},S.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},S.prototype.setWrapBehavioursEnabled=function(C){this.setOption("wrapBehavioursEnabled",C)},S.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},S.prototype.setShowFoldWidgets=function(C){this.setOption("showFoldWidgets",C)},S.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},S.prototype.setFadeFoldWidgets=function(C){this.setOption("fadeFoldWidgets",C)},S.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},S.prototype.remove=function(C){this.selection.isEmpty()&&(C=="left"?this.selection.selectLeft():this.selection.selectRight());var L=this.getSelectionRange();if(this.getBehavioursEnabled()){var I=this.session,F=I.getState(L.start.row),R=I.getMode().transformAction(F,"deletion",this,I,L);if(L.end.column===0){var B=I.getTextRange(L);if(B[B.length-1]==` `){var N=I.getLine(L.end.row);/^\s+$/.test(N)&&(L.end.column=N.length)}}R&&(L=R)}this.session.remove(L),this.clearSelection()},S.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},S.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},S.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},S.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var C=this.getSelectionRange();C.start.column==C.end.column&&C.start.row==C.end.row&&(C.end.column=0,C.end.row++),this.session.remove(C),this.clearSelection()},S.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var C=this.getCursorPosition();this.insert(` -`),this.moveCursorToPosition(C)},S.prototype.setGhostText=function(C,L){this.renderer.setGhostText(C,L)},S.prototype.removeGhostText=function(){this.renderer.removeGhostText()},S.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var C=this.getCursorPosition(),L=C.column;if(L!==0){var I=this.session.getLine(C.row),F,R;LH.toLowerCase()?1:0});for(var R=new g(0,0,0,0),F=C.first;F<=C.last;F++){var B=L.getLine(F);R.start.row=F,R.end.row=F,R.end.column=B.length,L.replace(R,I[F-C.first])}},S.prototype.toggleCommentLines=function(){var C=this.session.getState(this.getCursorPosition().row),L=this.$getSelectedRows();this.session.getMode().toggleCommentLines(C,this.session,L.first,L.last)},S.prototype.toggleBlockComment=function(){var C=this.getCursorPosition(),L=this.session.getState(C.row),I=this.getSelectionRange();this.session.getMode().toggleBlockComment(L,this.session,I,C)},S.prototype.getNumberAt=function(C,L){var I=/[\-]?[0-9]+(?:\.[0-9]+)?/g;I.lastIndex=0;for(var F=this.session.getLine(C);I.lastIndex=L){var B={value:R[0],start:R.index,end:R.index+R[0].length};return B}}return null},S.prototype.modifyNumber=function(C){var L=this.selection.getCursor().row,I=this.selection.getCursor().column,F=new g(L,I-1,L,I),R=this.session.getTextRange(F);if(!isNaN(parseFloat(R))&&isFinite(R)){var B=this.getNumberAt(L,I);if(B){var N=B.value.indexOf(".")>=0?B.start+B.value.indexOf(".")+1:B.end,H=B.start+B.value.length-N,W=parseFloat(B.value);W*=Math.pow(10,H),N!==B.end&&I=N&&B<=H&&(I=ue,W.selection.clearSelection(),W.moveCursorTo(C,N+F),W.selection.selectTo(C,H+F)),N=H});for(var j=this.$toggleWordPairs,U,K=0;K=H&&N<=W&&J.match(/((?:https?|ftp):\/\/[\S]+)/)){j=J.replace(/[\s:.,'";}\]]+$/,"");break}H=W}}catch(Y){I={error:Y}}finally{try{K&&!K.done&&(F=U.return)&&F.call(U)}finally{if(I)throw I.error}}return j},S.prototype.openLink=function(){var C=this.selection.getCursor(),L=this.findLinkAt(C.row,C.column);return L&&window.open(L,"_blank"),L!=null},S.prototype.removeLines=function(){var C=this.$getSelectedRows();this.session.removeFullLines(C.first,C.last),this.clearSelection()},S.prototype.duplicateSelection=function(){var C=this.selection,L=this.session,I=C.getRange(),F=C.isBackwards();if(I.isEmpty()){var R=I.start.row;L.duplicateLines(R,R)}else{var B=F?I.start:I.end,N=L.insert(B,L.getTextRange(I));I.start=B,I.end=N,C.setSelectionRange(I,F)}},S.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},S.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},S.prototype.moveText=function(C,L,I){return this.session.moveText(C,L,I)},S.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},S.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},S.prototype.$moveLines=function(C,L){var I,F,R=this.selection;if(!R.inMultiSelectMode||this.inVirtualSelectionMode){var B=R.toOrientedRange();I=this.$getSelectedRows(B),F=this.session.$moveLines(I.first,I.last,L?0:C),L&&C==-1&&(F=0),B.moveBy(F,0),R.fromOrientedRange(B)}else{var N=R.rangeList.ranges;R.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var H=0,W=0,j=N.length,U=0;UY+1)break;Y=X.last}for(U--,H=this.session.$moveLines(J,Y,L?0:C),L&&C==-1&&(K=U+1);K<=U;)N[K].moveBy(H,0),K++;L||(H=0),W+=H}R.fromOrientedRange(R.ranges[0]),R.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},S.prototype.$getSelectedRows=function(C){return C=(C||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(C.start.row),last:this.session.getRowFoldEnd(C.end.row)}},S.prototype.onCompositionStart=function(C){this.renderer.showComposition(C)},S.prototype.onCompositionUpdate=function(C){this.renderer.setCompositionText(C)},S.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},S.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},S.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},S.prototype.isRowVisible=function(C){return C>=this.getFirstVisibleRow()&&C<=this.getLastVisibleRow()},S.prototype.isRowFullyVisible=function(C){return C>=this.renderer.getFirstFullyVisibleRow()&&C<=this.renderer.getLastFullyVisibleRow()},S.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},S.prototype.$moveByPage=function(C,L){var I=this.renderer,F=this.renderer.layerConfig,R=C*Math.floor(F.height/F.lineHeight);L===!0?this.selection.$moveSelection(function(){this.moveCursorBy(R,0)}):L===!1&&(this.selection.moveCursorBy(R,0),this.selection.clearSelection());var B=I.scrollTop;I.scrollBy(0,R*F.lineHeight),L!=null&&I.scrollCursorIntoView(null,.5),I.animateScrolling(B)},S.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},S.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},S.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},S.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},S.prototype.scrollPageDown=function(){this.$moveByPage(1)},S.prototype.scrollPageUp=function(){this.$moveByPage(-1)},S.prototype.scrollToRow=function(C){this.renderer.scrollToRow(C)},S.prototype.scrollToLine=function(C,L,I,F){this.renderer.scrollToLine(C,L,I,F)},S.prototype.centerSelection=function(){var C=this.getSelectionRange(),L={row:Math.floor(C.start.row+(C.end.row-C.start.row)/2),column:Math.floor(C.start.column+(C.end.column-C.start.column)/2)};this.renderer.alignCursor(L,.5)},S.prototype.getCursorPosition=function(){return this.selection.getCursor()},S.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},S.prototype.getSelectionRange=function(){return this.selection.getRange()},S.prototype.selectAll=function(){this.selection.selectAll()},S.prototype.clearSelection=function(){this.selection.clearSelection()},S.prototype.moveCursorTo=function(C,L){this.selection.moveCursorTo(C,L)},S.prototype.moveCursorToPosition=function(C){this.selection.moveCursorToPosition(C)},S.prototype.jumpToMatching=function(C,L){var I=this.getCursorPosition(),F=new w(this.session,I.row,I.column),R=F.getCurrentToken(),B=0;R&&R.type.indexOf("tag-name")!==-1&&(R=F.stepBackward());var N=R||F.stepForward();if(N){var H,W=!1,j={},U=I.column-N.start,K,J={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(N.value.match(/[{}()\[\]]/g)){for(;U1?j[N.value]++:R.value==="=0;--B)this.$tryReplace(I[B],C)&&F++;return this.selection.setSelectionRange(R),F},S.prototype.$tryReplace=function(C,L){var I=this.session.getTextRange(C);return L=this.$search.replace(I,L),L!==null?(C.end=this.session.replace(C,L),C):null},S.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},S.prototype.find=function(C,L,I){L||(L={}),typeof C=="string"||C instanceof RegExp?L.needle=C:typeof C=="object"&&s.mixin(L,C);var F=this.selection.getRange();L.needle==null&&(C=this.session.getTextRange(F)||this.$search.$options.needle,C||(F=this.session.getWordRange(F.start.row,F.start.column),C=this.session.getTextRange(F)),this.$search.set({needle:C})),this.$search.set(L),L.start||this.$search.set({start:F});var R=this.$search.find(this.session);if(L.preventScroll)return R;if(R)return this.revealRange(R,I),R;L.backwards?F.start=F.end:F.end=F.start,this.selection.setRange(F)},S.prototype.findNext=function(C,L){this.find({skipCurrent:!0,backwards:!1},C,L)},S.prototype.findPrevious=function(C,L){this.find(C,{skipCurrent:!0,backwards:!0},L)},S.prototype.revealRange=function(C,L){this.session.unfold(C),this.selection.setSelectionRange(C);var I=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(C.start,C.end,.5),L!==!1&&this.renderer.animateScrolling(I)},S.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},S.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},S.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(C){C.destroy()}),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},S.prototype.setAutoScrollEditorIntoView=function(C){if(C){var L,I=this,F=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var R=this.$scrollAnchor;R.style.cssText="position:absolute",this.container.insertBefore(R,this.container.firstChild);var B=this.on("changeSelection",function(){F=!0}),N=this.renderer.on("beforeRender",function(){F&&(L=I.renderer.container.getBoundingClientRect())}),H=this.renderer.on("afterRender",function(){if(F&&L&&(I.isFocused()||I.searchBox&&I.searchBox.isFocused())){var W=I.renderer,j=W.$cursorLayer.$pixelPos,U=W.layerConfig,K=j.top-U.offset;j.top>=0&&K+L.top<0?F=!0:j.topwindow.innerHeight?F=!1:F=null,F!=null&&(R.style.top=K+"px",R.style.left=j.left+"px",R.style.height=U.lineHeight+"px",R.scrollIntoView(F)),F=L=null}});this.setAutoScrollEditorIntoView=function(W){W||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",B),this.renderer.off("afterRender",H),this.renderer.off("beforeRender",N))}}},S.prototype.$resetCursorStyle=function(){var C=this.$cursorStyle||"ace",L=this.renderer.$cursorLayer;L&&(L.setSmoothBlinking(/smooth/.test(C)),L.isBlinking=!this.$readOnly&&C!="wide",d.setCssClass(L.element,"ace_slim-cursors",/slim/.test(C)))},S.prototype.prompt=function(C,L,I){var F=this;E.loadModule("ace/ext/prompt",function(R){R.prompt(F,C,L,I)})},S})();_.$uid=0,_.prototype.curOp=null,_.prototype.prevOp={},_.prototype.$mergeableCommands=["backspace","del","insertstring"],_.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],s.implement(_.prototype,v),E.defineOptions(_.prototype,"editor",{selectionStyle:{set:function(S){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:S})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(S){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(S){var C=this;if(this.textInput.setReadOnly(S),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(I){var F=!1;if(I&&I.type=="keydown"){if(I&&I.key&&!I.ctrlKey&&!I.metaKey&&(I.key==" "&&I.preventDefault(),F=I.key.length==1),!F)return}else I&&I.type!=="exec"&&(F=!0);if(F){C.hoverTooltip||(C.hoverTooltip=new O);var R=d.createElement("div");R.textContent=A("editor.tooltip.disable-editing","Editing is disabled"),C.hoverTooltip.isOpen||C.hoverTooltip.showForRange(C,C.getSelectionRange(),R)}else C.hoverTooltip&&C.hoverTooltip.isOpen&&C.hoverTooltip.hide()});var L=this.textInput.getElement();S?(M.addListener(L,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(M.removeListener(L,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback),this.hoverTooltip&&(this.hoverTooltip.destroy(),this.hoverTooltip=null))}},initialValue:!1},copyWithEmptySelection:{set:function(S){this.textInput.setCopyWithEmptySelection(S)},initialValue:!1},cursorStyle:{set:function(S){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(S){this.setAutoScrollEditorIntoView(S)}},keyboardHandler:{set:function(S){this.setKeyboardHandler(S)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(S){this.session.setValue(S)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(S){this.setSession(S)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(S){this.renderer.$gutterLayer.setShowLineNumbers(S),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),S&&this.$relativeLineNumbers?k.attach(this):k.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(S){this.$showLineNumbers&&S?k.attach(this):k.detach(this)}},placeholder:{set:function(S){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var C=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(C&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),d.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!C&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),d.addCssClass(this.container,"ace_hasPlaceholder");var L=d.createElement("div");L.className="ace_placeholder",L.textContent=this.$placeholder||"",this.renderer.placeholderNode=L,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!C&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(S){var C={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(F){F.blur(),F.renderer.scroller.focus()},readOnly:!0},L=function(F){if(F.target==this.renderer.scroller&&F.keyCode===$.enter){F.preventDefault();var R=this.getCursorPosition().row;this.isRowVisible(R)||this.scrollToLine(R,!0,!0),this.focus()}},I;S?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(l.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",A("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",A("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",L.bind(this)),this.commands.addCommand(C),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",A("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",A("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),I||(I=new y(this)),I.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",L.bind(this)),this.commands.removeCommand(C),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),I&&I.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(S){this.$textInputAriaLabel=S},initialValue:""},enableMobileMenu:{set:function(S){this.$enableMobileMenu=S},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var k={getText:function(S,C){return(Math.abs(S.selection.lead.row-C)||C+1+(C<9?"·":""))+""},getWidth:function(S,C,L){return Math.max(C.toString().length,(L.lastRow+1).toString().length,2)*L.characterWidth},update:function(S,C){C.renderer.$loop.schedule(C.renderer.CHANGE_GUTTER)},attach:function(S){S.renderer.$gutterLayer.$renderer=this,S.on("changeSelection",this.update),this.update(null,S)},detach:function(S){S.renderer.$gutterLayer.$renderer==this&&(S.renderer.$gutterLayer.$renderer=null),S.off("changeSelection",this.update),this.update(null,S)}};n.Editor=_}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(t,n,u){var i=t("../lib/dom"),s=(function(){function d(o,l){this.element=o,this.canvasHeight=l||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return d.prototype.moveContainer=function(o){i.translate(this.element,0,-(o.firstRowScreen*o.lineHeight%this.canvasHeight)-o.offset*this.$offsetCoefficient)},d.prototype.pageChanged=function(o,l){return Math.floor(o.firstRowScreen*o.lineHeight/this.canvasHeight)!==Math.floor(l.firstRowScreen*l.lineHeight/this.canvasHeight)},d.prototype.computeLineTop=function(o,l,r){var a=l.firstRowScreen*l.lineHeight,c=Math.floor(a/this.canvasHeight),p=r.documentToScreenRow(o,0)*l.lineHeight;return p-c*this.canvasHeight},d.prototype.computeLineHeight=function(o,l,r){return l.lineHeight*r.getRowLineCount(o)},d.prototype.getLength=function(){return this.cells.length},d.prototype.get=function(o){return this.cells[o]},d.prototype.shift=function(){this.$cacheCell(this.cells.shift())},d.prototype.pop=function(){this.$cacheCell(this.cells.pop())},d.prototype.push=function(o){if(Array.isArray(o)){this.cells.push.apply(this.cells,o);for(var l=i.createFragment(this.element),r=0;rD&&(y=b.end.row+1,b=f.getNextFoldLine(y,b),D=b?b.start.row:1/0),y>v){for(;this.$lines.getLength()>w+1;)this.$lines.pop();break}E=this.$lines.get(++w),E?E.row=y:(E=this.$lines.createCell(y,h,this.session,c),this.$lines.push(E)),this.$renderCell(E,h,b,y),y++}this._signal("afterRender"),this.$updateGutterWidth(h),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},p.prototype.$updateGutterWidth=function(h){var f=this.session,g=f.gutterRenderer||this.$renderer,v=f.$firstLineNumber,b=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||f.$useWrapMode)&&(b=f.getLength()+v-1);var D=g?g.getWidth(f,b,h):b.toString().length*h.characterWidth,E=this.$padding||this.$computePadding();D+=E.left+E.right,D!==this.gutterWidth&&!isNaN(D)&&(this.gutterWidth=D,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",D))},p.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var h=this.session.selection.getCursor();this.$cursorRow!==h.row&&(this.$cursorRow=h.row)}},p.prototype.updateLineHighlight=function(){if(this.$showCursorMarker&&this.$updateCursorMarker(),!!this.$highlightGutterLine){var h=this.session.selection.cursor.row;if(this.$cursorRow=h,!(this.$cursorCell&&this.$cursorCell.row==h)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var f=this.$lines.cells;this.$cursorCell=null;for(var g=0;g=this.$cursorRow){if(v.row>this.$cursorRow){var b=this.session.getFoldLine(this.$cursorRow);if(g>0&&b&&b.start.row==f[g-1].row)v=f[g-1];else break}v.element.className="ace_gutter-active-line "+v.element.className,this.$cursorCell=v;break}}}}},p.prototype.$updateCursorMarker=function(){if(this.session){var h=this.session;this.$highlightElement||(this.$highlightElement=i.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var f=h.selection.cursor,g=this.config,v=this.$lines,b=g.firstRowScreen*g.lineHeight,D=Math.floor(b/v.canvasHeight),E=h.documentToScreenRow(f)*g.lineHeight,w=E-D*v.canvasHeight;i.setStyle(this.$highlightElement.style,"height",g.lineHeight+"px"),i.setStyle(this.$highlightElement.style,"top",w+"px")}},p.prototype.scrollLines=function(h){var f=this.config;if(this.config=h,this.$updateCursorRow(),this.$lines.pageChanged(f,h))return this.update(h);this.$lines.moveContainer(h);var g=Math.min(h.lastRow+h.gutterOffset,this.session.getLength()-1),v=this.oldLastRow;if(this.oldLastRow=g,!f||v0;b--)this.$lines.shift();if(v>g)for(var b=this.session.getFoldedRowCount(g+1,v);b>0;b--)this.$lines.pop();h.firstRowv&&this.$lines.push(this.$renderLines(h,v+1,g)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(h)},p.prototype.$renderLines=function(h,f,g){for(var v=[],b=f,D=this.session.getNextFoldLine(b),E=D?D.start.row:1/0;b>E&&(b=D.end.row+1,D=this.session.getNextFoldLine(b,D),E=D?D.start.row:1/0),!(b>g);){var w=this.$lines.createCell(b,h,this.session,c);this.$renderCell(w,h,D,b),v.push(w),b++}return v},p.prototype.$renderCell=function(h,f,g,v){var b=h.element,D=this.session,E=b.childNodes[0],w=b.childNodes[1],y=b.childNodes[2],A=b.childNodes[3],T=y.firstChild,$=D.$firstLineNumber,M=D.$breakpoints,O=D.$decorations,_=D.gutterRenderer||this.$renderer,k=this.$showFoldWidgets&&D.foldWidgets,S=g?g.start.row:Number.MAX_VALUE,C=f.lineHeight+"px",L=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",I=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",F=(_?_.getText(D,v):v+$).toString();if(this.$highlightGutterLine&&(v==this.$cursorRow||g&&v=S&&this.$cursorRow<=g.end.row)&&(L+="ace_gutter-active-line ",this.$cursorCell!=h&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=h)),M[v]&&(L+=M[v]),O[v]&&(L+=O[v]),this.$annotations[v]&&v!==S&&(L+=this.$annotations[v].className),k){var R=k[v];R==null&&(R=k[v]=D.getFoldWidget(v))}if(R){var B="ace_fold-widget ace_"+R,N=R=="start"&&v==S&&vf[v].row)){for(;g<=v;){var b=Math.floor((g+v)/2),D=f[b];if(D.row>h)v=b-1;else if(D.rowg.right-f.right)return"foldWidgets"},p})();a.prototype.$fixedWidth=!1,a.prototype.$highlightGutterLine=!0,a.prototype.$renderer=void 0,a.prototype.$showLineNumbers=!0,a.prototype.$showFoldWidgets=!0,s.implement(a.prototype,o);function c(p){var h=document.createTextNode("");p.appendChild(h);var f=i.createElement("span");p.appendChild(f);var g=i.createElement("span");p.appendChild(g);var v=i.createElement("span");return g.appendChild(v),p}n.Gutter=a}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(t,n,u){var i=t("../range").Range,s=t("../lib/dom"),d=(function(){function l(r){this.element=s.createElement("div"),this.element.className="ace_layer ace_marker-layer",r.appendChild(this.element)}return l.prototype.setPadding=function(r){this.$padding=r},l.prototype.setSession=function(r){this.session=r},l.prototype.setMarkers=function(r){this.markers=r},l.prototype.elt=function(r,a){var c=this.i!=-1&&this.element.childNodes[this.i];c?this.i++:(c=document.createElement("div"),this.element.appendChild(c),this.i=-1),c.style.cssText=a,c.className=r},l.prototype.update=function(r){if(r){this.config=r,this.i=0;var a;for(var c in this.markers){var p=this.markers[c];if(!p.range){p.update(a,this,this.session,r);continue}var h=p.range.clipRows(r.firstRow,r.lastRow);if(!h.isEmpty())if(h=h.toScreenRange(this.session),p.renderer){var f=this.$getTop(h.start.row,r),g=this.$padding+h.start.column*r.characterWidth;p.renderer(a,h,g,f,r)}else p.type=="fullLine"?this.drawFullLineMarker(a,h,p.clazz,r):p.type=="screenLine"?this.drawScreenLineMarker(a,h,p.clazz,r):h.isMultiLine()?p.type=="text"?this.drawTextMarker(a,h,p.clazz,r):this.drawMultiLineMarker(a,h,p.clazz,r):this.drawSingleLineMarker(a,h,p.clazz+" ace_start ace_br15",r)}if(this.i!=-1)for(;this.iw,b==v),p,b==v?0:1,h)},l.prototype.drawMultiLineMarker=function(r,a,c,p,h){var f=this.$padding,g=p.lineHeight,v=this.$getTop(a.start.row,p),b=f+a.start.column*p.characterWidth;if(h=h||"",this.session.$bidiHandler.isBidiRow(a.start.row)){var D=a.clone();D.end.row=D.start.row,D.end.column=this.session.getLine(D.start.row).length,this.drawBidiSingleLineMarker(r,D,c+" ace_br1 ace_start",p,null,h)}else this.elt(c+" ace_br1 ace_start","height:"+g+"px;right:"+f+"px;top:"+v+"px;left:"+b+"px;"+(h||""));if(this.session.$bidiHandler.isBidiRow(a.end.row)){var D=a.clone();D.start.row=D.end.row,D.start.column=0,this.drawBidiSingleLineMarker(r,D,c+" ace_br12",p,null,h)}else{v=this.$getTop(a.end.row,p);var E=a.end.column*p.characterWidth;this.elt(c+" ace_br12","height:"+g+"px;width:"+E+"px;top:"+v+"px;left:"+f+"px;"+(h||""))}if(g=(a.end.row-a.start.row-1)*p.lineHeight,!(g<=0)){v=this.$getTop(a.start.row+1,p);var w=(a.start.column?1:0)|(a.end.column?0:8);this.elt(c+(w?" ace_br"+w:""),"height:"+g+"px;right:"+f+"px;top:"+v+"px;left:"+f+"px;"+(h||""))}},l.prototype.drawSingleLineMarker=function(r,a,c,p,h,f){if(this.session.$bidiHandler.isBidiRow(a.start.row))return this.drawBidiSingleLineMarker(r,a,c,p,h,f);var g=p.lineHeight,v=(a.end.column+(h||0)-a.start.column)*p.characterWidth,b=this.$getTop(a.start.row,p),D=this.$padding+a.start.column*p.characterWidth;this.elt(c,"height:"+g+"px;width:"+v+"px;top:"+b+"px;left:"+D+"px;"+(f||""))},l.prototype.drawBidiSingleLineMarker=function(r,a,c,p,h,f){var g=p.lineHeight,v=this.$getTop(a.start.row,p),b=this.$padding,D=this.session.$bidiHandler.getSelections(a.start.column,a.end.column);D.forEach(function(E){this.elt(c,"height:"+g+"px;width:"+(E.width+(h||0))+"px;top:"+v+"px;left:"+(b+E.left)+"px;"+(f||""))},this)},l.prototype.drawFullLineMarker=function(r,a,c,p,h){var f=this.$getTop(a.start.row,p),g=p.lineHeight;a.start.row!=a.end.row&&(g+=this.$getTop(a.end.row,p)-f),this.elt(c,"height:"+g+"px;top:"+f+"px;left:0;right:0;"+(h||""))},l.prototype.drawScreenLineMarker=function(r,a,c,p,h){var f=this.$getTop(a.start.row,p),g=p.lineHeight;this.elt(c,"height:"+g+"px;top:"+f+"px;left:0;right:0;"+(h||""))},l})();d.prototype.$padding=0;function o(l,r,a,c){return(l?1:0)|(r?2:0)|(a?4:0)|(c?8:0)}n.Marker=d}),ace.define("ace/layer/text_util",["require","exports","module"],function(t,n,u){var i=new Set(["text","rparen","lparen"]);n.isTextToken=function(s){return i.has(s)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(t,n,u){var i=t("../lib/oop"),s=t("../lib/dom"),d=t("../lib/lang"),o=t("./lines").Lines,l=t("../lib/event_emitter").EventEmitter,r=t("../config").nls,a=t("./text_util").isTextToken,c=(function(){function p(h){this.dom=s,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",h.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new o(this.element)}return p.prototype.$updateEolChar=function(){var h=this.session.doc,f=h.getNewLineCharacter()==` -`&&h.getNewLineMode()!="windows",g=f?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=g)return this.EOL_CHAR=g,!0},p.prototype.setPadding=function(h){this.$padding=h,this.element.style.margin="0 "+h+"px"},p.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},p.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},p.prototype.$setFontMetrics=function(h){this.$fontMetrics=h,this.$fontMetrics.on("changeCharacterSize",function(f){this._signal("changeCharacterSize",f)}.bind(this)),this.$pollSizeChanges()},p.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},p.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},p.prototype.setSession=function(h){this.session=h,h&&this.$computeTabString()},p.prototype.setShowInvisibles=function(h){return this.showInvisibles==h?!1:(this.showInvisibles=h,typeof h=="string"?(this.showSpaces=/tab/i.test(h),this.showTabs=/space/i.test(h),this.showEOL=/eol/i.test(h)):this.showSpaces=this.showTabs=this.showEOL=h,this.$computeTabString(),!0)},p.prototype.setDisplayIndentGuides=function(h){return this.displayIndentGuides==h?!1:(this.displayIndentGuides=h,this.$computeTabString(),!0)},p.prototype.setHighlightIndentGuides=function(h){return this.$highlightIndentGuides===h?!1:(this.$highlightIndentGuides=h,h)},p.prototype.$computeTabString=function(){var h=this.session.getTabSize();this.tabSize=h;for(var f=this.$tabStrings=[0],g=1;gT&&(y=A.end.row+1,A=this.session.getNextFoldLine(y,A),T=A?A.start.row:1/0),!(y>b);){var $=D[E++];if($){this.dom.removeChildren($),this.$renderLine($,y,y==T?A:!1),w&&($.style.top=this.$lines.computeLineTop(y,h,this.session)+"px");var M=h.lineHeight*this.session.getRowLength(y)+"px";$.style.height!=M&&(w=!0,$.style.height=M)}y++}if(w)for(;E0;b--)this.$lines.shift();if(f.lastRow>h.lastRow)for(var b=this.session.getFoldedRowCount(h.lastRow+1,f.lastRow);b>0;b--)this.$lines.pop();h.firstRowf.lastRow&&this.$lines.push(this.$renderLinesFragment(h,f.lastRow+1,h.lastRow)),this.$highlightIndentGuide()},p.prototype.$renderLinesFragment=function(h,f,g){for(var v=[],b=f,D=this.session.getNextFoldLine(b),E=D?D.start.row:1/0;b>E&&(b=D.end.row+1,D=this.session.getNextFoldLine(b,D),E=D?D.start.row:1/0),!(b>g);){var w=this.$lines.createCell(b,h,this.session),y=w.element;this.dom.removeChildren(y),s.setStyle(y.style,"height",this.$lines.computeLineHeight(b,h,this.session)+"px"),s.setStyle(y.style,"top",this.$lines.computeLineTop(b,h,this.session)+"px"),this.$renderLine(y,b,b==E?D:!1),this.$useLineGroups()?y.className="ace_line_group":y.className="ace_line",v.push(w),b++}return v},p.prototype.update=function(h){this.$lines.moveContainer(h),this.config=h;for(var f=h.firstRow,g=h.lastRow,v=this.$lines;v.getLength();)v.pop();v.push(this.$renderLinesFragment(h,f,g))},p.prototype.$renderToken=function(h,f,g,v){for(var b=this,D=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,E=this.dom.createFragment(this.element),w,y=0;w=D.exec(v);){var A=w[1],T=w[2],$=w[3],M=w[4],O=w[5];if(!(!b.showSpaces&&T)){var _=y!=w.index?v.slice(y,w.index):"";if(y=w.index+w[0].length,_&&E.appendChild(this.dom.createTextNode(_,this.element)),A){var k=b.session.getScreenTabSize(f+w.index),S=b.$tabStrings[k].cloneNode(!0);S.charCount=1,E.appendChild(S),f+=k-1}else if(T)if(b.showSpaces){var C=this.dom.createElement("span");C.className="ace_invisible ace_invisible_space",C.textContent=d.stringRepeat(b.SPACE_CHAR,T.length),E.appendChild(C)}else E.appendChild(this.dom.createTextNode(T,this.element));else if($){var C=this.dom.createElement("span");C.className="ace_invisible ace_invisible_space ace_invalid",C.textContent=d.stringRepeat(b.SPACE_CHAR,$.length),E.appendChild(C)}else if(M){f+=1;var C=this.dom.createElement("span");C.style.width=b.config.characterWidth*2+"px",C.className=b.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",C.textContent=b.showSpaces?b.SPACE_CHAR:M,E.appendChild(C)}else if(O){f+=1;var C=this.dom.createElement("span");C.style.width=b.config.characterWidth*2+"px",C.className="ace_cjk",C.textContent=O,E.appendChild(C)}}}if(E.appendChild(this.dom.createTextNode(y?v.slice(y):v,this.element)),a(g.type))h.appendChild(E);else{var L="ace_"+g.type.replace(/\./g," ace_"),C=this.dom.createElement("span");g.type=="fold"&&(C.style.width=g.value.length*this.config.characterWidth+"px",C.setAttribute("title",r("inline-fold.closed.title","Unfold code"))),C.className=L,C.appendChild(E),h.appendChild(C)}return f+v.length},p.prototype.renderIndentGuide=function(h,f,g){var v=f.search(this.$indentGuideRe);if(v<=0||v>=g)return f;if(f[0]==" "){v-=v%this.tabSize;for(var b=v/this.tabSize,D=0;DD[E].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&h[f.row]!==""&&f.column===h[f.row].length){this.$highlightIndentGuideMarker.dir=1;for(var E=f.row+1;E0)v=h.element.childNodes[0];else return;var b=v.childNodes;if(b){var D=b[f-1];D&&D.classList&&D.classList.contains("ace_indent-guide")&&D.classList.add("ace_indent-guide-active")}}},p.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var h=this.$lines.cells;this.$clearActiveIndentGuide();var f=this.$highlightIndentGuideMarker.indentLevel;if(f!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var g=0;g=this.$highlightIndentGuideMarker.start+1){if(v.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(v,f)}}else for(var g=h.length-1;g>=0;g--){var v=h[g];if(this.$highlightIndentGuideMarker.end&&v.row=D;){E=this.$renderToken(w,E,A,T.substring(0,D-v)),T=T.substring(D-v),v=D,w=this.$createLineElement(),h.appendChild(w);var $=this.dom.createTextNode(d.stringRepeat(" ",g.indent),this.element);$.charCount=0,w.appendChild($),b++,E=0,D=g[b]||Number.MAX_VALUE}T.length!=0&&(v+=T.length,E=this.$renderToken(w,E,A,T))}}g[g.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(w,E,null,"",!0)},p.prototype.$renderSimpleLine=function(h,f){for(var g=0,v=0;vthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(h,g,b,D);g=this.$renderToken(h,g,b,D)}}},p.prototype.$renderOverflowMessage=function(h,f,g,v,b){g&&this.$renderToken(h,f,g,v.slice(0,this.MAX_LINE_LENGTH-f));var D=this.dom.createElement("span");D.className="ace_inline_button ace_keyword ace_toggle_wrap",D.textContent=b?"":"",h.appendChild(D)},p.prototype.$renderLine=function(h,f,g){if(!g&&g!=!1&&(g=this.session.getFoldLine(f)),g)var v=this.$getFoldLineTokens(f,g);else var v=this.session.getTokens(f);var b=h;if(v.length){var D=this.session.getRowSplitData(f);if(D&&D.length){this.$renderWrappedLine(h,v,D);var b=h.lastChild}else{var b=h;this.$useLineGroups()&&(b=this.$createLineElement(),h.appendChild(b)),this.$renderSimpleLine(b,v)}}else this.$useLineGroups()&&(b=this.$createLineElement(),h.appendChild(b));if(this.showEOL&&b){g&&(f=g.end.row);var E=this.dom.createElement("span");E.className="ace_invisible ace_invisible_eol",E.textContent=f==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,b.appendChild(E)}},p.prototype.$getFoldLineTokens=function(h,f){var g=this.session,v=[];function b(E,w,y){for(var A=0,T=0;T+E[A].value.lengthy-w&&($=$.substring(0,y-w)),v.push({type:E[A].type,value:$}),T=w+$.length,A+=1}for(;Ty?v.push({type:E[A].type,value:$.substring(0,y-T)}):v.push(E[A]),T+=$.length,A+=1}}var D=g.getTokens(h);return f.walk(function(E,w,y,A,T){E!=null?v.push({type:"fold",value:E}):(T&&(D=g.getTokens(w)),D.length&&b(D,A,y))},f.end.row,this.session.getLine(f.end.row).length),v},p.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},p})();c.prototype.EOF_CHAR="¶",c.prototype.EOL_CHAR_LF="¬",c.prototype.EOL_CHAR_CRLF="¤",c.prototype.EOL_CHAR=c.prototype.EOL_CHAR_LF,c.prototype.TAB_CHAR="—",c.prototype.SPACE_CHAR="·",c.prototype.$padding=0,c.prototype.MAX_LINE_LENGTH=1e4,c.prototype.showInvisibles=!1,c.prototype.showSpaces=!1,c.prototype.showTabs=!1,c.prototype.showEOL=!1,c.prototype.displayIndentGuides=!0,c.prototype.$highlightIndentGuides=!0,c.prototype.$tabStrings=[],c.prototype.destroy={},c.prototype.onChangeTabSize=c.prototype.$computeTabString,i.implement(c.prototype,l),n.Text=c}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(t,n,u){var i=t("../lib/dom"),s=(function(){function d(o){this.element=i.createElement("div"),this.element.className="ace_layer ace_cursor-layer",o.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),i.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return d.prototype.$updateOpacity=function(o){for(var l=this.cursors,r=l.length;r--;)i.setStyle(l[r].style,"opacity",o?"":"0")},d.prototype.$startCssAnimation=function(){for(var o=this.cursors,l=o.length;l--;)o[l].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&i.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},d.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,i.removeCssClass(this.element,"ace_animate-blinking")},d.prototype.setPadding=function(o){this.$padding=o},d.prototype.setSession=function(o){this.session=o},d.prototype.setBlinking=function(o){o!=this.isBlinking&&(this.isBlinking=o,this.restartTimer())},d.prototype.setBlinkInterval=function(o){o!=this.blinkInterval&&(this.blinkInterval=o,this.restartTimer())},d.prototype.setSmoothBlinking=function(o){o!=this.smoothBlinking&&(this.smoothBlinking=o,i.setCssClass(this.element,"ace_smooth-blinking",o),this.$updateCursors(!0),this.restartTimer())},d.prototype.addCursor=function(){var o=i.createElement("div");return o.className="ace_cursor",this.element.appendChild(o),this.cursors.push(o),o},d.prototype.removeCursor=function(){if(this.cursors.length>1){var o=this.cursors.pop();return o.parentNode.removeChild(o),o}},d.prototype.hideCursor=function(){this.isVisible=!1,i.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},d.prototype.showCursor=function(){this.isVisible=!0,i.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},d.prototype.restartTimer=function(){var o=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,i.removeCssClass(this.element,"ace_smooth-blinking")),o(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&i.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),i.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var l=function(){this.timeoutId=setTimeout(function(){o(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){o(!0),l()},this.blinkInterval),l()}},d.prototype.getPixelPosition=function(o,l){if(!this.config||!this.session)return{left:0,top:0};o||(o=this.session.selection.getCursor());var r=this.session.documentToScreenPosition(o),a=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,o.row)?this.session.$bidiHandler.getPosLeft(r.column):r.column*this.config.characterWidth),c=(r.row-(l?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:a,top:c}},d.prototype.isCursorInView=function(o,l){return o.top>=0&&o.topo.height+o.offset||p.top<0)&&r>1)){var h=this.cursors[a++]||this.addCursor(),f=h.style;this.drawCursor?this.drawCursor(h,p,o,l[r],this.session):this.isCursorInView(p,o)?(i.setStyle(f,"display","block"),i.translate(h,p.left,p.top),i.setStyle(f,"width",Math.round(o.characterWidth)+"px"),i.setStyle(f,"height",o.lineHeight+"px")):i.setStyle(f,"display","none")}}for(;this.cursors.length>a;)this.removeCursor();var g=this.session.getOverwrite();this.$setOverwrite(g),this.$pixelPos=p,this.restartTimer()},d.prototype.$setOverwrite=function(o){o!=this.overwrite&&(this.overwrite=o,o?i.addCssClass(this.element,"ace_overwrite-cursors"):i.removeCssClass(this.element,"ace_overwrite-cursors"))},d.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},d})();s.prototype.$padding=0,s.prototype.drawCursor=null,n.Cursor=s}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(t,n,u){var i=this&&this.__extends||(function(){var h=function(f,g){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,b){v.__proto__=b}||function(v,b){for(var D in b)Object.prototype.hasOwnProperty.call(b,D)&&(v[D]=b[D])},h(f,g)};return function(f,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");h(f,g);function v(){this.constructor=f}f.prototype=g===null?Object.create(g):(v.prototype=g.prototype,new v)}})(),s=t("./lib/oop"),d=t("./lib/dom"),o=t("./lib/event"),l=t("./lib/event_emitter").EventEmitter,r=32768,a=(function(){function h(f,g){this.element=d.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+g,this.inner=d.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),f.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)}return h.prototype.setVisible=function(f){this.element.style.display=f?"":"none",this.isVisible=f,this.coeff=1},h})();s.implement(a.prototype,l);var c=(function(h){i(f,h);function f(g,v){var b=h.call(this,g,"-v")||this;return b.scrollTop=0,b.scrollHeight=0,v.$scrollbarWidth=b.width=d.scrollbarWidth(g.ownerDocument),b.inner.style.width=b.element.style.width=(b.width||15)+5+"px",b.$minWidth=0,b}return f.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var g=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-g)/(this.coeff-g)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},f.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},f.prototype.setHeight=function(g){this.element.style.height=g+"px"},f.prototype.setScrollHeight=function(g){this.scrollHeight=g,g>r?(this.coeff=r/g,g=r):this.coeff!=1&&(this.coeff=1),this.inner.style.height=g+"px"},f.prototype.setScrollTop=function(g){this.scrollTop!=g&&(this.skipEvent=!0,this.scrollTop=g,this.element.scrollTop=g*this.coeff)},f})(a);c.prototype.setInnerHeight=c.prototype.setScrollHeight;var p=(function(h){i(f,h);function f(g,v){var b=h.call(this,g,"-h")||this;return b.scrollLeft=0,b.height=v.$scrollbarWidth,b.inner.style.height=b.element.style.height=(b.height||15)+5+"px",b}return f.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},f.prototype.getHeight=function(){return this.isVisible?this.height:0},f.prototype.setWidth=function(g){this.element.style.width=g+"px"},f.prototype.setInnerWidth=function(g){this.inner.style.width=g+"px"},f.prototype.setScrollWidth=function(g){this.inner.style.width=g+"px"},f.prototype.setScrollLeft=function(g){this.scrollLeft!=g&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=g)},f})(a);n.ScrollBar=c,n.ScrollBarV=c,n.ScrollBarH=p,n.VScrollBar=c,n.HScrollBar=p}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(t,n,u){var i=this&&this.__extends||(function(){var p=function(h,f){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,v){g.__proto__=v}||function(g,v){for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(g[b]=v[b])},p(h,f)};return function(h,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");p(h,f);function g(){this.constructor=h}h.prototype=f===null?Object.create(f):(g.prototype=f.prototype,new g)}})(),s=t("./lib/oop"),d=t("./lib/dom"),o=t("./lib/event"),l=t("./lib/event_emitter").EventEmitter;d.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{ +`),this.moveCursorToPosition(C)},S.prototype.setGhostText=function(C,L){this.renderer.setGhostText(C,L)},S.prototype.removeGhostText=function(){this.renderer.removeGhostText()},S.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var C=this.getCursorPosition(),L=C.column;if(L!==0){var I=this.session.getLine(C.row),F,R;Lz.toLowerCase()?1:0});for(var R=new g(0,0,0,0),F=C.first;F<=C.last;F++){var B=L.getLine(F);R.start.row=F,R.end.row=F,R.end.column=B.length,L.replace(R,I[F-C.first])}},S.prototype.toggleCommentLines=function(){var C=this.session.getState(this.getCursorPosition().row),L=this.$getSelectedRows();this.session.getMode().toggleCommentLines(C,this.session,L.first,L.last)},S.prototype.toggleBlockComment=function(){var C=this.getCursorPosition(),L=this.session.getState(C.row),I=this.getSelectionRange();this.session.getMode().toggleBlockComment(L,this.session,I,C)},S.prototype.getNumberAt=function(C,L){var I=/[\-]?[0-9]+(?:\.[0-9]+)?/g;I.lastIndex=0;for(var F=this.session.getLine(C);I.lastIndex=L){var B={value:R[0],start:R.index,end:R.index+R[0].length};return B}}return null},S.prototype.modifyNumber=function(C){var L=this.selection.getCursor().row,I=this.selection.getCursor().column,F=new g(L,I-1,L,I),R=this.session.getTextRange(F);if(!isNaN(parseFloat(R))&&isFinite(R)){var B=this.getNumberAt(L,I);if(B){var N=B.value.indexOf(".")>=0?B.start+B.value.indexOf(".")+1:B.end,z=B.start+B.value.length-N,W=parseFloat(B.value);W*=Math.pow(10,z),N!==B.end&&I=N&&B<=z&&(I=ue,W.selection.clearSelection(),W.moveCursorTo(C,N+F),W.selection.selectTo(C,z+F)),N=z});for(var j=this.$toggleWordPairs,U,K=0;K=z&&N<=W&&J.match(/((?:https?|ftp):\/\/[\S]+)/)){j=J.replace(/[\s:.,'";}\]]+$/,"");break}z=W}}catch(Y){I={error:Y}}finally{try{K&&!K.done&&(F=U.return)&&F.call(U)}finally{if(I)throw I.error}}return j},S.prototype.openLink=function(){var C=this.selection.getCursor(),L=this.findLinkAt(C.row,C.column);return L&&window.open(L,"_blank"),L!=null},S.prototype.removeLines=function(){var C=this.$getSelectedRows();this.session.removeFullLines(C.first,C.last),this.clearSelection()},S.prototype.duplicateSelection=function(){var C=this.selection,L=this.session,I=C.getRange(),F=C.isBackwards();if(I.isEmpty()){var R=I.start.row;L.duplicateLines(R,R)}else{var B=F?I.start:I.end,N=L.insert(B,L.getTextRange(I));I.start=B,I.end=N,C.setSelectionRange(I,F)}},S.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},S.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},S.prototype.moveText=function(C,L,I){return this.session.moveText(C,L,I)},S.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},S.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},S.prototype.$moveLines=function(C,L){var I,F,R=this.selection;if(!R.inMultiSelectMode||this.inVirtualSelectionMode){var B=R.toOrientedRange();I=this.$getSelectedRows(B),F=this.session.$moveLines(I.first,I.last,L?0:C),L&&C==-1&&(F=0),B.moveBy(F,0),R.fromOrientedRange(B)}else{var N=R.rangeList.ranges;R.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var z=0,W=0,j=N.length,U=0;UY+1)break;Y=X.last}for(U--,z=this.session.$moveLines(J,Y,L?0:C),L&&C==-1&&(K=U+1);K<=U;)N[K].moveBy(z,0),K++;L||(z=0),W+=z}R.fromOrientedRange(R.ranges[0]),R.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},S.prototype.$getSelectedRows=function(C){return C=(C||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(C.start.row),last:this.session.getRowFoldEnd(C.end.row)}},S.prototype.onCompositionStart=function(C){this.renderer.showComposition(C)},S.prototype.onCompositionUpdate=function(C){this.renderer.setCompositionText(C)},S.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},S.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},S.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},S.prototype.isRowVisible=function(C){return C>=this.getFirstVisibleRow()&&C<=this.getLastVisibleRow()},S.prototype.isRowFullyVisible=function(C){return C>=this.renderer.getFirstFullyVisibleRow()&&C<=this.renderer.getLastFullyVisibleRow()},S.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},S.prototype.$moveByPage=function(C,L){var I=this.renderer,F=this.renderer.layerConfig,R=C*Math.floor(F.height/F.lineHeight);L===!0?this.selection.$moveSelection(function(){this.moveCursorBy(R,0)}):L===!1&&(this.selection.moveCursorBy(R,0),this.selection.clearSelection());var B=I.scrollTop;I.scrollBy(0,R*F.lineHeight),L!=null&&I.scrollCursorIntoView(null,.5),I.animateScrolling(B)},S.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},S.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},S.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},S.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},S.prototype.scrollPageDown=function(){this.$moveByPage(1)},S.prototype.scrollPageUp=function(){this.$moveByPage(-1)},S.prototype.scrollToRow=function(C){this.renderer.scrollToRow(C)},S.prototype.scrollToLine=function(C,L,I,F){this.renderer.scrollToLine(C,L,I,F)},S.prototype.centerSelection=function(){var C=this.getSelectionRange(),L={row:Math.floor(C.start.row+(C.end.row-C.start.row)/2),column:Math.floor(C.start.column+(C.end.column-C.start.column)/2)};this.renderer.alignCursor(L,.5)},S.prototype.getCursorPosition=function(){return this.selection.getCursor()},S.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},S.prototype.getSelectionRange=function(){return this.selection.getRange()},S.prototype.selectAll=function(){this.selection.selectAll()},S.prototype.clearSelection=function(){this.selection.clearSelection()},S.prototype.moveCursorTo=function(C,L){this.selection.moveCursorTo(C,L)},S.prototype.moveCursorToPosition=function(C){this.selection.moveCursorToPosition(C)},S.prototype.jumpToMatching=function(C,L){var I=this.getCursorPosition(),F=new w(this.session,I.row,I.column),R=F.getCurrentToken(),B=0;R&&R.type.indexOf("tag-name")!==-1&&(R=F.stepBackward());var N=R||F.stepForward();if(N){var z,W=!1,j={},U=I.column-N.start,K,J={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(N.value.match(/[{}()\[\]]/g)){for(;U1?j[N.value]++:R.value==="=0;--B)this.$tryReplace(I[B],C)&&F++;return this.selection.setSelectionRange(R),F},S.prototype.$tryReplace=function(C,L){var I=this.session.getTextRange(C);return L=this.$search.replace(I,L),L!==null?(C.end=this.session.replace(C,L),C):null},S.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},S.prototype.find=function(C,L,I){L||(L={}),typeof C=="string"||C instanceof RegExp?L.needle=C:typeof C=="object"&&s.mixin(L,C);var F=this.selection.getRange();L.needle==null&&(C=this.session.getTextRange(F)||this.$search.$options.needle,C||(F=this.session.getWordRange(F.start.row,F.start.column),C=this.session.getTextRange(F)),this.$search.set({needle:C})),this.$search.set(L),L.start||this.$search.set({start:F});var R=this.$search.find(this.session);if(L.preventScroll)return R;if(R)return this.revealRange(R,I),R;L.backwards?F.start=F.end:F.end=F.start,this.selection.setRange(F)},S.prototype.findNext=function(C,L){this.find({skipCurrent:!0,backwards:!1},C,L)},S.prototype.findPrevious=function(C,L){this.find(C,{skipCurrent:!0,backwards:!0},L)},S.prototype.revealRange=function(C,L){this.session.unfold(C),this.selection.setSelectionRange(C);var I=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(C.start,C.end,.5),L!==!1&&this.renderer.animateScrolling(I)},S.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},S.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},S.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(C){C.destroy()}),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},S.prototype.setAutoScrollEditorIntoView=function(C){if(C){var L,I=this,F=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var R=this.$scrollAnchor;R.style.cssText="position:absolute",this.container.insertBefore(R,this.container.firstChild);var B=this.on("changeSelection",function(){F=!0}),N=this.renderer.on("beforeRender",function(){F&&(L=I.renderer.container.getBoundingClientRect())}),z=this.renderer.on("afterRender",function(){if(F&&L&&(I.isFocused()||I.searchBox&&I.searchBox.isFocused())){var W=I.renderer,j=W.$cursorLayer.$pixelPos,U=W.layerConfig,K=j.top-U.offset;j.top>=0&&K+L.top<0?F=!0:j.topwindow.innerHeight?F=!1:F=null,F!=null&&(R.style.top=K+"px",R.style.left=j.left+"px",R.style.height=U.lineHeight+"px",R.scrollIntoView(F)),F=L=null}});this.setAutoScrollEditorIntoView=function(W){W||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",B),this.renderer.off("afterRender",z),this.renderer.off("beforeRender",N))}}},S.prototype.$resetCursorStyle=function(){var C=this.$cursorStyle||"ace",L=this.renderer.$cursorLayer;L&&(L.setSmoothBlinking(/smooth/.test(C)),L.isBlinking=!this.$readOnly&&C!="wide",d.setCssClass(L.element,"ace_slim-cursors",/slim/.test(C)))},S.prototype.prompt=function(C,L,I){var F=this;E.loadModule("ace/ext/prompt",function(R){R.prompt(F,C,L,I)})},S})();_.$uid=0,_.prototype.curOp=null,_.prototype.prevOp={},_.prototype.$mergeableCommands=["backspace","del","insertstring"],_.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],s.implement(_.prototype,v),E.defineOptions(_.prototype,"editor",{selectionStyle:{set:function(S){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:S})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(S){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(S){var C=this;if(this.textInput.setReadOnly(S),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(I){var F=!1;if(I&&I.type=="keydown"){if(I&&I.key&&!I.ctrlKey&&!I.metaKey&&(I.key==" "&&I.preventDefault(),F=I.key.length==1),!F)return}else I&&I.type!=="exec"&&(F=!0);if(F){C.hoverTooltip||(C.hoverTooltip=new O);var R=d.createElement("div");R.textContent=A("editor.tooltip.disable-editing","Editing is disabled"),C.hoverTooltip.isOpen||C.hoverTooltip.showForRange(C,C.getSelectionRange(),R)}else C.hoverTooltip&&C.hoverTooltip.isOpen&&C.hoverTooltip.hide()});var L=this.textInput.getElement();S?(M.addListener(L,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(M.removeListener(L,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback),this.hoverTooltip&&(this.hoverTooltip.destroy(),this.hoverTooltip=null))}},initialValue:!1},copyWithEmptySelection:{set:function(S){this.textInput.setCopyWithEmptySelection(S)},initialValue:!1},cursorStyle:{set:function(S){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(S){this.setAutoScrollEditorIntoView(S)}},keyboardHandler:{set:function(S){this.setKeyboardHandler(S)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(S){this.session.setValue(S)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(S){this.setSession(S)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(S){this.renderer.$gutterLayer.setShowLineNumbers(S),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),S&&this.$relativeLineNumbers?k.attach(this):k.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(S){this.$showLineNumbers&&S?k.attach(this):k.detach(this)}},placeholder:{set:function(S){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var C=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(C&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),d.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!C&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),d.addCssClass(this.container,"ace_hasPlaceholder");var L=d.createElement("div");L.className="ace_placeholder",L.textContent=this.$placeholder||"",this.renderer.placeholderNode=L,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!C&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(S){var C={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(F){F.blur(),F.renderer.scroller.focus()},readOnly:!0},L=function(F){if(F.target==this.renderer.scroller&&F.keyCode===x.enter){F.preventDefault();var R=this.getCursorPosition().row;this.isRowVisible(R)||this.scrollToLine(R,!0,!0),this.focus()}},I;S?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(l.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",A("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",A("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",L.bind(this)),this.commands.addCommand(C),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",A("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",A("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),I||(I=new y(this)),I.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",L.bind(this)),this.commands.removeCommand(C),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),I&&I.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(S){this.$textInputAriaLabel=S},initialValue:""},enableMobileMenu:{set:function(S){this.$enableMobileMenu=S},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var k={getText:function(S,C){return(Math.abs(S.selection.lead.row-C)||C+1+(C<9?"·":""))+""},getWidth:function(S,C,L){return Math.max(C.toString().length,(L.lastRow+1).toString().length,2)*L.characterWidth},update:function(S,C){C.renderer.$loop.schedule(C.renderer.CHANGE_GUTTER)},attach:function(S){S.renderer.$gutterLayer.$renderer=this,S.on("changeSelection",this.update),this.update(null,S)},detach:function(S){S.renderer.$gutterLayer.$renderer==this&&(S.renderer.$gutterLayer.$renderer=null),S.off("changeSelection",this.update),this.update(null,S)}};n.Editor=_}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(t,n,h){var i=t("../lib/dom"),s=(function(){function d(o,l){this.element=o,this.canvasHeight=l||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return d.prototype.moveContainer=function(o){i.translate(this.element,0,-(o.firstRowScreen*o.lineHeight%this.canvasHeight)-o.offset*this.$offsetCoefficient)},d.prototype.pageChanged=function(o,l){return Math.floor(o.firstRowScreen*o.lineHeight/this.canvasHeight)!==Math.floor(l.firstRowScreen*l.lineHeight/this.canvasHeight)},d.prototype.computeLineTop=function(o,l,r){var a=l.firstRowScreen*l.lineHeight,c=Math.floor(a/this.canvasHeight),p=r.documentToScreenRow(o,0)*l.lineHeight;return p-c*this.canvasHeight},d.prototype.computeLineHeight=function(o,l,r){return l.lineHeight*r.getRowLineCount(o)},d.prototype.getLength=function(){return this.cells.length},d.prototype.get=function(o){return this.cells[o]},d.prototype.shift=function(){this.$cacheCell(this.cells.shift())},d.prototype.pop=function(){this.$cacheCell(this.cells.pop())},d.prototype.push=function(o){if(Array.isArray(o)){this.cells.push.apply(this.cells,o);for(var l=i.createFragment(this.element),r=0;rD&&(y=b.end.row+1,b=f.getNextFoldLine(y,b),D=b?b.start.row:1/0),y>v){for(;this.$lines.getLength()>w+1;)this.$lines.pop();break}E=this.$lines.get(++w),E?E.row=y:(E=this.$lines.createCell(y,u,this.session,c),this.$lines.push(E)),this.$renderCell(E,u,b,y),y++}this._signal("afterRender"),this.$updateGutterWidth(u),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},p.prototype.$updateGutterWidth=function(u){var f=this.session,g=f.gutterRenderer||this.$renderer,v=f.$firstLineNumber,b=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||f.$useWrapMode)&&(b=f.getLength()+v-1);var D=g?g.getWidth(f,b,u):b.toString().length*u.characterWidth,E=this.$padding||this.$computePadding();D+=E.left+E.right,D!==this.gutterWidth&&!isNaN(D)&&(this.gutterWidth=D,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",D))},p.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var u=this.session.selection.getCursor();this.$cursorRow!==u.row&&(this.$cursorRow=u.row)}},p.prototype.updateLineHighlight=function(){if(this.$showCursorMarker&&this.$updateCursorMarker(),!!this.$highlightGutterLine){var u=this.session.selection.cursor.row;if(this.$cursorRow=u,!(this.$cursorCell&&this.$cursorCell.row==u)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var f=this.$lines.cells;this.$cursorCell=null;for(var g=0;g=this.$cursorRow){if(v.row>this.$cursorRow){var b=this.session.getFoldLine(this.$cursorRow);if(g>0&&b&&b.start.row==f[g-1].row)v=f[g-1];else break}v.element.className="ace_gutter-active-line "+v.element.className,this.$cursorCell=v;break}}}}},p.prototype.$updateCursorMarker=function(){if(this.session){var u=this.session;this.$highlightElement||(this.$highlightElement=i.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var f=u.selection.cursor,g=this.config,v=this.$lines,b=g.firstRowScreen*g.lineHeight,D=Math.floor(b/v.canvasHeight),E=u.documentToScreenRow(f)*g.lineHeight,w=E-D*v.canvasHeight;i.setStyle(this.$highlightElement.style,"height",g.lineHeight+"px"),i.setStyle(this.$highlightElement.style,"top",w+"px")}},p.prototype.scrollLines=function(u){var f=this.config;if(this.config=u,this.$updateCursorRow(),this.$lines.pageChanged(f,u))return this.update(u);this.$lines.moveContainer(u);var g=Math.min(u.lastRow+u.gutterOffset,this.session.getLength()-1),v=this.oldLastRow;if(this.oldLastRow=g,!f||v0;b--)this.$lines.shift();if(v>g)for(var b=this.session.getFoldedRowCount(g+1,v);b>0;b--)this.$lines.pop();u.firstRowv&&this.$lines.push(this.$renderLines(u,v+1,g)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(u)},p.prototype.$renderLines=function(u,f,g){for(var v=[],b=f,D=this.session.getNextFoldLine(b),E=D?D.start.row:1/0;b>E&&(b=D.end.row+1,D=this.session.getNextFoldLine(b,D),E=D?D.start.row:1/0),!(b>g);){var w=this.$lines.createCell(b,u,this.session,c);this.$renderCell(w,u,D,b),v.push(w),b++}return v},p.prototype.$renderCell=function(u,f,g,v){var b=u.element,D=this.session,E=b.childNodes[0],w=b.childNodes[1],y=b.childNodes[2],A=b.childNodes[3],T=y.firstChild,x=D.$firstLineNumber,M=D.$breakpoints,O=D.$decorations,_=D.gutterRenderer||this.$renderer,k=this.$showFoldWidgets&&D.foldWidgets,S=g?g.start.row:Number.MAX_VALUE,C=f.lineHeight+"px",L=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",I=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",F=(_?_.getText(D,v):v+x).toString();if(this.$highlightGutterLine&&(v==this.$cursorRow||g&&v=S&&this.$cursorRow<=g.end.row)&&(L+="ace_gutter-active-line ",this.$cursorCell!=u&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=u)),M[v]&&(L+=M[v]),O[v]&&(L+=O[v]),this.$annotations[v]&&v!==S&&(L+=this.$annotations[v].className),k){var R=k[v];R==null&&(R=k[v]=D.getFoldWidget(v))}if(R){var B="ace_fold-widget ace_"+R,N=R=="start"&&v==S&&vf[v].row)){for(;g<=v;){var b=Math.floor((g+v)/2),D=f[b];if(D.row>u)v=b-1;else if(D.rowg.right-f.right)return"foldWidgets"},p})();a.prototype.$fixedWidth=!1,a.prototype.$highlightGutterLine=!0,a.prototype.$renderer=void 0,a.prototype.$showLineNumbers=!0,a.prototype.$showFoldWidgets=!0,s.implement(a.prototype,o);function c(p){var u=document.createTextNode("");p.appendChild(u);var f=i.createElement("span");p.appendChild(f);var g=i.createElement("span");p.appendChild(g);var v=i.createElement("span");return g.appendChild(v),p}n.Gutter=a}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(t,n,h){var i=t("../range").Range,s=t("../lib/dom"),d=(function(){function l(r){this.element=s.createElement("div"),this.element.className="ace_layer ace_marker-layer",r.appendChild(this.element)}return l.prototype.setPadding=function(r){this.$padding=r},l.prototype.setSession=function(r){this.session=r},l.prototype.setMarkers=function(r){this.markers=r},l.prototype.elt=function(r,a){var c=this.i!=-1&&this.element.childNodes[this.i];c?this.i++:(c=document.createElement("div"),this.element.appendChild(c),this.i=-1),c.style.cssText=a,c.className=r},l.prototype.update=function(r){if(r){this.config=r,this.i=0;var a;for(var c in this.markers){var p=this.markers[c];if(!p.range){p.update(a,this,this.session,r);continue}var u=p.range.clipRows(r.firstRow,r.lastRow);if(!u.isEmpty())if(u=u.toScreenRange(this.session),p.renderer){var f=this.$getTop(u.start.row,r),g=this.$padding+u.start.column*r.characterWidth;p.renderer(a,u,g,f,r)}else p.type=="fullLine"?this.drawFullLineMarker(a,u,p.clazz,r):p.type=="screenLine"?this.drawScreenLineMarker(a,u,p.clazz,r):u.isMultiLine()?p.type=="text"?this.drawTextMarker(a,u,p.clazz,r):this.drawMultiLineMarker(a,u,p.clazz,r):this.drawSingleLineMarker(a,u,p.clazz+" ace_start ace_br15",r)}if(this.i!=-1)for(;this.iw,b==v),p,b==v?0:1,u)},l.prototype.drawMultiLineMarker=function(r,a,c,p,u){var f=this.$padding,g=p.lineHeight,v=this.$getTop(a.start.row,p),b=f+a.start.column*p.characterWidth;if(u=u||"",this.session.$bidiHandler.isBidiRow(a.start.row)){var D=a.clone();D.end.row=D.start.row,D.end.column=this.session.getLine(D.start.row).length,this.drawBidiSingleLineMarker(r,D,c+" ace_br1 ace_start",p,null,u)}else this.elt(c+" ace_br1 ace_start","height:"+g+"px;right:"+f+"px;top:"+v+"px;left:"+b+"px;"+(u||""));if(this.session.$bidiHandler.isBidiRow(a.end.row)){var D=a.clone();D.start.row=D.end.row,D.start.column=0,this.drawBidiSingleLineMarker(r,D,c+" ace_br12",p,null,u)}else{v=this.$getTop(a.end.row,p);var E=a.end.column*p.characterWidth;this.elt(c+" ace_br12","height:"+g+"px;width:"+E+"px;top:"+v+"px;left:"+f+"px;"+(u||""))}if(g=(a.end.row-a.start.row-1)*p.lineHeight,!(g<=0)){v=this.$getTop(a.start.row+1,p);var w=(a.start.column?1:0)|(a.end.column?0:8);this.elt(c+(w?" ace_br"+w:""),"height:"+g+"px;right:"+f+"px;top:"+v+"px;left:"+f+"px;"+(u||""))}},l.prototype.drawSingleLineMarker=function(r,a,c,p,u,f){if(this.session.$bidiHandler.isBidiRow(a.start.row))return this.drawBidiSingleLineMarker(r,a,c,p,u,f);var g=p.lineHeight,v=(a.end.column+(u||0)-a.start.column)*p.characterWidth,b=this.$getTop(a.start.row,p),D=this.$padding+a.start.column*p.characterWidth;this.elt(c,"height:"+g+"px;width:"+v+"px;top:"+b+"px;left:"+D+"px;"+(f||""))},l.prototype.drawBidiSingleLineMarker=function(r,a,c,p,u,f){var g=p.lineHeight,v=this.$getTop(a.start.row,p),b=this.$padding,D=this.session.$bidiHandler.getSelections(a.start.column,a.end.column);D.forEach(function(E){this.elt(c,"height:"+g+"px;width:"+(E.width+(u||0))+"px;top:"+v+"px;left:"+(b+E.left)+"px;"+(f||""))},this)},l.prototype.drawFullLineMarker=function(r,a,c,p,u){var f=this.$getTop(a.start.row,p),g=p.lineHeight;a.start.row!=a.end.row&&(g+=this.$getTop(a.end.row,p)-f),this.elt(c,"height:"+g+"px;top:"+f+"px;left:0;right:0;"+(u||""))},l.prototype.drawScreenLineMarker=function(r,a,c,p,u){var f=this.$getTop(a.start.row,p),g=p.lineHeight;this.elt(c,"height:"+g+"px;top:"+f+"px;left:0;right:0;"+(u||""))},l})();d.prototype.$padding=0;function o(l,r,a,c){return(l?1:0)|(r?2:0)|(a?4:0)|(c?8:0)}n.Marker=d}),ace.define("ace/layer/text_util",["require","exports","module"],function(t,n,h){var i=new Set(["text","rparen","lparen"]);n.isTextToken=function(s){return i.has(s)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(t,n,h){var i=t("../lib/oop"),s=t("../lib/dom"),d=t("../lib/lang"),o=t("./lines").Lines,l=t("../lib/event_emitter").EventEmitter,r=t("../config").nls,a=t("./text_util").isTextToken,c=(function(){function p(u){this.dom=s,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",u.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new o(this.element)}return p.prototype.$updateEolChar=function(){var u=this.session.doc,f=u.getNewLineCharacter()==` +`&&u.getNewLineMode()!="windows",g=f?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=g)return this.EOL_CHAR=g,!0},p.prototype.setPadding=function(u){this.$padding=u,this.element.style.margin="0 "+u+"px"},p.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},p.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},p.prototype.$setFontMetrics=function(u){this.$fontMetrics=u,this.$fontMetrics.on("changeCharacterSize",function(f){this._signal("changeCharacterSize",f)}.bind(this)),this.$pollSizeChanges()},p.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},p.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},p.prototype.setSession=function(u){this.session=u,u&&this.$computeTabString()},p.prototype.setShowInvisibles=function(u){return this.showInvisibles==u?!1:(this.showInvisibles=u,typeof u=="string"?(this.showSpaces=/tab/i.test(u),this.showTabs=/space/i.test(u),this.showEOL=/eol/i.test(u)):this.showSpaces=this.showTabs=this.showEOL=u,this.$computeTabString(),!0)},p.prototype.setDisplayIndentGuides=function(u){return this.displayIndentGuides==u?!1:(this.displayIndentGuides=u,this.$computeTabString(),!0)},p.prototype.setHighlightIndentGuides=function(u){return this.$highlightIndentGuides===u?!1:(this.$highlightIndentGuides=u,u)},p.prototype.$computeTabString=function(){var u=this.session.getTabSize();this.tabSize=u;for(var f=this.$tabStrings=[0],g=1;gT&&(y=A.end.row+1,A=this.session.getNextFoldLine(y,A),T=A?A.start.row:1/0),!(y>b);){var x=D[E++];if(x){this.dom.removeChildren(x),this.$renderLine(x,y,y==T?A:!1),w&&(x.style.top=this.$lines.computeLineTop(y,u,this.session)+"px");var M=u.lineHeight*this.session.getRowLength(y)+"px";x.style.height!=M&&(w=!0,x.style.height=M)}y++}if(w)for(;E0;b--)this.$lines.shift();if(f.lastRow>u.lastRow)for(var b=this.session.getFoldedRowCount(u.lastRow+1,f.lastRow);b>0;b--)this.$lines.pop();u.firstRowf.lastRow&&this.$lines.push(this.$renderLinesFragment(u,f.lastRow+1,u.lastRow)),this.$highlightIndentGuide()},p.prototype.$renderLinesFragment=function(u,f,g){for(var v=[],b=f,D=this.session.getNextFoldLine(b),E=D?D.start.row:1/0;b>E&&(b=D.end.row+1,D=this.session.getNextFoldLine(b,D),E=D?D.start.row:1/0),!(b>g);){var w=this.$lines.createCell(b,u,this.session),y=w.element;this.dom.removeChildren(y),s.setStyle(y.style,"height",this.$lines.computeLineHeight(b,u,this.session)+"px"),s.setStyle(y.style,"top",this.$lines.computeLineTop(b,u,this.session)+"px"),this.$renderLine(y,b,b==E?D:!1),this.$useLineGroups()?y.className="ace_line_group":y.className="ace_line",v.push(w),b++}return v},p.prototype.update=function(u){this.$lines.moveContainer(u),this.config=u;for(var f=u.firstRow,g=u.lastRow,v=this.$lines;v.getLength();)v.pop();v.push(this.$renderLinesFragment(u,f,g))},p.prototype.$renderToken=function(u,f,g,v){for(var b=this,D=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,E=this.dom.createFragment(this.element),w,y=0;w=D.exec(v);){var A=w[1],T=w[2],x=w[3],M=w[4],O=w[5];if(!(!b.showSpaces&&T)){var _=y!=w.index?v.slice(y,w.index):"";if(y=w.index+w[0].length,_&&E.appendChild(this.dom.createTextNode(_,this.element)),A){var k=b.session.getScreenTabSize(f+w.index),S=b.$tabStrings[k].cloneNode(!0);S.charCount=1,E.appendChild(S),f+=k-1}else if(T)if(b.showSpaces){var C=this.dom.createElement("span");C.className="ace_invisible ace_invisible_space",C.textContent=d.stringRepeat(b.SPACE_CHAR,T.length),E.appendChild(C)}else E.appendChild(this.dom.createTextNode(T,this.element));else if(x){var C=this.dom.createElement("span");C.className="ace_invisible ace_invisible_space ace_invalid",C.textContent=d.stringRepeat(b.SPACE_CHAR,x.length),E.appendChild(C)}else if(M){f+=1;var C=this.dom.createElement("span");C.style.width=b.config.characterWidth*2+"px",C.className=b.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",C.textContent=b.showSpaces?b.SPACE_CHAR:M,E.appendChild(C)}else if(O){f+=1;var C=this.dom.createElement("span");C.style.width=b.config.characterWidth*2+"px",C.className="ace_cjk",C.textContent=O,E.appendChild(C)}}}if(E.appendChild(this.dom.createTextNode(y?v.slice(y):v,this.element)),a(g.type))u.appendChild(E);else{var L="ace_"+g.type.replace(/\./g," ace_"),C=this.dom.createElement("span");g.type=="fold"&&(C.style.width=g.value.length*this.config.characterWidth+"px",C.setAttribute("title",r("inline-fold.closed.title","Unfold code"))),C.className=L,C.appendChild(E),u.appendChild(C)}return f+v.length},p.prototype.renderIndentGuide=function(u,f,g){var v=f.search(this.$indentGuideRe);if(v<=0||v>=g)return f;if(f[0]==" "){v-=v%this.tabSize;for(var b=v/this.tabSize,D=0;DD[E].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&u[f.row]!==""&&f.column===u[f.row].length){this.$highlightIndentGuideMarker.dir=1;for(var E=f.row+1;E0)v=u.element.childNodes[0];else return;var b=v.childNodes;if(b){var D=b[f-1];D&&D.classList&&D.classList.contains("ace_indent-guide")&&D.classList.add("ace_indent-guide-active")}}},p.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var u=this.$lines.cells;this.$clearActiveIndentGuide();var f=this.$highlightIndentGuideMarker.indentLevel;if(f!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var g=0;g=this.$highlightIndentGuideMarker.start+1){if(v.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(v,f)}}else for(var g=u.length-1;g>=0;g--){var v=u[g];if(this.$highlightIndentGuideMarker.end&&v.row=D;){E=this.$renderToken(w,E,A,T.substring(0,D-v)),T=T.substring(D-v),v=D,w=this.$createLineElement(),u.appendChild(w);var x=this.dom.createTextNode(d.stringRepeat(" ",g.indent),this.element);x.charCount=0,w.appendChild(x),b++,E=0,D=g[b]||Number.MAX_VALUE}T.length!=0&&(v+=T.length,E=this.$renderToken(w,E,A,T))}}g[g.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(w,E,null,"",!0)},p.prototype.$renderSimpleLine=function(u,f){for(var g=0,v=0;vthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(u,g,b,D);g=this.$renderToken(u,g,b,D)}}},p.prototype.$renderOverflowMessage=function(u,f,g,v,b){g&&this.$renderToken(u,f,g,v.slice(0,this.MAX_LINE_LENGTH-f));var D=this.dom.createElement("span");D.className="ace_inline_button ace_keyword ace_toggle_wrap",D.textContent=b?"":"",u.appendChild(D)},p.prototype.$renderLine=function(u,f,g){if(!g&&g!=!1&&(g=this.session.getFoldLine(f)),g)var v=this.$getFoldLineTokens(f,g);else var v=this.session.getTokens(f);var b=u;if(v.length){var D=this.session.getRowSplitData(f);if(D&&D.length){this.$renderWrappedLine(u,v,D);var b=u.lastChild}else{var b=u;this.$useLineGroups()&&(b=this.$createLineElement(),u.appendChild(b)),this.$renderSimpleLine(b,v)}}else this.$useLineGroups()&&(b=this.$createLineElement(),u.appendChild(b));if(this.showEOL&&b){g&&(f=g.end.row);var E=this.dom.createElement("span");E.className="ace_invisible ace_invisible_eol",E.textContent=f==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,b.appendChild(E)}},p.prototype.$getFoldLineTokens=function(u,f){var g=this.session,v=[];function b(E,w,y){for(var A=0,T=0;T+E[A].value.lengthy-w&&(x=x.substring(0,y-w)),v.push({type:E[A].type,value:x}),T=w+x.length,A+=1}for(;Ty?v.push({type:E[A].type,value:x.substring(0,y-T)}):v.push(E[A]),T+=x.length,A+=1}}var D=g.getTokens(u);return f.walk(function(E,w,y,A,T){E!=null?v.push({type:"fold",value:E}):(T&&(D=g.getTokens(w)),D.length&&b(D,A,y))},f.end.row,this.session.getLine(f.end.row).length),v},p.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},p})();c.prototype.EOF_CHAR="¶",c.prototype.EOL_CHAR_LF="¬",c.prototype.EOL_CHAR_CRLF="¤",c.prototype.EOL_CHAR=c.prototype.EOL_CHAR_LF,c.prototype.TAB_CHAR="—",c.prototype.SPACE_CHAR="·",c.prototype.$padding=0,c.prototype.MAX_LINE_LENGTH=1e4,c.prototype.showInvisibles=!1,c.prototype.showSpaces=!1,c.prototype.showTabs=!1,c.prototype.showEOL=!1,c.prototype.displayIndentGuides=!0,c.prototype.$highlightIndentGuides=!0,c.prototype.$tabStrings=[],c.prototype.destroy={},c.prototype.onChangeTabSize=c.prototype.$computeTabString,i.implement(c.prototype,l),n.Text=c}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(t,n,h){var i=t("../lib/dom"),s=(function(){function d(o){this.element=i.createElement("div"),this.element.className="ace_layer ace_cursor-layer",o.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),i.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return d.prototype.$updateOpacity=function(o){for(var l=this.cursors,r=l.length;r--;)i.setStyle(l[r].style,"opacity",o?"":"0")},d.prototype.$startCssAnimation=function(){for(var o=this.cursors,l=o.length;l--;)o[l].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&i.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},d.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,i.removeCssClass(this.element,"ace_animate-blinking")},d.prototype.setPadding=function(o){this.$padding=o},d.prototype.setSession=function(o){this.session=o},d.prototype.setBlinking=function(o){o!=this.isBlinking&&(this.isBlinking=o,this.restartTimer())},d.prototype.setBlinkInterval=function(o){o!=this.blinkInterval&&(this.blinkInterval=o,this.restartTimer())},d.prototype.setSmoothBlinking=function(o){o!=this.smoothBlinking&&(this.smoothBlinking=o,i.setCssClass(this.element,"ace_smooth-blinking",o),this.$updateCursors(!0),this.restartTimer())},d.prototype.addCursor=function(){var o=i.createElement("div");return o.className="ace_cursor",this.element.appendChild(o),this.cursors.push(o),o},d.prototype.removeCursor=function(){if(this.cursors.length>1){var o=this.cursors.pop();return o.parentNode.removeChild(o),o}},d.prototype.hideCursor=function(){this.isVisible=!1,i.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},d.prototype.showCursor=function(){this.isVisible=!0,i.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},d.prototype.restartTimer=function(){var o=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,i.removeCssClass(this.element,"ace_smooth-blinking")),o(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&i.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),i.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var l=function(){this.timeoutId=setTimeout(function(){o(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){o(!0),l()},this.blinkInterval),l()}},d.prototype.getPixelPosition=function(o,l){if(!this.config||!this.session)return{left:0,top:0};o||(o=this.session.selection.getCursor());var r=this.session.documentToScreenPosition(o),a=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,o.row)?this.session.$bidiHandler.getPosLeft(r.column):r.column*this.config.characterWidth),c=(r.row-(l?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:a,top:c}},d.prototype.isCursorInView=function(o,l){return o.top>=0&&o.topo.height+o.offset||p.top<0)&&r>1)){var u=this.cursors[a++]||this.addCursor(),f=u.style;this.drawCursor?this.drawCursor(u,p,o,l[r],this.session):this.isCursorInView(p,o)?(i.setStyle(f,"display","block"),i.translate(u,p.left,p.top),i.setStyle(f,"width",Math.round(o.characterWidth)+"px"),i.setStyle(f,"height",o.lineHeight+"px")):i.setStyle(f,"display","none")}}for(;this.cursors.length>a;)this.removeCursor();var g=this.session.getOverwrite();this.$setOverwrite(g),this.$pixelPos=p,this.restartTimer()},d.prototype.$setOverwrite=function(o){o!=this.overwrite&&(this.overwrite=o,o?i.addCssClass(this.element,"ace_overwrite-cursors"):i.removeCssClass(this.element,"ace_overwrite-cursors"))},d.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},d})();s.prototype.$padding=0,s.prototype.drawCursor=null,n.Cursor=s}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(t,n,h){var i=this&&this.__extends||(function(){var u=function(f,g){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,b){v.__proto__=b}||function(v,b){for(var D in b)Object.prototype.hasOwnProperty.call(b,D)&&(v[D]=b[D])},u(f,g)};return function(f,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");u(f,g);function v(){this.constructor=f}f.prototype=g===null?Object.create(g):(v.prototype=g.prototype,new v)}})(),s=t("./lib/oop"),d=t("./lib/dom"),o=t("./lib/event"),l=t("./lib/event_emitter").EventEmitter,r=32768,a=(function(){function u(f,g){this.element=d.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+g,this.inner=d.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),f.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)}return u.prototype.setVisible=function(f){this.element.style.display=f?"":"none",this.isVisible=f,this.coeff=1},u})();s.implement(a.prototype,l);var c=(function(u){i(f,u);function f(g,v){var b=u.call(this,g,"-v")||this;return b.scrollTop=0,b.scrollHeight=0,v.$scrollbarWidth=b.width=d.scrollbarWidth(g.ownerDocument),b.inner.style.width=b.element.style.width=(b.width||15)+5+"px",b.$minWidth=0,b}return f.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var g=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-g)/(this.coeff-g)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},f.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},f.prototype.setHeight=function(g){this.element.style.height=g+"px"},f.prototype.setScrollHeight=function(g){this.scrollHeight=g,g>r?(this.coeff=r/g,g=r):this.coeff!=1&&(this.coeff=1),this.inner.style.height=g+"px"},f.prototype.setScrollTop=function(g){this.scrollTop!=g&&(this.skipEvent=!0,this.scrollTop=g,this.element.scrollTop=g*this.coeff)},f})(a);c.prototype.setInnerHeight=c.prototype.setScrollHeight;var p=(function(u){i(f,u);function f(g,v){var b=u.call(this,g,"-h")||this;return b.scrollLeft=0,b.height=v.$scrollbarWidth,b.inner.style.height=b.element.style.height=(b.height||15)+5+"px",b}return f.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},f.prototype.getHeight=function(){return this.isVisible?this.height:0},f.prototype.setWidth=function(g){this.element.style.width=g+"px"},f.prototype.setInnerWidth=function(g){this.inner.style.width=g+"px"},f.prototype.setScrollWidth=function(g){this.inner.style.width=g+"px"},f.prototype.setScrollLeft=function(g){this.scrollLeft!=g&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=g)},f})(a);n.ScrollBar=c,n.ScrollBarV=c,n.ScrollBarH=p,n.VScrollBar=c,n.HScrollBar=p}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(t,n,h){var i=this&&this.__extends||(function(){var p=function(u,f){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,v){g.__proto__=v}||function(g,v){for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(g[b]=v[b])},p(u,f)};return function(u,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");p(u,f);function g(){this.constructor=u}u.prototype=f===null?Object.create(f):(g.prototype=f.prototype,new g)}})(),s=t("./lib/oop"),d=t("./lib/dom"),o=t("./lib/event"),l=t("./lib/event_emitter").EventEmitter;d.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{ position: absolute; background: rgba(128, 128, 128, 0.6); -moz-box-sizing: border-box; @@ -259,7 +259,7 @@ import{i as Ao,h as x,f as Kl,a as Gl,p as Jl}from"./ConfigCustomJavascriptSet__ .ace_editor>.ace_sb_grabbed { z-index: 8; background: #000; -}`,"ace_scrollbar.css",!1);var r=(function(){function p(h,f){this.element=d.createElement("div"),this.element.className="ace_sb"+f,this.inner=d.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,h.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return p.prototype.setVisible=function(h){this.element.style.display=h?"":"none",this.isVisible=h,this.coeff=1},p})();s.implement(r.prototype,l);var a=(function(p){i(h,p);function h(f,g){var v=p.call(this,f,"-v")||this;return v.scrollTop=0,v.scrollHeight=0,v.parent=f,v.width=v.VScrollWidth,v.renderer=g,v.inner.style.width=v.element.style.width=(v.width||15)+"px",v.$minWidth=0,v}return h.prototype.onMouseDown=function(f,g){if(f==="mousedown"&&!(o.getButton(g)!==0||g.detail===2)){if(g.target===this.inner){var v=this,b=g.clientY,D=function(M){b=M.clientY},E=function(){clearInterval(T)},w=g.clientY,y=this.thumbTop,A=function(){if(b!==void 0){var M=v.scrollTopFromThumbTop(y+b-w);M!==v.scrollTop&&v._emit("scroll",{data:M})}};o.capture(this.inner,D,E);var T=setInterval(A,20);return o.preventDefault(g)}var $=g.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop($)}),o.preventDefault(g)}},h.prototype.getHeight=function(){return this.height},h.prototype.scrollTopFromThumbTop=function(f){var g=f*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return g=g>>0,g<0?g=0:g>this.pageHeight-this.viewHeight&&(g=this.pageHeight-this.viewHeight),g},h.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},h.prototype.setHeight=function(f){this.height=Math.max(0,f),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},h.prototype.setScrollHeight=function(f,g){this.pageHeight===f&&!g||(this.pageHeight=f,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},h.prototype.setScrollTop=function(f){this.scrollTop=f,f<0&&(f=0),this.thumbTop=f*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},h})(r);a.prototype.setInnerHeight=a.prototype.setScrollHeight;var c=(function(p){i(h,p);function h(f,g){var v=p.call(this,f,"-h")||this;return v.scrollLeft=0,v.scrollWidth=0,v.height=v.HScrollHeight,v.inner.style.height=v.element.style.height=(v.height||12)+"px",v.renderer=g,v}return h.prototype.onMouseDown=function(f,g){if(f==="mousedown"&&!(o.getButton(g)!==0||g.detail===2)){if(g.target===this.inner){var v=this,b=g.clientX,D=function(M){b=M.clientX},E=function(){clearInterval(T)},w=g.clientX,y=this.thumbLeft,A=function(){if(b!==void 0){var M=v.scrollLeftFromThumbLeft(y+b-w);M!==v.scrollLeft&&v._emit("scroll",{data:M})}};o.capture(this.inner,D,E);var T=setInterval(A,20);return o.preventDefault(g)}var $=g.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft($)}),o.preventDefault(g)}},h.prototype.getHeight=function(){return this.isVisible?this.height:0},h.prototype.scrollLeftFromThumbLeft=function(f){var g=f*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return g=g>>0,g<0?g=0:g>this.pageWidth-this.viewWidth&&(g=this.pageWidth-this.viewWidth),g},h.prototype.setWidth=function(f){this.width=Math.max(0,f),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},h.prototype.setScrollWidth=function(f,g){this.pageWidth===f&&!g||(this.pageWidth=f,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},h.prototype.setScrollLeft=function(f){this.scrollLeft=f,f<0&&(f=0),this.thumbLeft=f*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},h})(r);c.prototype.setInnerWidth=c.prototype.setScrollWidth,n.ScrollBar=a,n.ScrollBarV=a,n.ScrollBarH=c,n.VScrollBar=a,n.HScrollBar=c}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(t,n,u){var i=t("./lib/event"),s=(function(){function d(o,l){this.onRender=o,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=l||window;var r=this;this._flush=function(a){r.pending=!1;var c=r.changes;if(c&&(i.blockIdle(100),r.changes=0,r.onRender(c)),r.changes){if(r.$recursionLimit--<0)return;r.schedule()}else r.$recursionLimit=2}}return d.prototype.schedule=function(o){this.changes=this.changes|o,this.changes&&!this.pending&&(i.nextFrame(this._flush),this.pending=!0)},d.prototype.clear=function(o){var l=this.changes;return this.changes=0,l},d})();n.RenderLoop=s}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(t,n,u){var i=t("../lib/oop"),s=t("../lib/dom"),d=t("../lib/lang"),o=t("../lib/event"),l=t("../lib/useragent"),r=t("../lib/event_emitter").EventEmitter,a=512,c=typeof ResizeObserver=="function",p=200,h=(function(){function f(g){this.el=s.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=s.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=s.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),g.appendChild(this.el),this.$measureNode.textContent=d.stringRepeat("X",a),this.$characterSize={width:0,height:0},c?this.$addObserver():this.checkForSizeChanges()}return f.prototype.$setMeasureNodeStyles=function(g,v){g.width=g.height="auto",g.left=g.top="0px",g.visibility="hidden",g.position="absolute",g.whiteSpace="pre",l.isIE<8?g["font-family"]="inherit":g.font="inherit",g.overflow=v?"hidden":"visible"},f.prototype.checkForSizeChanges=function(g){if(g===void 0&&(g=this.$measureSizes()),g&&(this.$characterSize.width!==g.width||this.$characterSize.height!==g.height)){this.$measureNode.style.fontWeight="bold";var v=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=g,this.charSizes=Object.create(null),this.allowBoldFonts=v&&v.width===g.width&&v.height===g.height,this._emit("changeCharacterSize",{data:g})}},f.prototype.$addObserver=function(){var g=this;this.$observer=new window.ResizeObserver(function(v){g.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},f.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var g=this;return this.$pollSizeChangesTimer=o.onIdle(function v(){g.checkForSizeChanges(),o.onIdle(v,500)},500)},f.prototype.setPolling=function(g){g?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},f.prototype.$measureSizes=function(g){var v={height:(g||this.$measureNode).clientHeight,width:(g||this.$measureNode).clientWidth/a};return v.width===0||v.height===0?null:v},f.prototype.$measureCharWidth=function(g){this.$main.textContent=d.stringRepeat(g,a);var v=this.$main.getBoundingClientRect();return v.width/a},f.prototype.getCharacterWidth=function(g){var v=this.charSizes[g];return v===void 0&&(v=this.charSizes[g]=this.$measureCharWidth(g)/this.$characterSize.width),v},f.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},f.prototype.$getZoom=function(g){return!g||!g.parentElement?1:(Number(window.getComputedStyle(g).zoom)||1)*this.$getZoom(g.parentElement)},f.prototype.$initTransformMeasureNodes=function(){var g=function(v,b){return["div",{style:"position: absolute;top:"+v+"px;left:"+b+"px;"}]};this.els=s.buildDom([g(0,0),g(p,0),g(0,p),g(p,p)],this.el)},f.prototype.transformCoordinates=function(g,v){if(g){var b=this.$getZoom(this.el);g=y(1/b,g)}function D(B,N,H){var W=B[1]*N[0]-B[0]*N[1];return[(-N[1]*H[0]+N[0]*H[1])/W,(+B[1]*H[0]-B[0]*H[1])/W]}function E(B,N){return[B[0]-N[0],B[1]-N[1]]}function w(B,N){return[B[0]+N[0],B[1]+N[1]]}function y(B,N){return[B*N[0],B*N[1]]}this.els||this.$initTransformMeasureNodes();function A(B){var N=B.getBoundingClientRect();return[N.left,N.top]}var T=A(this.els[0]),$=A(this.els[1]),M=A(this.els[2]),O=A(this.els[3]),_=D(E(O,$),E(O,M),E(w($,M),w(O,T))),k=y(1+_[0],E($,T)),S=y(1+_[1],E(M,T));if(v){var C=v,L=_[0]*C[0]/p+_[1]*C[1]/p+1,I=w(y(C[0],k),y(C[1],S));return w(y(1/L/p,I),T)}var F=E(g,T),R=D(E(k,y(_[0],F)),E(S,y(_[1],F)),F);return y(p,R)},f})();h.prototype.$characterSize={width:0,height:0},i.implement(h.prototype,r),n.FontMetrics=h}),ace.define("ace/css/editor-css",["require","exports","module"],function(t,n,u){u.exports=` +}`,"ace_scrollbar.css",!1);var r=(function(){function p(u,f){this.element=d.createElement("div"),this.element.className="ace_sb"+f,this.inner=d.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,u.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return p.prototype.setVisible=function(u){this.element.style.display=u?"":"none",this.isVisible=u,this.coeff=1},p})();s.implement(r.prototype,l);var a=(function(p){i(u,p);function u(f,g){var v=p.call(this,f,"-v")||this;return v.scrollTop=0,v.scrollHeight=0,v.parent=f,v.width=v.VScrollWidth,v.renderer=g,v.inner.style.width=v.element.style.width=(v.width||15)+"px",v.$minWidth=0,v}return u.prototype.onMouseDown=function(f,g){if(f==="mousedown"&&!(o.getButton(g)!==0||g.detail===2)){if(g.target===this.inner){var v=this,b=g.clientY,D=function(M){b=M.clientY},E=function(){clearInterval(T)},w=g.clientY,y=this.thumbTop,A=function(){if(b!==void 0){var M=v.scrollTopFromThumbTop(y+b-w);M!==v.scrollTop&&v._emit("scroll",{data:M})}};o.capture(this.inner,D,E);var T=setInterval(A,20);return o.preventDefault(g)}var x=g.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(x)}),o.preventDefault(g)}},u.prototype.getHeight=function(){return this.height},u.prototype.scrollTopFromThumbTop=function(f){var g=f*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return g=g>>0,g<0?g=0:g>this.pageHeight-this.viewHeight&&(g=this.pageHeight-this.viewHeight),g},u.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},u.prototype.setHeight=function(f){this.height=Math.max(0,f),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},u.prototype.setScrollHeight=function(f,g){this.pageHeight===f&&!g||(this.pageHeight=f,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},u.prototype.setScrollTop=function(f){this.scrollTop=f,f<0&&(f=0),this.thumbTop=f*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},u})(r);a.prototype.setInnerHeight=a.prototype.setScrollHeight;var c=(function(p){i(u,p);function u(f,g){var v=p.call(this,f,"-h")||this;return v.scrollLeft=0,v.scrollWidth=0,v.height=v.HScrollHeight,v.inner.style.height=v.element.style.height=(v.height||12)+"px",v.renderer=g,v}return u.prototype.onMouseDown=function(f,g){if(f==="mousedown"&&!(o.getButton(g)!==0||g.detail===2)){if(g.target===this.inner){var v=this,b=g.clientX,D=function(M){b=M.clientX},E=function(){clearInterval(T)},w=g.clientX,y=this.thumbLeft,A=function(){if(b!==void 0){var M=v.scrollLeftFromThumbLeft(y+b-w);M!==v.scrollLeft&&v._emit("scroll",{data:M})}};o.capture(this.inner,D,E);var T=setInterval(A,20);return o.preventDefault(g)}var x=g.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(x)}),o.preventDefault(g)}},u.prototype.getHeight=function(){return this.isVisible?this.height:0},u.prototype.scrollLeftFromThumbLeft=function(f){var g=f*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return g=g>>0,g<0?g=0:g>this.pageWidth-this.viewWidth&&(g=this.pageWidth-this.viewWidth),g},u.prototype.setWidth=function(f){this.width=Math.max(0,f),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},u.prototype.setScrollWidth=function(f,g){this.pageWidth===f&&!g||(this.pageWidth=f,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},u.prototype.setScrollLeft=function(f){this.scrollLeft=f,f<0&&(f=0),this.thumbLeft=f*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},u})(r);c.prototype.setInnerWidth=c.prototype.setScrollWidth,n.ScrollBar=a,n.ScrollBarV=a,n.ScrollBarH=c,n.VScrollBar=a,n.HScrollBar=c}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(t,n,h){var i=t("./lib/event"),s=(function(){function d(o,l){this.onRender=o,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=l||window;var r=this;this._flush=function(a){r.pending=!1;var c=r.changes;if(c&&(i.blockIdle(100),r.changes=0,r.onRender(c)),r.changes){if(r.$recursionLimit--<0)return;r.schedule()}else r.$recursionLimit=2}}return d.prototype.schedule=function(o){this.changes=this.changes|o,this.changes&&!this.pending&&(i.nextFrame(this._flush),this.pending=!0)},d.prototype.clear=function(o){var l=this.changes;return this.changes=0,l},d})();n.RenderLoop=s}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(t,n,h){var i=t("../lib/oop"),s=t("../lib/dom"),d=t("../lib/lang"),o=t("../lib/event"),l=t("../lib/useragent"),r=t("../lib/event_emitter").EventEmitter,a=512,c=typeof ResizeObserver=="function",p=200,u=(function(){function f(g){this.el=s.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=s.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=s.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),g.appendChild(this.el),this.$measureNode.textContent=d.stringRepeat("X",a),this.$characterSize={width:0,height:0},c?this.$addObserver():this.checkForSizeChanges()}return f.prototype.$setMeasureNodeStyles=function(g,v){g.width=g.height="auto",g.left=g.top="0px",g.visibility="hidden",g.position="absolute",g.whiteSpace="pre",l.isIE<8?g["font-family"]="inherit":g.font="inherit",g.overflow=v?"hidden":"visible"},f.prototype.checkForSizeChanges=function(g){if(g===void 0&&(g=this.$measureSizes()),g&&(this.$characterSize.width!==g.width||this.$characterSize.height!==g.height)){this.$measureNode.style.fontWeight="bold";var v=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=g,this.charSizes=Object.create(null),this.allowBoldFonts=v&&v.width===g.width&&v.height===g.height,this._emit("changeCharacterSize",{data:g})}},f.prototype.$addObserver=function(){var g=this;this.$observer=new window.ResizeObserver(function(v){g.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},f.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var g=this;return this.$pollSizeChangesTimer=o.onIdle(function v(){g.checkForSizeChanges(),o.onIdle(v,500)},500)},f.prototype.setPolling=function(g){g?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},f.prototype.$measureSizes=function(g){var v={height:(g||this.$measureNode).clientHeight,width:(g||this.$measureNode).clientWidth/a};return v.width===0||v.height===0?null:v},f.prototype.$measureCharWidth=function(g){this.$main.textContent=d.stringRepeat(g,a);var v=this.$main.getBoundingClientRect();return v.width/a},f.prototype.getCharacterWidth=function(g){var v=this.charSizes[g];return v===void 0&&(v=this.charSizes[g]=this.$measureCharWidth(g)/this.$characterSize.width),v},f.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},f.prototype.$getZoom=function(g){return!g||!g.parentElement?1:(Number(window.getComputedStyle(g).zoom)||1)*this.$getZoom(g.parentElement)},f.prototype.$initTransformMeasureNodes=function(){var g=function(v,b){return["div",{style:"position: absolute;top:"+v+"px;left:"+b+"px;"}]};this.els=s.buildDom([g(0,0),g(p,0),g(0,p),g(p,p)],this.el)},f.prototype.transformCoordinates=function(g,v){if(g){var b=this.$getZoom(this.el);g=y(1/b,g)}function D(B,N,z){var W=B[1]*N[0]-B[0]*N[1];return[(-N[1]*z[0]+N[0]*z[1])/W,(+B[1]*z[0]-B[0]*z[1])/W]}function E(B,N){return[B[0]-N[0],B[1]-N[1]]}function w(B,N){return[B[0]+N[0],B[1]+N[1]]}function y(B,N){return[B*N[0],B*N[1]]}this.els||this.$initTransformMeasureNodes();function A(B){var N=B.getBoundingClientRect();return[N.left,N.top]}var T=A(this.els[0]),x=A(this.els[1]),M=A(this.els[2]),O=A(this.els[3]),_=D(E(O,x),E(O,M),E(w(x,M),w(O,T))),k=y(1+_[0],E(x,T)),S=y(1+_[1],E(M,T));if(v){var C=v,L=_[0]*C[0]/p+_[1]*C[1]/p+1,I=w(y(C[0],k),y(C[1],S));return w(y(1/L/p,I),T)}var F=E(g,T),R=D(E(k,y(_[0],F)),E(S,y(_[1],F)),F);return y(p,R)},f})();u.prototype.$characterSize={width:0,height:0},i.implement(u.prototype,r),n.FontMetrics=u}),ace.define("ace/css/editor-css",["require","exports","module"],function(t,n,h){h.exports=` .ace_br1 {border-top-left-radius : 3px;} .ace_br2 {border-top-right-radius : 3px;} .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;} @@ -955,9 +955,9 @@ import{i as Ao,h as x,f as Kl,a as Gl,p as Jl}from"./ConfigCustomJavascriptSet__ .ace_hidden_token { display: none; -}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(t,n,u){var i=t("../lib/dom"),s=t("../lib/oop"),d=t("../lib/event_emitter").EventEmitter,o=(function(){function l(r,a){this.renderer=a,this.pixelRatio=1,this.maxHeight=a.layerConfig.maxHeight,this.lineHeight=a.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},this.setScrollBarV(r)}return l.prototype.$createCanvas=function(){this.canvas=i.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},l.prototype.setScrollBarV=function(r){this.$createCanvas(),this.scrollbarV=r,r.element.appendChild(this.canvas),this.setDimensions()},l.prototype.$updateDecorators=function(r){if(typeof this.canvas.getContext!="function")return;var a=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(r);var c=this.canvas.getContext("2d");function p(k,S){return k.priorityS.priority?1:0}var h=this.renderer.session.$annotations;if(c.clearRect(0,0,this.canvas.width,this.canvas.height),h){var f={info:1,warning:2,error:3};h.forEach(function(k){k.priority=f[k.type]||null}),h=h.sort(p);for(var g=0;gthis.canvasHeight&&(y=this.canvasHeight-A);var T=y-A,$=y+A,M=$-T;c.fillStyle=a[h[g].type]||null,c.fillRect(0,T,Math.round(this.oneZoneWidth-1),M)}}var O=this.renderer.session.selection.getCursor();if(O){var _=Math.round(this.getVerticalOffsetForRow(O.row)*this.heightRatio);c.fillStyle="rgba(0, 0, 0, 0.5)",c.fillRect(0,_,this.canvasWidth,2)}},l.prototype.getVerticalOffsetForRow=function(r){r=r|0;var a=this.renderer.session.documentToScreenRow(r,0)*this.lineHeight;return a},l.prototype.setDimensions=function(r){r=r||this.renderer.layerConfig,this.maxHeight=r.maxHeight,this.lineHeight=r.lineHeight,this.canvasHeight=r.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeightM&&(this.$changedLines.firstRow=M),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},$.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},$.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},$.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},$.prototype.updateFull=function(M){M?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},$.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},$.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},$.prototype.onResize=function(M,O,_,k){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=M?1:0;var S=this.container;k||(k=S.clientHeight||S.scrollHeight),!k&&this.$maxLines&&this.lineHeight>1&&(!S.style.height||S.style.height=="0px")&&(S.style.height="1px",k=S.clientHeight||S.scrollHeight),_||(_=S.clientWidth||S.scrollWidth);var C=this.$updateCachedSize(M,O,_,k);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!_&&!k)return this.resizing=0;M&&(this.$gutterLayer.$padding=null),M?this.$renderChanges(C|this.$changes,!0):this.$loop.schedule(C|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},$.prototype.$updateCachedSize=function(M,O,_,k){k-=this.$extraHeight||0;var S=0,C=this.$size,L={width:C.width,height:C.height,scrollerHeight:C.scrollerHeight,scrollerWidth:C.scrollerWidth};if(k&&(M||C.height!=k)&&(C.height=k,S|=this.CHANGE_SIZE,C.scrollerHeight=C.height,this.$horizScroll&&(C.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(C.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",S=S|this.CHANGE_SCROLL),_&&(M||C.width!=_)){S|=this.CHANGE_SIZE,C.width=_,O==null&&(O=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=O,s.setStyle(this.scrollBarH.element.style,"left",O+"px"),s.setStyle(this.scroller.style,"left",O+this.margin.left+"px"),C.scrollerWidth=Math.max(0,_-O-this.scrollBarV.getWidth()-this.margin.h),s.setStyle(this.$gutter.style,"left",this.margin.left+"px");var I=this.scrollBarV.getWidth()+"px";s.setStyle(this.scrollBarH.element.style,"right",I),s.setStyle(this.scroller.style,"right",I),s.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(C.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||M)&&(S|=this.CHANGE_FULL)}return C.$dirty=!_||!k,S&&this._signal("resize",L),S},$.prototype.onGutterResize=function(M){var O=this.$showGutter?M:0;O!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,O,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},$.prototype.adjustWrapLimit=function(){var M=this.$size.scrollerWidth-this.$padding*2,O=Math.floor(M/this.characterWidth);return this.session.adjustWrapLimit(O,this.$showPrintMargin&&this.$printMarginColumn)},$.prototype.setAnimatedScroll=function(M){this.setOption("animatedScroll",M)},$.prototype.getAnimatedScroll=function(){return this.$animatedScroll},$.prototype.setShowInvisibles=function(M){this.setOption("showInvisibles",M),this.session.$bidiHandler.setShowInvisibles(M)},$.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},$.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},$.prototype.setDisplayIndentGuides=function(M){this.setOption("displayIndentGuides",M)},$.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},$.prototype.setHighlightIndentGuides=function(M){this.setOption("highlightIndentGuides",M)},$.prototype.setShowPrintMargin=function(M){this.setOption("showPrintMargin",M)},$.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},$.prototype.setPrintMarginColumn=function(M){this.setOption("printMarginColumn",M)},$.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},$.prototype.getShowGutter=function(){return this.getOption("showGutter")},$.prototype.setShowGutter=function(M){return this.setOption("showGutter",M)},$.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},$.prototype.setFadeFoldWidgets=function(M){this.setOption("fadeFoldWidgets",M)},$.prototype.setHighlightGutterLine=function(M){this.setOption("highlightGutterLine",M)},$.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},$.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var M=s.createElement("div");M.className="ace_layer ace_print-margin-layer",this.$printMarginEl=s.createElement("div"),this.$printMarginEl.className="ace_print-margin",M.appendChild(this.$printMarginEl),this.content.insertBefore(M,this.content.firstChild)}var O=this.$printMarginEl.style;O.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",O.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},$.prototype.getContainerElement=function(){return this.container},$.prototype.getMouseEventTarget=function(){return this.scroller},$.prototype.getTextAreaContainer=function(){return this.container},$.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var M=this.textarea.style,O=this.$composition;if(!this.$keepTextAreaAtCursor&&!O){s.translate(this.textarea,-100,0);return}var _=this.$cursorLayer.$pixelPos;if(_){O&&O.markerRange&&(_=this.$cursorLayer.getPixelPosition(O.markerRange.start,!0));var k=this.layerConfig,S=_.top,C=_.left;S-=k.offset;var L=O&&O.useTextareaForIME||y.isMobile?this.lineHeight:1;if(S<0||S>k.height-L){s.translate(this.textarea,0,0);return}var I=1,F=this.$size.height-L;if(!O)S+=this.lineHeight;else if(O.useTextareaForIME){var R=this.textarea.value;I=this.characterWidth*this.session.$getStringScreenWidth(R)[0]}else S+=this.lineHeight+2;C-=this.scrollLeft,C>this.$size.scrollerWidth-I&&(C=this.$size.scrollerWidth-I),C+=this.gutterWidth+this.margin.left,s.setStyle(M,"height",L+"px"),s.setStyle(M,"width",I+"px"),s.translate(this.textarea,Math.min(C,this.$size.scrollerWidth-I),Math.min(S,F))}}},$.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},$.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},$.prototype.getLastFullyVisibleRow=function(){var M=this.layerConfig,O=M.lastRow,_=this.session.documentToScreenRow(O,0)*M.lineHeight;return _-this.session.getScrollTop()>M.height-M.lineHeight?O-1:O},$.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},$.prototype.setPadding=function(M){this.$padding=M,this.$textLayer.setPadding(M),this.$cursorLayer.setPadding(M),this.$markerFront.setPadding(M),this.$markerBack.setPadding(M),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},$.prototype.setScrollMargin=function(M,O,_,k){var S=this.scrollMargin;S.top=M|0,S.bottom=O|0,S.right=k|0,S.left=_|0,S.v=S.top+S.bottom,S.h=S.left+S.right,S.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-S.top),this.updateFull()},$.prototype.setMargin=function(M,O,_,k){var S=this.margin;S.top=M|0,S.bottom=O|0,S.right=k|0,S.left=_|0,S.v=S.top+S.bottom,S.h=S.left+S.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},$.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},$.prototype.setHScrollBarAlwaysVisible=function(M){this.setOption("hScrollBarAlwaysVisible",M)},$.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},$.prototype.setVScrollBarAlwaysVisible=function(M){this.setOption("vScrollBarAlwaysVisible",M)},$.prototype.$updateScrollBarV=function(){var M=this.layerConfig.maxHeight,O=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(M-=(O-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>M-O&&(M=this.scrollTop+O,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(M+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},$.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},$.prototype.freeze=function(){this.$frozen=!0},$.prototype.unfreeze=function(){this.$frozen=!1},$.prototype.$renderChanges=function(M,O){if(this.$changes&&(M|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!M&&!O){this.$changes|=M;return}if(this.$size.$dirty)return this.$changes|=M,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",M),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var _=this.layerConfig;if(M&this.CHANGE_FULL||M&this.CHANGE_SIZE||M&this.CHANGE_TEXT||M&this.CHANGE_LINES||M&this.CHANGE_SCROLL||M&this.CHANGE_H_SCROLL){if(M|=this.$computeLayerConfig()|this.$loop.clear(),_.firstRow!=this.layerConfig.firstRow&&_.firstRowScreen==this.layerConfig.firstRowScreen){var k=this.scrollTop+(_.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;k>0&&(this.scrollTop=k,M=M|this.CHANGE_SCROLL,M|=this.$computeLayerConfig()|this.$loop.clear())}_=this.layerConfig,this.$updateScrollBarV(),M&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),s.translate(this.content,-this.scrollLeft,-_.offset);var S=_.width+2*this.$padding+"px",C=_.minHeight+"px";s.setStyle(this.content.style,"width",S),s.setStyle(this.content.style,"height",C)}if(M&this.CHANGE_H_SCROLL&&(s.translate(this.content,-this.scrollLeft,-_.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),M&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(_),this.$showGutter&&this.$gutterLayer.update(_),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(_),this.$markerBack.update(_),this.$markerFront.update(_),this.$cursorLayer.update(_),this.$moveTextAreaToCursor(),this._signal("afterRender",M);return}if(M&this.CHANGE_SCROLL){this.$changedLines=null,M&this.CHANGE_TEXT||M&this.CHANGE_LINES?this.$textLayer.update(_):this.$textLayer.scrollLines(_),this.$showGutter&&(M&this.CHANGE_GUTTER||M&this.CHANGE_LINES?this.$gutterLayer.update(_):this.$gutterLayer.scrollLines(_)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(_),this.$markerBack.update(_),this.$markerFront.update(_),this.$cursorLayer.update(_),this.$moveTextAreaToCursor(),this._signal("afterRender",M);return}M&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(_),this.$showGutter&&this.$gutterLayer.update(_),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(_)):M&this.CHANGE_LINES?((this.$updateLines()||M&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(_),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(_)):M&this.CHANGE_TEXT||M&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(_),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(_)):M&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(_),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(_)),M&this.CHANGE_CURSOR&&(this.$cursorLayer.update(_),this.$moveTextAreaToCursor()),M&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(_),M&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(_),this._signal("afterRender",M)},$.prototype.$autosize=function(){var M=this.session.getScreenLength()*this.lineHeight,O=this.$maxLines*this.lineHeight,_=Math.min(O,Math.max((this.$minLines||1)*this.lineHeight,M))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(_+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&_>this.$maxPixelHeight&&(_=this.$maxPixelHeight);var k=_<=2*this.lineHeight,S=!k&&M>O;if(_!=this.desiredHeight||this.$size.height!=this.desiredHeight||S!=this.$vScroll){S!=this.$vScroll&&(this.$vScroll=S,this.scrollBarV.setVisible(S));var C=this.container.clientWidth;this.container.style.height=_+"px",this.$updateCachedSize(!0,this.$gutterWidth,C,_),this.desiredHeight=_,this._signal("autosize")}},$.prototype.$computeLayerConfig=function(){var M=this.session,O=this.$size,_=O.height<=2*this.lineHeight,k=this.session.getScreenLength(),S=k*this.lineHeight,C=this.$getLongestLine(),L=!_&&(this.$hScrollBarAlwaysVisible||O.scrollerWidth-C-2*this.$padding<0),I=this.$horizScroll!==L;I&&(this.$horizScroll=L,this.scrollBarH.setVisible(L));var F=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),_=O.height<=2*this.lineHeight);var R=O.scrollerHeight+this.lineHeight,B=!this.$maxLines&&this.$scrollPastEnd?(O.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;S+=B;var N=this.scrollMargin;this.session.setScrollTop(Math.max(-N.top,Math.min(this.scrollTop,S-O.scrollerHeight+N.bottom))),this.session.setScrollLeft(Math.max(-N.left,Math.min(this.scrollLeft,C+2*this.$padding-O.scrollerWidth+N.right)));var H=!_&&(this.$vScrollBarAlwaysVisible||O.scrollerHeight-S+B<0||this.scrollTop>N.top),W=F!==H;W&&(this.$vScroll=H,this.scrollBarV.setVisible(H));var j=this.scrollTop%this.lineHeight,U=Math.ceil(R/this.lineHeight)-1,K=Math.max(0,Math.round((this.scrollTop-j)/this.lineHeight)),J=K+U,Y,X,q=this.lineHeight;K=M.screenToDocumentRow(K,0);var ne=M.getFoldLine(K);ne&&(K=ne.start.row),Y=M.documentToScreenRow(K,0),X=M.getRowLength(K)*q,J=Math.min(M.screenToDocumentRow(J,0),M.getLength()-1),R=O.scrollerHeight+M.getRowLength(J)*q+X,j=this.scrollTop-Y*q,j<0&&Y>0&&(Y=Math.max(0,Y+Math.floor(j/q)),j=this.scrollTop-Y*q);var ue=0;return(this.layerConfig.width!=C||I)&&(ue=this.CHANGE_H_SCROLL),(I||W)&&(ue|=this.$updateCachedSize(!0,this.gutterWidth,O.width,O.height),this._signal("scrollbarVisibilityChanged"),W&&(C=this.$getLongestLine())),this.layerConfig={width:C,padding:this.$padding,firstRow:K,firstRowScreen:Y,lastRow:J,lineHeight:q,characterWidth:this.characterWidth,minHeight:R,maxHeight:S,offset:j,gutterOffset:q?Math.max(0,Math.ceil((j+O.height-O.scrollerHeight)/q)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(C-this.$padding),ue},$.prototype.$updateLines=function(){if(this.$changedLines){var M=this.$changedLines.firstRow,O=this.$changedLines.lastRow;this.$changedLines=null;var _=this.layerConfig;if(!(M>_.lastRow+1)&&!(O<_.firstRow)){if(O===1/0){this.$showGutter&&this.$gutterLayer.update(_),this.$textLayer.update(_);return}return this.$textLayer.updateLines(_,M,O),!0}}},$.prototype.$getLongestLine=function(){var M=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(M+=1),this.$textLayer&&M>this.$textLayer.MAX_LINE_LENGTH&&(M=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(M*this.characterWidth))},$.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},$.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},$.prototype.addGutterDecoration=function(M,O){this.$gutterLayer.addGutterDecoration(M,O)},$.prototype.removeGutterDecoration=function(M,O){this.$gutterLayer.removeGutterDecoration(M,O)},$.prototype.updateBreakpoints=function(M){this._rows=M,this.$loop.schedule(this.CHANGE_GUTTER)},$.prototype.setAnnotations=function(M){this.$gutterLayer.setAnnotations(M),this.$loop.schedule(this.CHANGE_GUTTER)},$.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},$.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},$.prototype.showCursor=function(){this.$cursorLayer.showCursor()},$.prototype.scrollSelectionIntoView=function(M,O,_){this.scrollCursorIntoView(M,_),this.scrollCursorIntoView(O,_)},$.prototype.scrollCursorIntoView=function(M,O,_){if(this.$size.scrollerHeight!==0){var k=this.$cursorLayer.getPixelPosition(M),S=k.left,C=k.top,L=_&&_.top||0,I=_&&_.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var F=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;F+L>C?(O&&F+L>C+this.lineHeight&&(C-=O*this.$size.scrollerHeight),C===0&&(C=-this.scrollMargin.top),this.session.setScrollTop(C)):F+this.$size.scrollerHeight-I=1-this.scrollMargin.top||O>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||M<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||M>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},$.prototype.pixelToScreenCoordinates=function(M,O){var _;if(this.$hasCssTransforms){_={top:0,left:0};var k=this.$fontMetrics.transformCoordinates([M,O]);M=k[1]-this.gutterWidth-this.margin.left,O=k[0]}else _=this.scroller.getBoundingClientRect();var S=M+this.scrollLeft-_.left-this.$padding,C=S/this.characterWidth,L=Math.floor((O+this.scrollTop-_.top)/this.lineHeight),I=this.$blockCursor?Math.floor(C):Math.round(C);return{row:L,column:I,side:C-I>0?1:-1,offsetX:S}},$.prototype.screenToTextCoordinates=function(M,O){var _;if(this.$hasCssTransforms){_={top:0,left:0};var k=this.$fontMetrics.transformCoordinates([M,O]);M=k[1]-this.gutterWidth-this.margin.left,O=k[0]}else _=this.scroller.getBoundingClientRect();var S=M+this.scrollLeft-_.left-this.$padding,C=S/this.characterWidth,L=this.$blockCursor?Math.floor(C):Math.round(C),I=Math.floor((O+this.scrollTop-_.top)/this.lineHeight);return this.session.screenToDocumentPosition(I,Math.max(L,0),S)},$.prototype.textToScreenCoordinates=function(M,O){var _=this.scroller.getBoundingClientRect(),k=this.session.documentToScreenPosition(M,O),S=this.$padding+(this.session.$bidiHandler.isBidiRow(k.row,M)?this.session.$bidiHandler.getPosLeft(k.column):Math.round(k.column*this.characterWidth)),C=k.row*this.lineHeight;return{pageX:_.left+S-this.scrollLeft,pageY:_.top+C-this.scrollTop}},$.prototype.visualizeFocus=function(){s.addCssClass(this.container,"ace_focus")},$.prototype.visualizeBlur=function(){s.removeCssClass(this.container,"ace_focus")},$.prototype.showComposition=function(M){this.$composition=M,M.cssText||(M.cssText=this.textarea.style.cssText),M.useTextareaForIME==null&&(M.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(s.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):M.markerId=this.session.addMarker(M.markerRange,"ace_composition_marker","text")},$.prototype.setCompositionText=function(M){var O=this.session.selection.cursor;this.addToken(M,"composition_placeholder",O.row,O.column),this.$moveTextAreaToCursor()},$.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),s.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var M=this.session.selection.cursor;this.removeExtraToken(M.row,M.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},$.prototype.setGhostText=function(M,O){var _=this.session.selection.cursor,k=O||{row:_.row,column:_.column};this.removeGhostText();var S=this.$calculateWrappedTextChunks(M,k);this.addToken(S[0].text,"ghost_text",k.row,k.column),this.$ghostText={text:M,position:{row:k.row,column:k.column}};var C=s.createElement("div");if(S.length>1){var L=this.hideTokensAfterPosition(k.row,k.column),I;S.slice(1).forEach(function(W){var j=s.createElement("div"),U=s.createElement("span");U.className="ace_ghost_text",W.wrapped&&(j.className="ghost_text_line_wrapped"),W.text.length===0&&(W.text=" "),U.appendChild(s.createTextNode(W.text)),j.appendChild(U),C.appendChild(j),I=j}),L.forEach(function(W){var j=s.createElement("span");A(W.type)||(j.className="ace_"+W.type.replace(/\./g," ace_")),j.appendChild(s.createTextNode(W.value)),I.appendChild(j)}),this.$ghostTextWidget={el:C,row:k.row,column:k.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var F=this.$cursorLayer.getPixelPosition(k,!0),R=this.container,B=R.getBoundingClientRect().height,N=S.length*this.lineHeight,H=N0){var R=0;F.push(S[L].length);for(var B=0;B1||Math.abs(M.$size.height-k)>1?M.$resizeTimer.delay():M.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},$})();T.prototype.CHANGE_CURSOR=1,T.prototype.CHANGE_MARKER=2,T.prototype.CHANGE_GUTTER=4,T.prototype.CHANGE_SCROLL=8,T.prototype.CHANGE_LINES=16,T.prototype.CHANGE_TEXT=32,T.prototype.CHANGE_SIZE=64,T.prototype.CHANGE_MARKER_BACK=128,T.prototype.CHANGE_MARKER_FRONT=256,T.prototype.CHANGE_FULL=512,T.prototype.CHANGE_H_SCROLL=1024,T.prototype.$changes=0,T.prototype.$padding=null,T.prototype.$frozen=!1,T.prototype.STEPS=8,i.implement(T.prototype,D),o.defineOptions(T.prototype,"renderer",{useResizeObserver:{set:function($){!$&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):$&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function($){this.$textLayer.setShowInvisibles($)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function($){typeof $=="number"&&(this.$printMarginColumn=$),this.$showPrintMargin=!!$,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function($){this.$gutter.style.display=$?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function($){this.$gutterLayer.$useSvgGutterIcons=$},initialValue:!1},showFoldedAnnotations:{set:function($){this.$gutterLayer.$showFoldedAnnotations=$},initialValue:!1},fadeFoldWidgets:{set:function($){s.setCssClass(this.$gutter,"ace_fade-fold-widgets",$)},initialValue:!1},showFoldWidgets:{set:function($){this.$gutterLayer.setShowFoldWidgets($),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function($){this.$textLayer.setDisplayIndentGuides($)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function($){this.$textLayer.setHighlightIndentGuides($)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function($){this.$gutterLayer.setHighlightGutterLine($),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function($){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function($){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function($){typeof $=="number"&&($=$+"px"),this.container.style.fontSize=$,this.updateFontSize()},initialValue:12},fontFamily:{set:function($){this.container.style.fontFamily=$,this.updateFontSize()}},maxLines:{set:function($){this.updateFull()}},minLines:{set:function($){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function($){this.updateFull()},initialValue:0},scrollPastEnd:{set:function($){$=+$||0,this.$scrollPastEnd!=$&&(this.$scrollPastEnd=$,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function($){this.$gutterLayer.$fixedWidth=!!$,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function($){this.$updateCustomScrollbar($)},initialValue:!1},theme:{set:function($){this.setTheme($)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!y.isMobile&&!y.isIE}}),n.VirtualRenderer=T}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(t,n,u){var i=t("../lib/oop"),s=t("../lib/net"),d=t("../lib/event_emitter").EventEmitter,o=t("../config");function l(p){var h="importScripts('"+s.qualifyURL(p)+"');";try{return new Blob([h],{type:"application/javascript"})}catch{var f=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,g=new f;return g.append(h),g.getBlob("application/javascript")}}function r(p){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(o.get("loadWorkerFromBlob")){var h=l(p),f=window.URL||window.webkitURL,g=f.createObjectURL(h);return new Worker(g)}return new Worker(p)}var a=function(p){p.postMessage||(p=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=p,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){i.implement(this,d),this.$createWorkerFromOldConfig=function(p,h,f,g,v){if(t.nameToUrl&&!t.toUrl&&(t.toUrl=t.nameToUrl),o.get("packaged")||!t.toUrl)g=g||o.moduleUrl(h,"worker");else{var b=this.$normalizePath;g=g||b(t.toUrl("ace/worker/worker.js",null,"_"));var D={};p.forEach(function(E){D[E]=b(t.toUrl(E,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=r(g),v&&this.send("importScripts",v),this.$worker.postMessage({init:!0,tlns:D,module:h,classname:f}),this.$worker},this.onMessage=function(p){var h=p.data;switch(h.type){case"event":this._signal(h.name,{data:h.data});break;case"call":var f=this.callbacks[h.id];f&&(f(h.data),delete this.callbacks[h.id]);break;case"error":this.reportError(h.data);break;case"log":window.console&&console.log&&console.log.apply(console,h.data);break}},this.reportError=function(p){window.console&&console.error&&console.error(p)},this.$normalizePath=function(p){return s.qualifyURL(p)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(p){p.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(p,h){this.$worker.postMessage({command:p,args:h})},this.call=function(p,h,f){if(f){var g=this.callbackId++;this.callbacks[g]=f,h.push(g)}this.send(p,h)},this.emit=function(p,h){try{h.data&&h.data.err&&(h.data.err={message:h.data.err.message,stack:h.data.err.stack,code:h.data.err.code}),this.$worker&&this.$worker.postMessage({event:p,data:{data:h.data}})}catch(f){console.error(f.stack)}},this.attachToDocument=function(p){this.$doc&&this.terminate(),this.$doc=p,this.call("setValue",[p.getValue()]),p.on("change",this.changeListener,!0)},this.changeListener=function(p){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),p.action=="insert"?this.deltaQueue.push(p.start,p.lines):this.deltaQueue.push(p.start,p.end)},this.$sendDeltaQueue=function(){var p=this.deltaQueue;p&&(this.deltaQueue=null,p.length>50&&p.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:p}))}}).call(a.prototype);var c=function(p,h,f){var g=null,v=!1,b=Object.create(d),D=[],E=new a({messageBuffer:D,terminate:function(){},postMessage:function(y){D.push(y),g&&(v?setTimeout(w):w())}});E.setEmitSync=function(y){v=y};var w=function(){var y=D.shift();y.command?g[y.command].apply(g,y.args):y.event&&b._signal(y.event,y.data)};return b.postMessage=function(y){E.onMessage({data:y})},b.callback=function(y,A){this.postMessage({type:"call",id:A,data:y})},b.emit=function(y,A){this.postMessage({type:"event",name:y,data:A})},o.loadModule(["worker",h],function(y){for(g=new y[f](b);D.length;)w()}),E};n.UIWorkerClient=c,n.WorkerClient=a,n.createWorker=r}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(t,n,u){var i=t("./range").Range,s=t("./lib/event_emitter").EventEmitter,d=t("./lib/oop"),o=(function(){function l(r,a,c,p,h,f){var g=this;this.length=a,this.session=r,this.doc=r.getDocument(),this.mainClass=h,this.othersClass=f,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=p,this.$onCursorChange=function(){setTimeout(function(){g.onCursorChange()})},this.$pos=c;var v=r.getUndoManager().$undoStack||r.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=v.length,this.setup(),r.selection.on("changeCursor",this.$onCursorChange)}return l.prototype.setup=function(){var r=this,a=this.doc,c=this.session;this.selectionBefore=c.selection.toJSON(),c.selection.inMultiSelectMode&&c.selection.toSingleRange(),this.pos=a.createAnchor(this.$pos.row,this.$pos.column);var p=this.pos;p.$insertRight=!0,p.detach(),p.markerId=c.addMarker(new i(p.row,p.column,p.row,p.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(h){var f=a.createAnchor(h.row,h.column);f.$insertRight=!0,f.detach(),r.others.push(f)}),c.setUndoSelect(!1)},l.prototype.showOtherMarkers=function(){if(!this.othersActive){var r=this.session,a=this;this.othersActive=!0,this.others.forEach(function(c){c.markerId=r.addMarker(new i(c.row,c.column,c.row,c.column+a.length),a.othersClass,null,!1)})}},l.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var r=0;r=this.pos.column&&a.start.column<=this.pos.column+this.length+1,h=a.start.column-this.pos.column;if(this.updateAnchors(r),p&&(this.length+=c),p&&!this.session.$fromUndo){if(r.action==="insert")for(var f=this.others.length-1;f>=0;f--){var g=this.others[f],v={row:g.row,column:g.column+h};this.doc.insertMergedLines(v,r.lines)}else if(r.action==="remove")for(var f=this.others.length-1;f>=0;f--){var g=this.others[f],v={row:g.row,column:g.column+h};this.doc.remove(new i(v.row,v.column,v.row,v.column-c))}}this.$updating=!1,this.updateMarkers()}},l.prototype.updateAnchors=function(r){this.pos.onChange(r);for(var a=this.others.length;a--;)this.others[a].onChange(r);this.updateMarkers()},l.prototype.updateMarkers=function(){if(!this.$updating){var r=this,a=this.session,c=function(h,f){a.removeMarker(h.markerId),h.markerId=a.addMarker(new i(h.row,h.column,h.row,h.column+r.length),f,null,!1)};c(this.pos,this.mainClass);for(var p=this.others.length;p--;)c(this.others[p],this.othersClass)}},l.prototype.onCursorChange=function(r){if(!(this.$updating||!this.session)){var a=this.session.selection.getCursor();a.row===this.pos.row&&a.column>=this.pos.column&&a.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",r)):(this.hideOtherMarkers(),this._emit("cursorLeave",r))}},l.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},l.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var r=this.session.getUndoManager(),a=(r.$undoStack||r.$undostack).length-this.$undoStackDepth,c=0;c1?s.multiSelect.joinSelections():s.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(s){s.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(s){s.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(s){s.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],n.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(s){s.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(s){return s&&s.inMultiSelectMode}}];var i=t("../keyboard/hash_handler").HashHandler;n.keyboardHandler=new i(n.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(t,n,u){var i=t("./range_list").RangeList,s=t("./range").Range,d=t("./selection").Selection,o=t("./mouse/multi_select_handler").onMouseDown,l=t("./lib/event"),r=t("./lib/lang"),a=t("./commands/multi_select_commands");n.commands=a.defaultCommands.concat(a.multiSelectCommands);var c=t("./search").Search,p=new c;function h(E,w,y){return p.$options.wrap=!0,p.$options.needle=w,p.$options.backwards=y==-1,p.find(E)}var f=t("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(f.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(E,w){if(E){if(!this.inMultiSelectMode&&this.rangeCount===0){var y=this.toOrientedRange();if(this.rangeList.add(y),this.rangeList.add(E),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),w||this.fromOrientedRange(E);this.rangeList.removeAll(),this.rangeList.add(y),this.$onAddRange(y)}E.cursor||(E.cursor=E.end);var A=this.rangeList.add(E);return this.$onAddRange(E),A.length&&this.$onRemoveRange(A),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),w||this.fromOrientedRange(E)}},this.toSingleRange=function(E){E=E||this.ranges[0];var w=this.rangeList.removeAll();w.length&&this.$onRemoveRange(w),E&&this.fromOrientedRange(E)},this.substractPoint=function(E){var w=this.rangeList.substractPoint(E);if(w)return this.$onRemoveRange(w),w[0]},this.mergeOverlappingRanges=function(){var E=this.rangeList.merge();E.length&&this.$onRemoveRange(E)},this.$onAddRange=function(E){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(E),this._signal("addRange",{range:E})},this.$onRemoveRange=function(E){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var w=this.rangeList.ranges.pop();E.push(w),this.rangeCount=0}for(var y=E.length;y--;){var A=this.ranges.indexOf(E[y]);this.ranges.splice(A,1)}this._signal("removeRange",{ranges:E}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),w=w||this.ranges[0],w&&!w.isEqual(this.getRange())&&this.fromOrientedRange(w)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new i,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var E=this.ranges.length?this.ranges:[this.getRange()],w=[],y=0;y1){var E=this.rangeList.ranges,w=E[E.length-1],y=s.fromPoints(E[0].start,w.end);this.toSingleRange(),this.setSelectionRange(y,w.cursor==w.start)}else{var A=this.session.documentToScreenPosition(this.cursor),T=this.session.documentToScreenPosition(this.anchor),$=this.rectangularRangeBlock(A,T);$.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(E,w,y){var A=[],T=E.column0;)R--;if(R>0)for(var B=0;A[B].isEmpty();)B++;for(var N=R;N>=B;N--)A[N].isEmpty()&&A.splice(N,1)}return A}}).call(d.prototype);var g=t("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(E){E.cursor||(E.cursor=E.end);var w=this.getSelectionStyle();return E.marker=this.session.addMarker(E,"ace_selection",w),this.session.$selectionMarkers.push(E),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,E},this.removeSelectionMarker=function(E){if(E.marker){this.session.removeMarker(E.marker);var w=this.session.$selectionMarkers.indexOf(E);w!=-1&&this.session.$selectionMarkers.splice(w,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(E){for(var w=this.session.$selectionMarkers,y=E.length;y--;){var A=E[y];if(A.marker){this.session.removeMarker(A.marker);var T=w.indexOf(A);T!=-1&&w.splice(T,1)}}this.session.selectionMarkerCount=w.length},this.$onAddRange=function(E){this.addSelectionMarker(E.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(E){this.removeSelectionMarkers(E.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(E){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(a.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(E){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(a.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(E){var w=E.command,y=E.editor;if(y.multiSelect){if(w.multiSelectAction)w.multiSelectAction=="forEach"?A=y.forEachSelection(w,E.args):w.multiSelectAction=="forEachLine"?A=y.forEachSelection(w,E.args,!0):w.multiSelectAction=="single"?(y.exitMultiSelectMode(),A=w.exec(y,E.args||{})):A=w.multiSelectAction(y,E.args||{});else{var A=w.exec(y,E.args||{});y.multiSelect.addRange(y.multiSelect.toOrientedRange()),y.multiSelect.mergeOverlappingRanges()}return A}},this.forEachSelection=function(E,w,y){if(!this.inVirtualSelectionMode){var A=y&&y.keepOrder,T=y==!0||y&&y.$byLines,$=this.session,M=this.selection,O=M.rangeList,_=(A?M:O).ranges,k;if(!_.length)return E.exec?E.exec(this,w||{}):E(this,w||{});var S=M._eventRegistry;M._eventRegistry={};var C=new d($);this.inVirtualSelectionMode=!0;for(var L=_.length;L--;){if(T)for(;L>0&&_[L].start.row==_[L-1].end.row;)L--;C.fromOrientedRange(_[L]),C.index=L,this.selection=$.selection=C;var I=E.exec?E.exec(this,w||{}):E(this,w||{});!k&&I!==void 0&&(k=I),C.toOrientedRange(_[L])}C.detach(),this.selection=$.selection=M,this.inVirtualSelectionMode=!1,M._eventRegistry=S,M.mergeOverlappingRanges(),M.ranges[0]&&M.fromOrientedRange(M.ranges[0]);var F=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),F&&F.from==F.to&&this.renderer.animateScrolling(F.from),k}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var E="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var w=this.multiSelect.rangeList.ranges,y=[],A=0;A0);M<0&&(M=0),O>=k&&(O=k-1)}var C=this.session.removeFullLines(M,O);C=this.$reAlignText(C,_),this.session.insert({row:M,column:0},C.join(` +}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(t,n,h){var i=t("../lib/dom"),s=t("../lib/oop"),d=t("../lib/event_emitter").EventEmitter,o=(function(){function l(r,a){this.renderer=a,this.pixelRatio=1,this.maxHeight=a.layerConfig.maxHeight,this.lineHeight=a.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},this.setScrollBarV(r)}return l.prototype.$createCanvas=function(){this.canvas=i.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},l.prototype.setScrollBarV=function(r){this.$createCanvas(),this.scrollbarV=r,r.element.appendChild(this.canvas),this.setDimensions()},l.prototype.$updateDecorators=function(r){if(typeof this.canvas.getContext!="function")return;var a=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(r);var c=this.canvas.getContext("2d");function p(k,S){return k.priorityS.priority?1:0}var u=this.renderer.session.$annotations;if(c.clearRect(0,0,this.canvas.width,this.canvas.height),u){var f={info:1,warning:2,error:3};u.forEach(function(k){k.priority=f[k.type]||null}),u=u.sort(p);for(var g=0;gthis.canvasHeight&&(y=this.canvasHeight-A);var T=y-A,x=y+A,M=x-T;c.fillStyle=a[u[g].type]||null,c.fillRect(0,T,Math.round(this.oneZoneWidth-1),M)}}var O=this.renderer.session.selection.getCursor();if(O){var _=Math.round(this.getVerticalOffsetForRow(O.row)*this.heightRatio);c.fillStyle="rgba(0, 0, 0, 0.5)",c.fillRect(0,_,this.canvasWidth,2)}},l.prototype.getVerticalOffsetForRow=function(r){r=r|0;var a=this.renderer.session.documentToScreenRow(r,0)*this.lineHeight;return a},l.prototype.setDimensions=function(r){r=r||this.renderer.layerConfig,this.maxHeight=r.maxHeight,this.lineHeight=r.lineHeight,this.canvasHeight=r.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeightM&&(this.$changedLines.firstRow=M),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},x.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},x.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},x.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},x.prototype.updateFull=function(M){M?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},x.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},x.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},x.prototype.onResize=function(M,O,_,k){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=M?1:0;var S=this.container;k||(k=S.clientHeight||S.scrollHeight),!k&&this.$maxLines&&this.lineHeight>1&&(!S.style.height||S.style.height=="0px")&&(S.style.height="1px",k=S.clientHeight||S.scrollHeight),_||(_=S.clientWidth||S.scrollWidth);var C=this.$updateCachedSize(M,O,_,k);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!_&&!k)return this.resizing=0;M&&(this.$gutterLayer.$padding=null),M?this.$renderChanges(C|this.$changes,!0):this.$loop.schedule(C|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},x.prototype.$updateCachedSize=function(M,O,_,k){k-=this.$extraHeight||0;var S=0,C=this.$size,L={width:C.width,height:C.height,scrollerHeight:C.scrollerHeight,scrollerWidth:C.scrollerWidth};if(k&&(M||C.height!=k)&&(C.height=k,S|=this.CHANGE_SIZE,C.scrollerHeight=C.height,this.$horizScroll&&(C.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(C.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",S=S|this.CHANGE_SCROLL),_&&(M||C.width!=_)){S|=this.CHANGE_SIZE,C.width=_,O==null&&(O=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=O,s.setStyle(this.scrollBarH.element.style,"left",O+"px"),s.setStyle(this.scroller.style,"left",O+this.margin.left+"px"),C.scrollerWidth=Math.max(0,_-O-this.scrollBarV.getWidth()-this.margin.h),s.setStyle(this.$gutter.style,"left",this.margin.left+"px");var I=this.scrollBarV.getWidth()+"px";s.setStyle(this.scrollBarH.element.style,"right",I),s.setStyle(this.scroller.style,"right",I),s.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(C.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||M)&&(S|=this.CHANGE_FULL)}return C.$dirty=!_||!k,S&&this._signal("resize",L),S},x.prototype.onGutterResize=function(M){var O=this.$showGutter?M:0;O!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,O,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},x.prototype.adjustWrapLimit=function(){var M=this.$size.scrollerWidth-this.$padding*2,O=Math.floor(M/this.characterWidth);return this.session.adjustWrapLimit(O,this.$showPrintMargin&&this.$printMarginColumn)},x.prototype.setAnimatedScroll=function(M){this.setOption("animatedScroll",M)},x.prototype.getAnimatedScroll=function(){return this.$animatedScroll},x.prototype.setShowInvisibles=function(M){this.setOption("showInvisibles",M),this.session.$bidiHandler.setShowInvisibles(M)},x.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},x.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},x.prototype.setDisplayIndentGuides=function(M){this.setOption("displayIndentGuides",M)},x.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},x.prototype.setHighlightIndentGuides=function(M){this.setOption("highlightIndentGuides",M)},x.prototype.setShowPrintMargin=function(M){this.setOption("showPrintMargin",M)},x.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},x.prototype.setPrintMarginColumn=function(M){this.setOption("printMarginColumn",M)},x.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},x.prototype.getShowGutter=function(){return this.getOption("showGutter")},x.prototype.setShowGutter=function(M){return this.setOption("showGutter",M)},x.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},x.prototype.setFadeFoldWidgets=function(M){this.setOption("fadeFoldWidgets",M)},x.prototype.setHighlightGutterLine=function(M){this.setOption("highlightGutterLine",M)},x.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},x.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var M=s.createElement("div");M.className="ace_layer ace_print-margin-layer",this.$printMarginEl=s.createElement("div"),this.$printMarginEl.className="ace_print-margin",M.appendChild(this.$printMarginEl),this.content.insertBefore(M,this.content.firstChild)}var O=this.$printMarginEl.style;O.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",O.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},x.prototype.getContainerElement=function(){return this.container},x.prototype.getMouseEventTarget=function(){return this.scroller},x.prototype.getTextAreaContainer=function(){return this.container},x.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var M=this.textarea.style,O=this.$composition;if(!this.$keepTextAreaAtCursor&&!O){s.translate(this.textarea,-100,0);return}var _=this.$cursorLayer.$pixelPos;if(_){O&&O.markerRange&&(_=this.$cursorLayer.getPixelPosition(O.markerRange.start,!0));var k=this.layerConfig,S=_.top,C=_.left;S-=k.offset;var L=O&&O.useTextareaForIME||y.isMobile?this.lineHeight:1;if(S<0||S>k.height-L){s.translate(this.textarea,0,0);return}var I=1,F=this.$size.height-L;if(!O)S+=this.lineHeight;else if(O.useTextareaForIME){var R=this.textarea.value;I=this.characterWidth*this.session.$getStringScreenWidth(R)[0]}else S+=this.lineHeight+2;C-=this.scrollLeft,C>this.$size.scrollerWidth-I&&(C=this.$size.scrollerWidth-I),C+=this.gutterWidth+this.margin.left,s.setStyle(M,"height",L+"px"),s.setStyle(M,"width",I+"px"),s.translate(this.textarea,Math.min(C,this.$size.scrollerWidth-I),Math.min(S,F))}}},x.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},x.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},x.prototype.getLastFullyVisibleRow=function(){var M=this.layerConfig,O=M.lastRow,_=this.session.documentToScreenRow(O,0)*M.lineHeight;return _-this.session.getScrollTop()>M.height-M.lineHeight?O-1:O},x.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},x.prototype.setPadding=function(M){this.$padding=M,this.$textLayer.setPadding(M),this.$cursorLayer.setPadding(M),this.$markerFront.setPadding(M),this.$markerBack.setPadding(M),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},x.prototype.setScrollMargin=function(M,O,_,k){var S=this.scrollMargin;S.top=M|0,S.bottom=O|0,S.right=k|0,S.left=_|0,S.v=S.top+S.bottom,S.h=S.left+S.right,S.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-S.top),this.updateFull()},x.prototype.setMargin=function(M,O,_,k){var S=this.margin;S.top=M|0,S.bottom=O|0,S.right=k|0,S.left=_|0,S.v=S.top+S.bottom,S.h=S.left+S.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},x.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},x.prototype.setHScrollBarAlwaysVisible=function(M){this.setOption("hScrollBarAlwaysVisible",M)},x.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},x.prototype.setVScrollBarAlwaysVisible=function(M){this.setOption("vScrollBarAlwaysVisible",M)},x.prototype.$updateScrollBarV=function(){var M=this.layerConfig.maxHeight,O=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(M-=(O-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>M-O&&(M=this.scrollTop+O,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(M+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},x.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},x.prototype.freeze=function(){this.$frozen=!0},x.prototype.unfreeze=function(){this.$frozen=!1},x.prototype.$renderChanges=function(M,O){if(this.$changes&&(M|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!M&&!O){this.$changes|=M;return}if(this.$size.$dirty)return this.$changes|=M,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",M),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var _=this.layerConfig;if(M&this.CHANGE_FULL||M&this.CHANGE_SIZE||M&this.CHANGE_TEXT||M&this.CHANGE_LINES||M&this.CHANGE_SCROLL||M&this.CHANGE_H_SCROLL){if(M|=this.$computeLayerConfig()|this.$loop.clear(),_.firstRow!=this.layerConfig.firstRow&&_.firstRowScreen==this.layerConfig.firstRowScreen){var k=this.scrollTop+(_.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;k>0&&(this.scrollTop=k,M=M|this.CHANGE_SCROLL,M|=this.$computeLayerConfig()|this.$loop.clear())}_=this.layerConfig,this.$updateScrollBarV(),M&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),s.translate(this.content,-this.scrollLeft,-_.offset);var S=_.width+2*this.$padding+"px",C=_.minHeight+"px";s.setStyle(this.content.style,"width",S),s.setStyle(this.content.style,"height",C)}if(M&this.CHANGE_H_SCROLL&&(s.translate(this.content,-this.scrollLeft,-_.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),M&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(_),this.$showGutter&&this.$gutterLayer.update(_),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(_),this.$markerBack.update(_),this.$markerFront.update(_),this.$cursorLayer.update(_),this.$moveTextAreaToCursor(),this._signal("afterRender",M);return}if(M&this.CHANGE_SCROLL){this.$changedLines=null,M&this.CHANGE_TEXT||M&this.CHANGE_LINES?this.$textLayer.update(_):this.$textLayer.scrollLines(_),this.$showGutter&&(M&this.CHANGE_GUTTER||M&this.CHANGE_LINES?this.$gutterLayer.update(_):this.$gutterLayer.scrollLines(_)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(_),this.$markerBack.update(_),this.$markerFront.update(_),this.$cursorLayer.update(_),this.$moveTextAreaToCursor(),this._signal("afterRender",M);return}M&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(_),this.$showGutter&&this.$gutterLayer.update(_),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(_)):M&this.CHANGE_LINES?((this.$updateLines()||M&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(_),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(_)):M&this.CHANGE_TEXT||M&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(_),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(_)):M&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(_),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(_)),M&this.CHANGE_CURSOR&&(this.$cursorLayer.update(_),this.$moveTextAreaToCursor()),M&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(_),M&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(_),this._signal("afterRender",M)},x.prototype.$autosize=function(){var M=this.session.getScreenLength()*this.lineHeight,O=this.$maxLines*this.lineHeight,_=Math.min(O,Math.max((this.$minLines||1)*this.lineHeight,M))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(_+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&_>this.$maxPixelHeight&&(_=this.$maxPixelHeight);var k=_<=2*this.lineHeight,S=!k&&M>O;if(_!=this.desiredHeight||this.$size.height!=this.desiredHeight||S!=this.$vScroll){S!=this.$vScroll&&(this.$vScroll=S,this.scrollBarV.setVisible(S));var C=this.container.clientWidth;this.container.style.height=_+"px",this.$updateCachedSize(!0,this.$gutterWidth,C,_),this.desiredHeight=_,this._signal("autosize")}},x.prototype.$computeLayerConfig=function(){var M=this.session,O=this.$size,_=O.height<=2*this.lineHeight,k=this.session.getScreenLength(),S=k*this.lineHeight,C=this.$getLongestLine(),L=!_&&(this.$hScrollBarAlwaysVisible||O.scrollerWidth-C-2*this.$padding<0),I=this.$horizScroll!==L;I&&(this.$horizScroll=L,this.scrollBarH.setVisible(L));var F=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),_=O.height<=2*this.lineHeight);var R=O.scrollerHeight+this.lineHeight,B=!this.$maxLines&&this.$scrollPastEnd?(O.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;S+=B;var N=this.scrollMargin;this.session.setScrollTop(Math.max(-N.top,Math.min(this.scrollTop,S-O.scrollerHeight+N.bottom))),this.session.setScrollLeft(Math.max(-N.left,Math.min(this.scrollLeft,C+2*this.$padding-O.scrollerWidth+N.right)));var z=!_&&(this.$vScrollBarAlwaysVisible||O.scrollerHeight-S+B<0||this.scrollTop>N.top),W=F!==z;W&&(this.$vScroll=z,this.scrollBarV.setVisible(z));var j=this.scrollTop%this.lineHeight,U=Math.ceil(R/this.lineHeight)-1,K=Math.max(0,Math.round((this.scrollTop-j)/this.lineHeight)),J=K+U,Y,X,q=this.lineHeight;K=M.screenToDocumentRow(K,0);var ne=M.getFoldLine(K);ne&&(K=ne.start.row),Y=M.documentToScreenRow(K,0),X=M.getRowLength(K)*q,J=Math.min(M.screenToDocumentRow(J,0),M.getLength()-1),R=O.scrollerHeight+M.getRowLength(J)*q+X,j=this.scrollTop-Y*q,j<0&&Y>0&&(Y=Math.max(0,Y+Math.floor(j/q)),j=this.scrollTop-Y*q);var ue=0;return(this.layerConfig.width!=C||I)&&(ue=this.CHANGE_H_SCROLL),(I||W)&&(ue|=this.$updateCachedSize(!0,this.gutterWidth,O.width,O.height),this._signal("scrollbarVisibilityChanged"),W&&(C=this.$getLongestLine())),this.layerConfig={width:C,padding:this.$padding,firstRow:K,firstRowScreen:Y,lastRow:J,lineHeight:q,characterWidth:this.characterWidth,minHeight:R,maxHeight:S,offset:j,gutterOffset:q?Math.max(0,Math.ceil((j+O.height-O.scrollerHeight)/q)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(C-this.$padding),ue},x.prototype.$updateLines=function(){if(this.$changedLines){var M=this.$changedLines.firstRow,O=this.$changedLines.lastRow;this.$changedLines=null;var _=this.layerConfig;if(!(M>_.lastRow+1)&&!(O<_.firstRow)){if(O===1/0){this.$showGutter&&this.$gutterLayer.update(_),this.$textLayer.update(_);return}return this.$textLayer.updateLines(_,M,O),!0}}},x.prototype.$getLongestLine=function(){var M=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(M+=1),this.$textLayer&&M>this.$textLayer.MAX_LINE_LENGTH&&(M=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(M*this.characterWidth))},x.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},x.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},x.prototype.addGutterDecoration=function(M,O){this.$gutterLayer.addGutterDecoration(M,O)},x.prototype.removeGutterDecoration=function(M,O){this.$gutterLayer.removeGutterDecoration(M,O)},x.prototype.updateBreakpoints=function(M){this._rows=M,this.$loop.schedule(this.CHANGE_GUTTER)},x.prototype.setAnnotations=function(M){this.$gutterLayer.setAnnotations(M),this.$loop.schedule(this.CHANGE_GUTTER)},x.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},x.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},x.prototype.showCursor=function(){this.$cursorLayer.showCursor()},x.prototype.scrollSelectionIntoView=function(M,O,_){this.scrollCursorIntoView(M,_),this.scrollCursorIntoView(O,_)},x.prototype.scrollCursorIntoView=function(M,O,_){if(this.$size.scrollerHeight!==0){var k=this.$cursorLayer.getPixelPosition(M),S=k.left,C=k.top,L=_&&_.top||0,I=_&&_.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var F=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;F+L>C?(O&&F+L>C+this.lineHeight&&(C-=O*this.$size.scrollerHeight),C===0&&(C=-this.scrollMargin.top),this.session.setScrollTop(C)):F+this.$size.scrollerHeight-I=1-this.scrollMargin.top||O>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||M<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||M>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},x.prototype.pixelToScreenCoordinates=function(M,O){var _;if(this.$hasCssTransforms){_={top:0,left:0};var k=this.$fontMetrics.transformCoordinates([M,O]);M=k[1]-this.gutterWidth-this.margin.left,O=k[0]}else _=this.scroller.getBoundingClientRect();var S=M+this.scrollLeft-_.left-this.$padding,C=S/this.characterWidth,L=Math.floor((O+this.scrollTop-_.top)/this.lineHeight),I=this.$blockCursor?Math.floor(C):Math.round(C);return{row:L,column:I,side:C-I>0?1:-1,offsetX:S}},x.prototype.screenToTextCoordinates=function(M,O){var _;if(this.$hasCssTransforms){_={top:0,left:0};var k=this.$fontMetrics.transformCoordinates([M,O]);M=k[1]-this.gutterWidth-this.margin.left,O=k[0]}else _=this.scroller.getBoundingClientRect();var S=M+this.scrollLeft-_.left-this.$padding,C=S/this.characterWidth,L=this.$blockCursor?Math.floor(C):Math.round(C),I=Math.floor((O+this.scrollTop-_.top)/this.lineHeight);return this.session.screenToDocumentPosition(I,Math.max(L,0),S)},x.prototype.textToScreenCoordinates=function(M,O){var _=this.scroller.getBoundingClientRect(),k=this.session.documentToScreenPosition(M,O),S=this.$padding+(this.session.$bidiHandler.isBidiRow(k.row,M)?this.session.$bidiHandler.getPosLeft(k.column):Math.round(k.column*this.characterWidth)),C=k.row*this.lineHeight;return{pageX:_.left+S-this.scrollLeft,pageY:_.top+C-this.scrollTop}},x.prototype.visualizeFocus=function(){s.addCssClass(this.container,"ace_focus")},x.prototype.visualizeBlur=function(){s.removeCssClass(this.container,"ace_focus")},x.prototype.showComposition=function(M){this.$composition=M,M.cssText||(M.cssText=this.textarea.style.cssText),M.useTextareaForIME==null&&(M.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(s.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):M.markerId=this.session.addMarker(M.markerRange,"ace_composition_marker","text")},x.prototype.setCompositionText=function(M){var O=this.session.selection.cursor;this.addToken(M,"composition_placeholder",O.row,O.column),this.$moveTextAreaToCursor()},x.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),s.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var M=this.session.selection.cursor;this.removeExtraToken(M.row,M.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},x.prototype.setGhostText=function(M,O){var _=this.session.selection.cursor,k=O||{row:_.row,column:_.column};this.removeGhostText();var S=this.$calculateWrappedTextChunks(M,k);this.addToken(S[0].text,"ghost_text",k.row,k.column),this.$ghostText={text:M,position:{row:k.row,column:k.column}};var C=s.createElement("div");if(S.length>1){var L=this.hideTokensAfterPosition(k.row,k.column),I;S.slice(1).forEach(function(W){var j=s.createElement("div"),U=s.createElement("span");U.className="ace_ghost_text",W.wrapped&&(j.className="ghost_text_line_wrapped"),W.text.length===0&&(W.text=" "),U.appendChild(s.createTextNode(W.text)),j.appendChild(U),C.appendChild(j),I=j}),L.forEach(function(W){var j=s.createElement("span");A(W.type)||(j.className="ace_"+W.type.replace(/\./g," ace_")),j.appendChild(s.createTextNode(W.value)),I.appendChild(j)}),this.$ghostTextWidget={el:C,row:k.row,column:k.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var F=this.$cursorLayer.getPixelPosition(k,!0),R=this.container,B=R.getBoundingClientRect().height,N=S.length*this.lineHeight,z=N0){var R=0;F.push(S[L].length);for(var B=0;B1||Math.abs(M.$size.height-k)>1?M.$resizeTimer.delay():M.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},x})();T.prototype.CHANGE_CURSOR=1,T.prototype.CHANGE_MARKER=2,T.prototype.CHANGE_GUTTER=4,T.prototype.CHANGE_SCROLL=8,T.prototype.CHANGE_LINES=16,T.prototype.CHANGE_TEXT=32,T.prototype.CHANGE_SIZE=64,T.prototype.CHANGE_MARKER_BACK=128,T.prototype.CHANGE_MARKER_FRONT=256,T.prototype.CHANGE_FULL=512,T.prototype.CHANGE_H_SCROLL=1024,T.prototype.$changes=0,T.prototype.$padding=null,T.prototype.$frozen=!1,T.prototype.STEPS=8,i.implement(T.prototype,D),o.defineOptions(T.prototype,"renderer",{useResizeObserver:{set:function(x){!x&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):x&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(x){this.$textLayer.setShowInvisibles(x)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(x){typeof x=="number"&&(this.$printMarginColumn=x),this.$showPrintMargin=!!x,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(x){this.$gutter.style.display=x?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(x){this.$gutterLayer.$useSvgGutterIcons=x},initialValue:!1},showFoldedAnnotations:{set:function(x){this.$gutterLayer.$showFoldedAnnotations=x},initialValue:!1},fadeFoldWidgets:{set:function(x){s.setCssClass(this.$gutter,"ace_fade-fold-widgets",x)},initialValue:!1},showFoldWidgets:{set:function(x){this.$gutterLayer.setShowFoldWidgets(x),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(x){this.$textLayer.setDisplayIndentGuides(x)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(x){this.$textLayer.setHighlightIndentGuides(x)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(x){this.$gutterLayer.setHighlightGutterLine(x),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(x){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(x){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(x){typeof x=="number"&&(x=x+"px"),this.container.style.fontSize=x,this.updateFontSize()},initialValue:12},fontFamily:{set:function(x){this.container.style.fontFamily=x,this.updateFontSize()}},maxLines:{set:function(x){this.updateFull()}},minLines:{set:function(x){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(x){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(x){x=+x||0,this.$scrollPastEnd!=x&&(this.$scrollPastEnd=x,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(x){this.$gutterLayer.$fixedWidth=!!x,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(x){this.$updateCustomScrollbar(x)},initialValue:!1},theme:{set:function(x){this.setTheme(x)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!y.isMobile&&!y.isIE}}),n.VirtualRenderer=T}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(t,n,h){var i=t("../lib/oop"),s=t("../lib/net"),d=t("../lib/event_emitter").EventEmitter,o=t("../config");function l(p){var u="importScripts('"+s.qualifyURL(p)+"');";try{return new Blob([u],{type:"application/javascript"})}catch{var f=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,g=new f;return g.append(u),g.getBlob("application/javascript")}}function r(p){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(o.get("loadWorkerFromBlob")){var u=l(p),f=window.URL||window.webkitURL,g=f.createObjectURL(u);return new Worker(g)}return new Worker(p)}var a=function(p){p.postMessage||(p=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=p,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){i.implement(this,d),this.$createWorkerFromOldConfig=function(p,u,f,g,v){if(t.nameToUrl&&!t.toUrl&&(t.toUrl=t.nameToUrl),o.get("packaged")||!t.toUrl)g=g||o.moduleUrl(u,"worker");else{var b=this.$normalizePath;g=g||b(t.toUrl("ace/worker/worker.js",null,"_"));var D={};p.forEach(function(E){D[E]=b(t.toUrl(E,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=r(g),v&&this.send("importScripts",v),this.$worker.postMessage({init:!0,tlns:D,module:u,classname:f}),this.$worker},this.onMessage=function(p){var u=p.data;switch(u.type){case"event":this._signal(u.name,{data:u.data});break;case"call":var f=this.callbacks[u.id];f&&(f(u.data),delete this.callbacks[u.id]);break;case"error":this.reportError(u.data);break;case"log":window.console&&console.log&&console.log.apply(console,u.data);break}},this.reportError=function(p){window.console&&console.error&&console.error(p)},this.$normalizePath=function(p){return s.qualifyURL(p)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(p){p.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(p,u){this.$worker.postMessage({command:p,args:u})},this.call=function(p,u,f){if(f){var g=this.callbackId++;this.callbacks[g]=f,u.push(g)}this.send(p,u)},this.emit=function(p,u){try{u.data&&u.data.err&&(u.data.err={message:u.data.err.message,stack:u.data.err.stack,code:u.data.err.code}),this.$worker&&this.$worker.postMessage({event:p,data:{data:u.data}})}catch(f){console.error(f.stack)}},this.attachToDocument=function(p){this.$doc&&this.terminate(),this.$doc=p,this.call("setValue",[p.getValue()]),p.on("change",this.changeListener,!0)},this.changeListener=function(p){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),p.action=="insert"?this.deltaQueue.push(p.start,p.lines):this.deltaQueue.push(p.start,p.end)},this.$sendDeltaQueue=function(){var p=this.deltaQueue;p&&(this.deltaQueue=null,p.length>50&&p.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:p}))}}).call(a.prototype);var c=function(p,u,f){var g=null,v=!1,b=Object.create(d),D=[],E=new a({messageBuffer:D,terminate:function(){},postMessage:function(y){D.push(y),g&&(v?setTimeout(w):w())}});E.setEmitSync=function(y){v=y};var w=function(){var y=D.shift();y.command?g[y.command].apply(g,y.args):y.event&&b._signal(y.event,y.data)};return b.postMessage=function(y){E.onMessage({data:y})},b.callback=function(y,A){this.postMessage({type:"call",id:A,data:y})},b.emit=function(y,A){this.postMessage({type:"event",name:y,data:A})},o.loadModule(["worker",u],function(y){for(g=new y[f](b);D.length;)w()}),E};n.UIWorkerClient=c,n.WorkerClient=a,n.createWorker=r}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(t,n,h){var i=t("./range").Range,s=t("./lib/event_emitter").EventEmitter,d=t("./lib/oop"),o=(function(){function l(r,a,c,p,u,f){var g=this;this.length=a,this.session=r,this.doc=r.getDocument(),this.mainClass=u,this.othersClass=f,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=p,this.$onCursorChange=function(){setTimeout(function(){g.onCursorChange()})},this.$pos=c;var v=r.getUndoManager().$undoStack||r.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=v.length,this.setup(),r.selection.on("changeCursor",this.$onCursorChange)}return l.prototype.setup=function(){var r=this,a=this.doc,c=this.session;this.selectionBefore=c.selection.toJSON(),c.selection.inMultiSelectMode&&c.selection.toSingleRange(),this.pos=a.createAnchor(this.$pos.row,this.$pos.column);var p=this.pos;p.$insertRight=!0,p.detach(),p.markerId=c.addMarker(new i(p.row,p.column,p.row,p.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(u){var f=a.createAnchor(u.row,u.column);f.$insertRight=!0,f.detach(),r.others.push(f)}),c.setUndoSelect(!1)},l.prototype.showOtherMarkers=function(){if(!this.othersActive){var r=this.session,a=this;this.othersActive=!0,this.others.forEach(function(c){c.markerId=r.addMarker(new i(c.row,c.column,c.row,c.column+a.length),a.othersClass,null,!1)})}},l.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var r=0;r=this.pos.column&&a.start.column<=this.pos.column+this.length+1,u=a.start.column-this.pos.column;if(this.updateAnchors(r),p&&(this.length+=c),p&&!this.session.$fromUndo){if(r.action==="insert")for(var f=this.others.length-1;f>=0;f--){var g=this.others[f],v={row:g.row,column:g.column+u};this.doc.insertMergedLines(v,r.lines)}else if(r.action==="remove")for(var f=this.others.length-1;f>=0;f--){var g=this.others[f],v={row:g.row,column:g.column+u};this.doc.remove(new i(v.row,v.column,v.row,v.column-c))}}this.$updating=!1,this.updateMarkers()}},l.prototype.updateAnchors=function(r){this.pos.onChange(r);for(var a=this.others.length;a--;)this.others[a].onChange(r);this.updateMarkers()},l.prototype.updateMarkers=function(){if(!this.$updating){var r=this,a=this.session,c=function(u,f){a.removeMarker(u.markerId),u.markerId=a.addMarker(new i(u.row,u.column,u.row,u.column+r.length),f,null,!1)};c(this.pos,this.mainClass);for(var p=this.others.length;p--;)c(this.others[p],this.othersClass)}},l.prototype.onCursorChange=function(r){if(!(this.$updating||!this.session)){var a=this.session.selection.getCursor();a.row===this.pos.row&&a.column>=this.pos.column&&a.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",r)):(this.hideOtherMarkers(),this._emit("cursorLeave",r))}},l.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},l.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var r=this.session.getUndoManager(),a=(r.$undoStack||r.$undostack).length-this.$undoStackDepth,c=0;c1?s.multiSelect.joinSelections():s.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(s){s.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(s){s.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(s){s.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],n.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(s){s.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(s){return s&&s.inMultiSelectMode}}];var i=t("../keyboard/hash_handler").HashHandler;n.keyboardHandler=new i(n.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(t,n,h){var i=t("./range_list").RangeList,s=t("./range").Range,d=t("./selection").Selection,o=t("./mouse/multi_select_handler").onMouseDown,l=t("./lib/event"),r=t("./lib/lang"),a=t("./commands/multi_select_commands");n.commands=a.defaultCommands.concat(a.multiSelectCommands);var c=t("./search").Search,p=new c;function u(E,w,y){return p.$options.wrap=!0,p.$options.needle=w,p.$options.backwards=y==-1,p.find(E)}var f=t("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(f.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(E,w){if(E){if(!this.inMultiSelectMode&&this.rangeCount===0){var y=this.toOrientedRange();if(this.rangeList.add(y),this.rangeList.add(E),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),w||this.fromOrientedRange(E);this.rangeList.removeAll(),this.rangeList.add(y),this.$onAddRange(y)}E.cursor||(E.cursor=E.end);var A=this.rangeList.add(E);return this.$onAddRange(E),A.length&&this.$onRemoveRange(A),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),w||this.fromOrientedRange(E)}},this.toSingleRange=function(E){E=E||this.ranges[0];var w=this.rangeList.removeAll();w.length&&this.$onRemoveRange(w),E&&this.fromOrientedRange(E)},this.substractPoint=function(E){var w=this.rangeList.substractPoint(E);if(w)return this.$onRemoveRange(w),w[0]},this.mergeOverlappingRanges=function(){var E=this.rangeList.merge();E.length&&this.$onRemoveRange(E)},this.$onAddRange=function(E){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(E),this._signal("addRange",{range:E})},this.$onRemoveRange=function(E){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var w=this.rangeList.ranges.pop();E.push(w),this.rangeCount=0}for(var y=E.length;y--;){var A=this.ranges.indexOf(E[y]);this.ranges.splice(A,1)}this._signal("removeRange",{ranges:E}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),w=w||this.ranges[0],w&&!w.isEqual(this.getRange())&&this.fromOrientedRange(w)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new i,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var E=this.ranges.length?this.ranges:[this.getRange()],w=[],y=0;y1){var E=this.rangeList.ranges,w=E[E.length-1],y=s.fromPoints(E[0].start,w.end);this.toSingleRange(),this.setSelectionRange(y,w.cursor==w.start)}else{var A=this.session.documentToScreenPosition(this.cursor),T=this.session.documentToScreenPosition(this.anchor),x=this.rectangularRangeBlock(A,T);x.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(E,w,y){var A=[],T=E.column0;)R--;if(R>0)for(var B=0;A[B].isEmpty();)B++;for(var N=R;N>=B;N--)A[N].isEmpty()&&A.splice(N,1)}return A}}).call(d.prototype);var g=t("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(E){E.cursor||(E.cursor=E.end);var w=this.getSelectionStyle();return E.marker=this.session.addMarker(E,"ace_selection",w),this.session.$selectionMarkers.push(E),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,E},this.removeSelectionMarker=function(E){if(E.marker){this.session.removeMarker(E.marker);var w=this.session.$selectionMarkers.indexOf(E);w!=-1&&this.session.$selectionMarkers.splice(w,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(E){for(var w=this.session.$selectionMarkers,y=E.length;y--;){var A=E[y];if(A.marker){this.session.removeMarker(A.marker);var T=w.indexOf(A);T!=-1&&w.splice(T,1)}}this.session.selectionMarkerCount=w.length},this.$onAddRange=function(E){this.addSelectionMarker(E.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(E){this.removeSelectionMarkers(E.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(E){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(a.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(E){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(a.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(E){var w=E.command,y=E.editor;if(y.multiSelect){if(w.multiSelectAction)w.multiSelectAction=="forEach"?A=y.forEachSelection(w,E.args):w.multiSelectAction=="forEachLine"?A=y.forEachSelection(w,E.args,!0):w.multiSelectAction=="single"?(y.exitMultiSelectMode(),A=w.exec(y,E.args||{})):A=w.multiSelectAction(y,E.args||{});else{var A=w.exec(y,E.args||{});y.multiSelect.addRange(y.multiSelect.toOrientedRange()),y.multiSelect.mergeOverlappingRanges()}return A}},this.forEachSelection=function(E,w,y){if(!this.inVirtualSelectionMode){var A=y&&y.keepOrder,T=y==!0||y&&y.$byLines,x=this.session,M=this.selection,O=M.rangeList,_=(A?M:O).ranges,k;if(!_.length)return E.exec?E.exec(this,w||{}):E(this,w||{});var S=M._eventRegistry;M._eventRegistry={};var C=new d(x);this.inVirtualSelectionMode=!0;for(var L=_.length;L--;){if(T)for(;L>0&&_[L].start.row==_[L-1].end.row;)L--;C.fromOrientedRange(_[L]),C.index=L,this.selection=x.selection=C;var I=E.exec?E.exec(this,w||{}):E(this,w||{});!k&&I!==void 0&&(k=I),C.toOrientedRange(_[L])}C.detach(),this.selection=x.selection=M,this.inVirtualSelectionMode=!1,M._eventRegistry=S,M.mergeOverlappingRanges(),M.ranges[0]&&M.fromOrientedRange(M.ranges[0]);var F=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),F&&F.from==F.to&&this.renderer.animateScrolling(F.from),k}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var E="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var w=this.multiSelect.rangeList.ranges,y=[],A=0;A0);M<0&&(M=0),O>=k&&(O=k-1)}var C=this.session.removeFullLines(M,O);C=this.$reAlignText(C,_),this.session.insert({row:M,column:0},C.join(` `)+` -`),_||($.start.column=0,$.end.column=C[C.length-1].length),this.selection.setRange($)}else{T.forEach(function(R){w.substractPoint(R.cursor)});var L=0,I=1/0,F=y.map(function(R){var B=R.cursor,N=E.getLine(B.row),H=N.substr(B.column).search(/\S/g);return H==-1&&(H=0),B.column>L&&(L=B.column),HW?E.insert(N,r.stringRepeat(" ",H-W)):E.remove(new s(N.row,N.column,N.row,N.column-H+W)),R.start.column=R.end.column=L,R.start.row=R.end.row=N.row,R.cursor=R.end}),w.fromOrientedRange(y[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(E,w){var y=!0,A=!0,T,$,M;return E.map(function(C){var L=C.match(/(\s*)(.*?)(\s*)([=:].*)/);return L?T==null?(T=L[1].length,$=L[2].length,M=L[3].length,L):(T+$+M!=L[1].length+L[2].length+L[3].length&&(A=!1),T!=L[1].length&&(y=!1),T>L[1].length&&(T=L[1].length),$L[3].length&&(M=L[3].length),L):[C]}).map(w?_:y?A?k:_:S);function O(C){return r.stringRepeat(" ",C)}function _(C){return C[2]?O(T)+C[2]+O($-C[2].length+M)+C[4].replace(/^([=:])\s+/,"$1 "):C[0]}function k(C){return C[2]?O(T+$-C[2].length)+C[2]+O(M)+C[4].replace(/^([=:])\s+/,"$1 "):C[0]}function S(C){return C[2]?O(T)+C[2]+O(M)+C[4].replace(/^([=:])\s+/,"$1 "):C[0]}}}).call(g.prototype);function v(E,w){return E.row==w.row&&E.column==w.column}n.onSessionChange=function(E){var w=E.session;w&&!w.multiSelect&&(w.$selectionMarkers=[],w.selection.$initRangeList(),w.multiSelect=w.selection),this.multiSelect=w&&w.multiSelect;var y=E.oldSession;y&&(y.multiSelect.off("addRange",this.$onAddRange),y.multiSelect.off("removeRange",this.$onRemoveRange),y.multiSelect.off("multiSelect",this.$onMultiSelect),y.multiSelect.off("singleSelect",this.$onSingleSelect),y.multiSelect.lead.off("change",this.$checkMultiselectChange),y.multiSelect.anchor.off("change",this.$checkMultiselectChange)),w&&(w.multiSelect.on("addRange",this.$onAddRange),w.multiSelect.on("removeRange",this.$onRemoveRange),w.multiSelect.on("multiSelect",this.$onMultiSelect),w.multiSelect.on("singleSelect",this.$onSingleSelect),w.multiSelect.lead.on("change",this.$checkMultiselectChange),w.multiSelect.anchor.on("change",this.$checkMultiselectChange)),w&&this.inMultiSelectMode!=w.selection.inMultiSelectMode&&(w.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function b(E){E.$multiselectOnSessionChange||(E.$onAddRange=E.$onAddRange.bind(E),E.$onRemoveRange=E.$onRemoveRange.bind(E),E.$onMultiSelect=E.$onMultiSelect.bind(E),E.$onSingleSelect=E.$onSingleSelect.bind(E),E.$multiselectOnSessionChange=n.onSessionChange.bind(E),E.$checkMultiselectChange=E.$checkMultiselectChange.bind(E),E.$multiselectOnSessionChange(E),E.on("changeSession",E.$multiselectOnSessionChange),E.on("mousedown",o),E.commands.addCommands(a.defaultCommands),D(E))}function D(E){if(!E.textInput)return;var w=E.textInput.getElement(),y=!1;l.addListener(w,"keydown",function(T){var $=T.keyCode==18&&!(T.ctrlKey||T.shiftKey||T.metaKey);E.$blockSelectEnabled&&$?y||(E.renderer.setMouseCursor("crosshair"),y=!0):y&&A()},E),l.addListener(w,"keyup",A,E),l.addListener(w,"blur",A,E);function A(T){y&&(E.renderer.setMouseCursor(""),y=!1)}}n.MultiSelect=b,t("./config").defineOptions(g.prototype,"editor",{enableMultiselect:{set:function(E){b(this),E?this.on("mousedown",o):this.off("mousedown",o)},value:!0},enableBlockSelect:{set:function(E){this.$blockSelectEnabled=E},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(t,n,u){var i=t("../../range").Range,s=n.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(d,o,l){var r=d.getLine(l);return this.foldingStartMarker.test(r)?"start":o=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(d,o,l){return null},this.indentationBlock=function(d,o,l){var r=/\S/,a=d.getLine(o),c=a.search(r);if(c!=-1){for(var p=l||a.length,h=d.getLength(),f=o,g=o;++of){var D=d.getLine(g).length;return new i(f,p,g,D)}}},this.openingBracketBlock=function(d,o,l,r,a){var c={row:l,column:r+1},p=d.$findClosingBracket(o,c,a);if(p){var h=d.foldWidgets[p.row];return h==null&&(h=d.getFoldWidget(p.row)),h=="start"&&p.row>c.row&&(p.row--,p.column=d.getLine(p.row).length),i.fromPoints(c,p)}},this.closingBracketBlock=function(d,o,l,r,a){var c={row:l,column:r},p=d.$findOpeningBracket(o,c);if(p)return p.column++,c.column--,i.fromPoints(p,c)}}).call(s.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(t,n,u){var i=t("../lib/dom"),s=t("../range").Range,d=t("../config").nls;function o(r,a,c){for(var p=0,h=r.length-1;p<=h;){var f=p+h>>1,g=c(a,r[f]);if(g>0)p=f+1;else if(g<0)h=f-1;else return f}return-(p+1)}function l(r,a,c){var p=r.getAnnotations().sort(s.comparePoints);if(p.length){var h=o(p,{row:a,column:-1},s.comparePoints);h<0&&(h=-h-1),h>=p.length?h=c>0?0:p.length-1:h===0&&c<0&&(h=p.length-1);var f=p[h];if(!(!f||!c)){if(f.row===a){do f=p[h+=c];while(f&&f.row===a);if(!f)return p.slice()}var g=[];a=f.row;do g[c<0?"unshift":"push"](f),f=p[h+=c];while(f&&f.row==a);return g.length&&g}}}n.showErrorMarker=function(r,a){var c=r.session,p=r.getCursorPosition(),h=p.row,f=c.widgetManager.getWidgetsAtRow(h).filter(function(T){return T.type=="errorMarker"})[0];f?f.destroy():h-=a;var g=l(c,h,a),v;if(g){var b=g[0];p.column=(b.pos&&typeof b.column!="number"?b.pos.sc:b.column)||0,p.row=b.row,v=r.renderer.$gutterLayer.$annotations[p.row]}else{if(f)return;v={displayText:[d("error-marker.good-state","Looks good!")],className:"ace_ok"}}r.session.unfold(p.row),r.selection.moveToPosition(p);var D={row:p.row,fixedWidth:!0,coverGutter:!0,el:i.createElement("div"),type:"errorMarker"},E=D.el.appendChild(i.createElement("div")),w=D.el.appendChild(i.createElement("div"));w.className="error_widget_arrow "+v.className;var y=r.renderer.$cursorLayer.getPixelPosition(p).left;w.style.left=y+r.renderer.gutterWidth-5+"px",D.el.className="error_widget_wrapper",E.className="error_widget "+v.className,v.displayText.forEach(function(T,$){E.appendChild(i.createTextNode(T)),$L&&(L=B.column),zW?E.insert(N,r.stringRepeat(" ",z-W)):E.remove(new s(N.row,N.column,N.row,N.column-z+W)),R.start.column=R.end.column=L,R.start.row=R.end.row=N.row,R.cursor=R.end}),w.fromOrientedRange(y[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(E,w){var y=!0,A=!0,T,x,M;return E.map(function(C){var L=C.match(/(\s*)(.*?)(\s*)([=:].*)/);return L?T==null?(T=L[1].length,x=L[2].length,M=L[3].length,L):(T+x+M!=L[1].length+L[2].length+L[3].length&&(A=!1),T!=L[1].length&&(y=!1),T>L[1].length&&(T=L[1].length),xL[3].length&&(M=L[3].length),L):[C]}).map(w?_:y?A?k:_:S);function O(C){return r.stringRepeat(" ",C)}function _(C){return C[2]?O(T)+C[2]+O(x-C[2].length+M)+C[4].replace(/^([=:])\s+/,"$1 "):C[0]}function k(C){return C[2]?O(T+x-C[2].length)+C[2]+O(M)+C[4].replace(/^([=:])\s+/,"$1 "):C[0]}function S(C){return C[2]?O(T)+C[2]+O(M)+C[4].replace(/^([=:])\s+/,"$1 "):C[0]}}}).call(g.prototype);function v(E,w){return E.row==w.row&&E.column==w.column}n.onSessionChange=function(E){var w=E.session;w&&!w.multiSelect&&(w.$selectionMarkers=[],w.selection.$initRangeList(),w.multiSelect=w.selection),this.multiSelect=w&&w.multiSelect;var y=E.oldSession;y&&(y.multiSelect.off("addRange",this.$onAddRange),y.multiSelect.off("removeRange",this.$onRemoveRange),y.multiSelect.off("multiSelect",this.$onMultiSelect),y.multiSelect.off("singleSelect",this.$onSingleSelect),y.multiSelect.lead.off("change",this.$checkMultiselectChange),y.multiSelect.anchor.off("change",this.$checkMultiselectChange)),w&&(w.multiSelect.on("addRange",this.$onAddRange),w.multiSelect.on("removeRange",this.$onRemoveRange),w.multiSelect.on("multiSelect",this.$onMultiSelect),w.multiSelect.on("singleSelect",this.$onSingleSelect),w.multiSelect.lead.on("change",this.$checkMultiselectChange),w.multiSelect.anchor.on("change",this.$checkMultiselectChange)),w&&this.inMultiSelectMode!=w.selection.inMultiSelectMode&&(w.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function b(E){E.$multiselectOnSessionChange||(E.$onAddRange=E.$onAddRange.bind(E),E.$onRemoveRange=E.$onRemoveRange.bind(E),E.$onMultiSelect=E.$onMultiSelect.bind(E),E.$onSingleSelect=E.$onSingleSelect.bind(E),E.$multiselectOnSessionChange=n.onSessionChange.bind(E),E.$checkMultiselectChange=E.$checkMultiselectChange.bind(E),E.$multiselectOnSessionChange(E),E.on("changeSession",E.$multiselectOnSessionChange),E.on("mousedown",o),E.commands.addCommands(a.defaultCommands),D(E))}function D(E){if(!E.textInput)return;var w=E.textInput.getElement(),y=!1;l.addListener(w,"keydown",function(T){var x=T.keyCode==18&&!(T.ctrlKey||T.shiftKey||T.metaKey);E.$blockSelectEnabled&&x?y||(E.renderer.setMouseCursor("crosshair"),y=!0):y&&A()},E),l.addListener(w,"keyup",A,E),l.addListener(w,"blur",A,E);function A(T){y&&(E.renderer.setMouseCursor(""),y=!1)}}n.MultiSelect=b,t("./config").defineOptions(g.prototype,"editor",{enableMultiselect:{set:function(E){b(this),E?this.on("mousedown",o):this.off("mousedown",o)},value:!0},enableBlockSelect:{set:function(E){this.$blockSelectEnabled=E},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(t,n,h){var i=t("../../range").Range,s=n.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(d,o,l){var r=d.getLine(l);return this.foldingStartMarker.test(r)?"start":o=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(d,o,l){return null},this.indentationBlock=function(d,o,l){var r=/\S/,a=d.getLine(o),c=a.search(r);if(c!=-1){for(var p=l||a.length,u=d.getLength(),f=o,g=o;++of){var D=d.getLine(g).length;return new i(f,p,g,D)}}},this.openingBracketBlock=function(d,o,l,r,a){var c={row:l,column:r+1},p=d.$findClosingBracket(o,c,a);if(p){var u=d.foldWidgets[p.row];return u==null&&(u=d.getFoldWidget(p.row)),u=="start"&&p.row>c.row&&(p.row--,p.column=d.getLine(p.row).length),i.fromPoints(c,p)}},this.closingBracketBlock=function(d,o,l,r,a){var c={row:l,column:r},p=d.$findOpeningBracket(o,c);if(p)return p.column++,c.column--,i.fromPoints(p,c)}}).call(s.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(t,n,h){var i=t("../lib/dom"),s=t("../range").Range,d=t("../config").nls;function o(r,a,c){for(var p=0,u=r.length-1;p<=u;){var f=p+u>>1,g=c(a,r[f]);if(g>0)p=f+1;else if(g<0)u=f-1;else return f}return-(p+1)}function l(r,a,c){var p=r.getAnnotations().sort(s.comparePoints);if(p.length){var u=o(p,{row:a,column:-1},s.comparePoints);u<0&&(u=-u-1),u>=p.length?u=c>0?0:p.length-1:u===0&&c<0&&(u=p.length-1);var f=p[u];if(!(!f||!c)){if(f.row===a){do f=p[u+=c];while(f&&f.row===a);if(!f)return p.slice()}var g=[];a=f.row;do g[c<0?"unshift":"push"](f),f=p[u+=c];while(f&&f.row==a);return g.length&&g}}}n.showErrorMarker=function(r,a){var c=r.session,p=r.getCursorPosition(),u=p.row,f=c.widgetManager.getWidgetsAtRow(u).filter(function(T){return T.type=="errorMarker"})[0];f?f.destroy():u-=a;var g=l(c,u,a),v;if(g){var b=g[0];p.column=(b.pos&&typeof b.column!="number"?b.pos.sc:b.column)||0,p.row=b.row,v=r.renderer.$gutterLayer.$annotations[p.row]}else{if(f)return;v={displayText:[d("error-marker.good-state","Looks good!")],className:"ace_ok"}}r.session.unfold(p.row),r.selection.moveToPosition(p);var D={row:p.row,fixedWidth:!0,coverGutter:!0,el:i.createElement("div"),type:"errorMarker"},E=D.el.appendChild(i.createElement("div")),w=D.el.appendChild(i.createElement("div"));w.className="error_widget_arrow "+v.className;var y=r.renderer.$cursorLayer.getPixelPosition(p).left;w.style.left=y+r.renderer.gutterWidth-5+"px",D.el.className="error_widget_wrapper",E.className="error_widget "+v.className,v.displayText.forEach(function(T,x){E.appendChild(i.createTextNode(T)),x-1}function pl(z,G){var Z=this.__data__,ee=oi(Z,z);return ee<0?(++this.size,Z.push([z,G])):Z[ee][1]=G,this}pt.prototype.clear=ll,pt.prototype.delete=cl,pt.prototype.get=hl,pt.prototype.has=ul,pt.prototype.set=pl;function Rt(z){var G=-1,Z=z==null?0:z.length;for(this.clear();++GFe))return!1;var De=le.get(z);if(De&&le.get(G))return De==G;var Ue=-1,et=!0,Pe=Z&i?new ri:void 0;for(le.set(z,G),le.set(G,z);++Ue-1&&z%1==0&&z-1&&z%1==0&&z<=s}function Ir(z){var G=typeof z;return z!=null&&(G=="object"||G=="function")}function Tn(z){return z!=null&&typeof z=="object"}var Or=Oe?Wa(Oe):kl;function Hl(z){return jl(z)?Dl(z):Tl(z)}function Vl(){return[]}function Ul(){return!1}m.exports=zl})(Ri,Ri.exports);var Go=Ri.exports,st={};Object.defineProperty(st,"__esModule",{value:!0});st.getAceInstance=st.debounce=st.editorEvents=st.editorOptions=void 0;var iu=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];st.editorOptions=iu;var su=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];st.editorEvents=su;var ru=function(){var m;return typeof window>"u"?(Ge.window={},m=Fi,delete Ge.window):window.ace?(m=window.ace,m.acequire=window.ace.require||window.ace.acequire):m=Fi,m};st.getAceInstance=ru;var ou=function(m,e){var t=null;return function(){var n=this,u=arguments;clearTimeout(t),t=setTimeout(function(){m.apply(n,u)},e)}};st.debounce=ou;var au=Yt&&Yt.__extends||(function(){var m=function(e,t){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,u){n.__proto__=u}||function(n,u){for(var i in u)Object.prototype.hasOwnProperty.call(u,i)&&(n[i]=u[i])},m(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");m(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),Ls=Yt&&Yt.__assign||function(){return Ls=Object.assign||function(m){for(var e,t=1,n=arguments.length;t0&&this.handleMarkers(A);var O=this.editor.$options;hn.editorOptions.forEach(function(_){O.hasOwnProperty(_)?t.editor.setOption(_,t.props[_]):t.props[_]&&console.warn("ReactAce: editor option ".concat(_," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}),this.handleOptions(this.props),Array.isArray(w)&&w.forEach(function(_){typeof _.exec=="string"?t.editor.commands.bindKey(_.bindKey,_.exec):t.editor.commands.addCommand(_)}),D&&this.editor.setKeyboardHandler("ace/keyboard/"+D),u&&(this.refEditor.className+=" "+u),E&&E(this.editor),this.editor.resize(),o&&this.editor.focus()},e.prototype.componentDidUpdate=function(t){for(var n=t,u=this.props,i=0;i 0!";if(a!=this.$splits){if(a>this.$splits){for(;this.$splitsa;)c=this.$editors[this.$splits-1],this.$container.removeChild(c.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(a){return this.$editors[a]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(a){this.$editors.forEach(function(c){c.setTheme(a)})},this.setKeyboardHandler=function(a){this.$editors.forEach(function(c){c.setKeyboardHandler(a)})},this.forEach=function(a,c){this.$editors.forEach(a,c)},this.$fontSize="",this.setFontSize=function(a){this.$fontSize=a,this.forEach(function(c){c.setFontSize(a)})},this.$cloneSession=function(a){var c=new l(a.getDocument(),a.getMode()),p=a.getUndoManager();return c.setUndoManager(p),c.setTabSize(a.getTabSize()),c.setUseSoftTabs(a.getUseSoftTabs()),c.setOverwrite(a.getOverwrite()),c.setBreakpoints(a.getBreakpoints()),c.setUseWrapMode(a.getUseWrapMode()),c.setUseWorker(a.getUseWorker()),c.setWrapLimitRange(a.$wrapLimitRange.min,a.$wrapLimitRange.max),c.$foldData=a.$cloneFoldData(),c},this.setSession=function(a,c){var p;c==null?p=this.$cEditor:p=this.$editors[c];var h=this.$editors.some(function(f){return f.session===a});return h&&(a=this.$cloneSession(a)),p.setSession(a),a},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(a){this.$orientation!=a&&(this.$orientation=a,this.resize())},this.resize=function(){var a=this.$container.clientWidth,c=this.$container.clientHeight,p;if(this.$orientation==this.BESIDE)for(var h=a/this.$splits,f=0;f-1}function Wu(m,e){var t=this.__data__,n=zi(t,m);return n<0?t.push([m,e]):t[n][1]=e,this}Sn.prototype.clear=Ru;Sn.prototype.delete=Nu;Sn.prototype.get=Bu;Sn.prototype.has=Pu;Sn.prototype.set=Wu;function qt(m){var e=-1,t=m?m.length:0;for(this.clear();++e0&&t.handleMarkers(F,_);for(var S=0;S"u"&&(this.Diff_Timeout<=0?o=Number.MAX_VALUE:o=new Date().getTime()+this.Diff_Timeout*1e3);var l=o;if(i==null||s==null)throw new Error("Null input. (diff_main)");if(i==s)return i?[new e.Diff(u,i)]:[];typeof d>"u"&&(d=!0);var r=d,a=this.diff_commonPrefix(i,s),c=i.substring(0,a);i=i.substring(a),s=s.substring(a),a=this.diff_commonSuffix(i,s);var p=i.substring(i.length-a);i=i.substring(0,i.length-a),s=s.substring(0,s.length-a);var h=this.diff_compute_(i,s,r,l);return c&&h.unshift(new e.Diff(u,c)),p&&h.push(new e.Diff(u,p)),this.diff_cleanupMerge(h),h},e.prototype.diff_compute_=function(i,s,d,o){var l;if(!i)return[new e.Diff(n,s)];if(!s)return[new e.Diff(t,i)];var r=i.length>s.length?i:s,a=i.length>s.length?s:i,c=r.indexOf(a);if(c!=-1)return l=[new e.Diff(n,r.substring(0,c)),new e.Diff(u,a),new e.Diff(n,r.substring(c+a.length))],i.length>s.length&&(l[0][0]=l[2][0]=t),l;if(a.length==1)return[new e.Diff(t,i),new e.Diff(n,s)];var p=this.diff_halfMatch_(i,s);if(p){var h=p[0],f=p[1],g=p[2],v=p[3],b=p[4],D=this.diff_main(h,g,d,o),E=this.diff_main(f,v,d,o);return D.concat([new e.Diff(u,b)],E)}return d&&i.length>100&&s.length>100?this.diff_lineMode_(i,s,o):this.diff_bisect_(i,s,o)},e.prototype.diff_lineMode_=function(i,s,d){var o=this.diff_linesToChars_(i,s);i=o.chars1,s=o.chars2;var l=o.lineArray,r=this.diff_main(i,s,!1,d);this.diff_charsToLines_(r,l),this.diff_cleanupSemantic(r),r.push(new e.Diff(u,""));for(var a=0,c=0,p=0,h="",f="";a=1&&p>=1){r.splice(a-c-p,c+p),a=a-c-p;for(var g=this.diff_main(h,f,!1,d),v=g.length-1;v>=0;v--)r.splice(a,0,g[v]);a=a+g.length}p=0,c=0,h="",f="";break}a++}return r.pop(),r},e.prototype.diff_bisect_=function(i,s,d){for(var o=i.length,l=s.length,r=Math.ceil((o+l)/2),a=r,c=2*r,p=new Array(c),h=new Array(c),f=0;fd);y++){for(var A=-y+b;A<=y-D;A+=2){var T=a+A,$;A==-y||A!=y&&p[T-1]o)D+=2;else if(M>l)b+=2;else if(v){var O=a+g-A;if(O>=0&&O=_)return this.diff_bisectSplit_(i,s,$,M,d)}}}for(var k=-y+E;k<=y-w;k+=2){var O=a+k,_;k==-y||k!=y&&h[O-1]o)w+=2;else if(S>l)E+=2;else if(!v){var T=a+g-k;if(T>=0&&T=_)return this.diff_bisectSplit_(i,s,$,M,d)}}}}return[new e.Diff(t,i),new e.Diff(n,s)]},e.prototype.diff_bisectSplit_=function(i,s,d,o,l){var r=i.substring(0,d),a=s.substring(0,o),c=i.substring(d),p=s.substring(o),h=this.diff_main(r,a,!1,l),f=this.diff_main(c,p,!1,l);return h.concat(f)},e.prototype.diff_linesToChars_=function(i,s){var d=[],o={};d[0]="";function l(p){for(var h="",f=0,g=-1,v=d.length;go?i=i.substring(d-o):ds.length?i:s,o=i.length>s.length?s:i;if(d.length<4||o.length*2=D.length?[$,M,O,_,T]:null}var a=r(d,o,Math.ceil(d.length/4)),c=r(d,o,Math.ceil(d.length/2)),p;if(!a&&!c)return null;c?a?p=a[4].length>c[4].length?a:c:p=c:p=a;var h,f,g,v;i.length>s.length?(h=p[0],f=p[1],g=p[2],v=p[3]):(g=p[0],v=p[1],h=p[2],f=p[3]);var b=p[4];return[h,f,g,v,b]},e.prototype.diff_cleanupSemantic=function(i){for(var s=!1,d=[],o=0,l=null,r=0,a=0,c=0,p=0,h=0;r0?d[o-1]:-1,a=0,c=0,p=0,h=0,l=null,s=!0)),r++;for(s&&this.diff_cleanupMerge(i),this.diff_cleanupSemanticLossless(i),r=1;r=b?(v>=f.length/2||v>=g.length/2)&&(i.splice(r,0,new e.Diff(u,g.substring(0,v))),i[r-1][1]=f.substring(0,f.length-v),i[r+1][1]=g.substring(v),r++):(b>=f.length/2||b>=g.length/2)&&(i.splice(r,0,new e.Diff(u,f.substring(0,b))),i[r-1][0]=n,i[r-1][1]=g.substring(0,g.length-b),i[r+1][0]=t,i[r+1][1]=f.substring(b),r++),r++}r++}},e.prototype.diff_cleanupSemanticLossless=function(i){function s(b,D){if(!b||!D)return 6;var E=b.charAt(b.length-1),w=D.charAt(0),y=E.match(e.nonAlphaNumericRegex_),A=w.match(e.nonAlphaNumericRegex_),T=y&&E.match(e.whitespaceRegex_),$=A&&w.match(e.whitespaceRegex_),M=T&&E.match(e.linebreakRegex_),O=$&&w.match(e.linebreakRegex_),_=M&&b.match(e.blanklineEndRegex_),k=O&&D.match(e.blanklineStartRegex_);return _||k?5:M||O?4:y&&!T&&$?3:T||$?2:y||A?1:0}for(var d=1;d=g&&(g=v,p=o,h=l,f=r)}i[d-1][1]!=p&&(p?i[d-1][1]=p:(i.splice(d-1,1),d--),i[d][1]=h,f?i[d+1][1]=f:(i.splice(d+1,1),d--))}d++}},e.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,e.whitespaceRegex_=/\s/,e.linebreakRegex_=/[\r\n]/,e.blanklineEndRegex_=/\n\r?\n$/,e.blanklineStartRegex_=/^\r?\n\r?\n/,e.prototype.diff_cleanupEfficiency=function(i){for(var s=!1,d=[],o=0,l=null,r=0,a=!1,c=!1,p=!1,h=!1;r0?d[o-1]:-1,p=h=!1),s=!0)),r++;s&&this.diff_cleanupMerge(i)},e.prototype.diff_cleanupMerge=function(i){i.push(new e.Diff(u,""));for(var s=0,d=0,o=0,l="",r="",a;s1?(d!==0&&o!==0&&(a=this.diff_commonPrefix(r,l),a!==0&&(s-d-o>0&&i[s-d-o-1][0]==u?i[s-d-o-1][1]+=r.substring(0,a):(i.splice(0,0,new e.Diff(u,r.substring(0,a))),s++),r=r.substring(a),l=l.substring(a)),a=this.diff_commonSuffix(r,l),a!==0&&(i[s][1]=r.substring(r.length-a)+i[s][1],r=r.substring(0,r.length-a),l=l.substring(0,l.length-a))),s-=d+o,i.splice(s,d+o),l.length&&(i.splice(s,0,new e.Diff(t,l)),s++),r.length&&(i.splice(s,0,new e.Diff(n,r)),s++),s++):s!==0&&i[s-1][0]==u?(i[s-1][1]+=i[s][1],i.splice(s,1)):s++,o=0,d=0,l="",r="";break}i[i.length-1][1]===""&&i.pop();var c=!1;for(s=1;ss));a++)l=d,r=o;return i.length!=a&&i[a][0]===t?r:r+(s-l)},e.prototype.diff_prettyHtml=function(i){for(var s=[],d=/&/g,o=//g,r=/\n/g,a=0;a");switch(c){case n:s[a]=''+h+"";break;case t:s[a]=''+h+"";break;case u:s[a]=""+h+"";break}}return s.join("")},e.prototype.diff_text1=function(i){for(var s=[],d=0;dthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var o=this.match_alphabet_(s),l=this;function r($,M){var O=$/s.length,_=Math.abs(d-M);return l.Match_Distance?O+_/l.Match_Distance:_?1:O}var a=this.Match_Threshold,c=i.indexOf(s,d);c!=-1&&(a=Math.min(r(0,c),a),c=i.lastIndexOf(s,d+s.length),c!=-1&&(a=Math.min(r(0,c),a)));var p=1<=D;y--){var A=o[i.charAt(y-1)];if(b===0?w[y]=(w[y+1]<<1|1)&A:w[y]=(w[y+1]<<1|1)&A|((v[y+1]|v[y])<<1|1)|v[y+1],w[y]&p){var T=r(b,y-1);if(T<=a)if(a=T,c=y-1,c>d)D=Math.max(1,2*d-c);else break}}if(r(b+1,d)>a)break;v=w}return c},e.prototype.match_alphabet_=function(i){for(var s={},d=0;d"u")o=i,l=this.diff_main(o,s,!0),l.length>2&&(this.diff_cleanupSemantic(l),this.diff_cleanupEfficiency(l));else if(i&&typeof i=="object"&&typeof s>"u"&&typeof d>"u")l=i,o=this.diff_text1(l);else if(typeof i=="string"&&s&&typeof s=="object"&&typeof d>"u")o=i,l=s;else if(typeof i=="string"&&typeof s=="string"&&d&&typeof d=="object")o=i,l=d;else throw new Error("Unknown call format to patch_make.");if(l.length===0)return[];for(var r=[],a=new e.patch_obj,c=0,p=0,h=0,f=o,g=o,v=0;v=2*this.Patch_Margin&&c&&(this.patch_addContext_(a,f),r.push(a),a=new e.patch_obj,c=0,f=g,p=h);break}b!==n&&(p+=D.length),b!==t&&(h+=D.length)}return c&&(this.patch_addContext_(a,f),r.push(a)),r},e.prototype.patch_deepCopy=function(i){for(var s=[],d=0;dthis.Match_MaxBits?(p=this.match_main(s,c.substring(0,this.Match_MaxBits),a),p!=-1&&(h=this.match_main(s,c.substring(c.length-this.Match_MaxBits),a+c.length-this.Match_MaxBits),(h==-1||p>=h)&&(p=-1))):p=this.match_main(s,c,a),p==-1)l[r]=!1,o-=i[r].length2-i[r].length1;else{l[r]=!0,o=p-a;var f;if(h==-1?f=s.substring(p,p+c.length):f=s.substring(p,h+this.Match_MaxBits),c==f)s=s.substring(0,p)+this.diff_text2(i[r].diffs)+s.substring(p+c.length);else{var g=this.diff_main(c,f,!1);if(c.length>this.Match_MaxBits&&this.diff_levenshtein(g)/c.length>this.Patch_DeleteThreshold)l[r]=!1;else{this.diff_cleanupSemanticLossless(g);for(var v=0,b,D=0;Dr[0][1].length){var a=s-r[0][1].length;r[0][1]=d.substring(r[0][1].length)+r[0][1],l.start1-=a,l.start2-=a,l.length1+=a,l.length2+=a}if(l=i[i.length-1],r=l.diffs,r.length==0||r[r.length-1][0]!=u)r.push(new e.Diff(u,d)),l.length1+=s,l.length2+=s;else if(s>r[r.length-1][1].length){var a=s-r[r.length-1][1].length;r[r.length-1][1]+=d.substring(0,a),l.length1+=a,l.length2+=a}return d},e.prototype.patch_splitMax=function(i){for(var s=this.Match_MaxBits,d=0;d2*s?(c.length1+=f.length,l+=f.length,p=!1,c.diffs.push(new e.Diff(h,f)),o.diffs.shift()):(f=f.substring(0,s-c.length1-this.Patch_Margin),c.length1+=f.length,l+=f.length,h===u?(c.length2+=f.length,r+=f.length):p=!1,c.diffs.push(new e.Diff(h,f)),f==o.diffs[0][1]?o.diffs.shift():o.diffs[0][1]=o.diffs[0][1].substring(f.length))}a=this.diff_text2(c.diffs),a=a.substring(a.length-this.Patch_Margin);var g=this.diff_text1(o.diffs).substring(0,this.Patch_Margin);g!==""&&(c.length1+=g.length,c.length2+=g.length,c.diffs.length!==0&&c.diffs[c.diffs.length-1][0]===u?c.diffs[c.diffs.length-1][1]+=g:c.diffs.push(new e.Diff(u,g))),p||i.splice(++d,0,c)}}},e.prototype.patch_toText=function(i){for(var s=[],d=0;d-1}function gl(H,G){var Z=this.__data__,ee=oi(Z,H);return ee<0?(++this.size,Z.push([H,G])):Z[ee][1]=G,this}pt.prototype.clear=ul,pt.prototype.delete=pl,pt.prototype.get=dl,pt.prototype.has=fl,pt.prototype.set=gl;function Rt(H){var G=-1,Z=H==null?0:H.length;for(this.clear();++GFe))return!1;var De=le.get(H);if(De&&le.get(G))return De==G;var Ue=-1,et=!0,Pe=Z&i?new ri:void 0;for(le.set(H,G),le.set(G,H);++Ue-1&&H%1==0&&H-1&&H%1==0&&H<=s}function Fr(H){var G=typeof H;return H!=null&&(G=="object"||G=="function")}function Tn(H){return H!=null&&typeof H=="object"}var Rr=Oe?za(Oe):Ml;function Kl(H){return Vl(H)?_l(H):Il(H)}function Gl(){return[]}function Jl(){return!1}m.exports=Ul})(Ni,Ni.exports);var Qo=Ni.exports,st={};Object.defineProperty(st,"__esModule",{value:!0});st.getAceInstance=st.debounce=st.editorEvents=st.editorOptions=void 0;var ou=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];st.editorOptions=ou;var au=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];st.editorEvents=au;var lu=function(){var m;return typeof window>"u"?(Ge.window={},m=Ri,delete Ge.window):window.ace?(m=window.ace,m.acequire=window.ace.require||window.ace.acequire):m=Ri,m};st.getAceInstance=lu;var cu=function(m,e){var t=null;return function(){var n=this,h=arguments;clearTimeout(t),t=setTimeout(function(){m.apply(n,h)},e)}};st.debounce=cu;var hu=Yt&&Yt.__extends||(function(){var m=function(e,t){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,h){n.__proto__=h}||function(n,h){for(var i in h)Object.prototype.hasOwnProperty.call(h,i)&&(n[i]=h[i])},m(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");m(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}})(),Ms=Yt&&Yt.__assign||function(){return Ms=Object.assign||function(m){for(var e,t=1,n=arguments.length;t0&&this.handleMarkers(A);var O=this.editor.$options;hn.editorOptions.forEach(function(_){O.hasOwnProperty(_)?t.editor.setOption(_,t.props[_]):t.props[_]&&console.warn("ReactAce: editor option ".concat(_," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}),this.handleOptions(this.props),Array.isArray(w)&&w.forEach(function(_){typeof _.exec=="string"?t.editor.commands.bindKey(_.bindKey,_.exec):t.editor.commands.addCommand(_)}),D&&this.editor.setKeyboardHandler("ace/keyboard/"+D),h&&(this.refEditor.className+=" "+h),E&&E(this.editor),this.editor.resize(),o&&this.editor.focus()},e.prototype.componentDidUpdate=function(t){for(var n=t,h=this.props,i=0;i 0!";if(a!=this.$splits){if(a>this.$splits){for(;this.$splitsa;)c=this.$editors[this.$splits-1],this.$container.removeChild(c.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(a){return this.$editors[a]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(a){this.$editors.forEach(function(c){c.setTheme(a)})},this.setKeyboardHandler=function(a){this.$editors.forEach(function(c){c.setKeyboardHandler(a)})},this.forEach=function(a,c){this.$editors.forEach(a,c)},this.$fontSize="",this.setFontSize=function(a){this.$fontSize=a,this.forEach(function(c){c.setFontSize(a)})},this.$cloneSession=function(a){var c=new l(a.getDocument(),a.getMode()),p=a.getUndoManager();return c.setUndoManager(p),c.setTabSize(a.getTabSize()),c.setUseSoftTabs(a.getUseSoftTabs()),c.setOverwrite(a.getOverwrite()),c.setBreakpoints(a.getBreakpoints()),c.setUseWrapMode(a.getUseWrapMode()),c.setUseWorker(a.getUseWorker()),c.setWrapLimitRange(a.$wrapLimitRange.min,a.$wrapLimitRange.max),c.$foldData=a.$cloneFoldData(),c},this.setSession=function(a,c){var p;c==null?p=this.$cEditor:p=this.$editors[c];var u=this.$editors.some(function(f){return f.session===a});return u&&(a=this.$cloneSession(a)),p.setSession(a),a},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(a){this.$orientation!=a&&(this.$orientation=a,this.resize())},this.resize=function(){var a=this.$container.clientWidth,c=this.$container.clientHeight,p;if(this.$orientation==this.BESIDE)for(var u=a/this.$splits,f=0;f-1}function zu(m,e){var t=this.__data__,n=zi(t,m);return n<0?t.push([m,e]):t[n][1]=e,this}Sn.prototype.clear=Pu;Sn.prototype.delete=Wu;Sn.prototype.get=ju;Sn.prototype.has=Hu;Sn.prototype.set=zu;function qt(m){var e=-1,t=m?m.length:0;for(this.clear();++e0&&t.handleMarkers(F,_);for(var S=0;S"u"&&(this.Diff_Timeout<=0?o=Number.MAX_VALUE:o=new Date().getTime()+this.Diff_Timeout*1e3);var l=o;if(i==null||s==null)throw new Error("Null input. (diff_main)");if(i==s)return i?[new e.Diff(h,i)]:[];typeof d>"u"&&(d=!0);var r=d,a=this.diff_commonPrefix(i,s),c=i.substring(0,a);i=i.substring(a),s=s.substring(a),a=this.diff_commonSuffix(i,s);var p=i.substring(i.length-a);i=i.substring(0,i.length-a),s=s.substring(0,s.length-a);var u=this.diff_compute_(i,s,r,l);return c&&u.unshift(new e.Diff(h,c)),p&&u.push(new e.Diff(h,p)),this.diff_cleanupMerge(u),u},e.prototype.diff_compute_=function(i,s,d,o){var l;if(!i)return[new e.Diff(n,s)];if(!s)return[new e.Diff(t,i)];var r=i.length>s.length?i:s,a=i.length>s.length?s:i,c=r.indexOf(a);if(c!=-1)return l=[new e.Diff(n,r.substring(0,c)),new e.Diff(h,a),new e.Diff(n,r.substring(c+a.length))],i.length>s.length&&(l[0][0]=l[2][0]=t),l;if(a.length==1)return[new e.Diff(t,i),new e.Diff(n,s)];var p=this.diff_halfMatch_(i,s);if(p){var u=p[0],f=p[1],g=p[2],v=p[3],b=p[4],D=this.diff_main(u,g,d,o),E=this.diff_main(f,v,d,o);return D.concat([new e.Diff(h,b)],E)}return d&&i.length>100&&s.length>100?this.diff_lineMode_(i,s,o):this.diff_bisect_(i,s,o)},e.prototype.diff_lineMode_=function(i,s,d){var o=this.diff_linesToChars_(i,s);i=o.chars1,s=o.chars2;var l=o.lineArray,r=this.diff_main(i,s,!1,d);this.diff_charsToLines_(r,l),this.diff_cleanupSemantic(r),r.push(new e.Diff(h,""));for(var a=0,c=0,p=0,u="",f="";a=1&&p>=1){r.splice(a-c-p,c+p),a=a-c-p;for(var g=this.diff_main(u,f,!1,d),v=g.length-1;v>=0;v--)r.splice(a,0,g[v]);a=a+g.length}p=0,c=0,u="",f="";break}a++}return r.pop(),r},e.prototype.diff_bisect_=function(i,s,d){for(var o=i.length,l=s.length,r=Math.ceil((o+l)/2),a=r,c=2*r,p=new Array(c),u=new Array(c),f=0;fd);y++){for(var A=-y+b;A<=y-D;A+=2){var T=a+A,x;A==-y||A!=y&&p[T-1]o)D+=2;else if(M>l)b+=2;else if(v){var O=a+g-A;if(O>=0&&O=_)return this.diff_bisectSplit_(i,s,x,M,d)}}}for(var k=-y+E;k<=y-w;k+=2){var O=a+k,_;k==-y||k!=y&&u[O-1]o)w+=2;else if(S>l)E+=2;else if(!v){var T=a+g-k;if(T>=0&&T=_)return this.diff_bisectSplit_(i,s,x,M,d)}}}}return[new e.Diff(t,i),new e.Diff(n,s)]},e.prototype.diff_bisectSplit_=function(i,s,d,o,l){var r=i.substring(0,d),a=s.substring(0,o),c=i.substring(d),p=s.substring(o),u=this.diff_main(r,a,!1,l),f=this.diff_main(c,p,!1,l);return u.concat(f)},e.prototype.diff_linesToChars_=function(i,s){var d=[],o={};d[0]="";function l(p){for(var u="",f=0,g=-1,v=d.length;go?i=i.substring(d-o):ds.length?i:s,o=i.length>s.length?s:i;if(d.length<4||o.length*2=D.length?[x,M,O,_,T]:null}var a=r(d,o,Math.ceil(d.length/4)),c=r(d,o,Math.ceil(d.length/2)),p;if(!a&&!c)return null;c?a?p=a[4].length>c[4].length?a:c:p=c:p=a;var u,f,g,v;i.length>s.length?(u=p[0],f=p[1],g=p[2],v=p[3]):(g=p[0],v=p[1],u=p[2],f=p[3]);var b=p[4];return[u,f,g,v,b]},e.prototype.diff_cleanupSemantic=function(i){for(var s=!1,d=[],o=0,l=null,r=0,a=0,c=0,p=0,u=0;r0?d[o-1]:-1,a=0,c=0,p=0,u=0,l=null,s=!0)),r++;for(s&&this.diff_cleanupMerge(i),this.diff_cleanupSemanticLossless(i),r=1;r=b?(v>=f.length/2||v>=g.length/2)&&(i.splice(r,0,new e.Diff(h,g.substring(0,v))),i[r-1][1]=f.substring(0,f.length-v),i[r+1][1]=g.substring(v),r++):(b>=f.length/2||b>=g.length/2)&&(i.splice(r,0,new e.Diff(h,f.substring(0,b))),i[r-1][0]=n,i[r-1][1]=g.substring(0,g.length-b),i[r+1][0]=t,i[r+1][1]=f.substring(b),r++),r++}r++}},e.prototype.diff_cleanupSemanticLossless=function(i){function s(b,D){if(!b||!D)return 6;var E=b.charAt(b.length-1),w=D.charAt(0),y=E.match(e.nonAlphaNumericRegex_),A=w.match(e.nonAlphaNumericRegex_),T=y&&E.match(e.whitespaceRegex_),x=A&&w.match(e.whitespaceRegex_),M=T&&E.match(e.linebreakRegex_),O=x&&w.match(e.linebreakRegex_),_=M&&b.match(e.blanklineEndRegex_),k=O&&D.match(e.blanklineStartRegex_);return _||k?5:M||O?4:y&&!T&&x?3:T||x?2:y||A?1:0}for(var d=1;d=g&&(g=v,p=o,u=l,f=r)}i[d-1][1]!=p&&(p?i[d-1][1]=p:(i.splice(d-1,1),d--),i[d][1]=u,f?i[d+1][1]=f:(i.splice(d+1,1),d--))}d++}},e.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,e.whitespaceRegex_=/\s/,e.linebreakRegex_=/[\r\n]/,e.blanklineEndRegex_=/\n\r?\n$/,e.blanklineStartRegex_=/^\r?\n\r?\n/,e.prototype.diff_cleanupEfficiency=function(i){for(var s=!1,d=[],o=0,l=null,r=0,a=!1,c=!1,p=!1,u=!1;r0?d[o-1]:-1,p=u=!1),s=!0)),r++;s&&this.diff_cleanupMerge(i)},e.prototype.diff_cleanupMerge=function(i){i.push(new e.Diff(h,""));for(var s=0,d=0,o=0,l="",r="",a;s1?(d!==0&&o!==0&&(a=this.diff_commonPrefix(r,l),a!==0&&(s-d-o>0&&i[s-d-o-1][0]==h?i[s-d-o-1][1]+=r.substring(0,a):(i.splice(0,0,new e.Diff(h,r.substring(0,a))),s++),r=r.substring(a),l=l.substring(a)),a=this.diff_commonSuffix(r,l),a!==0&&(i[s][1]=r.substring(r.length-a)+i[s][1],r=r.substring(0,r.length-a),l=l.substring(0,l.length-a))),s-=d+o,i.splice(s,d+o),l.length&&(i.splice(s,0,new e.Diff(t,l)),s++),r.length&&(i.splice(s,0,new e.Diff(n,r)),s++),s++):s!==0&&i[s-1][0]==h?(i[s-1][1]+=i[s][1],i.splice(s,1)):s++,o=0,d=0,l="",r="";break}i[i.length-1][1]===""&&i.pop();var c=!1;for(s=1;ss));a++)l=d,r=o;return i.length!=a&&i[a][0]===t?r:r+(s-l)},e.prototype.diff_prettyHtml=function(i){for(var s=[],d=/&/g,o=//g,r=/\n/g,a=0;a");switch(c){case n:s[a]=''+u+"";break;case t:s[a]=''+u+"";break;case h:s[a]=""+u+"";break}}return s.join("")},e.prototype.diff_text1=function(i){for(var s=[],d=0;dthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var o=this.match_alphabet_(s),l=this;function r(x,M){var O=x/s.length,_=Math.abs(d-M);return l.Match_Distance?O+_/l.Match_Distance:_?1:O}var a=this.Match_Threshold,c=i.indexOf(s,d);c!=-1&&(a=Math.min(r(0,c),a),c=i.lastIndexOf(s,d+s.length),c!=-1&&(a=Math.min(r(0,c),a)));var p=1<=D;y--){var A=o[i.charAt(y-1)];if(b===0?w[y]=(w[y+1]<<1|1)&A:w[y]=(w[y+1]<<1|1)&A|((v[y+1]|v[y])<<1|1)|v[y+1],w[y]&p){var T=r(b,y-1);if(T<=a)if(a=T,c=y-1,c>d)D=Math.max(1,2*d-c);else break}}if(r(b+1,d)>a)break;v=w}return c},e.prototype.match_alphabet_=function(i){for(var s={},d=0;d"u")o=i,l=this.diff_main(o,s,!0),l.length>2&&(this.diff_cleanupSemantic(l),this.diff_cleanupEfficiency(l));else if(i&&typeof i=="object"&&typeof s>"u"&&typeof d>"u")l=i,o=this.diff_text1(l);else if(typeof i=="string"&&s&&typeof s=="object"&&typeof d>"u")o=i,l=s;else if(typeof i=="string"&&typeof s=="string"&&d&&typeof d=="object")o=i,l=d;else throw new Error("Unknown call format to patch_make.");if(l.length===0)return[];for(var r=[],a=new e.patch_obj,c=0,p=0,u=0,f=o,g=o,v=0;v=2*this.Patch_Margin&&c&&(this.patch_addContext_(a,f),r.push(a),a=new e.patch_obj,c=0,f=g,p=u);break}b!==n&&(p+=D.length),b!==t&&(u+=D.length)}return c&&(this.patch_addContext_(a,f),r.push(a)),r},e.prototype.patch_deepCopy=function(i){for(var s=[],d=0;dthis.Match_MaxBits?(p=this.match_main(s,c.substring(0,this.Match_MaxBits),a),p!=-1&&(u=this.match_main(s,c.substring(c.length-this.Match_MaxBits),a+c.length-this.Match_MaxBits),(u==-1||p>=u)&&(p=-1))):p=this.match_main(s,c,a),p==-1)l[r]=!1,o-=i[r].length2-i[r].length1;else{l[r]=!0,o=p-a;var f;if(u==-1?f=s.substring(p,p+c.length):f=s.substring(p,u+this.Match_MaxBits),c==f)s=s.substring(0,p)+this.diff_text2(i[r].diffs)+s.substring(p+c.length);else{var g=this.diff_main(c,f,!1);if(c.length>this.Match_MaxBits&&this.diff_levenshtein(g)/c.length>this.Patch_DeleteThreshold)l[r]=!1;else{this.diff_cleanupSemanticLossless(g);for(var v=0,b,D=0;Dr[0][1].length){var a=s-r[0][1].length;r[0][1]=d.substring(r[0][1].length)+r[0][1],l.start1-=a,l.start2-=a,l.length1+=a,l.length2+=a}if(l=i[i.length-1],r=l.diffs,r.length==0||r[r.length-1][0]!=h)r.push(new e.Diff(h,d)),l.length1+=s,l.length2+=s;else if(s>r[r.length-1][1].length){var a=s-r[r.length-1][1].length;r[r.length-1][1]+=d.substring(0,a),l.length1+=a,l.length2+=a}return d},e.prototype.patch_splitMax=function(i){for(var s=this.Match_MaxBits,d=0;d2*s?(c.length1+=f.length,l+=f.length,p=!1,c.diffs.push(new e.Diff(u,f)),o.diffs.shift()):(f=f.substring(0,s-c.length1-this.Patch_Margin),c.length1+=f.length,l+=f.length,u===h?(c.length2+=f.length,r+=f.length):p=!1,c.diffs.push(new e.Diff(u,f)),f==o.diffs[0][1]?o.diffs.shift():o.diffs[0][1]=o.diffs[0][1].substring(f.length))}a=this.diff_text2(c.diffs),a=a.substring(a.length-this.Patch_Margin);var g=this.diff_text1(o.diffs).substring(0,this.Patch_Margin);g!==""&&(c.length1+=g.length,c.length2+=g.length,c.diffs.length!==0&&c.diffs[c.diffs.length-1][0]===h?c.diffs[c.diffs.length-1][1]+=g:c.diffs.push(new e.Diff(h,g))),p||i.splice(++d,0,c)}}},e.prototype.patch_toText=function(i){for(var s=[],d=0;dv)break;var b=this.getFoldWidgetRange(l,"all",r);if(b){if(b.start.row<=p)break;if(b.isMultiLine())r=b.end.row;else if(c==v)break}f=r}}return new s(p,h,f,l.getLine(f).length)},this.getCommentRegionBlock=function(l,r,a){for(var c=r.search(/\s*$/),p=l.getLength(),h=a,f=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,g=1;++ah)return new s(h,c,b,r.length)}}.call(o.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle","ace/worker/worker_client"],function(t,n,u){var i=t("../lib/oop"),s=t("./text").Mode,d=t("./json_highlight_rules").JsonHighlightRules,o=t("./matching_brace_outdent").MatchingBraceOutdent,l=t("./folding/cstyle").FoldMode,r=t("../worker/worker_client").WorkerClient,a=function(){this.HighlightRules=d,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new l};i.inherits(a,s),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(c,p,h){var f=this.$getIndent(p);if(c=="start"){var g=p.match(/^.*[\{\(\[]\s*$/);g&&(f+=h)}return f},this.checkOutdent=function(c,p,h){return this.$outdent.checkOutdent(p,h)},this.autoOutdent=function(c,p,h){this.$outdent.autoOutdent(p,h)},this.createWorker=function(c){var p=new r(["ace"],"ace/mode/json_worker","JsonWorker");return p.attachToDocument(c.getDocument()),p.on("annotate",function(h){c.setAnnotations(h.data)}),p.on("terminate",function(){c.clearAnnotations()}),p},this.$id="ace/mode/json"}.call(a.prototype),n.Mode=a}),(function(){ace.require(["ace/mode/json"],function(t){m&&(m.exports=t)})})()})(Cp);var Sp={exports:{}};(function(m,e){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,n,u){var i=t("../lib/oop"),s=t("./text_highlight_rules").TextHighlightRules,d=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};i.inherits(d,s),n.JsonHighlightRules=d}),ace.define("ace/mode/json5_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/json_highlight_rules"],function(t,n,u){var i=t("../lib/oop"),s=t("./json_highlight_rules").JsonHighlightRules,d=function(){s.call(this);var o=[{token:"variable",regex:/[a-zA-Z$_\u00a1-\uffff][\w$\u00a1-\uffff]*\s*(?=:)/},{token:"variable",regex:/['](?:(?:\\.)|(?:[^'\\]))*?[']\s*(?=:)/},{token:"constant.language.boolean",regex:/(?:null)\b/},{token:"string",regex:/'/,next:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\/bfnrt]|$)/,consumeLineEnd:!0},{token:"string",regex:/'|$/,next:"start"},{defaultToken:"string"}]},{token:"string",regex:/"(?![^"]*":)/,next:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\/bfnrt]|$)/,consumeLineEnd:!0},{token:"string",regex:/"|$/,next:"start"},{defaultToken:"string"}]},{token:"constant.numeric",regex:/[+-]?(?:Infinity|NaN)\b/}];for(var l in this.$rules)this.$rules[l].unshift.apply(this.$rules[l],o);this.normalizeRules()};i.inherits(d,s),n.Json5HighlightRules=d}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(t,n,u){var i=t("../range").Range,s=function(){};(function(){this.checkOutdent=function(d,o){return/^\s+$/.test(d)?/^\s*\}/.test(o):!1},this.autoOutdent=function(d,o){var l=d.getLine(o),r=l.match(/^(\s*\})/);if(!r)return 0;var a=r[1].length,c=d.findMatchingBracket({row:o,column:a});if(!c||c.row==o)return 0;var p=this.$getIndent(d.getLine(c.row));d.replace(new i(o,0,o,a-1),p)},this.$getIndent=function(d){return d.match(/^\s*/)[0]}}).call(s.prototype),n.MatchingBraceOutdent=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(t,n,u){var i=t("../../lib/oop"),s=t("../../range").Range,d=t("./fold_mode").FoldMode,o=n.FoldMode=function(l){l&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+l.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+l.end)))};i.inherits(o,d),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(l,r,a){var c=l.getLine(a);if(this.singleLineBlockCommentRe.test(c)&&!this.startRegionRe.test(c)&&!this.tripleStarBlockCommentRe.test(c))return"";var p=this._getFoldWidgetBase(l,r,a);return!p&&this.startRegionRe.test(c)?"start":p},this.getFoldWidgetRange=function(l,r,a,c){var p=l.getLine(a);if(this.startRegionRe.test(p))return this.getCommentRegionBlock(l,p,a);var g=p.match(this.foldingStartMarker);if(g){var h=g.index;if(g[1])return this.openingBracketBlock(l,g[1],a,h);var f=l.getCommentFoldRange(a,h+g[0].length,1);return f&&!f.isMultiLine()&&(c?f=this.getSectionRange(l,a):r!="all"&&(f=null)),f}if(r!=="markbegin"){var g=p.match(this.foldingStopMarker);if(g){var h=g.index+g[0].length;return g[1]?this.closingBracketBlock(l,g[1],a,h):l.getCommentFoldRange(a,h,-1)}}},this.getSectionRange=function(l,r){var a=l.getLine(r),c=a.search(/\S/),p=r,h=a.length;r+=1;for(var f=r,g=l.getLength();++rv)break;var b=this.getFoldWidgetRange(l,"all",r);if(b){if(b.start.row<=p)break;if(b.isMultiLine())r=b.end.row;else if(c==v)break}f=r}}return new s(p,h,f,l.getLine(f).length)},this.getCommentRegionBlock=function(l,r,a){for(var c=r.search(/\s*$/),p=l.getLength(),h=a,f=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,g=1;++ah)return new s(h,c,b,r.length)}}.call(o.prototype)}),ace.define("ace/mode/json5",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json5_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"],function(t,n,u){var i=t("../lib/oop"),s=t("./text").Mode,d=t("./json5_highlight_rules").Json5HighlightRules,o=t("./matching_brace_outdent").MatchingBraceOutdent,l=t("./folding/cstyle").FoldMode,r=function(){this.HighlightRules=d,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new l};i.inherits(r,s),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.checkOutdent=function(a,c,p){return this.$outdent.checkOutdent(c,p)},this.autoOutdent=function(a,c,p){this.$outdent.autoOutdent(c,p)},this.$id="ace/mode/json5"}.call(r.prototype),n.Mode=r}),(function(){ace.require(["ace/mode/json5"],function(t){m&&(m.exports=t)})})()})(Sp);var Ep={exports:{}};(function(m,e){ace.define("ace/mode/yaml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,n,u){var i=t("../lib/oop"),s=t("./text_highlight_rules").TextHighlightRules,d=function(){this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"list.markup",regex:/^(?:-{3}|\.{3})\s*(?=#|$)/},{token:"list.markup",regex:/^\s*[\-?](?:$|\s)/},{token:"constant",regex:"!![\\w//]+"},{token:"constant.language",regex:"[&\\*][a-zA-Z0-9-_]+"},{token:["meta.tag","keyword"],regex:/^(\s*\w[^\s:]*?)(:(?=\s|$))/},{token:["meta.tag","keyword"],regex:/(\w[^\s:]*?)(\s*:(?=\s|$))/},{token:"keyword.operator",regex:"<<\\w*:\\w*"},{token:"keyword.operator",regex:"-\\s*(?=[{])"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:/[|>][-+\d]*(?:$|\s+(?:$|#))/,onMatch:function(o,l,r,a){a=a.replace(/ #.*/,"");var c=/^ *((:\s*)?-(\s*[^|>])?)?/.exec(a)[0].replace(/\S\s*$/,"").length,p=parseInt(/\d+[\s+-]*$/.exec(a));return p?(c+=p-1,this.next="mlString"):this.next="mlStringPre",r.length?(r[0]=this.next,r[1]=c):(r.push(this.next),r.push(c)),this.token},next:"mlString"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:/(\b|[+\-\.])[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)(?=[^\d-\w]|$)$/},{token:"constant.numeric",regex:/[+\-]?\.inf\b|NaN\b|0x[\dA-Fa-f_]+|0b[10_]+/},{token:"constant.language.boolean",regex:"\\b(?:true|false|TRUE|FALSE|True|False|yes|no)\\b"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:/[^\s,:\[\]\{\}]+/}],mlStringPre:[{token:"indent",regex:/^ *$/},{token:"indent",regex:/^ */,onMatch:function(o,l,r){var a=r[1];return a>=o.length?(this.next="start",r.shift(),r.shift()):(r[1]=o.length-1,this.next=r[0]="mlString"),this.token},next:"mlString"},{defaultToken:"string"}],mlString:[{token:"indent",regex:/^ *$/},{token:"indent",regex:/^ */,onMatch:function(o,l,r){var a=r[1];return a>=o.length?(this.next="start",r.splice(0)):this.next="mlString",this.token},next:"mlString"},{token:"string",regex:".+"}]},this.normalizeRules()};i.inherits(d,s),n.YamlHighlightRules=d}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(t,n,u){var i=t("../range").Range,s=function(){};(function(){this.checkOutdent=function(d,o){return/^\s+$/.test(d)?/^\s*\}/.test(o):!1},this.autoOutdent=function(d,o){var l=d.getLine(o),r=l.match(/^(\s*\})/);if(!r)return 0;var a=r[1].length,c=d.findMatchingBracket({row:o,column:a});if(!c||c.row==o)return 0;var p=this.$getIndent(d.getLine(c.row));d.replace(new i(o,0,o,a-1),p)},this.$getIndent=function(d){return d.match(/^\s*/)[0]}}).call(s.prototype),n.MatchingBraceOutdent=s}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(t,n,u){var i=t("../../lib/oop"),s=t("./fold_mode").FoldMode,d=t("../../range").Range,o=n.FoldMode=function(){};i.inherits(o,s),function(){this.commentBlock=function(l,r){var a=/\S/,c=l.getLine(r),p=c.search(a);if(!(p==-1||c[p]!="#")){for(var h=c.length,f=l.getLength(),g=r,v=r;++rg){var D=l.getLine(v).length;return new d(g,h,v,D)}}},this.getFoldWidgetRange=function(l,r,a){var c=this.indentationBlock(l,a);if(c||(c=this.commentBlock(l,a),c))return c},this.getFoldWidget=function(l,r,a){var c=l.getLine(a),p=c.search(/\S/),h=l.getLine(a+1),f=l.getLine(a-1),g=f.search(/\S/),v=h.search(/\S/);if(p==-1)return l.foldWidgets[a-1]=g!=-1&&gD){var T=l.getLine(E).length;return new d(D,v,E,T)}}},this.getFoldWidget=function(l,r,a){var c=l.getLine(a),p=c.search(/\S/),h=l.getLine(a+1),f=l.getLine(a-1),g=f.search(/\S/),v=h.search(/\S/),b=c[p]==="-";if(p==-1)return l.foldWidgets[a-1]=g!=-1&&g ["+this.end.row+"/"+this.end.column+"]"},u.prototype.contains=function(i,s){return this.compare(i,s)==0},u.prototype.compareRange=function(i){var s,d=i.end,o=i.start;return s=this.compare(d.row,d.column),s==1?(s=this.compare(o.row,o.column),s==1?2:s==0?1:0):s==-1?-2:(s=this.compare(o.row,o.column),s==-1?-1:s==1?42:0)},u.prototype.comparePoint=function(i){return this.compare(i.row,i.column)},u.prototype.containsRange=function(i){return this.comparePoint(i.start)==0&&this.comparePoint(i.end)==0},u.prototype.intersects=function(i){var s=this.compareRange(i);return s==-1||s==0||s==1},u.prototype.isEnd=function(i,s){return this.end.row==i&&this.end.column==s},u.prototype.isStart=function(i,s){return this.start.row==i&&this.start.column==s},u.prototype.setStart=function(i,s){typeof i=="object"?(this.start.column=i.column,this.start.row=i.row):(this.start.row=i,this.start.column=s)},u.prototype.setEnd=function(i,s){typeof i=="object"?(this.end.column=i.column,this.end.row=i.row):(this.end.row=i,this.end.column=s)},u.prototype.inside=function(i,s){return this.compare(i,s)==0?!(this.isEnd(i,s)||this.isStart(i,s)):!1},u.prototype.insideStart=function(i,s){return this.compare(i,s)==0?!this.isEnd(i,s):!1},u.prototype.insideEnd=function(i,s){return this.compare(i,s)==0?!this.isStart(i,s):!1},u.prototype.compare=function(i,s){return!this.isMultiLine()&&i===this.start.row?sthis.end.column?1:0:ithis.end.row?1:this.start.row===i?s>=this.start.column?0:-1:this.end.row===i?s<=this.end.column?0:1:0},u.prototype.compareStart=function(i,s){return this.start.row==i&&this.start.column==s?-1:this.compare(i,s)},u.prototype.compareEnd=function(i,s){return this.end.row==i&&this.end.column==s?1:this.compare(i,s)},u.prototype.compareInside=function(i,s){return this.end.row==i&&this.end.column==s?1:this.start.row==i&&this.start.column==s?-1:this.compare(i,s)},u.prototype.clipRows=function(i,s){if(this.end.row>s)var d={row:s+1,column:0};else if(this.end.rows)var o={row:s+1,column:0};else if(this.start.rowthis.row)){var r=u(l,{row:this.row,column:this.column},this.$insertRight);this.setPosition(r.row,r.column,!0)}},o.prototype.setPosition=function(l,r,a){var c;if(a?c={row:l,column:r}:c=this.$clipPositionToDocument(l,r),!(this.row==c.row&&this.column==c.column)){var p={row:this.row,column:this.column};this.row=c.row,this.column=c.column,this._signal("change",{old:p,value:c})}},o.prototype.detach=function(){this.document.off("change",this.$onChange)},o.prototype.attach=function(l){this.document=l||this.document,this.document.on("change",this.$onChange)},o.prototype.$clipPositionToDocument=function(l,r){var a={};return l>=this.document.getLength()?(a.row=Math.max(0,this.document.getLength()-1),a.column=this.document.getLine(a.row).length):l<0?(a.row=0,a.column=0):(a.row=l,a.column=Math.min(this.document.getLine(a.row).length,Math.max(0,r))),r<0&&(a.column=0),a},o})();d.prototype.$insertRight=!1,i.implement(d.prototype,s),e.Anchor=d}),ace.define("ace/document",[],function(m,e,t){var n=m("./lib/oop"),u=m("./apply_delta").applyDelta,i=m("./lib/event_emitter").EventEmitter,s=m("./range").Range,d=m("./anchor").Anchor,o=(function(){function l(r){this.$lines=[""],r.length===0?this.$lines=[""]:Array.isArray(r)?this.insertMergedLines({row:0,column:0},r):this.insert({row:0,column:0},r)}return l.prototype.setValue=function(r){var a=this.getLength()-1;this.remove(new s(0,0,a,this.getLine(a).length)),this.insert({row:0,column:0},r||"")},l.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},l.prototype.createAnchor=function(r,a){return new d(this,r,a)},l.prototype.$detectNewLine=function(r){var a=r.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=a?a[1]:` +`&&(i.left++,l--),c=l,c===0&&h.right.push({startLine:i.right,endLine:i.right}),a===` +`&&(c-=1),h.left.push({startLine:i.left,endLine:i.left+c}),i.left+=l;break;case n.DIFF_INSERT:r===` +`&&(i.right++,l--),c=l,c===0&&h.left.push({startLine:i.left,endLine:i.left}),a===` +`&&(c-=1),h.right.push({startLine:i.right,endLine:i.right+c}),i.right+=l;break;default:throw new Error("Diff type was not defined.")}}}),h},e.prototype.setCodeMarkers=function(t){t===void 0&&(t={left:[],right:[]});for(var n=[],h={left:[],right:[]},i=0;iv)break;var b=this.getFoldWidgetRange(l,"all",r);if(b){if(b.start.row<=p)break;if(b.isMultiLine())r=b.end.row;else if(c==v)break}f=r}}return new s(p,u,f,l.getLine(f).length)},this.getCommentRegionBlock=function(l,r,a){for(var c=r.search(/\s*$/),p=l.getLength(),u=a,f=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,g=1;++au)return new s(u,c,b,r.length)}}.call(o.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle","ace/worker/worker_client"],function(t,n,h){var i=t("../lib/oop"),s=t("./text").Mode,d=t("./json_highlight_rules").JsonHighlightRules,o=t("./matching_brace_outdent").MatchingBraceOutdent,l=t("./folding/cstyle").FoldMode,r=t("../worker/worker_client").WorkerClient,a=function(){this.HighlightRules=d,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new l};i.inherits(a,s),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(c,p,u){var f=this.$getIndent(p);if(c=="start"){var g=p.match(/^.*[\{\(\[]\s*$/);g&&(f+=u)}return f},this.checkOutdent=function(c,p,u){return this.$outdent.checkOutdent(p,u)},this.autoOutdent=function(c,p,u){this.$outdent.autoOutdent(p,u)},this.createWorker=function(c){var p=new r(["ace"],"ace/mode/json_worker","JsonWorker");return p.attachToDocument(c.getDocument()),p.on("annotate",function(u){c.setAnnotations(u.data)}),p.on("terminate",function(){c.clearAnnotations()}),p},this.$id="ace/mode/json"}.call(a.prototype),n.Mode=a}),(function(){ace.require(["ace/mode/json"],function(t){m&&(m.exports=t)})})()})(Ap);var Dp={exports:{}};(function(m,e){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,n,h){var i=t("../lib/oop"),s=t("./text_highlight_rules").TextHighlightRules,d=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};i.inherits(d,s),n.JsonHighlightRules=d}),ace.define("ace/mode/json5_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/json_highlight_rules"],function(t,n,h){var i=t("../lib/oop"),s=t("./json_highlight_rules").JsonHighlightRules,d=function(){s.call(this);var o=[{token:"variable",regex:/[a-zA-Z$_\u00a1-\uffff][\w$\u00a1-\uffff]*\s*(?=:)/},{token:"variable",regex:/['](?:(?:\\.)|(?:[^'\\]))*?[']\s*(?=:)/},{token:"constant.language.boolean",regex:/(?:null)\b/},{token:"string",regex:/'/,next:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\/bfnrt]|$)/,consumeLineEnd:!0},{token:"string",regex:/'|$/,next:"start"},{defaultToken:"string"}]},{token:"string",regex:/"(?![^"]*":)/,next:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\/bfnrt]|$)/,consumeLineEnd:!0},{token:"string",regex:/"|$/,next:"start"},{defaultToken:"string"}]},{token:"constant.numeric",regex:/[+-]?(?:Infinity|NaN)\b/}];for(var l in this.$rules)this.$rules[l].unshift.apply(this.$rules[l],o);this.normalizeRules()};i.inherits(d,s),n.Json5HighlightRules=d}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(t,n,h){var i=t("../range").Range,s=function(){};(function(){this.checkOutdent=function(d,o){return/^\s+$/.test(d)?/^\s*\}/.test(o):!1},this.autoOutdent=function(d,o){var l=d.getLine(o),r=l.match(/^(\s*\})/);if(!r)return 0;var a=r[1].length,c=d.findMatchingBracket({row:o,column:a});if(!c||c.row==o)return 0;var p=this.$getIndent(d.getLine(c.row));d.replace(new i(o,0,o,a-1),p)},this.$getIndent=function(d){return d.match(/^\s*/)[0]}}).call(s.prototype),n.MatchingBraceOutdent=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(t,n,h){var i=t("../../lib/oop"),s=t("../../range").Range,d=t("./fold_mode").FoldMode,o=n.FoldMode=function(l){l&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+l.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+l.end)))};i.inherits(o,d),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(l,r,a){var c=l.getLine(a);if(this.singleLineBlockCommentRe.test(c)&&!this.startRegionRe.test(c)&&!this.tripleStarBlockCommentRe.test(c))return"";var p=this._getFoldWidgetBase(l,r,a);return!p&&this.startRegionRe.test(c)?"start":p},this.getFoldWidgetRange=function(l,r,a,c){var p=l.getLine(a);if(this.startRegionRe.test(p))return this.getCommentRegionBlock(l,p,a);var g=p.match(this.foldingStartMarker);if(g){var u=g.index;if(g[1])return this.openingBracketBlock(l,g[1],a,u);var f=l.getCommentFoldRange(a,u+g[0].length,1);return f&&!f.isMultiLine()&&(c?f=this.getSectionRange(l,a):r!="all"&&(f=null)),f}if(r!=="markbegin"){var g=p.match(this.foldingStopMarker);if(g){var u=g.index+g[0].length;return g[1]?this.closingBracketBlock(l,g[1],a,u):l.getCommentFoldRange(a,u,-1)}}},this.getSectionRange=function(l,r){var a=l.getLine(r),c=a.search(/\S/),p=r,u=a.length;r+=1;for(var f=r,g=l.getLength();++rv)break;var b=this.getFoldWidgetRange(l,"all",r);if(b){if(b.start.row<=p)break;if(b.isMultiLine())r=b.end.row;else if(c==v)break}f=r}}return new s(p,u,f,l.getLine(f).length)},this.getCommentRegionBlock=function(l,r,a){for(var c=r.search(/\s*$/),p=l.getLength(),u=a,f=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,g=1;++au)return new s(u,c,b,r.length)}}.call(o.prototype)}),ace.define("ace/mode/json5",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json5_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"],function(t,n,h){var i=t("../lib/oop"),s=t("./text").Mode,d=t("./json5_highlight_rules").Json5HighlightRules,o=t("./matching_brace_outdent").MatchingBraceOutdent,l=t("./folding/cstyle").FoldMode,r=function(){this.HighlightRules=d,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new l};i.inherits(r,s),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.checkOutdent=function(a,c,p){return this.$outdent.checkOutdent(c,p)},this.autoOutdent=function(a,c,p){this.$outdent.autoOutdent(c,p)},this.$id="ace/mode/json5"}.call(r.prototype),n.Mode=r}),(function(){ace.require(["ace/mode/json5"],function(t){m&&(m.exports=t)})})()})(Dp);var $p={exports:{}};(function(m,e){ace.define("ace/mode/yaml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,n,h){var i=t("../lib/oop"),s=t("./text_highlight_rules").TextHighlightRules,d=function(){this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"list.markup",regex:/^(?:-{3}|\.{3})\s*(?=#|$)/},{token:"list.markup",regex:/^\s*[\-?](?:$|\s)/},{token:"constant",regex:"!![\\w//]+"},{token:"constant.language",regex:"[&\\*][a-zA-Z0-9-_]+"},{token:["meta.tag","keyword"],regex:/^(\s*\w[^\s:]*?)(:(?=\s|$))/},{token:["meta.tag","keyword"],regex:/(\w[^\s:]*?)(\s*:(?=\s|$))/},{token:"keyword.operator",regex:"<<\\w*:\\w*"},{token:"keyword.operator",regex:"-\\s*(?=[{])"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:/[|>][-+\d]*(?:$|\s+(?:$|#))/,onMatch:function(o,l,r,a){a=a.replace(/ #.*/,"");var c=/^ *((:\s*)?-(\s*[^|>])?)?/.exec(a)[0].replace(/\S\s*$/,"").length,p=parseInt(/\d+[\s+-]*$/.exec(a));return p?(c+=p-1,this.next="mlString"):this.next="mlStringPre",r.length?(r[0]=this.next,r[1]=c):(r.push(this.next),r.push(c)),this.token},next:"mlString"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:/(\b|[+\-\.])[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)(?=[^\d-\w]|$)$/},{token:"constant.numeric",regex:/[+\-]?\.inf\b|NaN\b|0x[\dA-Fa-f_]+|0b[10_]+/},{token:"constant.language.boolean",regex:"\\b(?:true|false|TRUE|FALSE|True|False|yes|no)\\b"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:/[^\s,:\[\]\{\}]+/}],mlStringPre:[{token:"indent",regex:/^ *$/},{token:"indent",regex:/^ */,onMatch:function(o,l,r){var a=r[1];return a>=o.length?(this.next="start",r.shift(),r.shift()):(r[1]=o.length-1,this.next=r[0]="mlString"),this.token},next:"mlString"},{defaultToken:"string"}],mlString:[{token:"indent",regex:/^ *$/},{token:"indent",regex:/^ */,onMatch:function(o,l,r){var a=r[1];return a>=o.length?(this.next="start",r.splice(0)):this.next="mlString",this.token},next:"mlString"},{token:"string",regex:".+"}]},this.normalizeRules()};i.inherits(d,s),n.YamlHighlightRules=d}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(t,n,h){var i=t("../range").Range,s=function(){};(function(){this.checkOutdent=function(d,o){return/^\s+$/.test(d)?/^\s*\}/.test(o):!1},this.autoOutdent=function(d,o){var l=d.getLine(o),r=l.match(/^(\s*\})/);if(!r)return 0;var a=r[1].length,c=d.findMatchingBracket({row:o,column:a});if(!c||c.row==o)return 0;var p=this.$getIndent(d.getLine(c.row));d.replace(new i(o,0,o,a-1),p)},this.$getIndent=function(d){return d.match(/^\s*/)[0]}}).call(s.prototype),n.MatchingBraceOutdent=s}),ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(t,n,h){var i=t("../../lib/oop"),s=t("./fold_mode").FoldMode,d=t("../../range").Range,o=n.FoldMode=function(){};i.inherits(o,s),function(){this.commentBlock=function(l,r){var a=/\S/,c=l.getLine(r),p=c.search(a);if(!(p==-1||c[p]!="#")){for(var u=c.length,f=l.getLength(),g=r,v=r;++rg){var D=l.getLine(v).length;return new d(g,u,v,D)}}},this.getFoldWidgetRange=function(l,r,a){var c=this.indentationBlock(l,a);if(c||(c=this.commentBlock(l,a),c))return c},this.getFoldWidget=function(l,r,a){var c=l.getLine(a),p=c.search(/\S/),u=l.getLine(a+1),f=l.getLine(a-1),g=f.search(/\S/),v=u.search(/\S/);if(p==-1)return l.foldWidgets[a-1]=g!=-1&&gD){var T=l.getLine(E).length;return new d(D,v,E,T)}}},this.getFoldWidget=function(l,r,a){var c=l.getLine(a),p=c.search(/\S/),u=l.getLine(a+1),f=l.getLine(a-1),g=f.search(/\S/),v=u.search(/\S/),b=c[p]==="-";if(p==-1)return l.foldWidgets[a-1]=g!=-1&&g ["+this.end.row+"/"+this.end.column+"]"},h.prototype.contains=function(i,s){return this.compare(i,s)==0},h.prototype.compareRange=function(i){var s,d=i.end,o=i.start;return s=this.compare(d.row,d.column),s==1?(s=this.compare(o.row,o.column),s==1?2:s==0?1:0):s==-1?-2:(s=this.compare(o.row,o.column),s==-1?-1:s==1?42:0)},h.prototype.comparePoint=function(i){return this.compare(i.row,i.column)},h.prototype.containsRange=function(i){return this.comparePoint(i.start)==0&&this.comparePoint(i.end)==0},h.prototype.intersects=function(i){var s=this.compareRange(i);return s==-1||s==0||s==1},h.prototype.isEnd=function(i,s){return this.end.row==i&&this.end.column==s},h.prototype.isStart=function(i,s){return this.start.row==i&&this.start.column==s},h.prototype.setStart=function(i,s){typeof i=="object"?(this.start.column=i.column,this.start.row=i.row):(this.start.row=i,this.start.column=s)},h.prototype.setEnd=function(i,s){typeof i=="object"?(this.end.column=i.column,this.end.row=i.row):(this.end.row=i,this.end.column=s)},h.prototype.inside=function(i,s){return this.compare(i,s)==0?!(this.isEnd(i,s)||this.isStart(i,s)):!1},h.prototype.insideStart=function(i,s){return this.compare(i,s)==0?!this.isEnd(i,s):!1},h.prototype.insideEnd=function(i,s){return this.compare(i,s)==0?!this.isStart(i,s):!1},h.prototype.compare=function(i,s){return!this.isMultiLine()&&i===this.start.row?sthis.end.column?1:0:ithis.end.row?1:this.start.row===i?s>=this.start.column?0:-1:this.end.row===i?s<=this.end.column?0:1:0},h.prototype.compareStart=function(i,s){return this.start.row==i&&this.start.column==s?-1:this.compare(i,s)},h.prototype.compareEnd=function(i,s){return this.end.row==i&&this.end.column==s?1:this.compare(i,s)},h.prototype.compareInside=function(i,s){return this.end.row==i&&this.end.column==s?1:this.start.row==i&&this.start.column==s?-1:this.compare(i,s)},h.prototype.clipRows=function(i,s){if(this.end.row>s)var d={row:s+1,column:0};else if(this.end.rows)var o={row:s+1,column:0};else if(this.start.rowthis.row)){var r=h(l,{row:this.row,column:this.column},this.$insertRight);this.setPosition(r.row,r.column,!0)}},o.prototype.setPosition=function(l,r,a){var c;if(a?c={row:l,column:r}:c=this.$clipPositionToDocument(l,r),!(this.row==c.row&&this.column==c.column)){var p={row:this.row,column:this.column};this.row=c.row,this.column=c.column,this._signal("change",{old:p,value:c})}},o.prototype.detach=function(){this.document.off("change",this.$onChange)},o.prototype.attach=function(l){this.document=l||this.document,this.document.on("change",this.$onChange)},o.prototype.$clipPositionToDocument=function(l,r){var a={};return l>=this.document.getLength()?(a.row=Math.max(0,this.document.getLength()-1),a.column=this.document.getLine(a.row).length):l<0?(a.row=0,a.column=0):(a.row=l,a.column=Math.min(this.document.getLine(a.row).length,Math.max(0,r))),r<0&&(a.column=0),a},o})();d.prototype.$insertRight=!1,i.implement(d.prototype,s),e.Anchor=d}),ace.define("ace/document",[],function(m,e,t){var n=m("./lib/oop"),h=m("./apply_delta").applyDelta,i=m("./lib/event_emitter").EventEmitter,s=m("./range").Range,d=m("./anchor").Anchor,o=(function(){function l(r){this.$lines=[""],r.length===0?this.$lines=[""]:Array.isArray(r)?this.insertMergedLines({row:0,column:0},r):this.insert({row:0,column:0},r)}return l.prototype.setValue=function(r){var a=this.getLength()-1;this.remove(new s(0,0,a,this.getLine(a).length)),this.insert({row:0,column:0},r||"")},l.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},l.prototype.createAnchor=function(r,a){return new d(this,r,a)},l.prototype.$detectNewLine=function(r){var a=r.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=a?a[1]:` `,this._signal("changeNewLineMode")},l.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r `;case"unix":return` `;default:return this.$autoNewLine||` `}},l.prototype.setNewLineMode=function(r){this.$newLineMode!==r&&(this.$newLineMode=r,this._signal("changeNewLineMode"))},l.prototype.getNewLineMode=function(){return this.$newLineMode},l.prototype.isNewLine=function(r){return r==`\r `||r=="\r"||r==` -`},l.prototype.getLine=function(r){return this.$lines[r]||""},l.prototype.getLines=function(r,a){return this.$lines.slice(r,a+1)},l.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},l.prototype.getLength=function(){return this.$lines.length},l.prototype.getTextRange=function(r){return this.getLinesForRange(r).join(this.getNewLineCharacter())},l.prototype.getLinesForRange=function(r){var a;if(r.start.row===r.end.row)a=[this.getLine(r.start.row).substring(r.start.column,r.end.column)];else{a=this.getLines(r.start.row,r.end.row),a[0]=(a[0]||"").substring(r.start.column);var c=a.length-1;r.end.row-r.start.row==c&&(a[c]=a[c].substring(0,r.end.column))}return a},l.prototype.insertLines=function(r,a){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(r,a)},l.prototype.removeLines=function(r,a){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(r,a)},l.prototype.insertNewLine=function(r){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(r,["",""])},l.prototype.insert=function(r,a){return this.getLength()<=1&&this.$detectNewLine(a),this.insertMergedLines(r,this.$split(a))},l.prototype.insertInLine=function(r,a){var c=this.clippedPos(r.row,r.column),p=this.pos(r.row,r.column+a.length);return this.applyDelta({start:c,end:p,action:"insert",lines:[a]},!0),this.clonePos(p)},l.prototype.clippedPos=function(r,a){var c=this.getLength();r===void 0?r=c:r<0?r=0:r>=c&&(r=c-1,a=void 0);var p=this.getLine(r);return a==null&&(a=p.length),a=Math.min(Math.max(a,0),p.length),{row:r,column:a}},l.prototype.clonePos=function(r){return{row:r.row,column:r.column}},l.prototype.pos=function(r,a){return{row:r,column:a}},l.prototype.$clipPosition=function(r){var a=this.getLength();return r.row>=a?(r.row=Math.max(0,a-1),r.column=this.getLine(a-1).length):(r.row=Math.max(0,r.row),r.column=Math.min(Math.max(r.column,0),this.getLine(r.row).length)),r},l.prototype.insertFullLines=function(r,a){r=Math.min(Math.max(r,0),this.getLength());var c=0;r0,p=a=0&&this.applyDelta({start:this.pos(r,this.getLine(r).length),end:this.pos(r+1,0),action:"remove",lines:["",""]})},l.prototype.replace=function(r,a){if(r instanceof s||(r=s.fromPoints(r.start,r.end)),a.length===0&&r.isEmpty())return r.start;if(a==this.getTextRange(r))return r.end;this.remove(r);var c;return a?c=this.insert(r.start,a):c=r.start,c},l.prototype.applyDeltas=function(r){for(var a=0;a=0;a--)this.revertDelta(r[a])},l.prototype.applyDelta=function(r,a){var c=r.action=="insert";(c?r.lines.length<=1&&!r.lines[0]:!s.comparePoints(r.start,r.end))||(c&&r.lines.length>2e4?this.$splitAndapplyLargeDelta(r,2e4):(u(this.$lines,r,a),this._signal("change",r)))},l.prototype.$safeApplyDelta=function(r){var a=this.$lines.length;(r.action=="remove"&&r.start.row0;)s&1&&(d+=i),(s>>=1)&&(i+=i);return d};var n=/^\s\s*/,u=/\s\s*$/;e.stringTrimLeft=function(i){return i.replace(n,"")},e.stringTrimRight=function(i){return i.replace(u,"")},e.copyObject=function(i){var s={};for(var d in i)s[d]=i[d];return s},e.copyArray=function(i){for(var s=[],d=0,o=i.length;d65535?2:1}}),ace.define("ace/worker/mirror",[],function(m,e,t){var n=m("../document").Document,u=m("../lib/lang"),i=e.Mirror=function(s){this.sender=s;var d=this.doc=new n(""),o=this.deferredUpdate=u.delayedCall(this.onUpdate.bind(this)),l=this;s.on("change",function(r){var a=r.data;if(a[0].start)d.applyDeltas(a);else for(var c=0;c=d.$lines.length)throw h=new Error("Invalid delta"),h.data={path:l.$path,linesLength:d.$lines.length,start:p.start,end:p.end},h;d.applyDelta(p,!0)}if(l.$timeout)return o.schedule(l.$timeout);l.onUpdate()})};(function(){this.$timeout=500,this.setTimeout=function(s){this.$timeout=s},this.setValue=function(s){this.doc.setValue(s),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(s){this.sender.callback(this.doc.getValue(),s)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(i.prototype)}),ace.define("ace/mode/json/json_parse",[],function(m,e,t){var n,u,i={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:` -`,r:"\r",t:" "},s,d=function(g){throw{name:"SyntaxError",message:g,at:n,text:s}},o=function(g){return g&&g!==u&&d("Expected '"+g+"' instead of '"+u+"'"),u=s.charAt(n),n+=1,u},l=function(){var g,v="";for(u==="-"&&(v="-",o("-"));u>="0"&&u<="9";)v+=u,o();if(u===".")for(v+=".";o()&&u>="0"&&u<="9";)v+=u;if(u==="e"||u==="E")for(v+=u,o(),(u==="-"||u==="+")&&(v+=u,o());u>="0"&&u<="9";)v+=u,o();if(g=+v,!isNaN(g))return g;d("Bad number")},r=function(){var g,v,b="",D;if(u==='"')for(;o();){if(u==='"')return o(),b;if(u==="\\")if(o(),u==="u"){for(D=0,v=0;v<4&&(g=parseInt(o(),16),!!isFinite(g));v+=1)D=D*16+g;b+=String.fromCharCode(D)}else{if(typeof i[u]!="string")break;b+=i[u]}else{if(u==` -`||u=="\r")break;b+=u}}d("Bad string")},a=function(){for(;u&&u<=" ";)o()},c=function(){switch(u){case"t":return o("t"),o("r"),o("u"),o("e"),!0;case"f":return o("f"),o("a"),o("l"),o("s"),o("e"),!1;case"n":return o("n"),o("u"),o("l"),o("l"),null}d("Unexpected '"+u+"'")},p,h=function(){var g=[];if(u==="["){if(o("["),a(),u==="]")return o("]"),g;for(;u;){if(g.push(p()),a(),u==="]")return o("]"),g;o(","),a()}}d("Bad array")},f=function(){var g,v={};if(u==="{"){if(o("{"),a(),u==="}")return o("}"),v;for(;u;){if(g=r(),a(),o(":"),Object.hasOwnProperty.call(v,g)&&d('Duplicate key "'+g+'"'),v[g]=p(),a(),u==="}")return o("}"),v;o(","),a()}}d("Bad object")};return p=function(){switch(a(),u){case"{":return f();case"[":return h();case'"':return r();case"-":return l();default:return u>="0"&&u<="9"?l():c()}},function(g,v){var b;return s=g,n=0,u=" ",b=p(),a(),u&&d("Syntax error"),typeof v=="function"?(function D(E,w){var y,A,T=E[w];if(T&&typeof T=="object")for(y in T)Object.hasOwnProperty.call(T,y)&&(A=D(T,y),A!==void 0?T[y]=A:delete T[y]);return v.call(E,w,T)})({"":b},""):b}}),ace.define("ace/mode/json_worker",[],function(m,e,t){var n=m("../lib/oop"),u=m("../worker/mirror").Mirror,i=m("./json/json_parse"),s=e.JsonWorker=function(d){u.call(this,d),this.setTimeout(200)};n.inherits(s,u),function(){this.onUpdate=function(){var d=this.doc.getValue(),o=[];try{d&&i(d)}catch(r){var l=this.doc.indexToPosition(r.at-1);o.push({row:l.row,column:l.column,text:r.message,type:"error"})}this.sender.emit("annotate",o)}}.call(s.prototype)});var Dp={exports:{}};(function(m,e){ace.define("ace/theme/clouds_midnight-css",["require","exports","module"],function(t,n,u){u.exports=`.ace-clouds-midnight .ace_gutter { +`},l.prototype.getLine=function(r){return this.$lines[r]||""},l.prototype.getLines=function(r,a){return this.$lines.slice(r,a+1)},l.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},l.prototype.getLength=function(){return this.$lines.length},l.prototype.getTextRange=function(r){return this.getLinesForRange(r).join(this.getNewLineCharacter())},l.prototype.getLinesForRange=function(r){var a;if(r.start.row===r.end.row)a=[this.getLine(r.start.row).substring(r.start.column,r.end.column)];else{a=this.getLines(r.start.row,r.end.row),a[0]=(a[0]||"").substring(r.start.column);var c=a.length-1;r.end.row-r.start.row==c&&(a[c]=a[c].substring(0,r.end.column))}return a},l.prototype.insertLines=function(r,a){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(r,a)},l.prototype.removeLines=function(r,a){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(r,a)},l.prototype.insertNewLine=function(r){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(r,["",""])},l.prototype.insert=function(r,a){return this.getLength()<=1&&this.$detectNewLine(a),this.insertMergedLines(r,this.$split(a))},l.prototype.insertInLine=function(r,a){var c=this.clippedPos(r.row,r.column),p=this.pos(r.row,r.column+a.length);return this.applyDelta({start:c,end:p,action:"insert",lines:[a]},!0),this.clonePos(p)},l.prototype.clippedPos=function(r,a){var c=this.getLength();r===void 0?r=c:r<0?r=0:r>=c&&(r=c-1,a=void 0);var p=this.getLine(r);return a==null&&(a=p.length),a=Math.min(Math.max(a,0),p.length),{row:r,column:a}},l.prototype.clonePos=function(r){return{row:r.row,column:r.column}},l.prototype.pos=function(r,a){return{row:r,column:a}},l.prototype.$clipPosition=function(r){var a=this.getLength();return r.row>=a?(r.row=Math.max(0,a-1),r.column=this.getLine(a-1).length):(r.row=Math.max(0,r.row),r.column=Math.min(Math.max(r.column,0),this.getLine(r.row).length)),r},l.prototype.insertFullLines=function(r,a){r=Math.min(Math.max(r,0),this.getLength());var c=0;r0,p=a=0&&this.applyDelta({start:this.pos(r,this.getLine(r).length),end:this.pos(r+1,0),action:"remove",lines:["",""]})},l.prototype.replace=function(r,a){if(r instanceof s||(r=s.fromPoints(r.start,r.end)),a.length===0&&r.isEmpty())return r.start;if(a==this.getTextRange(r))return r.end;this.remove(r);var c;return a?c=this.insert(r.start,a):c=r.start,c},l.prototype.applyDeltas=function(r){for(var a=0;a=0;a--)this.revertDelta(r[a])},l.prototype.applyDelta=function(r,a){var c=r.action=="insert";(c?r.lines.length<=1&&!r.lines[0]:!s.comparePoints(r.start,r.end))||(c&&r.lines.length>2e4?this.$splitAndapplyLargeDelta(r,2e4):(h(this.$lines,r,a),this._signal("change",r)))},l.prototype.$safeApplyDelta=function(r){var a=this.$lines.length;(r.action=="remove"&&r.start.row0;)s&1&&(d+=i),(s>>=1)&&(i+=i);return d};var n=/^\s\s*/,h=/\s\s*$/;e.stringTrimLeft=function(i){return i.replace(n,"")},e.stringTrimRight=function(i){return i.replace(h,"")},e.copyObject=function(i){var s={};for(var d in i)s[d]=i[d];return s},e.copyArray=function(i){for(var s=[],d=0,o=i.length;d65535?2:1}}),ace.define("ace/worker/mirror",[],function(m,e,t){var n=m("../document").Document,h=m("../lib/lang"),i=e.Mirror=function(s){this.sender=s;var d=this.doc=new n(""),o=this.deferredUpdate=h.delayedCall(this.onUpdate.bind(this)),l=this;s.on("change",function(r){var a=r.data;if(a[0].start)d.applyDeltas(a);else for(var c=0;c=d.$lines.length)throw u=new Error("Invalid delta"),u.data={path:l.$path,linesLength:d.$lines.length,start:p.start,end:p.end},u;d.applyDelta(p,!0)}if(l.$timeout)return o.schedule(l.$timeout);l.onUpdate()})};(function(){this.$timeout=500,this.setTimeout=function(s){this.$timeout=s},this.setValue=function(s){this.doc.setValue(s),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(s){this.sender.callback(this.doc.getValue(),s)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(i.prototype)}),ace.define("ace/mode/json/json_parse",[],function(m,e,t){var n,h,i={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:` +`,r:"\r",t:" "},s,d=function(g){throw{name:"SyntaxError",message:g,at:n,text:s}},o=function(g){return g&&g!==h&&d("Expected '"+g+"' instead of '"+h+"'"),h=s.charAt(n),n+=1,h},l=function(){var g,v="";for(h==="-"&&(v="-",o("-"));h>="0"&&h<="9";)v+=h,o();if(h===".")for(v+=".";o()&&h>="0"&&h<="9";)v+=h;if(h==="e"||h==="E")for(v+=h,o(),(h==="-"||h==="+")&&(v+=h,o());h>="0"&&h<="9";)v+=h,o();if(g=+v,!isNaN(g))return g;d("Bad number")},r=function(){var g,v,b="",D;if(h==='"')for(;o();){if(h==='"')return o(),b;if(h==="\\")if(o(),h==="u"){for(D=0,v=0;v<4&&(g=parseInt(o(),16),!!isFinite(g));v+=1)D=D*16+g;b+=String.fromCharCode(D)}else{if(typeof i[h]!="string")break;b+=i[h]}else{if(h==` +`||h=="\r")break;b+=h}}d("Bad string")},a=function(){for(;h&&h<=" ";)o()},c=function(){switch(h){case"t":return o("t"),o("r"),o("u"),o("e"),!0;case"f":return o("f"),o("a"),o("l"),o("s"),o("e"),!1;case"n":return o("n"),o("u"),o("l"),o("l"),null}d("Unexpected '"+h+"'")},p,u=function(){var g=[];if(h==="["){if(o("["),a(),h==="]")return o("]"),g;for(;h;){if(g.push(p()),a(),h==="]")return o("]"),g;o(","),a()}}d("Bad array")},f=function(){var g,v={};if(h==="{"){if(o("{"),a(),h==="}")return o("}"),v;for(;h;){if(g=r(),a(),o(":"),Object.hasOwnProperty.call(v,g)&&d('Duplicate key "'+g+'"'),v[g]=p(),a(),h==="}")return o("}"),v;o(","),a()}}d("Bad object")};return p=function(){switch(a(),h){case"{":return f();case"[":return u();case'"':return r();case"-":return l();default:return h>="0"&&h<="9"?l():c()}},function(g,v){var b;return s=g,n=0,h=" ",b=p(),a(),h&&d("Syntax error"),typeof v=="function"?(function D(E,w){var y,A,T=E[w];if(T&&typeof T=="object")for(y in T)Object.hasOwnProperty.call(T,y)&&(A=D(T,y),A!==void 0?T[y]=A:delete T[y]);return v.call(E,w,T)})({"":b},""):b}}),ace.define("ace/mode/json_worker",[],function(m,e,t){var n=m("../lib/oop"),h=m("../worker/mirror").Mirror,i=m("./json/json_parse"),s=e.JsonWorker=function(d){h.call(this,d),this.setTimeout(200)};n.inherits(s,h),function(){this.onUpdate=function(){var d=this.doc.getValue(),o=[];try{d&&i(d)}catch(r){var l=this.doc.indexToPosition(r.at-1);o.push({row:l.row,column:l.column,text:r.message,type:"error"})}this.sender.emit("annotate",o)}}.call(s.prototype)});var _p={exports:{}};(function(m,e){ace.define("ace/theme/clouds_midnight-css",["require","exports","module"],function(t,n,h){h.exports=`.ace-clouds-midnight .ace_gutter { background: #232323; color: #929292 } @@ -1123,7 +1123,7 @@ import{i as Ao,h as x,f as Kl,a as Gl,p as Jl}from"./ConfigCustomJavascriptSet__ .ace-clouds-midnight .ace_indent-guide-active { background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y; } -`}),ace.define("ace/theme/clouds_midnight",["require","exports","module","ace/theme/clouds_midnight-css","ace/lib/dom"],function(t,n,u){n.isDark=!0,n.cssClass="ace-clouds-midnight",n.cssText=t("./clouds_midnight-css");var i=t("../lib/dom");i.importCssString(n.cssText,n.cssClass,!1)}),(function(){ace.require(["ace/theme/clouds_midnight"],function(t){m&&(m.exports=t)})})()})(Dp);var $p={exports:{}};(function(m,e){ace.define("ace/theme/chrome-css",["require","exports","module"],function(t,n,u){u.exports=`.ace-chrome .ace_gutter { +`}),ace.define("ace/theme/clouds_midnight",["require","exports","module","ace/theme/clouds_midnight-css","ace/lib/dom"],function(t,n,h){n.isDark=!0,n.cssClass="ace-clouds-midnight",n.cssText=t("./clouds_midnight-css");var i=t("../lib/dom");i.importCssString(n.cssText,n.cssClass,!1)}),(function(){ace.require(["ace/theme/clouds_midnight"],function(t){m&&(m.exports=t)})})()})(_p);var kp={exports:{}};(function(m,e){ace.define("ace/theme/chrome-css",["require","exports","module"],function(t,n,h){h.exports=`.ace-chrome .ace_gutter { background: #ebebeb; color: #333; overflow : hidden; @@ -1281,21 +1281,21 @@ import{i as Ao,h as x,f as Kl,a as Gl,p as Jl}from"./ConfigCustomJavascriptSet__ .ace-chrome .ace_indent-guide-active { background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y; } -`}),ace.define("ace/theme/chrome",["require","exports","module","ace/theme/chrome-css","ace/lib/dom"],function(t,n,u){n.isDark=!1,n.cssClass="ace-chrome",n.cssText=t("./chrome-css");var i=t("../lib/dom");i.importCssString(n.cssText,n.cssClass,!1)}),(function(){ace.require(["ace/theme/chrome"],function(t){m&&(m.exports=t)})})()})($p);var xp={exports:{}};(function(m,e){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(t,n,u){function i(y){var A=new Date().toLocaleString("en-us",y);return A.length==1?"0"+A:A}var s=t("./lib/dom"),d=t("./lib/oop"),o=t("./lib/event_emitter").EventEmitter,l=t("./lib/lang"),r=t("./range").Range,a=t("./range_list").RangeList,c=t("./keyboard/hash_handler").HashHandler,p=t("./tokenizer").Tokenizer,h=t("./clipboard"),f={CURRENT_WORD:function(y){return y.session.getTextRange(y.session.getWordRange())},SELECTION:function(y,A,T){var $=y.session.getTextRange();return T?$.replace(/\n\r?([ \t]*\S)/g,` -`+T+"$1"):$},CURRENT_LINE:function(y){return y.session.getLine(y.getCursorPosition().row)},PREV_LINE:function(y){return y.session.getLine(y.getCursorPosition().row-1)},LINE_INDEX:function(y){return y.getCursorPosition().row},LINE_NUMBER:function(y){return y.getCursorPosition().row+1},SOFT_TABS:function(y){return y.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(y){return y.session.getTabSize()},CLIPBOARD:function(y){return h.getText&&h.getText()},FILENAME:function(y){return/[^/\\]*$/.exec(this.FILEPATH(y))[0]},FILENAME_BASE:function(y){return/[^/\\]*$/.exec(this.FILEPATH(y))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(y){return this.FILEPATH(y).replace(/[^/\\]*$/,"")},FILEPATH:function(y){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(y){var A=y.session.$mode||{};return A.blockComment&&A.blockComment.start||""},BLOCK_COMMENT_END:function(y){var A=y.session.$mode||{};return A.blockComment&&A.blockComment.end||""},LINE_COMMENT:function(y){var A=y.session.$mode||{};return A.lineCommentStart||""},CURRENT_YEAR:i.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:i.bind(null,{year:"2-digit"}),CURRENT_MONTH:i.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:i.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:i.bind(null,{month:"short"}),CURRENT_DATE:i.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:i.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:i.bind(null,{weekday:"short"}),CURRENT_HOUR:i.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:i.bind(null,{minute:"2-digit"}),CURRENT_SECOND:i.bind(null,{second:"2-digit"})};f.SELECTED_TEXT=f.SELECTION;var g=(function(){function y(){this.snippetMap={},this.snippetNameMap={},this.variables=f}return y.prototype.getTokenizer=function(){return y.$tokenizer||this.createTokenizer()},y.prototype.createTokenizer=function(){function A(M){return M=M.substr(1),/^\d+$/.test(M)?[{tabstopId:parseInt(M,10)}]:[{text:M}]}function T(M){return"(?:[^\\\\"+M+"]|\\\\.)"}var $={regex:"/("+T("/")+"+)/",onMatch:function(M,O,_){var k=_[0];return k.fmtString=!0,k.guard=M.slice(1,-1),k.flag="",""},next:"formatString"};return y.$tokenizer=new p({start:[{regex:/\\./,onMatch:function(M,O,_){var k=M[1];return(k=="}"&&_.length||"`$\\".indexOf(k)!=-1)&&(M=k),[M]}},{regex:/}/,onMatch:function(M,O,_){return[_.length?_.shift():M]}},{regex:/\$(?:\d+|\w+)/,onMatch:A},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(M,O,_){var k=A(M.substr(1));return _.unshift(k[0]),k},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+T("\\|")+"*\\|",onMatch:function(M,O,_){var k=M.slice(1,-1).replace(/\\[,|\\]|,/g,function(S){return S.length==2?S[1]:"\0"}).split("\0").map(function(S){return{value:S}});return _[0].choices=k,[k[0]]},next:"start"},$,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(M,O,_){return _.length&&_[0].expectElse?(_[0].expectElse=!1,_[0].ifEnd={elseEnd:_[0]},[_[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(M,O,_){var k=M[1];return k=="}"&&_.length||"`$\\".indexOf(k)!=-1?M=k:k=="n"?M=` -`:k=="t"?M=" ":"ulULE".indexOf(k)!=-1&&(M={changeCase:k,local:k>"a"}),[M]}},{regex:"/\\w*}",onMatch:function(M,O,_){var k=_.shift();return k&&(k.flag=M.slice(1,-1)),this.next=k&&k.tabstopId?"start":"",[k||M]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(M,O,_){return[{text:M.slice(1)}]}},{regex:/\${\w+/,onMatch:function(M,O,_){var k={text:M.slice(2)};return _.unshift(k),[k]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(M,O,_){var k=_.shift();return this.next=k&&k.tabstopId?"start":"",[k||M]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(M,O,_){var k=_[0];return k.formatFunction=M.slice(2,-1),[_.shift()]},next:"formatString"},$,{regex:/:[\?\-+]?/,onMatch:function(M,O,_){M[1]=="+"&&(_[0].ifEnd=_[0]),M[1]=="?"&&(_[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),y.$tokenizer},y.prototype.tokenizeTmSnippet=function(A,T){return this.getTokenizer().getLineTokens(A,T).tokens.map(function($){return $.value||$})},y.prototype.getVariableValue=function(A,T,$){if(/^\d+$/.test(T))return(this.variables.__||{})[T]||"";if(/^[A-Z]\d+$/.test(T))return(this.variables[T[0]+"__"]||{})[T.substr(1)]||"";if(T=T.replace(/^TM_/,""),!this.variables.hasOwnProperty(T))return"";var M=this.variables[T];return typeof M=="function"&&(M=this.variables[T](A,T,$)),M??""},y.prototype.tmStrFormat=function(A,T,$){if(!T.fmt)return A;var M=T.flag||"",O=T.guard;O=new RegExp(O,M.replace(/[^gim]/g,""));var _=typeof T.fmt=="string"?this.tokenizeTmSnippet(T.fmt,"formatString"):T.fmt,k=this,S=A.replace(O,function(){var C=k.variables.__;k.variables.__=[].slice.call(arguments);for(var L=k.resolveVariables(_,$),I="E",F=0;F=0&&S.splice(C,1)}}var M=this.snippetMap,O=this.snippetNameMap;A.content?$(A):Array.isArray(A)&&A.forEach($)},y.prototype.parseSnippetFile=function(A){A=A.replace(/\r/g,"");for(var T=[],$={},M=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,O;O=M.exec(A);){if(O[1])try{$=JSON.parse(O[1]),T.push($)}catch{}if(O[4])$.content=O[4].replace(/^\t/gm,""),T.push($),$={};else{var _=O[2],k=O[3];if(_=="regex"){var S=/\/((?:[^\/\\]|\\.)*)|$/g;$.guard=S.exec(k)[1],$.trigger=S.exec(k)[1],$.endTrigger=S.exec(k)[1],$.endGuard=S.exec(k)[1]}else _=="snippet"?($.tabTrigger=k.match(/^\S*/)[0],$.name||($.name=k)):_&&($[_]=k)}}return T},y.prototype.getSnippetByName=function(A,T){var $=this.snippetNameMap,M;return this.getActiveScopes(T).some(function(O){var _=$[O];return _&&(M=_[A]),!!M},this),M},y})();d.implement(g.prototype,o);var v=function(y,A,T){function $(K){for(var J=[],Y=0;Y1?(j=J[J.length-1].length,W+=J.length-1):j+=K.length,U+=K}else K&&(K.start?K.end={row:W,column:j}:K.start={row:W,column:j})}),{text:U,tabstops:C,tokens:S}},b=(function(){function y(A){if(this.index=0,this.ranges=[],this.tabstops=[],A.tabstopManager)return A.tabstopManager;A.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=l.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(A)}return y.prototype.attach=function(A){this.$openTabstops=null,this.selectedTabstop=null,this.editor=A,this.session=A.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},y.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},y.prototype.onChange=function(A){for(var T=A.action[0]=="r",$=this.selectedTabstop||{},M=$.parents||{},O=this.tabstops.slice(),_=0;_2&&(this.tabstops.length&&k.push(k.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,k))},y.prototype.addTabstopMarkers=function(A){var T=this.session;A.forEach(function($){$.markerId||($.markerId=T.addMarker($,"ace_snippet-marker","text"))})},y.prototype.removeTabstopMarkers=function(A){var T=this.session;A.forEach(function($){T.removeMarker($.markerId),$.markerId=null})},y.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var A=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&A--,this.tabstops.forEach(function(T){T.snippetId===A?this.addTabstopMarkers(T):this.removeTabstopMarkers(T)},this)}},y.prototype.removeRange=function(A){var T=A.tabstop.indexOf(A);T!=-1&&A.tabstop.splice(T,1),T=this.ranges.indexOf(A),T!=-1&&this.ranges.splice(T,1),T=A.tabstop.rangeList.ranges.indexOf(A),T!=-1&&A.tabstop.splice(T,1),this.session.removeMarker(A.markerId),A.tabstop.length||(T=this.tabstops.indexOf(A.tabstop),T!=-1&&this.tabstops.splice(T,1),this.tabstops.length||this.detach())},y})();b.prototype.keyboardHandler=new c,b.prototype.keyboardHandler.bindKeys({Tab:function(y){n.snippetManager&&n.snippetManager.expandWithTab(y)||(y.tabstopManager.tabNext(1),y.renderer.scrollCursorIntoView())},"Shift-Tab":function(y){y.tabstopManager.tabNext(-1),y.renderer.scrollCursorIntoView()},Esc:function(y){y.tabstopManager.detach()}});var D=function(y,A){y.row==0&&(y.column+=A.column),y.row+=A.row},E=function(y,A){y.row==A.row&&(y.column-=A.column),y.row-=A.row};s.importCssString(` +`}),ace.define("ace/theme/chrome",["require","exports","module","ace/theme/chrome-css","ace/lib/dom"],function(t,n,h){n.isDark=!1,n.cssClass="ace-chrome",n.cssText=t("./chrome-css");var i=t("../lib/dom");i.importCssString(n.cssText,n.cssClass,!1)}),(function(){ace.require(["ace/theme/chrome"],function(t){m&&(m.exports=t)})})()})(kp);var Tp={exports:{}};(function(m,e){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(t,n,h){function i(y){var A=new Date().toLocaleString("en-us",y);return A.length==1?"0"+A:A}var s=t("./lib/dom"),d=t("./lib/oop"),o=t("./lib/event_emitter").EventEmitter,l=t("./lib/lang"),r=t("./range").Range,a=t("./range_list").RangeList,c=t("./keyboard/hash_handler").HashHandler,p=t("./tokenizer").Tokenizer,u=t("./clipboard"),f={CURRENT_WORD:function(y){return y.session.getTextRange(y.session.getWordRange())},SELECTION:function(y,A,T){var x=y.session.getTextRange();return T?x.replace(/\n\r?([ \t]*\S)/g,` +`+T+"$1"):x},CURRENT_LINE:function(y){return y.session.getLine(y.getCursorPosition().row)},PREV_LINE:function(y){return y.session.getLine(y.getCursorPosition().row-1)},LINE_INDEX:function(y){return y.getCursorPosition().row},LINE_NUMBER:function(y){return y.getCursorPosition().row+1},SOFT_TABS:function(y){return y.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(y){return y.session.getTabSize()},CLIPBOARD:function(y){return u.getText&&u.getText()},FILENAME:function(y){return/[^/\\]*$/.exec(this.FILEPATH(y))[0]},FILENAME_BASE:function(y){return/[^/\\]*$/.exec(this.FILEPATH(y))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(y){return this.FILEPATH(y).replace(/[^/\\]*$/,"")},FILEPATH:function(y){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(y){var A=y.session.$mode||{};return A.blockComment&&A.blockComment.start||""},BLOCK_COMMENT_END:function(y){var A=y.session.$mode||{};return A.blockComment&&A.blockComment.end||""},LINE_COMMENT:function(y){var A=y.session.$mode||{};return A.lineCommentStart||""},CURRENT_YEAR:i.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:i.bind(null,{year:"2-digit"}),CURRENT_MONTH:i.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:i.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:i.bind(null,{month:"short"}),CURRENT_DATE:i.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:i.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:i.bind(null,{weekday:"short"}),CURRENT_HOUR:i.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:i.bind(null,{minute:"2-digit"}),CURRENT_SECOND:i.bind(null,{second:"2-digit"})};f.SELECTED_TEXT=f.SELECTION;var g=(function(){function y(){this.snippetMap={},this.snippetNameMap={},this.variables=f}return y.prototype.getTokenizer=function(){return y.$tokenizer||this.createTokenizer()},y.prototype.createTokenizer=function(){function A(M){return M=M.substr(1),/^\d+$/.test(M)?[{tabstopId:parseInt(M,10)}]:[{text:M}]}function T(M){return"(?:[^\\\\"+M+"]|\\\\.)"}var x={regex:"/("+T("/")+"+)/",onMatch:function(M,O,_){var k=_[0];return k.fmtString=!0,k.guard=M.slice(1,-1),k.flag="",""},next:"formatString"};return y.$tokenizer=new p({start:[{regex:/\\./,onMatch:function(M,O,_){var k=M[1];return(k=="}"&&_.length||"`$\\".indexOf(k)!=-1)&&(M=k),[M]}},{regex:/}/,onMatch:function(M,O,_){return[_.length?_.shift():M]}},{regex:/\$(?:\d+|\w+)/,onMatch:A},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(M,O,_){var k=A(M.substr(1));return _.unshift(k[0]),k},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+T("\\|")+"*\\|",onMatch:function(M,O,_){var k=M.slice(1,-1).replace(/\\[,|\\]|,/g,function(S){return S.length==2?S[1]:"\0"}).split("\0").map(function(S){return{value:S}});return _[0].choices=k,[k[0]]},next:"start"},x,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(M,O,_){return _.length&&_[0].expectElse?(_[0].expectElse=!1,_[0].ifEnd={elseEnd:_[0]},[_[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(M,O,_){var k=M[1];return k=="}"&&_.length||"`$\\".indexOf(k)!=-1?M=k:k=="n"?M=` +`:k=="t"?M=" ":"ulULE".indexOf(k)!=-1&&(M={changeCase:k,local:k>"a"}),[M]}},{regex:"/\\w*}",onMatch:function(M,O,_){var k=_.shift();return k&&(k.flag=M.slice(1,-1)),this.next=k&&k.tabstopId?"start":"",[k||M]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(M,O,_){return[{text:M.slice(1)}]}},{regex:/\${\w+/,onMatch:function(M,O,_){var k={text:M.slice(2)};return _.unshift(k),[k]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(M,O,_){var k=_.shift();return this.next=k&&k.tabstopId?"start":"",[k||M]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(M,O,_){var k=_[0];return k.formatFunction=M.slice(2,-1),[_.shift()]},next:"formatString"},x,{regex:/:[\?\-+]?/,onMatch:function(M,O,_){M[1]=="+"&&(_[0].ifEnd=_[0]),M[1]=="?"&&(_[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),y.$tokenizer},y.prototype.tokenizeTmSnippet=function(A,T){return this.getTokenizer().getLineTokens(A,T).tokens.map(function(x){return x.value||x})},y.prototype.getVariableValue=function(A,T,x){if(/^\d+$/.test(T))return(this.variables.__||{})[T]||"";if(/^[A-Z]\d+$/.test(T))return(this.variables[T[0]+"__"]||{})[T.substr(1)]||"";if(T=T.replace(/^TM_/,""),!this.variables.hasOwnProperty(T))return"";var M=this.variables[T];return typeof M=="function"&&(M=this.variables[T](A,T,x)),M??""},y.prototype.tmStrFormat=function(A,T,x){if(!T.fmt)return A;var M=T.flag||"",O=T.guard;O=new RegExp(O,M.replace(/[^gim]/g,""));var _=typeof T.fmt=="string"?this.tokenizeTmSnippet(T.fmt,"formatString"):T.fmt,k=this,S=A.replace(O,function(){var C=k.variables.__;k.variables.__=[].slice.call(arguments);for(var L=k.resolveVariables(_,x),I="E",F=0;F=0&&S.splice(C,1)}}var M=this.snippetMap,O=this.snippetNameMap;A.content?x(A):Array.isArray(A)&&A.forEach(x)},y.prototype.parseSnippetFile=function(A){A=A.replace(/\r/g,"");for(var T=[],x={},M=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,O;O=M.exec(A);){if(O[1])try{x=JSON.parse(O[1]),T.push(x)}catch{}if(O[4])x.content=O[4].replace(/^\t/gm,""),T.push(x),x={};else{var _=O[2],k=O[3];if(_=="regex"){var S=/\/((?:[^\/\\]|\\.)*)|$/g;x.guard=S.exec(k)[1],x.trigger=S.exec(k)[1],x.endTrigger=S.exec(k)[1],x.endGuard=S.exec(k)[1]}else _=="snippet"?(x.tabTrigger=k.match(/^\S*/)[0],x.name||(x.name=k)):_&&(x[_]=k)}}return T},y.prototype.getSnippetByName=function(A,T){var x=this.snippetNameMap,M;return this.getActiveScopes(T).some(function(O){var _=x[O];return _&&(M=_[A]),!!M},this),M},y})();d.implement(g.prototype,o);var v=function(y,A,T){function x(K){for(var J=[],Y=0;Y1?(j=J[J.length-1].length,W+=J.length-1):j+=K.length,U+=K}else K&&(K.start?K.end={row:W,column:j}:K.start={row:W,column:j})}),{text:U,tabstops:C,tokens:S}},b=(function(){function y(A){if(this.index=0,this.ranges=[],this.tabstops=[],A.tabstopManager)return A.tabstopManager;A.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=l.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(A)}return y.prototype.attach=function(A){this.$openTabstops=null,this.selectedTabstop=null,this.editor=A,this.session=A.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},y.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},y.prototype.onChange=function(A){for(var T=A.action[0]=="r",x=this.selectedTabstop||{},M=x.parents||{},O=this.tabstops.slice(),_=0;_2&&(this.tabstops.length&&k.push(k.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,k))},y.prototype.addTabstopMarkers=function(A){var T=this.session;A.forEach(function(x){x.markerId||(x.markerId=T.addMarker(x,"ace_snippet-marker","text"))})},y.prototype.removeTabstopMarkers=function(A){var T=this.session;A.forEach(function(x){T.removeMarker(x.markerId),x.markerId=null})},y.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var A=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&A--,this.tabstops.forEach(function(T){T.snippetId===A?this.addTabstopMarkers(T):this.removeTabstopMarkers(T)},this)}},y.prototype.removeRange=function(A){var T=A.tabstop.indexOf(A);T!=-1&&A.tabstop.splice(T,1),T=this.ranges.indexOf(A),T!=-1&&this.ranges.splice(T,1),T=A.tabstop.rangeList.ranges.indexOf(A),T!=-1&&A.tabstop.splice(T,1),this.session.removeMarker(A.markerId),A.tabstop.length||(T=this.tabstops.indexOf(A.tabstop),T!=-1&&this.tabstops.splice(T,1),this.tabstops.length||this.detach())},y})();b.prototype.keyboardHandler=new c,b.prototype.keyboardHandler.bindKeys({Tab:function(y){n.snippetManager&&n.snippetManager.expandWithTab(y)||(y.tabstopManager.tabNext(1),y.renderer.scrollCursorIntoView())},"Shift-Tab":function(y){y.tabstopManager.tabNext(-1),y.renderer.scrollCursorIntoView()},Esc:function(y){y.tabstopManager.detach()}});var D=function(y,A){y.row==0&&(y.column+=A.column),y.row+=A.row},E=function(y,A){y.row==A.row&&(y.column-=A.column),y.row-=A.row};s.importCssString(` .ace_snippet-marker { -moz-box-sizing: border-box; box-sizing: border-box; background: rgba(194, 193, 208, 0.09); border: 1px dotted rgba(211, 208, 235, 0.62); position: absolute; -}`,"snippets.css",!1),n.snippetManager=new g;var w=t("./editor").Editor;(function(){this.insertSnippet=function(y,A){return n.snippetManager.insertSnippet(this,y,A)},this.expandSnippet=function(y){return n.snippetManager.expandWithTab(this,y)}}).call(w.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(t,n,u){var i=t("../virtual_renderer").VirtualRenderer,s=t("../editor").Editor,d=t("../range").Range,o=t("../lib/event"),l=t("../lib/lang"),r=t("../lib/dom"),a=t("../config").nls,c=t("./../lib/useragent"),p=function(D){return"suggest-aria-id:".concat(D)},h=c.isSafari?"menu":"listbox",f=c.isSafari?"menuitem":"option",g=c.isSafari?"aria-current":"aria-selected",v=function(D){var E=new i(D);E.$maxLines=4;var w=new s(E);return w.setHighlightActiveLine(!1),w.setShowPrintMargin(!1),w.renderer.setShowGutter(!1),w.renderer.setHighlightGutterLine(!1),w.$mouseHandler.$focusTimeout=0,w.$highlightTagPending=!0,w},b=(function(){function D(E){var w=r.createElement("div"),y=v(w);E&&E.appendChild(w),w.style.display="none",y.renderer.content.style.cursor="default",y.renderer.setStyle("ace_autocomplete"),y.renderer.$textLayer.element.setAttribute("role",h),y.renderer.$textLayer.element.setAttribute("aria-roledescription",a("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),y.renderer.$textLayer.element.setAttribute("aria-label",a("autocomplete.popup.aria-label","Autocomplete suggestions")),y.renderer.textarea.setAttribute("aria-hidden","true"),y.setOption("displayIndentGuides",!1),y.setOption("dragDelay",150);var A=function(){};y.focus=A,y.$isFocused=!0,y.renderer.$cursorLayer.restartTimer=A,y.renderer.$cursorLayer.element.style.opacity="0",y.renderer.$maxLines=8,y.renderer.$keepTextAreaAtCursor=!1,y.setHighlightActiveLine(!1),y.session.highlight(""),y.session.$searchHighlight.clazz="ace_highlight-marker",y.on("mousedown",function(S){var C=S.getDocumentPosition();y.selection.moveToPosition(C),M.start.row=M.end.row=C.row,S.stop()});var T,$=new d(-1,0,-1,1/0),M=new d(-1,0,-1,1/0);M.id=y.session.addMarker(M,"ace_active-line","fullLine"),y.setSelectOnHover=function(S){S?$.id&&(y.session.removeMarker($.id),$.id=null):$.id=y.session.addMarker($,"ace_line-hover","fullLine")},y.setSelectOnHover(!1),y.on("mousemove",function(S){if(!T){T=S;return}if(!(T.x==S.x&&T.y==S.y)){T=S,T.scrollTop=y.renderer.scrollTop,y.isMouseOver=!0;var C=T.getDocumentPosition().row;$.start.row!=C&&($.id||y.setRow(C),_(C))}}),y.renderer.on("beforeRender",function(){if(T&&$.start.row!=-1){T.$pos=null;var S=T.getDocumentPosition().row;$.id||y.setRow(S),_(S,!0)}}),y.renderer.on("afterRender",function(){for(var S=y.renderer.$textLayer,C=S.config.firstRow,L=S.config.lastRow;C<=L;C++){var I=S.element.childNodes[C-S.config.firstRow];I.setAttribute("role",f),I.setAttribute("aria-roledescription",a("autocomplete.popup.item.aria-roledescription","item")),I.setAttribute("aria-setsize",y.data.length),I.setAttribute("aria-describedby","doc-tooltip"),I.setAttribute("aria-posinset",C+1);var F=y.getData(C);if(F){var R="".concat(F.caption||F.value).concat(F.meta?", ".concat(F.meta):"");I.setAttribute("aria-label",R)}var B=I.querySelectorAll(".ace_completion-highlight");B.forEach(function(N){N.setAttribute("role","mark")})}}),y.renderer.on("afterRender",function(){var S=y.getRow(),C=y.renderer.$textLayer,L=C.element.childNodes[S-C.config.firstRow],I=document.activeElement;if(L!==y.selectedNode&&y.selectedNode&&(r.removeCssClass(y.selectedNode,"ace_selected"),y.selectedNode.removeAttribute(g),y.selectedNode.removeAttribute("id")),I.removeAttribute("aria-activedescendant"),y.selectedNode=L,L){var F=p(S);r.addCssClass(L,"ace_selected"),L.id=F,C.element.setAttribute("aria-activedescendant",F),I.setAttribute("aria-activedescendant",F),L.setAttribute(g,"true")}});var O=function(){_(-1)},_=function(S,C){S!==$.start.row&&($.start.row=$.end.row=S,C||y.session._emit("changeBackMarker"),y._emit("changeHoverMarker"))};y.getHoveredRow=function(){return $.start.row},o.addListener(y.container,"mouseout",function(){y.isMouseOver=!1,O()}),y.on("hide",O),y.on("changeSelection",O),y.session.doc.getLength=function(){return y.data.length},y.session.doc.getLine=function(S){var C=y.data[S];return typeof C=="string"?C:C&&C.value||""};var k=y.session.bgTokenizer;return k.$tokenizeRow=function(S){function C(K,J){K&&I.push({type:(L.className||"")+(J||""),value:K})}var L=y.data[S],I=[];if(!L)return I;typeof L=="string"&&(L={value:L});for(var F=L.caption||L.value||L.name,R=F.toLowerCase(),B=(y.filterText||"").toLowerCase(),N=0,H=0,W=0;W<=B.length;W++)if(W!=H&&(L.matchMask&1<=W?L="bottom":L="top"),L==="top"?(j.bottom=S.top-this.$borderSize,j.top=j.bottom-W):L==="bottom"&&(j.top=S.top+C+this.$borderSize,j.bottom=j.top+W);var J=j.top>=0&&j.bottom<=B;if(!I&&!J)return!1;J?H.$maxPixelHeight=null:L==="top"?H.$maxPixelHeight=K:H.$maxPixelHeight=U,L==="top"?(F.style.top="",F.style.bottom=B+R-j.bottom+"px",y.isTopdown=!1):(F.style.top=j.top+"px",F.style.bottom="",y.isTopdown=!0),F.style.display="";var Y=S.left;return Y+F.offsetWidth>N&&(Y=N-F.offsetWidth),F.style.left=Y+"px",F.style.right="",y.isOpen||(y.isOpen=!0,this._signal("show"),T=null),y.anchorPos=S,y.anchor=L,r.$fixPositionBug(F),!0},y.show=function(S,C,L){this.tryShow(S,C,L?"bottom":void 0,!0)},y.goTo=function(S){var C=this.getRow(),L=this.session.getLength()-1;switch(S){case"up":C=C<=0?L:C-1;break;case"down":C=C>=L?-1:C+1;break;case"start":C=0;break;case"end":C=L}this.setRow(C)},y.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},y.$imageSize=0,y.$borderSize=1,y}return D})();r.importCssString(` +}`,"snippets.css",!1),n.snippetManager=new g;var w=t("./editor").Editor;(function(){this.insertSnippet=function(y,A){return n.snippetManager.insertSnippet(this,y,A)},this.expandSnippet=function(y){return n.snippetManager.expandWithTab(this,y)}}).call(w.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(t,n,h){var i=t("../virtual_renderer").VirtualRenderer,s=t("../editor").Editor,d=t("../range").Range,o=t("../lib/event"),l=t("../lib/lang"),r=t("../lib/dom"),a=t("../config").nls,c=t("./../lib/useragent"),p=function(D){return"suggest-aria-id:".concat(D)},u=c.isSafari?"menu":"listbox",f=c.isSafari?"menuitem":"option",g=c.isSafari?"aria-current":"aria-selected",v=function(D){var E=new i(D);E.$maxLines=4;var w=new s(E);return w.setHighlightActiveLine(!1),w.setShowPrintMargin(!1),w.renderer.setShowGutter(!1),w.renderer.setHighlightGutterLine(!1),w.$mouseHandler.$focusTimeout=0,w.$highlightTagPending=!0,w},b=(function(){function D(E){var w=r.createElement("div"),y=v(w);E&&E.appendChild(w),w.style.display="none",y.renderer.content.style.cursor="default",y.renderer.setStyle("ace_autocomplete"),y.renderer.$textLayer.element.setAttribute("role",u),y.renderer.$textLayer.element.setAttribute("aria-roledescription",a("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),y.renderer.$textLayer.element.setAttribute("aria-label",a("autocomplete.popup.aria-label","Autocomplete suggestions")),y.renderer.textarea.setAttribute("aria-hidden","true"),y.setOption("displayIndentGuides",!1),y.setOption("dragDelay",150);var A=function(){};y.focus=A,y.$isFocused=!0,y.renderer.$cursorLayer.restartTimer=A,y.renderer.$cursorLayer.element.style.opacity="0",y.renderer.$maxLines=8,y.renderer.$keepTextAreaAtCursor=!1,y.setHighlightActiveLine(!1),y.session.highlight(""),y.session.$searchHighlight.clazz="ace_highlight-marker",y.on("mousedown",function(S){var C=S.getDocumentPosition();y.selection.moveToPosition(C),M.start.row=M.end.row=C.row,S.stop()});var T,x=new d(-1,0,-1,1/0),M=new d(-1,0,-1,1/0);M.id=y.session.addMarker(M,"ace_active-line","fullLine"),y.setSelectOnHover=function(S){S?x.id&&(y.session.removeMarker(x.id),x.id=null):x.id=y.session.addMarker(x,"ace_line-hover","fullLine")},y.setSelectOnHover(!1),y.on("mousemove",function(S){if(!T){T=S;return}if(!(T.x==S.x&&T.y==S.y)){T=S,T.scrollTop=y.renderer.scrollTop,y.isMouseOver=!0;var C=T.getDocumentPosition().row;x.start.row!=C&&(x.id||y.setRow(C),_(C))}}),y.renderer.on("beforeRender",function(){if(T&&x.start.row!=-1){T.$pos=null;var S=T.getDocumentPosition().row;x.id||y.setRow(S),_(S,!0)}}),y.renderer.on("afterRender",function(){for(var S=y.renderer.$textLayer,C=S.config.firstRow,L=S.config.lastRow;C<=L;C++){var I=S.element.childNodes[C-S.config.firstRow];I.setAttribute("role",f),I.setAttribute("aria-roledescription",a("autocomplete.popup.item.aria-roledescription","item")),I.setAttribute("aria-setsize",y.data.length),I.setAttribute("aria-describedby","doc-tooltip"),I.setAttribute("aria-posinset",C+1);var F=y.getData(C);if(F){var R="".concat(F.caption||F.value).concat(F.meta?", ".concat(F.meta):"");I.setAttribute("aria-label",R)}var B=I.querySelectorAll(".ace_completion-highlight");B.forEach(function(N){N.setAttribute("role","mark")})}}),y.renderer.on("afterRender",function(){var S=y.getRow(),C=y.renderer.$textLayer,L=C.element.childNodes[S-C.config.firstRow],I=document.activeElement;if(L!==y.selectedNode&&y.selectedNode&&(r.removeCssClass(y.selectedNode,"ace_selected"),y.selectedNode.removeAttribute(g),y.selectedNode.removeAttribute("id")),I.removeAttribute("aria-activedescendant"),y.selectedNode=L,L){var F=p(S);r.addCssClass(L,"ace_selected"),L.id=F,C.element.setAttribute("aria-activedescendant",F),I.setAttribute("aria-activedescendant",F),L.setAttribute(g,"true")}});var O=function(){_(-1)},_=function(S,C){S!==x.start.row&&(x.start.row=x.end.row=S,C||y.session._emit("changeBackMarker"),y._emit("changeHoverMarker"))};y.getHoveredRow=function(){return x.start.row},o.addListener(y.container,"mouseout",function(){y.isMouseOver=!1,O()}),y.on("hide",O),y.on("changeSelection",O),y.session.doc.getLength=function(){return y.data.length},y.session.doc.getLine=function(S){var C=y.data[S];return typeof C=="string"?C:C&&C.value||""};var k=y.session.bgTokenizer;return k.$tokenizeRow=function(S){function C(K,J){K&&I.push({type:(L.className||"")+(J||""),value:K})}var L=y.data[S],I=[];if(!L)return I;typeof L=="string"&&(L={value:L});for(var F=L.caption||L.value||L.name,R=F.toLowerCase(),B=(y.filterText||"").toLowerCase(),N=0,z=0,W=0;W<=B.length;W++)if(W!=z&&(L.matchMask&1<=W?L="bottom":L="top"),L==="top"?(j.bottom=S.top-this.$borderSize,j.top=j.bottom-W):L==="bottom"&&(j.top=S.top+C+this.$borderSize,j.bottom=j.top+W);var J=j.top>=0&&j.bottom<=B;if(!I&&!J)return!1;J?z.$maxPixelHeight=null:L==="top"?z.$maxPixelHeight=K:z.$maxPixelHeight=U,L==="top"?(F.style.top="",F.style.bottom=B+R-j.bottom+"px",y.isTopdown=!1):(F.style.top=j.top+"px",F.style.bottom="",y.isTopdown=!0),F.style.display="";var Y=S.left;return Y+F.offsetWidth>N&&(Y=N-F.offsetWidth),F.style.left=Y+"px",F.style.right="",y.isOpen||(y.isOpen=!0,this._signal("show"),T=null),y.anchorPos=S,y.anchor=L,r.$fixPositionBug(F),!0},y.show=function(S,C,L){this.tryShow(S,C,L?"bottom":void 0,!0)},y.goTo=function(S){var C=this.getRow(),L=this.session.getLength()-1;switch(S){case"up":C=C<=0?L:C-1;break;case"down":C=C>=L?-1:C+1;break;case"start":C=0;break;case"end":C=L}this.setRow(C)},y.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},y.$imageSize=0,y.$borderSize=1,y}return D})();r.importCssString(` .ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { background-color: #CAD6FA; z-index: 1; @@ -1387,80 +1387,80 @@ import{i as Ao,h as x,f as Kl,a as Gl,p as Jl}from"./ConfigCustomJavascriptSet__ animation: none; } } -`,"autocompletion.css",!1),n.AcePopup=b,n.$singleLineEditor=v,n.getAriaId=p}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(t,n,u){var i=(function(){function s(d){this.editor=d,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return s.prototype.setScreenReaderContent=function(d){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",function(){var l=this.popup.getRow(),r=this.popup.renderer.$textLayer,a=r.element.childNodes[l-r.config.firstRow];if(a){for(var c="doc-tooltip ",p=0;p=0&&o.test(s[r]);r--)l.push(s[r]);return l.reverse().join("")},n.retrieveFollowingIdentifier=function(s,d,o){o=o||i;for(var l=[],r=d;r0)for(var y=this.popup.getFirstVisibleRow();y<=this.popup.getLastVisibleRow();y++){var A=this.popup.getData(y);A&&(!w||A.hideInlinePreview)&&this.$seen(A)}},E.prototype.$onPopupShow=function(w){this.$onPopupChange(w),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},E.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var w=this.editor.container.parentNode,y=[];w;)y.push(w),w.addEventListener("scroll",this.onLayoutChange,{passive:!0}),w=w.parentNode;this.$elements=y}},E.prototype.unObserveLayoutChanges=function(){var w=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(y){y.removeEventListener("scroll",w.onLayoutChange,{passive:!0})}),this.$elements=null},E.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},E.prototype.$updatePopupPosition=function(){var w=this.editor,y=w.renderer,A=y.layerConfig.lineHeight,T=y.$cursorLayer.getPixelPosition(this.base,!0);T.left-=this.popup.getTextLeftOffset();var $=w.container.getBoundingClientRect();T.top+=$.top-y.layerConfig.offset,T.left+=$.left-w.renderer.scrollLeft,T.left+=y.gutterWidth;var M={top:T.top,left:T.left};y.$ghostText&&y.$ghostTextWidget&&this.base.row===y.$ghostText.position.row&&(M.top+=y.$ghostTextWidget.el.offsetHeight);var O=w.container.getBoundingClientRect().bottom-A,_=Othis.filterText&&w.lastIndexOf(this.filterText,0)===0)var y=this.filtered;else var y=this.all;this.filterText=w,y=this.filterCompletions(y,this.filterText),y=y.sort(function(T,$){return $.exactMatch-T.exactMatch||$.$score-T.$score||(T.caption||T.value).localeCompare($.caption||$.value)});var A=null;y=y.filter(function(T){var $=T.snippet||T.caption||T.value;return $===A?!1:(A=$,!0)}),this.filtered=y},E.prototype.filterCompletions=function(w,y){var A=[],T=y.toUpperCase(),$=y.toLowerCase();e:for(var M=0,O;O=w[M];M++){if(O.skipFilter){O.$score=O.score,A.push(O);continue}var _=!this.ignoreCaption&&O.caption||O.value||O.snippet;if(_){var k=-1,S=0,C=0,L,I;if(this.exactMatch){if(y!==_.substr(0,y.length))continue e}else{var F=_.toLowerCase().indexOf($);if(F>-1)C=F;else for(var R=0;R=0&&(N<0||B0&&(k===-1&&(C+=10),C+=I,S|=1<c)&&(v.range.start.row===f?h++:(f=v.range.start.row,h=0),!(h>200))){var b=v.range.clipRows(a,c);if(!(b.start.row===b.end.row&&b.start.column===b.end.column)){var D=b.toScreenRange(l);if(D.isEmpty()){p=l.getNextFoldLine(b.end.row,p),p&&p.end.row>b.end.row&&(a=p.end.row);continue}this.markerType==="fullLine"?o.drawFullLineMarker(d,D,v.className,r):D.isMultiLine()?this.markerType==="line"?o.drawMultiLineMarker(d,D,v.className,r):o.drawTextMarker(d,D,v.className,r):o.drawSingleLineMarker(d,D,v.className+" ace_br15",r)}}}},s})();i.prototype.MAX_MARKERS=1e4,n.MarkerGroup=i}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(t,n,u){function i(l,r){var a=l.getTextRange(d.fromPoints({row:0,column:0},r));return a.split(o).length-1}function s(l,r){var a=i(l,r),c=l.getValue().split(o),p=Object.create(null),h=c[a];return c.forEach(function(f,g){if(!(!f||f===h)){var v=Math.abs(a-g),b=c.length-v;p[f]?p[f]=Math.max(b,p[f]):p[f]=b}}),p}var d=t("../range").Range,o=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;n.getCompletions=function(l,r,a,c,p){var h=s(r,a),f=Object.keys(h);p(null,f.map(function(g){return{caption:g,value:g,score:h[g],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/marker_group","ace/autocomplete/text_completer","ace/editor","ace/config"],function(t,n,u){var i=t("../snippets").snippetManager,s=t("../autocomplete").Autocomplete,d=t("../config"),o=t("../lib/lang"),l=t("../autocomplete/util"),r=t("../marker_group").MarkerGroup,a=t("../autocomplete/text_completer"),c={getCompletions:function($,M,O,_,k){if(M.$mode.completer)return M.$mode.completer.getCompletions($,M,O,_,k);var S=$.session.getState(O.row),C=M.$mode.getCompletions(S,M,O,_);C=C.map(function(L){return L.completerId=c.id,L}),k(null,C)},id:"keywordCompleter"},p=function($){var M={};return $.replace(/\${(\d+)(:(.*?))?}/g,function(O,_,k,S){return M[_]=S||""}).replace(/\$(\d+?)/g,function(O,_){return M[_]})},h={getCompletions:function($,M,O,_,k){var S=[],C=M.getTokenAt(O.row,O.column);C&&C.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?S.push("html-tag"):S=i.getActiveScopes($);var L=i.snippetMap,I=[];S.forEach(function(F){for(var R=L[F]||[],B=R.length;B--;){var N=R[B],H=N.name||N.tabTrigger;H&&I.push({caption:H,snippet:N.content,meta:N.tabTrigger&&!N.name?N.tabTrigger+"⇥ ":"snippet",completerId:h.id})}},this),k(null,I)},getDocTooltip:function($){$.snippet&&!$.docHTML&&($.docHTML=["",o.escapeHTML($.caption),"","
",o.escapeHTML(p($.snippet))].join(""))},id:"snippetCompleter"},f=[h,a,c];n.setCompleters=function($){f.length=0,$&&f.push.apply(f,$)},n.addCompleter=function($){f.push($)},n.textCompleter=a,n.keyWordCompleter=c,n.snippetCompleter=h;var g={name:"expandSnippet",exec:function($){return i.expandWithTab($)},bindKey:"Tab"},v=function($,M){b(M.session.$mode)},b=function($){typeof $=="string"&&($=d.$modes[$]),$&&(i.files||(i.files={}),D($.$id,$.snippetFileId),$.modes&&$.modes.forEach(b))},D=function($,M){!M||!$||i.files[$]||(i.files[$]={},d.loadModule(M,function(O){O&&(i.files[$]=O,!O.snippets&&O.snippetText&&(O.snippets=i.parseSnippetFile(O.snippetText)),i.register(O.snippets||[],O.scope),O.includeScopes&&(i.snippetMap[O.scope].includeScopes=O.includeScopes,O.includeScopes.forEach(function(_){b("ace/mode/"+_)})))}))},E=function($){var M=$.editor,O=M.completer&&M.completer.activated;if($.command.name==="backspace")O&&!l.getCompletionPrefix(M)&&M.completer.detach();else if($.command.name==="insertstring"&&!O){w=$;var _=$.editor.$liveAutocompletionDelay;_?y.delay(_):A($)}},w,y=o.delayedCall(function(){A(w)},0),A=function($){var M=$.editor,O=l.getCompletionPrefix(M),_=$.args,k=l.triggerAutocomplete(M,_);if(O&&O.length>=M.$liveAutocompletionThreshold||k){var S=s.for(M);S.autoShown=!0,S.showPopup(M)}},T=t("../editor").Editor;t("../config").defineOptions(T.prototype,"editor",{enableBasicAutocompletion:{set:function($){$?(s.for(this),this.completers||(this.completers=Array.isArray($)?$:f),this.commands.addCommand(s.startCommand)):this.commands.removeCommand(s.startCommand)},value:!1},enableLiveAutocompletion:{set:function($){$?(this.completers||(this.completers=Array.isArray($)?$:f),this.commands.on("afterExec",E)):this.commands.off("afterExec",E)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function($){$?(this.commands.addCommand(g),this.on("changeMode",v),v(null,this)):(this.commands.removeCommand(g),this.off("changeMode",v))},value:!1}}),n.MarkerGroup=r}),(function(){ace.require(["ace/ext/language_tools"],function(t){m&&(m.exports=t)})})()})(xp);const Zr={jsonError:{border:"1px solid red",minHeight:200},jsonNoError:{border:"1px solid #00000000",minHeight:200}};function nr(m){return x.createElement(wp,{style:m.error===!0?Zr.jsonError:m.error===!1?Zr.jsonNoError:void 0,mode:m.mode||"json",width:"100%",height:"100%",showPrintMargin:m.editValueMode,showGutter:m.editValueMode,highlightActiveLine:m.editValueMode,defaultValue:m.defaultValue,theme:m.themeType==="dark"?"clouds_midnight":"chrome",value:m.value,readOnly:!m.onChange,onChange:e=>{var t;return(t=m.onChange)==null?void 0:t.call(m,e)},name:m.name||"UNIQUE_ID_OF_DIV1",fontSize:m.fontSize||14,setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:m.editValueMode,tabSize:m.editValueMode?2:void 0},editorProps:{$blockScrolling:!0}})}const ms={flex:{display:"flex"},button:{height:48,minWidth:48},wrapper:{width:"calc(100vw - 40px)",height:"calc(100vh - 188px)"}};class _p extends V{async componentDidMount(){await super.componentDidMount();const{data:e,attr:t}=this.props,n=V.getValue(e,t)||"{}";this.setState({value:n,initialized:!0,jsonError:this.validateJson(n)})}validateJson(e){let t=!1;if(this.props.schema.validateJson!==!1&&(e||!this.props.schema.allowEmpty))try{this.props.schema.json5?Uo.parse(e):JSON.parse(e)}catch(n){console.log("Error in JSON",n),t=!0}return t}renderItem(e,t){if(!this.state.initialized)return null;const{schema:n,data:u,attr:i}=this.props,{value:s,showSelectId:d}=this.state,o=n.readOnly===!0||t;return x.createElement(fe,{fullWidth:!0,variant:"standard"},x.createElement("div",{style:ms.flex},x.createElement(me,{color:"grey",style:ms.button,size:"small",variant:"outlined",onClick:()=>this.setState({showSelectId:!0})},P.I18n.t("ra_JSON editor"))),d?x.createElement(Xs,{title:this.getText(n.label),overflowHidden:!0,applyDisabled:this.state.jsonError&&this.props.schema.doNotApplyWithError||o,onClose:()=>{o?this.setState({showSelectId:!1}):this.setState({showSelectId:!1,value:V.getValue(u,i)||{}})},onApply:o?void 0:()=>this.setState({showSelectId:!1},()=>this.onChange(i,s))},x.createElement("div",{style:{...ms.wrapper,border:this.state.jsonError?"2px solid red":"2px solid transparent"}},x.createElement(nr,{mode:this.props.schema.json5?"json5":"json",value:typeof s=="object"?JSON.stringify(s):s,onChange:o?void 0:l=>this.setState({value:l,jsonError:this.validateJson(l)}),name:"ConfigJsonEditor",themeType:this.props.oContext.themeType}))):null,n.help||this.state.jsonError?x.createElement(ve,null,this.state.jsonError?P.I18n.t("ra_Invalid JSON"):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const kp=[{value:"en",label:"English"},{value:"de",label:"Deutsch"},{value:"ru",label:"русский"},{value:"pt",label:"Portugues"},{value:"nl",label:"Nederlands"},{value:"fr",label:"français"},{value:"it",label:"Italiano"},{value:"es",label:"Espanol"},{value:"pl",label:"Polski"},{value:"uk",label:"Український"},{value:"zh-cn",label:"简体中文"}];class Tp extends V{async componentDidMount(){await super.componentDidMount();const e=V.getValue(this.props.data,this.props.attr),t=[...kp];this.props.schema.system?t.unshift({value:"",label:P.I18n.t("ra_System language")}):t.unshift({value:"",label:P.I18n.t("ra_none")}),this.setState({value:this.props.schema.system?e||"":e||P.I18n.getLanguage(),selectOptions:t})}renderItem(e,t){var u,i;if(!this.state.selectOptions)return null;const n=(u=this.state.selectOptions)==null?void 0:u.find(s=>s.value===this.state.value||!s.value&&!this.state.value);return x.createElement(fe,{fullWidth:!0,variant:"standard"},this.props.schema.label?x.createElement(Te,null,this.getText(this.props.schema.label)):null,x.createElement(Be,{variant:"standard",error:!!e,disabled:t,value:this.state.value||"_",renderValue:()=>this.getText(n==null?void 0:n.label,this.props.schema.noTranslation),onChange:s=>{let{value:d}=s.target;d==="_"&&(d=""),this.setState({value:d},()=>{const o=this.onChange(this.props.attr,d);if(o instanceof Promise&&o.catch(l=>console.error(l)),this.props.schema.changeGuiLanguage)if(d){if(d===P.I18n.getLanguage())return;P.I18n.setLanguage(d),this.props.oContext.changeLanguage&&this.props.oContext.changeLanguage()}else this.props.oContext.socket.getSystemConfig().then(l=>{l.common.language!==P.I18n.getLanguage()&&l.common.language&&(P.I18n.setLanguage(l.common.language),this.props.oContext.changeLanguage&&this.props.oContext.changeLanguage())}).catch(l=>console.error(`Cannot read system config: ${l}`))})}},(i=this.state.selectOptions)==null?void 0:i.map(s=>x.createElement(xe,{key:s.value,value:s.value},s.label))),this.props.schema.help?x.createElement(ve,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}class Lp extends V{scrollRef;constructor(e){super(e),this.scrollRef=x.createRef()}scrolledDown(){return this.scrollRef.current?this.scrollRef.current.offsetHeight+this.scrollRef.current.scrollTop>=this.scrollRef.current.scrollHeight:!1}async componentDidMount(){await super.componentDidMount(),V.getValue(this.props.data,this.props.attr)||(this.props.schema.licenseUrl?(this.setState({showLicenseDialog:!0,loading:!0,scrolledDown:!1}),fetch(this.props.schema.licenseUrl).then(e=>e.text()).then(e=>this.setState({license:e,loading:!1})).catch(e=>this.setState({license:e.toString(),loading:!1,error:!0,scrolledDown:!1}))):this.setState({showLicenseDialog:!0,scrolledDown:!1}),setTimeout(()=>{this.scrollRef.current&&(this.scrolledDown()?this.setState({scrolledDown:!0}):this.scrollRef.current.addEventListener("scroll",()=>{!this.state.scrolledDown&&this.scrolledDown()&&this.setState({scrolledDown:!0})}))},1e3))}renderItem(e,t){return this.state.showLicenseDialog?x.createElement(Lt,{maxWidth:"lg",open:!0,onClose:(n,u)=>{u!=="escapeKeyDown"&&u!=="backdropClick"&&this.setState({showLicenseDialog:!1})}},x.createElement(yn,null,this.props.schema.title?P.I18n.t(this.props.schema.title):P.I18n.t("ra_License agreement")),x.createElement(Kt,null,this.props.schema.licenseUrl?x.createElement(x.Fragment,null,this.state.loading?x.createElement(Wi,null):null,x.createElement("pre",{ref:this.scrollRef,style:{width:"100%",height:"100%",overflowY:"auto",fontSize:14}},this.state.license)):null,!this.props.schema.licenseUrl&&this.props.schema.texts?x.createElement("div",{ref:this.scrollRef,style:{width:"100%",height:"100%",overflowY:"auto",fontSize:14}},this.props.schema.texts.map((n,u)=>this.props.schema.noTranslation?x.createElement("p",{key:u},n):x.createElement("p",{key:u},P.I18n.t(n)))):null),x.createElement(Gt,null,this.props.schema.checkBox?x.createElement(Xn,{control:x.createElement(Zt,{disabled:t,checked:!!this.state.licenseChecked,onClick:()=>this.setState({licenseChecked:!this.state.licenseChecked})}),label:P.I18n.t(this.props.schema.checkBox)}):null,x.createElement(me,{disabled:t||this.state.loading||this.state.error||this.props.schema.checkBox&&!this.state.licenseChecked||!this.state.scrolledDown,onClick:()=>{this.setState({showLicenseDialog:!1});const n=this.onChange(this.props.attr,!0);n instanceof Promise&&n.catch(u=>console.error(`Cannot set value: ${u}`))},color:"primary",variant:"contained",startIcon:x.createElement(Ks,null)},this.props.schema.agreeText?P.I18n.t(this.props.schema.agreeText):P.I18n.t("ra_Accept license")),x.createElement(me,{onClick:()=>{this.setState({showLicenseDialog:!1}),setTimeout(()=>this.setState({showLicenseDialog:!0}),2e3)},color:"grey",variant:"contained",startIcon:x.createElement(ht,null)},P.I18n.t("ra_Close")))):null}}const qr={indeterminate:{opacity:.5},control:{flexDirection:"row",width:"100%"}};class Mp extends V{updateTimeout;async componentDidMount(){await super.componentDidMount();let e=V.getValue(this.props.data,this.props.attr);if(e==null&&(e=""),Array.isArray(e)&&this.props.oContext.multiEdit){e=V.DIFFERENT_VALUE,this.setState({_value:e,oldValue:e});return}this.setState({_value:e.toString(),oldValue:e.toString()})}static getDerivedStateFromProps(e,t){if(e.schema.min!==void 0&&e.schema.min<0||e.schema.max!==void 0&&e.schema.max<0)return null;const n=V.getValue(e.data,e.attr);return e.oContext.multiEdit&&t._value===V.DIFFERENT_VALUE?{_value:V.DIFFERENT_VALUE}:n==null||t.oldValue===null||t.oldValue===void 0||n.toString()!==parseFloat(t._value).toString()&&n.toString()!==t.oldValue.toString()?{_value:n}:null}checkValue(e){if(e==null||(e=e.toString().trim().replace(",","."),e==="-"))return null;const t=e===""?0:parseFloat(e);return e!==""&&Number.isNaN(t)?"ra_Not a number":e!==""&&window.isFinite(t)?this.props.schema.min!==void 0&&tthis.props.schema.max?"ra_Too big":e===""||e==="-"||Number.isNaN(t)?"ra_Not a number":null:"ra_Not a number"}renderItem(e,t){var i;const n=Array.isArray(this.state._value)||this.state._value===V.DIFFERENT_VALUE;if(this.state.oldValue!==null&&this.state.oldValue!==void 0?(this.updateTimeout&&clearTimeout(this.updateTimeout),this.updateTimeout=setTimeout(()=>{this.updateTimeout=void 0,this.setState({oldValue:null})},30)):this.updateTimeout&&(clearTimeout(this.updateTimeout),this.updateTimeout=void 0),n){const s=V.getValue(this.props.data,this.props.attr),d=(s==null?void 0:s.filter(o=>o||o===0).map(o=>({label:o.toString(),value:o})))||[];return d.unshift({label:P.I18n.t(V.DIFFERENT_LABEL),value:V.DIFFERENT_VALUE}),x.createElement(Pi,{style:qr.indeterminate,fullWidth:!0,freeSolo:!0,value:d[0],getOptionSelected:(o,l)=>o.label===l.label,onChange:(o,l)=>{const r=this.onChange(this.props.attr,l==null?void 0:l.value,()=>{this.setState({_value:l==null?void 0:l.value,oldValue:this.state._value})});r instanceof Promise&&r.catch(a=>console.error(a))},options:d,getOptionLabel:o=>o.label,renderInput:o=>x.createElement(pe,{...o,label:this.getText(this.props.schema.label),variant:"standard",slotProps:{htmlInput:{...o.inputProps,readOnly:this.props.schema.readOnly||!1},input:{endAdornment:this.props.schema.unit?this.getText(this.props.schema.unit,this.props.schema.noTranslation):void 0}},error:!!e,placeholder:this.getText(this.props.schema.placeholder),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),disabled:!!t})})}!e&&this.state._value!==null&&this.state._value!==void 0&&this.state._value&&(e=this.checkValue(this.state._value),e&&(e=P.I18n.t(e)));const u=parseFloat(((i=this.state._value)==null?void 0:i.toString().replace(",","."))||"");return x.createElement(fe,{variant:"standard",style:qr.control},x.createElement(pe,{sx:{"& .up-down":{display:"none"},"&:hover .up-down":{display:"block"}},variant:"standard",type:Number.isNaN(u)?"text":this.props.schema.min!==void 0&&this.props.schema.min>=0?"number":"text",fullWidth:!0,slotProps:{htmlInput:{min:this.props.schema.min,max:this.props.schema.max,step:this.props.schema.step,readOnly:this.props.schema.readOnly||!1},input:{endAdornment:this.props.schema.unit?this.getText(this.props.schema.unit,this.props.schema.noTranslation):null}},value:this.state._value??"",error:!!e,disabled:!!t,onChange:s=>{const d=s.target.value,o=this.checkValue(d);o?this.onError(this.props.attr,P.I18n.t(o)):this.onError(this.props.attr),this.setState({_value:d,oldValue:this.state._value},()=>{const l=parseFloat(d.toString().replace(",","."));Number.isNaN(l)?this.onChange(this.props.attr,d.toString().replace(",",".")):this.onChange(this.props.attr,l)})},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:e&&typeof e=="string"?e:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}))}}class Ip extends V{authWindow;oid;url;constructor(e){super(e),this.state={...this.state,accessTokens:"",success:!1,blocked:!1,running:!1,pressed:!1,clientId:"",clientSecret:"",accessTokenError:""},this.url=`https://oauth2.iobroker.in/${e.schema.identifier}?redirect=true`,e.schema.scope&&(this.url+=`&scope=${encodeURIComponent(e.schema.scope)}`),this.oid=`${this.props.oContext.adapterName}.${this.props.oContext.instance}.${this.props.schema.saveTokenIn||"oauth2Tokens"}`}async componentDidMount(){await super.componentDidMount(),window.addEventListener?window.addEventListener("message",this.onMessage,!1):window.attachEvent("onmessage",this.onMessage,!1),await this.props.oContext.socket.subscribeState(this.oid,this.onTokensUpdated);let e;this.props.schema.ownClientId&&(e={clientId:V.getValue(this.props.data,this.props.schema.ownClientId)}),this.props.schema.ownClientId&&(e||={},e.clientSecret=V.getValue(this.props.data,this.props.schema.ownClientSecret));const t=await this.props.oContext.socket.getState(this.oid);if(t){const n=JSON.parse(t.val);new Date(n.access_token_expires_on).getTime()>Date.now()&&(e||={},e.accessTokens=t.val)}e&&this.setState(e)}onTokensUpdated=(e,t)=>{if(t!=null&&t.val){const n=JSON.parse(t.val);if(new Date(n.access_token_expires_on).getTime()>Date.now()){this.state.accessTokens!==t.val&&this.setState({accessTokens:t.val});return}}this.setState({accessTokens:""})};componentWillUnmount(){super.componentWillUnmount(),window.removeEventListener?window.removeEventListener("message",this.onMessage,!1):window.detachEvent("onmessage",this.onMessage,!1),this.props.oContext.socket.unsubscribeState(this.oid,this.onTokensUpdated)}saveToken(e){try{e&&!e.startsWith("{")&&(e=atob(e));const t=JSON.parse(e);t.access_token&&t.refresh_token&&t.expires_in&&(t.access_token_expires_on||=new Date(Date.now()+t.expires_in*1e3).toISOString(),this.props.schema.ownClientId&&(t.client_id=V.getValue(this.props.data,this.props.schema.ownClientId)),this.props.oContext.socket.setState(this.oid,JSON.stringify(t),!0).catch(n=>console.log(`Error occurred: ${n.toString()}`)))}catch(t){console.warn(t)}}onMessage=e=>{var t,n,u;if(e.origin==="https://oauth2.iobroker.in"&&(typeof e.data=="string"&&e.data.startsWith(`${this.props.schema.identifier}-authentication:`)||typeof e.message=="string"&&e.message.startsWith(`${this.props.schema.identifier}-authentication:`))){const i=(e.data||e.message).split(":");i[1]==="success"?(this.setState({accessTokens:i[2],success:!0,pressed:!1},()=>this.saveToken(this.state.accessTokens)),(t=this.authWindow)==null||t.postMessage("close",e.origin),this.authWindow=null):(u=(n=this.props).onError)==null||u.call(n,i[2])}};onOpenUrl(){this.authWindow=window.open(this.url+(this.props.schema.ownClientId?`&client_id=${encodeURIComponent(this.state.clientId)}&client_secret=${encodeURIComponent(this.state.clientSecret)}`:""),this.props.schema.identifier),!this.authWindow||this.authWindow.closed||typeof this.authWindow.closed>"u"?this.setState({blocked:!0}):this.setState({pressed:!0})}renderItem(e,t){let n="";if(this.state.accessTokens)try{const s=JSON.parse(this.state.accessTokens);n=new Date(s.access_token_expires_on).toLocaleString()}catch{}let u;this.state.accessTokens?u=this.props.schema.refreshLabel?this.getText(this.props.schema.refreshLabel):P.I18n.t("ra_Renew %s access",this.props.schema.identifier[0].toUpperCase()+this.props.schema.identifier.slice(1)):u=this.props.schema.label?this.getText(this.props.schema.label):P.I18n.t("ra_Get %s access",this.props.schema.identifier[0].toUpperCase()+this.props.schema.identifier.slice(1));const i=this.getIcon();return x.createElement("div",{style:{width:"100%",margin:"0 0 1rem 0"}},this.props.schema.ownClientId?x.createElement(pe,{value:this.state.clientId,onChange:s=>{const d=s.target.value;this.setState({clientId:d},()=>this.onChange(this.props.schema.ownClientId,d))},style:{marginBottom:8},variant:"standard",fullWidth:!0,error:!this.state.clientId,disabled:!!t,label:P.I18n.t("ra_OAuth Client ID"),slotProps:{input:{endAdornment:this.state.clientId?x.createElement(se,{size:"small",tabIndex:-1,onClick:()=>this.setState({clientId:""},()=>this.onChange(this.props.schema.ownClientId,""))},x.createElement(ht,null)):null}}}):null,this.props.schema.ownClientSecret?x.createElement(pe,{value:this.state.clientSecret,onChange:s=>{const d=s.target.value;this.setState({clientSecret:d},()=>this.onChange(this.props.schema.ownClientSecret,d))},style:{marginBottom:8},variant:"standard",fullWidth:!0,error:!this.state.clientSecret,disabled:!!t,label:P.I18n.t("ra_OAuth Client secret"),slotProps:{input:{endAdornment:this.state.clientSecret?x.createElement(se,{size:"small",tabIndex:-1,onClick:()=>this.setState({clientSecret:""},()=>this.onChange(this.props.schema.ownClientSecret,""))},x.createElement(ht,null)):null}}}):null,x.createElement(me,{disabled:this.state.running||this.props.schema.ownClientSecret&&!this.state.clientSecret||this.props.schema.ownClientId&&!this.state.clientId,endIcon:i||x.createElement(xc,null),variant:"contained",onClick:()=>this.onOpenUrl()},u),this.state.blocked?x.createElement("div",{style:{color:"red",fontSize:16,marginTop:20}},P.I18n.t("ra_Please allow popups in your browser for this page!")):null,this.state.accessTokens?x.createElement("div",{style:{color:"green",fontSize:16,marginTop:20}},this.props.alive?P.I18n.t("ra_Successfully authorized. Token valid till %s and will be automatically renewed.",n):P.I18n.t("ra_Successfully authorized. Token valid till %s but it can expire as the instance is not running.",n)):null,this.state.pressed?x.createElement(x.Fragment,null,x.createElement("div",{style:{width:"100%",margin:"1rem 0 1rem 0"}},x.createElement("span",{style:{marginRight:4}},`${P.I18n.t("ra_If the button above does not work, you can authorize manually this app by visiting this url")}`,":"),x.createElement("br",null),x.createElement("a",{target:this.props.schema.identifier,href:this.url,rel:"noreferrer"},this.url)),x.createElement(pe,{value:this.state.accessTokens,label:P.I18n.t("ra_Enter the code from that page here"),variant:"standard",error:!!this.state.accessTokenError,helperText:this.state.accessTokenError||"",onChange:s=>{let d=s.target.value;try{d!=null&&d.trim()&&!d.trim().startsWith("{")&&(d=atob(d.trim()))}catch{this.setState({accessTokenError:"Invalid access token. Cannot decode from base64"})}if(d!=null&&d.startsWith("{"))try{const o=JSON.parse(d);o.access_token&&(o.access_token_expires_on=new Date(Date.now()+(o.expires_in-10)*1e3).toISOString(),this.setState({accessTokens:JSON.stringify(o),accessTokenError:""},()=>this.saveToken(this.state.accessTokens)))}catch{this.setState({accessTokens:d,accessTokenError:"Invalid access token. Cannot parse JSON"})}else d&&this.setState({accessTokens:d,accessTokenError:"Invalid access token. Not JSON"})},fullWidth:!0})):null)}}const eo={flex:{display:"flex"},button:{maxHeight:48,marginLeft:4,minWidth:48}};class Op extends V{fillOnSelect=[];async componentDidMount(){await super.componentDidMount();const{data:e,attr:t}=this.props,n=V.getValue(e,t)||"";if(this.props.schema.fillOnSelect){const u=this.props.schema.fillOnSelect.split(",").map(i=>i.trim());for(const i of u){const s=i.split("=>");if(s.length===2){const d={pathInObject:s[0],attr:s[1]};(d.attr.includes("(X)")||d.attr.includes("(x)"))&&(d.overwrite=!0,d.attr=d.attr.replace(/\(X\)|\(x\)/g,"")),this.fillOnSelect.push(d)}else console.error(`Invalid format for fillOnSelect: ${this.props.schema.fillOnSelect}`)}}this.setState({value:n,initialized:!0})}onObjectChanged=async(e,t)=>{if(await this.onChange(e,t),this.fillOnSelect.length)try{const n=await this.getCachedObject(t);for(const u of this.fillOnSelect)if(u.overwrite||!V.getValue(this.props.data,u.attr)){let i=V.getValue(n,u.pathInObject);typeof i=="object"&&(i=this.getText(i,!0)),await this.onChange(u.attr,i)}}catch(n){console.error(n.toString())}};renderItem(e,t){if(!this.state.initialized)return null;const n=this.props.oContext.socket,{schema:u,attr:i}=this.props,{value:s,showSelectId:d}=this.state;return x.createElement(fe,{fullWidth:!0,variant:"standard"},u.label?x.createElement(Te,{shrink:!0},this.getText(u.label)):null,x.createElement("div",{style:eo.flex},x.createElement(pe,{variant:"standard",fullWidth:!0,value:s,error:!!e,disabled:t,placeholder:this.getText(u.placeholder),label:this.getText(u.label),helperText:this.renderHelp(u.help,u.helpLink,u.noTranslation),onChange:o=>{const l=Array.isArray(o.target.value)?o.target.value[0]:o.target.value;this.setState({value:l},()=>{this.onObjectChanged(i,l)})}}),x.createElement(me,{color:"grey",disabled:t,style:eo.button,size:"small",variant:"outlined",onClick:()=>this.setState({showSelectId:!0})},"...")),d?x.createElement(P.DialogSelectID,{imagePrefix:this.props.oContext.imagePrefix??"../..",dialogName:`admin.${this.props.oContext.adapterName}`,filterFunc:u.filterFunc,themeType:this.props.oContext.themeType,theme:this.props.oContext.theme,types:u.types?Array.isArray(u.types)?u.types:[u.types]:void 0,customFilter:u.customFilter,filters:u.filters,socket:n,selected:s,root:u.root,onClose:()=>this.setState({showSelectId:!1}),onOk:o=>{const l=Array.isArray(o)?o[0]:o;this.setState({showSelectId:!1,value:l},()=>{this.onObjectChanged(i,l)})}}):null)}}const vs={fullWidth:{width:"100%",display:"inline-block"},halfWidth1:{width:"calc(50% - 5px)",display:"inline-block",marginRight:8},halfWidth2:{width:"calc(50% - 5px)",display:"inline-block"}},gi="____ppp____";class Fp extends V{async componentDidMount(){await super.componentDidMount();const e=V.getValue(this.props.data,this.props.attr);this.setState({_repeat:e?gi:"",_visible:!1,value:e?gi:"",_notEqual:!1})}onChangePassword(e,t){e===void 0&&(e=this.state.value),t===void 0&&(t=this.state._repeat);const n=!!this.props.schema.repeat&&t!==e;this.setState({value:e,_repeat:t,_notEqual:n},()=>{if(n)this.onError(this.props.attr,P.I18n.t("ra_Passwords are not equal!"));else{this.onError(this.props.attr);const u=this.onChange(this.props.attr,e);u instanceof Promise&&u.catch(i=>this.onError(this.props.attr,i))}})}renderItem(e,t){if(this.state._notEqual===void 0)return null;const n=x.createElement(pe,{variant:"standard",fullWidth:!0,type:this.state._visible&&this.state.value!==gi?"text":"password",value:this.state.value,error:!!e||this.state._notEqual,disabled:!!t,onChange:u=>this.onChangePassword(u.target.value),label:this.getText(this.props.schema.label),slotProps:{input:{autoComplete:"new-password",endAdornment:this.state.value&&this.state.value!==gi&&this.props.schema.visible&&!t&&!this.props.schema.readOnly?x.createElement(vn,{position:"end"},x.createElement(se,{size:"large",tabIndex:-1,onClick:u=>{u.preventDefault(),u.stopPropagation(),this.setState({_visible:!this.state._visible})},edge:"end"},this.state._visible?x.createElement(_c,null):x.createElement(Wo,null))):void 0},htmlInput:{autoComplete:"new-password",form:{autoComplete:"off"},maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:this.props.schema.readOnly||!1}},helperText:this.state._notEqual?P.I18n.t("ra_Passwords are not equal!"):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)});if(this.props.schema.repeat&&!this.props.schema.readOnly){const u=this.state._visible?null:x.createElement(pe,{variant:"standard",fullWidth:!0,type:"password",value:this.state._repeat,error:!!e||this.state._notEqual,disabled:!!t,onChange:i=>this.onChangePassword(void 0,i.target.value),label:`${this.getText(this.props.schema.label)} (${P.I18n.t("ra_repeat")})`,slotProps:{input:{autoComplete:"new-password"},htmlInput:{autoComplete:"new-password",form:{autoComplete:"off"},maxLength:this.props.schema.maxLength||this.props.schema.max||void 0}},helperText:this.state._notEqual?P.I18n.t("ra_Passwords are not equal!"):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)});return x.createElement("div",{style:vs.fullWidth},x.createElement("div",{style:vs.halfWidth1},n),x.createElement("div",{style:vs.halfWidth2},u))}return n}}class Rp extends V{checkTimeout=null;async componentDidMount(){await super.componentDidMount();const e=await this.getPatternAsync(this.props.schema.pattern,null,!0)??"";this.setState({pattern:e})}componentWillUnmount(){this.checkTimeout&&(clearTimeout(this.checkTimeout),this.checkTimeout=null),super.componentWillUnmount()}checkIfInstanceChanged(){this.checkTimeout&&clearTimeout(this.checkTimeout),this.checkTimeout=setTimeout(async()=>{this.checkTimeout=null;const e=await this.getPatternAsync(this.props.schema.pattern,null,!0)??"";e!==this.state.pattern&&this.setState({pattern:e})},200)}renderItem(e,t){return this.checkIfInstanceChanged(),x.createElement(pe,{variant:"standard",fullWidth:!0,disabled:!!t,slotProps:{input:{endAdornment:this.props.schema.copyToClipboard?x.createElement(se,{tabIndex:-1,size:"small",onClick:async()=>{P.Utils.copyToClipboard(await this.getPatternAsync(this.props.schema.pattern,null,this.props.schema.noTranslation)),window.alert(P.I18n.t("ra_Copied"))}},x.createElement(P.IconCopy,null)):void 0}},value:this.state.pattern||"",label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}}const Np={warning:{"& .Mui-error":{color:"orange"}}};class Bp extends V{updateTimeout;async componentDidMount(){await super.componentDidMount();let e=V.getValue(this.props.data,this.props.attr);e==null&&(e=""),this.setState({_value:e.toString(),oldValue:e.toString()});const t=await this.props.oContext.socket.getAdapterInstances(),n=`system.adapter.${this.props.oContext.adapterName}.${this.props.oContext.instance}`,u=await this.getCachedObject(n),i=u==null?void 0:u.common.host,s=[];t.forEach(d=>{var l,r,a,c;if(!d||d._id===n||d.common.host!==i||!((l=d.native)!=null&&l.bind))return;if(d!=null&&d.native&&d.native.secure&&d.native.leEnabled&&d.native.leUpdate){const p=parseInt(d.native.leCheckPort||d.native.lePort,10);p&&s.push({name:`${d._id.replace("system.adapter.","")} (LE)`,port:p,v6bind:d.native.bind.includes(":")?d.native.bind:d.native.v6bind,bind:d.native.bind,enabled:!!((r=d.common)!=null&&r.enabled)})}const o=parseInt((a=d==null?void 0:d.native)==null?void 0:a.port,10);o&&s.push({name:d._id.replace("system.adapter.",""),bind:d.native.bind,v6bind:d.native.bind.includes(":")?d.native.bind:d.native.v6bind,port:o,enabled:!!((c=d.common)!=null&&c.enabled)})}),this.setState({ports:s})}static getDerivedStateFromProps(e,t){const n=V.getValue(e.data,e.attr);return n==null||t.oldValue===null||t.oldValue===void 0||n.toString()!==parseInt(t._value,10).toString()&&n.toString()!==t.oldValue.toString()?{_value:n}:null}checkValue(e){if(e==null)return null;const t=this.props.schema.min??20,n=this.props.schema.max||65535;e=e.toString().trim();const u=e===""?0:parseInt(e,10);return e!==""&&Number.isNaN(u)?"ra_Not a number":e!==""&&window.isFinite(Number(e))?un?"ra_Too big":e===""||e==="-"||Number.isNaN(u)?"ra_Not a number":null:"ra_Not a number"}renderItem(e,t){this.state.oldValue!==null&&this.state.oldValue!==void 0?(this.updateTimeout&&clearTimeout(this.updateTimeout),this.updateTimeout=setTimeout(()=>{this.updateTimeout=void 0,this.setState({oldValue:null})},30)):this.updateTimeout&&(clearTimeout(this.updateTimeout),this.updateTimeout=void 0);const n=this.props.schema.min??20,u=this.props.schema.max||65535;let i;if(this.state.ports){const s=parseInt(this.state._value,10);if(s){const d=this.props.data.bind,o=this.state.ports.filter(r=>{if(r.port!==s)return!1;const a=r.bind,c=r.v6bind;return!d||!a||d==="0.0.0.0"||a==="0.0.0.0"||d==="::"||c==="::"||d===a||d===c});let l=o.findIndex(r=>r.port===s&&r.enabled);if(l!==-1){const r=this.state.ports.find(a=>a.port===s&&a.enabled&&o.some(c=>c.name===a.name&&c.bind===a.bind));e=P.I18n.t("ra_Port is already used by %s",(r==null?void 0:r.name)||o[l].name)}else if(l=o.findIndex(r=>r.port===s&&!r.enabled),l!==-1){i=!0;const r=this.state.ports.find(a=>a.port===s&&!a.enabled&&o.some(c=>c.name===a.name&&c.bind===a.bind));e=P.I18n.t("ra_Port could be used by %s",(r==null?void 0:r.name)||o[l].name)}}}return!e&&this.state._value!==null&&this.state._value!==void 0&&(e=this.checkValue(this.state._value),typeof e=="string"&&(e=P.I18n.t(e))),x.createElement(pe,{variant:"standard",type:"number",fullWidth:!0,slotProps:{htmlInput:{min:n,max:u,readOnly:this.props.schema.readOnly||!1}},value:this.state._value??"",error:!!e,disabled:!!t,sx:i?Np.warning:void 0,onChange:s=>{const d=Number(s.target.value.toString().replace(/[^0-9]/g,"")).toString(),o=this.checkValue(d);o?this.onError(this.props.attr,P.I18n.t(o)):this.onError(this.props.attr),this.setState({_value:d,oldValue:this.state._value},()=>{if(d.trim()===parseInt(d,10).toString()){const l=this.onChange(this.props.attr,parseInt(d,10)||0);l instanceof Promise&&l.catch(r=>{console.error(`Cannot set value for ${this.props.attr}: ${r}`)})}})},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:e&&typeof e=="string"?e:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}}class Pp extends V{async componentDidMount(){await super.componentDidMount();const e=V.getValue(this.props.data,this.props.attr);this.props.oContext.socket.getEnums("rooms").then(t=>{const n=Object.keys(t).map(u=>({value:this.props.schema.short?u.replace("enum.rooms.",""):u,label:this.getText(t[u].common.name),obj:t[u]}));this.props.schema.allowDeactivate!==!1&&n.unshift({label:P.I18n.t(V.NONE_LABEL),value:V.NONE_VALUE}),this.setState({value:e,selectOptions:n})}).catch(t=>console.error(`Cannot get enums: ${t}`))}renderItem(e,t){if(!this.state.selectOptions)return null;const n=this.state.selectOptions.find(u=>u.value===this.state.value);return x.createElement(fe,{variant:"standard",fullWidth:!0},this.props.schema.label?x.createElement(Te,null,this.getText(this.props.schema.label)):null,x.createElement(Be,{variant:"standard",error:!!e,disabled:!!t,value:this.state.value||"_",renderValue:()=>n?n.obj?x.createElement(P.TextWithIcon,{value:n.obj,themeType:this.props.oContext.themeType,lang:P.I18n.getLanguage()}):n.label:"",onChange:u=>{this.setState({value:u.target.value==="_"?"":u.target.value},()=>this.onChange(this.props.attr,this.state.value))}},this.state.selectOptions.map(u=>x.createElement(xe,{key:u.value,value:u.value,style:u.value===V.DIFFERENT_VALUE?{opacity:.5}:{}},u.obj?x.createElement(P.TextWithIcon,{value:u.obj,themeType:this.props.oContext.themeType,lang:P.I18n.getLanguage()}):u.label))),this.props.schema.help?x.createElement(ve,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const on={noMargin:{"&>div":{marginTop:0}},icon:{width:20,height:20,marginRight:4}};class Wp extends V{initialValue="";async componentDidMount(){await super.componentDidMount();let e=V.getValue(this.props.data,this.props.attr);this.props.schema.multiple&&(typeof e=="string"?e=[e]:e==null&&(e=[]));const t=[];for(const n of this.props.schema.options||[]){const u=n;if(Array.isArray(u.items)){const i={label:this.getText(n.label,this.props.schema.noTranslation),value:n.value,group:!0,color:n.color,description:this.getText(n.description)};i.hiddenValue=await this.isHidden(i),t.push(i);for(const s of u.items){const d={label:this.getText(s.label,this.props.schema.noTranslation),value:s.value,hidden:s.hidden,color:n.color,description:this.getText(n.description),icon:s.icon};d.hiddenValue=await this.isHidden(d),t.push(d)}}else{const i={label:this.getText(n.label,this.props.schema.noTranslation),value:n.value,hidden:n.hidden,color:n.color,description:this.getText(n.description),icon:n.icon};i.hiddenValue=await this.isHidden(i),t.push(i)}}if(this.props.onFilterLabelUpdate&&this.props.table){const n={};for(const u of t)!u.group&&u.value!==V.DIFFERENT_VALUE&&(n[u.value.toString()]=u.label);this.props.onFilterLabelUpdate(this.props.attr,n)}Array.isArray(e)&&!this.props.schema.multiple?(this.initialValue=[...e],t.unshift({label:P.I18n.t(V.DIFFERENT_LABEL),value:V.DIFFERENT_VALUE}),this.setState({value:V.DIFFERENT_VALUE,selectOptions:t})):this.setState({value:e,selectOptions:t})}_getValue(){let e=this.state.value===null||this.state.value===void 0?V.getValue(this.props.data,this.props.attr):this.state.value;return this.props.schema.multiple&&(typeof e=="string"?e=[e]:e==null&&(e=[])),e}async isHidden(e){return e.hidden?this.props.custom?!!await this.executeCustom(e.hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):!!await this.execute(e.hidden,this.props.schema.default,this.props.data,this.props.arrayIndex,this.props.globalData):!1}renderRadio(e,t){const n=this.state.selectOptions.filter(i=>!i.hiddenValue&&!i.group),u=this._getValue();return x.createElement(fe,{fullWidth:!0,error:!!e,disabled:!!t,id:`jsonSelect_${this.props.attr}_${this.props.index||this.props.index===0?this.props.index:""}`},this.props.schema.label?x.createElement(ic,null,this.getText(this.props.schema.label)):null,x.createElement(sc,{row:!!this.props.schema.horizontal,value:u==null?"":u.toString(),onChange:i=>{const s=n.find(o=>o.value.toString()===i.target.value),d=s?s.value:i.target.value;this.setState({value:d},()=>{const o=this.onChange(this.props.attr,d);o instanceof Promise&&o.catch(l=>console.error(l))})}},n.map((i,s)=>x.createElement(Xn,{key:s,value:i.value.toString(),control:x.createElement(rc,null),title:i.description||"",label:x.createElement("span",{style:{display:"flex",alignItems:"center"}},i.icon?x.createElement(P.Icon,{src:i.icon,style:on.icon}):null,x.createElement(yt,{component:"span",style:{color:i.color}},i.label)),style:i.value===V.DIFFERENT_VALUE?{opacity:.5}:{}}))),this.props.schema.help?x.createElement(ve,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}renderItem(e,t){if(!this.state.selectOptions)return null;if(this.props.schema.format==="radio")return this.renderRadio(e,t);const n=this.state.selectOptions.filter(s=>!s.hiddenValue),u=this._getValue(),i=this.props.schema.multiple?null:n.find(s=>s.value==u);return x.createElement(fe,{variant:"standard",fullWidth:!0,sx:this.props.table!==void 0?on.noMargin:void 0,id:`jsonSelect_${this.props.attr}_${this.props.index||this.props.index===0?this.props.index:""}`},this.props.schema.label?x.createElement(Te,null,this.getText(this.props.schema.label)):null,x.createElement(Be,{variant:"standard",error:!!e,multiple:this.props.schema.multiple,disabled:!!t,value:u||"_",renderValue:s=>this.props.schema.multiple?x.createElement("div",{style:{display:"flex",flexWrap:"wrap",gap:.5}},s.map(d=>{const o=n.find(l=>l.value===d);if(o||this.props.schema.showAllValues!==!1){const l=(o==null?void 0:o.label)||d;return x.createElement(Hs,{key:d,label:l})}return null})):i!=null&&i.color?x.createElement("span",{style:{display:"flex",alignItems:"center"}},i.icon?x.createElement(P.Icon,{src:i.icon,style:on.icon}):null,x.createElement("span",null,x.createElement("div",{style:{color:i.color}},i.label??s),i.description?x.createElement("div",{style:{opacity:.7,fontStyle:"italic",fontSize:"smaller"}},i.description):null)):(i==null?void 0:i.label)===void 0?i!=null&&i.icon?x.createElement("span",{style:{display:"flex",alignItems:"center"}},x.createElement(P.Icon,{src:i.icon,style:on.icon}),s):s:x.createElement("span",{style:{display:"flex",alignItems:"center"}},i.icon?x.createElement(P.Icon,{src:i.icon,style:on.icon}):null,x.createElement("span",null,x.createElement("div",null,i.label),i.description?x.createElement("div",{style:{opacity:.7,fontStyle:"italic",fontSize:"smaller"}},i.description):null)),onChange:s=>{this.setState({value:s.target.value==="_"?"":s.target.value},()=>{let d;this.state.value===V.DIFFERENT_VALUE?d=this.onChange(this.props.attr,this.initialValue):d=this.onChange(this.props.attr,this.state.value),d instanceof Promise&&d.catch(o=>console.error(o))})}},n.map((s,d)=>s.group?x.createElement(_o,{key:d,style:{color:s.color}},x.createElement("div",null,s.label),i.description?x.createElement("div",{style:{opacity:.7,fontStyle:"italic",fontSize:"smaller"}},i.description):null):x.createElement(xe,{key:d,value:s.value,style:s.value===V.DIFFERENT_VALUE?{opacity:.5}:{}},this.props.schema.multiple?x.createElement(Zt,{checked:u.includes(s.value),onClick:()=>{const o=JSON.parse(JSON.stringify(this._getValue())),l=u.indexOf(s.value);l!==-1?o.splice(l,1):(o.push(s.value),o.sort()),this.setState({value:o},()=>this.onChange(this.props.attr,o))}}):null,s.icon?x.createElement(P.Icon,{src:s.icon,style:on.icon}):null,x.createElement(Vs,{primary:s.label,secondary:s.description,slotProps:{secondary:{style:{fontSize:"smaller",fontStyle:"italic",opacity:.7}}},style:{color:s.color}})))),this.props.schema.help?x.createElement(ve,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const jp={menuPaper:{maxHeight:800}};class zp extends V{initialized=!1;localContext;async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){const t=await this.getPatternAsync(this.props.schema.jsonData,null,!0);try{e=JSON.parse(t)}catch{console.error(`Cannot parse json data: ${t}`)}}e===void 0&&(e=null),this.setState({running:!0},async()=>{const t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){const n=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(n!=null&&n.val)){window.alert(P.I18n.t("ra_Instance %s is not alive",t));return}}try{const n=await this.props.oContext.socket.sendTo(t,this.props.schema.command||"send",e);this.reportFilterLabels(n);for(const u of n)u.hiddenValue=await this.isHidden(u);this.setState({list:n,running:!1})}catch(n){console.error(`Cannot send command: ${n}`)}})}else{const e=V.getValue(this.props.data,this.props.attr);this.setState({value:e,running:!1})}}reportFilterLabels(e){if(this.props.onFilterLabelUpdate&&this.props.table&&Array.isArray(e)){const t={};for(const n of e)n.value!==V.DIFFERENT_VALUE&&(t[n.value]=n.label);this.props.onFilterLabelUpdate(this.props.attr,t)}}getContext(){const e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=V.getValue(this.props.data,t)),JSON.stringify(e)}_getValue(){let e=this.state.value===null||this.state.value===void 0?V.getValue(this.props.data,this.props.attr):this.state.value;return this.props.schema.multiple&&(typeof e=="string"?e=[e]:e==null&&(e=[])),e}async isHidden(e){return e.hidden?this.props.custom?!!await this.executeCustom(e.hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):!!await this.execute(e.hidden,this.props.schema.default,this.props.data,this.props.arrayIndex,this.props.globalData):!1}renderItem(e,t){if(this.props.alive){const s=this.getContext();(s!==this.localContext||!this.initialized)&&(this.localContext=s,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}const n=this._getValue();if(!this.props.alive||!this.state.running&&!Array.isArray(this.state.list))return this.props.schema.multiple||this.props.schema.manual===!1?P.I18n.t("ra_Cannot retrieve options, as instance is offline"):x.createElement(pe,{variant:"standard",fullWidth:!0,value:n,error:!!e,disabled:!!t,onChange:s=>{const d=s.target.value;this.setState({value:d},()=>this.onChange(this.props.attr,(d||"").trim()))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),slotProps:{input:{endAdornment:this.state.value&&!this.props.schema.noClearButton?x.createElement(vn,{position:"end"},x.createElement(se,{tabIndex:-1,size:"small",onClick:()=>this.setState({value:""},()=>this.onChange(this.props.attr,""))},x.createElement(ht,null))):null}}});if(this.state.running)return x.createElement(Tt,{size:"24"});const u=this.state.list.filter(s=>!s.hiddenValue),i=u.find(s=>s.value===n);return x.createElement(fe,{variant:"standard",fullWidth:!0},this.props.schema.label?x.createElement(Te,null,this.getText(this.props.schema.label)):null,x.createElement(Be,{variant:"standard",error:!!e,multiple:this.props.schema.multiple,disabled:!!t,sx:{"&.MuiSelect-paper":this.props.schema.multiple?jp.menuPaper:void 0},value:n,renderValue:s=>this.props.schema.multiple?x.createElement(Ie,{sx:{display:"flex",flexWrap:"wrap",gap:.5}},s.map(d=>{const o=u.find(l=>l.value===d);if(o||this.props.schema.showAllValues!==!1){const l=(o==null?void 0:o.label)||d;return x.createElement(Hs,{key:d,label:l})}return null})):this.getText((i==null?void 0:i.label)||s,this.props.schema.noTranslation),onChange:s=>{const d=this.onChange(this.props.attr,s.target.value);d instanceof Promise&&d.catch(o=>console.error(`Cannot set value: ${o}`))}},u.map((s,d)=>s.group?x.createElement(_o,{key:d},x.createElement("div",null,this.getText(s.label,this.props.schema.noTranslation)),s.description?x.createElement("div",{style:{opacity:.7,fontStyle:"italic",fontSize:"smaller"}},this.getText(s.description)):null):x.createElement(xe,{key:d,value:s.value},this.props.schema.multiple?x.createElement(Zt,{checked:n.includes(s.value.toString()),onClick:()=>{const o=JSON.parse(JSON.stringify(this._getValue())),l=n.indexOf(s.value.toString());l!==-1?o.splice(l,1):(o.push(s.value),o.sort()),this.setState({value:o},()=>this.onChange(this.props.attr,o))}}):null,x.createElement(Vs,{primary:this.getText(s.label),secondary:this.getText(s.description),slotProps:{secondary:{style:{fontSize:"smaller",fontStyle:"italic",opacity:.7}}}})))),this.props.schema.help?x.createElement(ve,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const to={fullWidth:{width:"100%"}};function At(m){return m.split(".").reduce((e,t)=>(e<<8)+parseInt(t,10),0)>>>0}function Hp(m,e){var u,i;const t=(i=(u=m==null?void 0:m.native)==null?void 0:u.hardware)==null?void 0:i.networkInterfaces;if(!t)return null;let n;return Object.keys(t).forEach(s=>t[s].forEach(d=>{d.internal||e.includes(":")&&d.family!=="IPv6"||e.includes(".")&&!e.match(/[^.\d]/)&&d.family!=="IPv4"||(d.family==="IPv4"&&!d.address.startsWith("172")&&(e==="127.0.0.0"||e==="localhost"||e.match(/[^.\d]/))?n=d.address:n||(d.family==="IPv4"&&e.includes(".")&&(At(e)&At(d.netmask),At(d.address)&At(d.netmask)),n=d.address))})),n||Object.keys(t).forEach(s=>t[s].forEach(d=>{d.internal||e.includes(":")&&d.family!=="IPv6"||e.includes(".")&&!e.match(/[^.\d]/)&&d.family!=="IPv4"||(d.family==="IPv6"&&(e==="127.0.0.0"||e==="localhost"||e.match(/[^.\d]/))?n=d.address:n||(d.family==="IPv4"&&e.includes(".")&&(At(e)&At(d.netmask),At(d.address)&At(d.netmask)),n=d.address))})),n||Object.keys(t).forEach(s=>{t[s].forEach(d=>{d.internal||e.includes(":")&&d.family!=="IPv6"||e.includes(".")&&!e.match(/[^.\d]/)&&d.family!=="IPv4"||(e==="127.0.0.0"||e==="localhost"||e.match(/[^.\d]/),n=d.address)})}),n||Object.keys(t).forEach(s=>{t[s].forEach(d=>{d.internal||(n=d.address)})}),n}class no extends V{async componentDidMount(){var t;await super.componentDidMount();let e=window.location.hostname;if(this.props.schema.openUrl){const n=await this.props.oContext.socket.getCurrentInstance(),u=await this.getCachedObject(`system.adapter.${n}`);if(u){const i=await this.getCachedObject(`system.host.${(t=u==null?void 0:u.common)==null?void 0:t.host}`);if(i){const s=Hp(i,window.location.hostname);if(s)e=`${s}:${window.location.port}`;else{console.warn(`Cannot find suitable IP in host ${u.common.host} for ${u._id}`);return}}}}await new Promise(n=>{this.setState({_error:"",_message:"",hostname:e},n)}),this.props.schema.onLoaded&&this._onClick().catch(n=>console.error(n))}renderErrorDialog(){return this.state._error?x.createElement(P.DialogError,{text:this.state._error,onClose:()=>this.setState({_error:""})}):null}renderMessageDialog(){return this.state._message?x.createElement(P.DialogMessage,{text:this.state._message,onClose:()=>this.setState({_message:""})}):null}renderCopyDialog(){return this.state._copyDialog?x.createElement(Xs,{title:this.getText(this.state._copyDialog.title||P.I18n.t("ra_Result")),overflowHidden:!0,onClose:()=>{this.setState({_copyDialog:null})},onApply:()=>{P.copy(this.state._copyDialog.text),window.alert(P.I18n.t("ra_Copied")),this.setState({_copyDialog:null})},titleButtonApply:P.I18n.t("ra_Copy content")},x.createElement("div",{style:{width:"calc(100vw - 40px)",height:"calc(100vh - 188px)"}},x.createElement(nr,{mode:this.state._copyDialog.type,value:this.state._copyDialog.text,name:"CopyDialog",themeType:this.props.oContext.themeType}))):null}async _onClick(){this.props.oContext.onCommandRunning(!0),this.setState({running:!0});const e=`${window.location.protocol}//${window.location.host}${window.location.pathname.replace(/\/index\.html$/,"")}`,t=`${window.location.protocol}//${this.state.hostname.split(":").length>3?`[${this.state.hostname}]`:this.state.hostname}${window.location.pathname.replace(/\/index\.html$/,"")}`;let n=this.props.schema.data;if(n===void 0&&this.props.schema.jsonData){const s=await this.getPatternAsync(this.props.schema.jsonData,{_origin:e,_originIp:t,...this.props.data},!0);try{n=JSON.parse(s)}catch{console.error(`Cannot parse json data: ${s}`)}}n===void 0&&(n=null),this.props.schema.openUrl&&!n&&(n={_origin:e,_originIp:t});let u;this.props.schema.timeout&&(u=setTimeout(()=>{this.props.oContext.onCommandRunning(!1),this.setState({_error:P.I18n.t("ra_Request timed out"),running:!1})},parseInt(this.props.schema.timeout,10)||1e4));const i=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(i!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){const s=await this.props.oContext.socket.getState(`system.adapter.${i}.alive`);if(!(s!=null&&s.val)){window.alert(P.I18n.t("ra_Instance %s is not alive",i));return}}this.props.oContext.socket.sendTo(i,this.props.schema.command||"send",n).then(async s=>{var d,o,l,r,a,c;if(u&&(clearTimeout(u),u=void 0),s!=null&&s.error)if((d=this.props.schema.error)!=null&&d[s.error]){let p=this.getText(this.props.schema.error[s.error]);(o=s.args)==null||o.forEach(h=>p=p.replace("%s",h)),this.setState({_error:p})}else this.setState({_error:s.error?typeof s.error=="string"?P.I18n.t(s.error):JSON.stringify(s.error):P.I18n.t("ra_Error")});else{if(s!=null&&s.command){(r=(l=this.props.oContext).onBackEndCommand)==null||r.call(l,s.command);return}if(s!=null&&s.reloadBrowser&&this.props.schema.reloadBrowser)window.location.reload();else if(s!=null&&s.openUrl&&this.props.schema.openUrl)window.open(s.openUrl,s.window||this.props.schema.window||"_blank");else if(s!=null&&s.result&&((a=this.props.schema.result)!=null&&a[s.result])){let p=this.getText(this.props.schema.result[s.result]);(c=s.args)==null||c.forEach(h=>p=p.replace("%s",h)),window.alert(p)}if(s!=null&&s.native&&this.props.schema.useNative){for(const[p,h]of Object.entries(s.native))await this.onChangeAsync(p,h);setTimeout(()=>this.props.oContext.forceUpdate(Object.keys(s.native),this.props.data),300)}else s!=null&&s.result?window.alert(typeof s.result=="object"?JSON.stringify(s.result):s.result):s!=null&&s.copyDialog?this.setState({_copyDialog:s.copyDialog}):window.alert(P.I18n.t("ra_Ok"));s!=null&&s.saveConfig&&this.props.onChange(null,null,null,!0)}}).catch(s=>{this.props.schema.error&&this.props.schema.error[s.toString()]?this.setState({_error:this.getText(this.props.schema.error[s.toString()])}):this.setState({_error:P.I18n.t(s.toString())||P.I18n.t("ra_Error")})}).then(()=>{this.props.oContext.onCommandRunning(!1),this.setState({running:!1})})}renderDialogConfirm(){if(!this.state.confirmDialog)return null;const e=this.state.confirmData||this.props.schema.confirm;let t=null;return e.type==="warning"?t=x.createElement(Hn,null):e.type==="error"?t=x.createElement(Jt,null):e.type==="info"&&(t=x.createElement(Li,null)),x.createElement(P.DialogConfirm,{title:this.getText(e.title)||P.I18n.t("ra_Please confirm"),text:this.getText(e.text),ok:this.getText(e.ok)||P.I18n.t("ra_Ok"),cancel:this.getText(e.cancel)||P.I18n.t("ra_Cancel"),icon:t||void 0,onClose:n=>this.setState({confirmDialog:!1},()=>n&&this._onClick())})}renderItem(e,t){const n=this.getIcon();return x.createElement("div",{style:to.fullWidth},x.createElement(me,{variant:this.props.schema.variant||void 0,color:this.props.schema.color||"grey",style:{...to.fullWidth,...this.props.schema.controlStyle||void 0},disabled:t||!this.props.alive,startIcon:n,title:this.props.alive?this.getText(this.props.schema.title)||"":P.I18n.t("ra_Instance %s is not alive",this.props.oContext.instance.toString()),onClick:()=>{this.props.schema.confirm?this.setState({confirmDialog:!0}):this._onClick().catch(u=>console.error(u))}},this.props.schema.showProcess&&this.state.running?x.createElement(Tt,{size:20,style:{marginRight:8}}):null,this.getText(this.props.schema.label,this.props.schema.noTranslation)),this.renderErrorDialog(),this.renderMessageDialog(),this.renderCopyDialog())}}const Vp={fullWidth:{width:"100%"}};class Up extends V{async _onClick(){var n,u;let e=this.props.schema.val;if(typeof e=="string"&&e.includes("${")){e=await this.getPatternAsync(e,null,!0);const i=await this.getCachedObject(this.props.schema.id);((n=i==null?void 0:i.common)==null?void 0:n.type)==="number"?e=parseFloat(e):((u=i==null?void 0:i.common)==null?void 0:u.type)==="boolean"&&(e=e==="true"||e===!0||e==="1"||e===1)}const t=(this.props.schema.id||"").replace(/%INSTANCE%/g,(this.props.oContext.instance||0).toString());try{await this.props.oContext.socket.setState(t,{val:e,ack:!!this.props.schema.ack}),this.props.schema.okText&&window.alert(this.getText(this.props.schema.okText))}catch(i){this.props.schema.error&&this.props.schema.error[i.toString()]?window.alert(this.getText(this.props.schema.error[i.toString()])):window.alert(P.I18n.t(i.toString())||P.I18n.t("ra_Error"))}}renderDialogConfirm(){if(!this.state.confirmDialog)return null;const e=this.state.confirmData||this.props.schema.confirm;let t=null;return e.type==="warning"?t=x.createElement(Hn,null):e.type==="error"?t=x.createElement(Jt,null):e.type==="info"&&(t=x.createElement(Li,null)),x.createElement(P.DialogConfirm,{title:this.getText(e.title)||P.I18n.t("ra_Please confirm"),text:this.getText(e.text),ok:this.getText(e.ok)||P.I18n.t("ra_Ok"),cancel:this.getText(e.cancel)||P.I18n.t("ra_Cancel"),icon:t,onClose:n=>this.setState({confirmDialog:!1},()=>n&&this._onClick())})}renderItem(e,t){const n=this.getIcon();return x.createElement(me,{variant:this.props.schema.variant||void 0,color:this.props.schema.color||"grey",style:Vp.fullWidth,disabled:t,onClick:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0}):await this._onClick()},startIcon:n||void 0},this.getText(this.props.schema.label,this.props.schema.noTranslation))}}const io={fullWidth:{width:"100%"},slider:{marginLeft:10,marginRight:10,width:"calc(100% - 20px)"}};class Kp extends V{async componentDidMount(){await super.componentDidMount();const e=V.getValue(this.props.data,this.props.attr);this.setState({_value:e})}static getDerivedStateFromProps(e,t){if(e.schema.min!==void 0&&e.schema.min<0||e.schema.max!==void 0&&e.schema.max<0)return null;const n=V.getValue(e.data,e.attr);return n==null||n.toString()!==parseFloat(t._value).toString()?{_value:n}:null}renderItem(e,t){const n=this.props.schema.min||0,u=this.props.schema.max||100,i=this.props.schema.unit?this.getText(this.props.schema.unit,this.props.schema.noTranslation):"",s=[{value:n,label:n+i},{value:u,label:u+i}];return x.createElement(Ie,{style:io.fullWidth},this.props.schema.label?x.createElement(yt,{gutterBottom:!0},this.getText(this.props.schema.label)):null,x.createElement(ko,{style:io.slider,value:this.state._value,getAriaValueText:d=>d+i,step:this.props.schema.step||(u-n)/100,valueLabelDisplay:"auto",marks:s,min:n,max:u,disabled:!!t,onChange:d=>{const o=d.target.value;this.setState({_value:o},()=>this.onChange(this.props.attr,o))}}),this.props.schema.help?x.createElement(yt,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}function Dt(m,e){return m==="edit"||m==="rename"?x.createElement(Mo,{style:e}):m==="delete"?x.createElement(_t,{style:e}):m==="refresh"?x.createElement(Us,{style:e}):m==="newDevice"||m==="new"||m==="add"?x.createElement(Un,{style:e}):m==="discover"||m==="search"?x.createElement(Lo,{style:e}):m==="unpairDevice"||m==="unpair"?x.createElement(Fo,{style:e}):m==="pairDevice"||m==="pair"?x.createElement(Ro,{style:e}):m==="identify"?x.createElement(kc,{style:e}):m==="play"?x.createElement(Gs,{style:e}):m==="stop"?x.createElement(Tc,{style:e}):m==="pause"?x.createElement(Lc,{style:e}):m==="forward"||m==="next"?x.createElement(Mc,{style:e}):m==="rewind"||m==="previous"?x.createElement(Ic,{style:e}):m==="lamp"||m==="light"?x.createElement(Oc,{style:e}):m==="backlight"?x.createElement(Fc,{style:e}):m==="dimmer"?x.createElement(Rc,{style:e}):m==="socket"?x.createElement(Nc,{style:e}):m==="settings"?x.createElement(Bc,{style:e}):m==="users"||m==="group"?x.createElement(Oo,{style:e}):m==="user"?x.createElement(Io,{style:e}):m==="qrcode"?x.createElement(Pc,{style:e}):m==="connection"?x.createElement(Wc,{style:e}):m==="no-connection"?x.createElement(jc,{style:e}):m==="visible"?x.createElement(Wo,{style:e}):null}function Gp(m,e){return typeof e=="string"?{"@keyframes newStateAnimationOnceColor":{"0%":{color:e},"100%":{color:m.palette.mode==="dark"?"#fff":"#000"}},animation:"newStateAnimationOnceColor 2s ease-in-out"}:{"@keyframes newStateAnimationOnce":{"0%":{color:"#00f900"},"80%":{color:m.palette.mode==="dark"?"#518851":"#008000"},"100%":{color:m.palette.mode==="dark"?"#fff":"#000"}},animation:"newStateAnimationOnce 2s ease-in-out"}}class Jp extends V{controlTimeout=null;delayedUpdate={timer:null,value:null};async getObjectID(){let e=(this.props.schema.oid||"").toString();return e.includes("${")&&(e=await this.getPatternAsync(e,null,!0)),this.props.schema.foreign?e:`${this.props.schema.system?"system.adapter.":""}${this.props.oContext.adapterName}.${this.props.oContext.instance||0}.${e}`}async componentDidMount(){var u,i;await super.componentDidMount();const e=await this.getObjectID(),t=await this.getCachedObject(e);if((u=t==null?void 0:t.common)!=null&&u.states&&!this.props.schema.options){if(Array.isArray((i=t==null?void 0:t.common)==null?void 0:i.states)){const s={};t.common.states.forEach((d,o)=>{s[o.toString()]=d}),t.common.states=s}Object.keys(t.common.states).length||(t.common.states=void 0)}const n=this.props.schema.control||this.detectType(t);try{const s=await this.props.oContext.socket.getState(e);this.setState({stateValue:s?s.val:null,controlType:n,obj:t,objId:e},async()=>{const d=await this.getObjectID();await this.props.oContext.socket.subscribeState(d,this.onStateChanged)})}catch(s){console.error(`Cannot get state ${e}: ${s}`),this.setState({controlType:n,obj:t,objId:e})}}componentWillUnmount(){super.componentWillUnmount(),this.state.objId&&this.props.oContext.socket.unsubscribeState(this.state.objId,this.onStateChanged),this.delayedUpdate.timer&&(clearTimeout(this.delayedUpdate.timer),this.delayedUpdate.timer=null),this.controlTimeout&&(clearTimeout(this.controlTimeout),this.controlTimeout=null,this.state.objId&&this.props.oContext.socket.setState(this.state.objId,this.state.stateValue,!1).catch(e=>console.error(`Cannot control value: ${e.toString()}`)))}onStateChanged=(e,t)=>{let n=t?t.val:null;this.state.controlType==="button"||this.state.controlType==="switch"?(n=!!n,this.state.stateValue!==n&&this.setState({stateValue:n})):n!==null&&(this.state.controlType==="slider"||this.state.controlType==="number")?(n=parseFloat(n),console.log(`${Date.now()} Received new value: ${n}`),n!==this.state.stateValue?(this.delayedUpdate.timer&&(clearTimeout(this.delayedUpdate.timer),this.delayedUpdate.timer=null),this.delayedUpdate.value=n,this.delayedUpdate.timer=setTimeout(()=>{this.setState({stateValue:this.delayedUpdate.value})},500)):this.delayedUpdate.timer&&(clearTimeout(this.delayedUpdate.timer),this.delayedUpdate.timer=null)):this.state.stateValue.toString()!==n.toString()&&this.setState({stateValue:n})};detectType(e){if(e||={},e.common||={},e.common.type==="boolean"){if(this.props.schema.controlled!==!1){if(e.common.read===!1||this.props.schema.controlled===!0)return"button";if(e.common.write||this.props.schema.controlled===!0)return"switch"}return"text"}return e.common.type==="number"&&this.props.schema.controlled!==!1?e.common.write||this.props.schema.controlled===!0?e.common.states||this.props.schema.options?"select":e.common.max!==void 0?"slider":"input":"text":e.common.write&&this.props.schema.controlled!==!1?e.common.states||this.props.schema.options?"select":"input":"text"}getNormalizedStates(){let e;return this.props.schema.options?e=this.props.schema.options.map(t=>typeof t=="string"?{value:t,label:this.getText(t,this.props.schema.noTranslation)}:{value:t.value,label:this.getText(t.label,this.props.schema.noTranslation),color:t.color}):this.state.obj.common.states?(e=[],Object.keys(this.state.obj.common.states).forEach(t=>{e.push({value:t,label:this.getText(this.state.obj.common.states[t],this.props.schema.noTranslation)})})):e=[],e}renderItem(e,t){var u,i,s,d,o;if(!this.state.obj)return null;let n;if(this.state.controlType==="select"||!this.state.controlType&&(this.state.obj.common.type==="number"||this.state.obj.common.type==="string")&&this.state.obj.common.write!==!1&&(this.props.schema.options||this.state.obj.common.states)){const l=this.getNormalizedStates(),r=l.find(a=>a.value===this.state.stateValue);n=x.createElement(fe,{fullWidth:!0},x.createElement(Te,null,this.getText(this.props.schema.label)),x.createElement(Be,{value:this.state.stateValue,disabled:!!this.props.schema.readOnly||t,onChange:a=>{this.setState({stateValue:a.target.value},()=>{let c=this.state.stateValue;this.state.obj.common.type==="number"&&(c=parseFloat(c.toString().replace(",","."))),this.props.oContext.socket.setState(this.state.objId,c,!1)})},renderValue:a=>r!=null&&r.color?x.createElement("div",{style:{color:r.color}},r.label):a},l.map(a=>x.createElement(xe,{key:(a.value??"").toString(),value:a.value,style:{color:a.color}},"$",a.label))))}else if(this.state.controlType==="button"||!this.state.controlType&&this.state.obj.common.type==="boolean"&&(this.state.obj.common.write&&this.state.obj.common.read===!1||(u=this.state.obj.common.role)!=null&&u.includes("button"))){let l=null;this.props.schema.falseImage&&(l=Dt(this.props.schema.falseImage));const r=this.getText(this.props.schema.falseText||this.props.schema.label,this.props.schema.noTranslation);!r&&l?n=x.createElement(se,{style:this.props.schema.falseTextStyle,disabled:!!this.props.schema.readOnly,onClick:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0,confirmCallback:async a=>{a&&await this.props.oContext.socket.setState(this.state.objId,this.props.schema.buttonValue!==void 0?this.props.schema.buttonValue:!0,!1)}}):await this.props.oContext.socket.setState(this.state.objId,this.props.schema.buttonValue!==void 0?this.props.schema.buttonValue:!0,!1)}},l):n=x.createElement(me,{variant:this.props.schema.variant||"contained",startIcon:l,style:this.props.schema.falseTextStyle,disabled:t||!!this.props.schema.readOnly,onClick:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0,confirmCallback:async a=>{a&&await this.props.oContext.socket.setState(this.state.objId,this.props.schema.buttonValue!==void 0?this.props.schema.buttonValue:!0,!1)}}):await this.props.oContext.socket.setState(this.state.objId,this.props.schema.buttonValue!==void 0?this.props.schema.buttonValue:!0,!1)}},r||(this.state.objId||"").split(".").pop())}else if(this.state.controlType==="input"||!this.state.controlType&&this.state.obj.common.write&&this.state.obj.common.type==="string")n=x.createElement("div",{style:{width:"100%",display:"flex",flexDirection:"row",gap:8,alignItems:"baseline"}},x.createElement(pe,{style:{flex:1},value:this.state.stateValue,variant:"standard",disabled:!!this.props.schema.readOnly||t,slotProps:{input:{endAdornment:this.getText(this.props.schema.unit,this.props.schema.noTranslation)||this.state.obj.common.unit||void 0},htmlInput:{readOnly:!!this.props.schema.readOnly}},onKeyUp:l=>{this.props.schema.setOnEnterKey&&l.key==="Enter"&&this.props.oContext.socket.setState(this.state.objId,this.state.stateValue,!1)},onChange:l=>{this.setState({stateValue:l.target.value},()=>{this.props.schema.setOnEnterKey||this.props.schema.showEnterButton||(this.controlTimeout&&clearTimeout(this.controlTimeout),this.controlTimeout=setTimeout(async()=>{this.controlTimeout=null;let r=this.state.stateValue;this.state.obj.common.type==="number"&&(r=parseFloat(r.toString().replace(",","."))),await this.props.oContext.socket.setState(this.state.objId,r,!1)},this.props.schema.controlDelay||0))})},label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}),this.props.schema.showEnterButton&&!this.props.schema.readOnly&&x.createElement(me,{variant:"outlined",disabled:t,onClick:()=>{this.props.oContext.socket.setState(this.state.objId,this.state.stateValue,!1)}},this.getText(typeof this.props.schema.showEnterButton=="string"?this.props.schema.showEnterButton:"Set")));else{let l;this.props.schema.size==="normal"?l=16:this.props.schema.size==="large"?l=20:typeof this.props.schema.size=="number"&&(l=this.props.schema.size);let r=this.getText(this.props.schema.label,this.props.schema.noTranslation);const a={display:"flex",alignItems:"center",fontSize:l||"1rem",gap:8};this.props.schema.narrow||(a.width="100%",a.justifyContent="space-between"),r.trim()&&!r.trim().endsWith(":")&&this.props.schema.addColon&&(r=`${r.trim()}:`);let c;this.props.schema.blinkOnUpdate&&(c=Gp(this.props.oContext.theme,this.props.schema.blinkOnUpdate));let p;this.props.schema.labelIcon&&(p=x.createElement(P.Icon,{src:this.props.schema.labelIcon,style:{marginRight:4}}));let h;if(r&&p?h=x.createElement("div",{style:{whiteSpace:"nowrap"}},p,r):r?h=x.createElement("div",{style:{whiteSpace:"nowrap"}},r):p&&(h=p),this.state.controlType==="switch"||!this.state.controlType&&this.state.obj.common.type==="boolean"&&(this.state.obj.common.write&&this.state.obj.common.read!==!1||(i=this.state.obj.common.role)!=null&&i.includes("switch"))){let f=null;const g=this.getText(this.props.schema.falseText,this.props.schema.noTranslation);this.props.schema.falseImage&&(f=Dt(this.props.schema.falseImage,g?{marginLeft:8}:void 0));let v=null;const b=this.getText(this.props.schema.trueText,this.props.schema.noTranslation);this.props.schema.trueImage&&(v=Dt(this.props.schema.trueImage,b?{marginRight:8}:void 0)),n=x.createElement(oc,{checked:!!this.state.stateValue,disabled:!!this.props.schema.readOnly||t,onChange:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0,confirmCallback:async D=>{D&&await this.props.oContext.socket.setState(this.state.objId,!this.state.stateValue,!1)}}):await this.props.oContext.socket.setState(this.state.objId,!this.state.stateValue,!1)}}),(g||f||b||v)&&(n=x.createElement("div",{style:{display:"flex",alignItems:"center",fontSize:14}},x.createElement("span",{style:this.props.schema.falseTextStyle},g,f),n,x.createElement("span",{style:this.props.schema.trueTextStyle},v,b))),h&&(n=x.createElement("div",{style:a},h,n))}else if(this.state.controlType==="slider"||!this.state.controlType&&this.state.obj.common.type==="number"&&(this.state.obj.common.write&&(this.state.obj.common.max!==void 0||this.state.obj.common.unit==="%")||(s=this.state.obj.common.role)!=null&&s.includes("slider")||(d=this.state.obj.common.role)!=null&&d.includes("dimmer")||(o=this.state.obj.common.role)!=null&&o.includes("blind"))){let f=null;const g=this.getText(this.props.schema.falseText,this.props.schema.noTranslation);this.props.schema.falseImage&&(f=Dt(this.props.schema.falseImage,g?{marginLeft:8}:void 0));let v=null;const b=this.getText(this.props.schema.trueText,this.props.schema.noTranslation);this.props.schema.trueImage&&(v=Dt(this.props.schema.trueImage,b?{marginRight:8}:void 0));const D=this.props.schema.min??(this.state.obj.common.min||0),E=this.props.schema.max??this.state.obj.common.max??100,w=this.props.schema.step??(this.state.obj.common.step||1);n=x.createElement(ko,{style:{width:"100%",flexGrow:1},min:D,max:E,disabled:!!this.props.schema.readOnly||t,step:w,value:this.state.stateValue,valueLabelDisplay:"auto",valueLabelFormat:y=>{let A=this.props.schema.digits!==void 0?y.toFixed(this.props.schema.digits):y.toString();return this.props.oContext.isFloatComma&&(A=A.replace(".",",")),`${A}${this.getText(this.props.schema.unit,this.props.schema.noTranslation)||this.state.obj.common.unit||""}`},onChange:(y,A)=>{this.setState({stateValue:A},()=>{this.controlTimeout&&clearTimeout(this.controlTimeout),this.controlTimeout=setTimeout(async()=>{console.log(`${Date.now()} Send new value: ${this.state.stateValue}`),this.controlTimeout=null,await this.props.oContext.socket.setState(this.state.objId,this.state.stateValue,!1)},this.props.schema.controlDelay||0)})}}),(g||f||b||v)&&(n=x.createElement("div",{style:{display:"flex",width:"100%",flexGrow:1,alignItems:"center"}},x.createElement("span",{style:{marginRight:16,...this.props.schema.falseTextStyle}},g,f),n,x.createElement("span",{style:{marginLeft:16,...this.props.schema.trueTextStyle}},v,b))),h&&(n=x.createElement("div",{style:a},h,n))}else if(this.state.obj.common.type==="number"&&this.state.obj.common.write&&!this.state.controlType){const f=this.props.schema.min??this.state.obj.common.min??void 0,g=this.props.schema.max??this.state.obj.common.max??void 0,v=this.props.schema.step??this.state.obj.common.step??void 0;n=x.createElement(pe,{variant:"standard",style:{width:"100%"},value:this.state.stateValue,type:"number",disabled:!!this.props.schema.readOnly||t,slotProps:{htmlInput:{min:f,max:g,step:v,readOnly:!!this.props.schema.readOnly},input:{endAdornment:this.getText(this.props.schema.unit,this.props.schema.noTranslation)||this.state.obj.common.unit||void 0}},onChange:b=>{this.setState({stateValue:b.target.value},()=>{this.controlTimeout&&clearTimeout(this.controlTimeout),this.controlTimeout=setTimeout(async()=>{this.controlTimeout=null;const D=parseFloat(this.state.stateValue);await this.props.oContext.socket.setState(this.state.objId,D,!1)},this.props.schema.controlDelay||0)})},label:this.getText(this.props.schema.label,this.props.schema.noTranslation),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}else if(this.state.obj.common.type==="boolean"){let f=null,g,v;this.state.stateValue?(g=this.getText(this.props.schema.trueText,this.props.schema.noTranslation),this.props.schema.trueImage&&(f=Dt(this.props.schema.falseImage,g?{marginRight:8}:void 0)),v=this.props.schema.trueTextStyle):(g=this.getText(this.props.schema.falseText,this.props.schema.noTranslation),this.props.schema.falseImage&&(f=Dt(this.props.schema.falseImage,g?{marginLeft:8}:void 0)),v=this.props.schema.falseTextStyle),v=Object.assign(a,v),n=x.createElement("div",{style:v},h,x.createElement(Ie,{style:{display:"flex",alignItems:"center",gap:8},sx:c,key:this.props.schema.blinkOnUpdate?g:void 0},f,g||(this.state.stateValue?P.I18n.t("ra_true"):P.I18n.t("ra_false"))))}else{const f=this.getText(this.props.schema.unit,this.props.schema.noTranslation)||this.state.obj.common.unit;let g=this.state.stateValue;if(g!=null&&(this.props.schema.options||this.state.obj.common.states)){const E=this.getNormalizedStates().find(w=>w.value.toString()===g.toString());E&&(g=E.label)}let v,b;this.state.controlType==="html"?(b=(g||"").toString(),v=x.createElement("span",{dangerouslySetInnerHTML:{__html:g}})):this.state.stateValue===null?(v="null",b=v):this.state.stateValue===void 0?(v="undefined",b=v):(this.props.schema.digits!==void 0&&typeof g=="number"?(v=g.toFixed(this.props.schema.digits),this.props.oContext.isFloatComma&&(v=v.replace(".",","))):v=g.toString(),b=v),n=x.createElement("div",{style:a},h,x.createElement("div",{style:{display:"flex",alignItems:"baseline",gap:4}},x.createElement(Ie,{sx:c,key:this.props.schema.blinkOnUpdate?b:void 0},v),f?x.createElement("span",{style:{opacity:.7,fontSize:"smaller"}},f):null))}}return n}}const ys={fullWidth:m=>({width:"100%",backgroundColor:m.palette.mode==="dark"?"#FFF":"#000",borderStyle:"hidden"}),primary:m=>({backgroundColor:m.palette.primary.main}),secondary:m=>({backgroundColor:m.palette.secondary.main})};class Yp extends V{renderItem(){return x.createElement(Ie,{component:"hr",sx:P.Utils.getStyle(this.props.oContext.theme,ys.fullWidth,this.props.schema.color==="primary"?ys.primary:this.props.schema.color==="secondary"?ys.secondary:{backgroundColor:this.props.schema.color||(this.props.oContext.themeType==="dark"?"#333":"#ddd")},{height:this.props.schema.color?this.props.schema.height||2:this.props.schema.height||1})})}}const Qp={header:m=>({width:"100%",background:m.palette.primary.main,color:m.palette.primary.contrastText,padding:"4px !important",borderRadius:"3px",marginBlockEnd:0,marginBlockStart:0})};class Xp extends V{renderItem(){let e="h5";switch((this.props.schema.size||5).toString()){case"1":e="h1";break;case"2":e="h2";break;case"3":e="h3";break;case"4":e="h4";break;default:e="h5";break}return x.createElement(Ie,{component:e,sx:Qp.header},this.getText(this.props.schema.label||this.props.schema.text,this.props.schema.noTranslation))}}class Zp extends V{getSrc(){let e=this.props.schema.src;return e&&!e.startsWith(".")&&!e.startsWith("http")&&!e.startsWith(`adapter/${this.props.oContext.adapterName}/`)&&!e.startsWith(`./adapter/${this.props.oContext.adapterName}/`)&&(e=`${this.props.oContext.imagePrefix}/adapter/${this.props.oContext.adapterName}/${e}`),e}renderItem(){const{schema:e}=this.props,t=this.getSrc();if(e.showInDialog){const n=e.showInDialogSmallSize||100,u=e.showInDialogButtonLabel?this.getText(e.showInDialogButtonLabel):"";return x.createElement(x.Fragment,null,x.createElement(ge,{title:P.I18n.t("ra_Click to see in full size")},x.createElement("img",{src:t,style:{cursor:"pointer",width:"auto",height:n,objectFit:"contain"},alt:"",onClick:()=>this.setState({showDialog:!0})}))," ",u?x.createElement(me,{variant:"outlined",color:"grey",onClick:()=>this.setState({showDialog:!0})},u):null,this.state.showDialog?x.createElement(Lt,{open:!0,onClose:()=>this.setState({showDialog:!1}),maxWidth:"lg"},x.createElement(Kt,null,x.createElement(P.Icon,{src:t,style:{width:"100%",height:"100%",objectFit:"contain"}})),x.createElement(Gt,null,x.createElement(me,{variant:"contained",onClick:()=>this.setState({showDialog:!1}),color:"primary"},P.I18n.t("ra_Close")))):null)}return x.createElement("img",{src:t,style:{cursor:e.href?"pointer":void 0,width:"100%",height:"100%"},onClick:e.href?()=>e.href&&window.open(e.href,"_blank"):null,alt:""})}}function so(m,e,t){return typeof t=="string"?{"@keyframes newValueAnimationOnceColor":{"0%":{color:e?`${t} !important`:t},"100%":{color:m.palette.mode==="dark"?e?"#fff !important":"#fff":e?"#000 !important":"#000"}},animation:"newValueAnimationOnceColor 2s ease-in-out"}:{"@keyframes newValueAnimationOnce":{"0%":{color:e?"#00f900 !important":"#00f900"},"80%":{color:m.palette.mode==="dark"?e?"#518851 !important":"#518851":e?"#008000 !important":"#008000"},"100%":{color:m.palette.mode==="dark"?e?"#fff !important":"#fff":e?"#000 !important":"#000"}},animation:"newValueAnimationOnce 2s ease-in-out"}}function ro(m,e){return typeof e=="string"?{"@keyframes blinkAnimationColor":{"0%":{color:e},"100%":{color:m.palette.mode==="dark"?"#fff":"#000"}},animation:"blinkAnimationColor 2s ease-in-out infinite"}:{"@keyframes blinkAnimation":{"0%":{color:"#00f900"},"80%":{color:m.palette.mode==="dark"?"#518851":"#008000"},"100%":{color:m.palette.mode==="dark"?"#fff":"#000"}},animation:"blinkAnimation 2s ease-in-out infinite"}}const an={label:{fontWeight:"bold",whiteSpace:"nowrap"},valueImage:{maxHeight:"100%"},valueAndUnit:{display:"flex",gap:4,alignItems:"baseline"},value:{},unit:{fontSize:"smaller",opacity:.7}};class qp extends V{renderItem(e){let t=this.getText(this.props.schema.text||this.props.schema.label,this.props.schema.noTranslation);this.props.schema.addColon&&typeof t=="string"&&!t.trim().endsWith(":")&&(t=`${t.trim()}:`),t&&(t.includes("
")||t.includes(""))&&(t=P.Utils.renderTextWithA(t));let n;this.props.schema.size==="normal"?n=16:this.props.schema.size==="large"?n=20:typeof this.props.schema.size=="number"&&(n=this.props.schema.size);const u={width:"100%",height:"100%",display:"flex",alignItems:"center",position:"relative",fontSize:n};this.props.schema.narrow?u.gap=8:u.justifyContent="space-between";let i,s;this.props.schema.data&&typeof this.props.schema.data=="object"&&this.props.schema.data.en?s=this.getText(this.props.schema.data):typeof this.props.schema.data=="object"||this.props.schema.data===void 0||this.props.schema.data===null?s=JSON.stringify(this.props.schema.data):typeof this.props.schema.data=="number"?(s=this.props.schema.data.toString(),this.props.oContext.isFloatComma&&(s=s.replace(".",","))):(!this.props.schema.booleanAsCheckbox||typeof this.props.schema.data!="boolean")&&(s=this.props.schema.data.toString());let d=!1;if(this.props.schema.booleanAsCheckbox&&typeof this.props.schema.data=="boolean")i=x.createElement(Zt,{checked:!!i,disabled:!0,size:this.props.schema.size==="small"?"small":this.props.schema.size==="large"?"large":void 0});else if(s.startsWith("data:image/"))i=x.createElement("div",{style:{...an.value,...an.valueImage,...this.props.schema.styleValue||void 0}},x.createElement(P.Icon,{src:s}));else{const a={...an.value,...this.props.schema.styleValue||void 0};this.props.schema.html?i=x.createElement("div",{style:a,dangerouslySetInnerHTML:{__html:s}}):Array.isArray(this.props.schema.data)?(d=!0,i=x.createElement("div",{style:a},this.props.schema.data.map((c,p)=>x.createElement("div",{key:p},typeof c=="object"||c===null||c===void 0?JSON.stringify(c):c)))):s.includes(` -`)?(d=!0,i=x.createElement("div",{style:a},P.Utils.renderTextWithA(s))):i=x.createElement("div",{style:a},s)}if(this.props.schema.blinkOnUpdate&&this.props.schema.blink){const a=so(this.props.oContext.theme,!0,this.props.schema.blinkOnUpdate),c=ro(this.props.oContext.theme,this.props.schema.blink);i=x.createElement(Ie,{key:s,sx:{...a,...c}},i)}else if(this.props.schema.blinkOnUpdate){const a=so(this.props.oContext.theme,!1,this.props.schema.blinkOnUpdate);i=x.createElement(Ie,{key:s,sx:a},i)}else if(this.props.schema.blink){const a=ro(this.props.oContext.theme,this.props.schema.blink);i=x.createElement(Ie,{sx:a},i)}this.props.schema.unit&&(i=x.createElement("div",{style:an.valueAndUnit},i,x.createElement("div",{style:{...an.unit,...this.props.schema.styleUnit||void 0}},this.getText(this.props.schema.unit,this.props.schema.noTranslation))));let o;this.props.schema.labelIcon&&(o=x.createElement(P.Icon,{src:this.props.schema.labelIcon,style:{marginRight:4}}));let l;this.props.schema.copyToClipboard&&(l=x.createElement(fn,{className:"staticCopyButton",style:{position:"absolute",top:"calc(50% - 12px)",right:0,cursor:"pointer"},onClick:()=>{P.Utils.copyToClipboard(s),window.alert(P.I18n.t("ra_Copied"))}}));const r={"& .staticCopyButton":{display:"none"},"& .staticCopyButton:action":{transform:"scale(0.9)"},"&:hover .staticCopyButton":{display:"block"}};return this.props.schema.highlight&&(r["&:hover"]={backgroundColor:this.props.oContext.themeType==="dark"?"#51515180":"#b8b8b880"}),d&&(u.alignItems="top"),x.createElement(Ie,{component:"div",style:u,sx:r},x.createElement("div",{style:{...an.label,...this.props.schema.styleLabel||void 0}},o,t),i,l)}}const oo={fullWidth:{height:"100%",width:"100%"},link:m=>({textDecoration:"underline",color:m.palette.mode==="dark"?"#4dabf5":"#254e72",cursor:"pointer"})};function ao(m,e,t){let n,u="";m?m.toString().startsWith("#")||m.toString().startsWith("/")?(n=e||"_self",u=m):m.startsWith("http://")||m.startsWith("https://")?(n=e||"_blank",u=m):(u=`#tab-instances/config/${t}/${m}`,n=e||"_self"):(u=`#tab-instances/config/${t}`,n=e||"_self"),n==="_self"?setTimeout(i=>{i.startsWith("#")?window.location.hash=i:i.startsWith("/")?u=`${window.location.protocol}:${window.location.host}${u}`:(i.startsWith("http://")||i.startsWith("https://"))&&(window.location.href=i)},100,u):(u.startsWith("#")?u=`${window.location.protocol}:${window.location.host}${window.location.pathname}${u}`:u.startsWith("/")&&(u=`${window.location.protocol}:${window.location.host}${u}`),window.open(u,n))}class lo extends V{renderItem(e,t){if(this.props.schema.button){const u=this.getIcon();return x.createElement(me,{variant:this.props.schema.variant||void 0,color:this.props.schema.color||"grey",style:{...oo.fullWidth,...this.props.schema.controlStyle||void 0},disabled:t,startIcon:u,onClick:this.props.schema.href?()=>{const i=this.props.schema.href?this.getText(this.props.schema.href,!0):null;i&&(this.props.oContext.onBackEndCommand?this.props.oContext.onBackEndCommand({command:"link",url:i,target:this.props.schema.target,close:this.props.schema.close}):ao(i,this.props.schema.target,`${this.props.oContext.adapterName}.${this.props.oContext.instance}`))}:null},this.getText(this.props.schema.text||this.props.schema.label,this.props.schema.noTranslation))}let n=this.getText(this.props.schema.text||this.props.schema.label,this.props.schema.noTranslation);if(this.props.schema.format==="html")n=x.createElement("div",{dangerouslySetInnerHTML:{__html:n}});else if(this.props.schema.format==="json")try{const u=typeof n=="string"?JSON.parse(n):n;n=x.createElement("pre",{style:{whiteSpace:"pre-wrap",wordBreak:"break-word",margin:0}},JSON.stringify(u,null,2))}catch{}else n&&(n.includes("")||n.includes(""))&&(n=P.Utils.renderTextWithA(n));return x.createElement(Ie,{component:"span",style:{...this.props.schema.controlStyle||void 0},sx:this.props.schema.href?oo.link:void 0,onClick:this.props.schema.href?()=>{const u=this.props.schema.href?this.getText(this.props.schema.href,!0):null;u&&(this.props.oContext.onBackEndCommand?this.props.oContext.onBackEndCommand({command:"link",url:u,target:this.props.schema.target||"_blank",close:this.props.schema.close}):ao(u,this.props.schema.target||"_blank",`${this.props.oContext.adapterName}.${this.props.oContext.instance}`))}:null},n)}}const bs=1024*1024,re={paper:{width:"100%",marginBottom:16,backgroundColor:"rgba(255, 255, 255, 0.1)"},headerText:{width:"100%"},table:{minWidth:750},label:{display:"flex",justifyContent:"space-between"},title:{flex:"1 1 100%"},rootTool:{paddingLeft:16,paddingRight:8},silver:{opacity:.2},flex:{display:"flex",alignItems:"baseline"},filteredOut:{padding:10,display:"flex",textAlign:"center"},buttonEmpty:{width:34,display:"inline-block"},buttonCell:{whiteSpace:"nowrap"},dropZone:{width:"100%",height:100,position:"relative"},dropZoneEmpty:{},uploadDiv:{position:"relative",width:"100%",minHeight:300,opacity:.9,marginTop:30,cursor:"pointer",outline:"none"},uploadDivDragging:{opacity:1,background:"rgba(128,255,128,0.1)"},uploadCenterDiv:{margin:5,border:"3px dashed grey",borderRadius:5,width:"calc(100% - 10px)",height:"calc(100% - 10px)",minHeight:300,position:"relative",display:"flex"},uploadCenterIcon:{paddingTop:10,width:48,height:48},uploadCenterText:{fontSize:16},uploadCenterTextAndIcon:{textAlign:"center",position:"absolute",top:0,bottom:0,left:0,right:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},tooltip:{pointerEvents:"none"},cardHeader:m=>({color:m.palette.mode==="light"?m.palette.secondary.main:m.palette.text.primary,height:"100%",fontWeight:"bold",fontSize:20,fontStyle:"italic",padding:"4px 16px",backgroundColor:m.palette.primary.main,display:"flex",justifyContent:"space-between"})};function ed(m,e,t){e=e||"key";const n=[];return Object.keys(m).forEach(u=>{const i={};i[e]=u,t?(i[t]=m[u],n.push(i)):n.push(Object.assign(i,m[u]))}),n}function co(m,e,t){e=e||"key";const n={};return m.forEach(u=>{const i=u[e]??"";delete u[e],t?n[i]=u[t]:n[i]=u}),n}function td(m,e){let t="";for(let n=0;n{t.filter&&(this.filterRefs[t.attr]=Jl())}),this.refDiv=x.createRef()}async componentDidMount(){var i;await super.componentDidMount();const e=V.getValue(this.props.data,this.props.attr)||[];let t;if(this.props.schema.objKeyName?t=ed(e,this.props.schema.objKeyName,this.props.schema.objValueName):t=e,Array.isArray(t)||(t=[]),this.props.schema.encryptedAttributes){let s;try{this.props.oContext.socket.getCompactSystemConfig?s=await this.props.oContext.socket.getCompactSystemConfig():s=await this.getCachedObject("system.config")}catch(d){console.error(`Cannot get system configuration: ${d}`)}this.secret=((i=s==null?void 0:s.native)==null?void 0:i.secret)||this.secret,e.forEach(d=>{this.props.schema.encryptedAttributes.forEach(o=>{d[o]&&(d[o]=nd(this.secret,d[o]))})})}const n=window.localStorage.getItem(`table.collapsed.${this.props.oContext.instance}.${this.props.attr}`);let u=[];if(n)try{u=JSON.parse(n)}catch{}this.setState({value:t,visibleValue:null,orderBy:"",order:"asc",iteration:0,filterOn:[],width:0,tableErrors:{},collapsed:u,filterLabelMap:{}},()=>this.validateUniqueProps())}componentWillUnmount(){this.typingTimer&&(clearTimeout(this.typingTimer),this.typingTimer=null),this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=null),this.refreshBecauseOfHiddenElements&&(clearTimeout(this.refreshBecauseOfHiddenElements),this.refreshBecauseOfHiddenElements=null),super.componentWillUnmount()}itemTable(e,t,n,u){var o;const{schema:i}=this.props,s=(o=i.items)==null?void 0:o.find(l=>l.attr===e);if(!s)return null;const d={items:{[e]:s}};return x.createElement(tn,{oContext:this.props.oContext,alive:this.props.alive,arrayIndex:n,changed:this.props.changed,common:this.props.common,expertMode:this.props.expertMode,custom:!0,data:t,globalData:this.props.data,index:n+this.state.iteration,onChange:(l,r)=>{const a=JSON.parse(JSON.stringify(this.state.value));a[n][l]=r,this.setState({value:a},()=>{this.validateUniqueProps(),this.onChangeWrapper(a,!0)})},onError:this.onTableRowError(n),originalData:this.props.originalData,schema:d,table:!0,themeName:this.props.themeName,onFilterLabelUpdate:(l,r)=>{const a=this.state.filterLabelMap[l],c={...a,...r};JSON.stringify(a)!==JSON.stringify(c)&&this.setState(p=>({filterLabelMap:{...p.filterLabelMap,[l]:c}}))},customComponents:this.props.customComponents,onHiddenChanged:u?(l,r)=>{if(r)this.listOfHiddenElements[n]||=[],this.listOfHiddenElements[n].includes(l)||(this.listOfHiddenElements[n].push(l),this.refreshBecauseOfHiddenElements&&clearTimeout(this.refreshBecauseOfHiddenElements),this.refreshBecauseOfHiddenElements=setTimeout(()=>{this.forceUpdate()},100));else if(this.listOfHiddenElements[n]){const a=this.listOfHiddenElements[n].indexOf(l);a!==-1&&(this.listOfHiddenElements[n].splice(a,1),this.refreshBecauseOfHiddenElements&&clearTimeout(this.refreshBecauseOfHiddenElements),this.refreshBecauseOfHiddenElements=setTimeout(()=>{this.forceUpdate()},100))}}:void 0})}validateUniqueProps(){if(!this.props.schema.uniqueColumns)return;let e=null,t=null;for(const n of this.props.schema.uniqueColumns){const u=[];this.state.value.find(s=>{const d=s[n];return u.includes(d)?(e||(e=n,t=d),this.onError(n,"is not unique"),!0):(u.push(d),!1)})||this.onError(n,null)}e?this.setState({errorMessage:P.I18n.t('Non-allowed duplicate entry "%s" in column "%s"',t,e)}):this.setState({errorMessage:""})}onTableRowError=e=>(t,n)=>{const u={...this.state.tableErrors};u[e]||(u[e]={}),n?u[e][t]=n:(delete u[e][t],Object.keys(u[e]).length===0&&delete u[e]),this.setState({tableErrors:u}),this.props.onError(t,n)};static descendingComparator(e,t,n){return t[n]e[n]?1:0}static getComparator(e,t){return e==="desc"?(n,u)=>Qe.descendingComparator(n,u,t):(n,u)=>-Qe.descendingComparator(n,u,t)}static getFilterValue(e){var t,n,u;return(u=(n=(t=e==null?void 0:e.current)==null?void 0:t.children[0])==null?void 0:n.children[0])==null?void 0:u.value}static setFilterValue(e,t){return e.current.children[0].children[0].value=t}handleRequestSort=(e,t=!1)=>{const{order:n,orderBy:u}=this.state,s=t?n:u===e&&n==="asc"?"desc":"asc",d=this.stableSort(s,e);JSON.stringify(d)!==JSON.stringify(this.state.value)&&this.setState({value:d,order:s,orderBy:e,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,d))};stableSort=(e,t)=>{const{value:n}=this.state,u=Qe.getComparator(e,t),i=n.map((s,d)=>({el:s,index:d}));return i.sort((s,d)=>{const o=u(s.el,d.el);return o!==0?o:s.index-d.index}),i.map(s=>s.el)};renderShowHideFilter(e){return e.filter?x.createElement(se,{title:P.I18n.t("ra_Show/hide filter input"),size:"small",onClick:()=>{const t=[...this.state.filterOn],n=this.state.filterOn.indexOf(e.attr);n===-1?t.push(e.attr):t.splice(n,1),this.setState({filterOn:t},()=>{n&&Qe.getFilterValue(this.filterRefs[e.attr])&&(Qe.setFilterValue(this.filterRefs[e.attr],""),this.applyFilter())})}},this.state.filterOn.includes(e.attr)?x.createElement(zc,null):x.createElement(Hc,null)):null}renderImportExportButtons(e){return x.createElement(x.Fragment,null,!e.noDelete&&e.import?x.createElement(ge,{title:P.I18n.t("ra_Import data from %s file","CSV"),slotProps:{popper:{sx:re.tooltip}}},x.createElement(se,{size:"small",onClick:()=>this.setState({showImportDialog:!0})},x.createElement(Vn,null))):null,e.export?x.createElement(ge,{title:P.I18n.t("ra_Export data to %s file","CSV"),slotProps:{popper:{sx:re.tooltip}}},x.createElement(se,{size:"small",onClick:()=>this.onExport()},x.createElement(Vc,null))):null,e.noDelete?null:x.createElement(se,{disabled:!0,size:"small"},x.createElement(_t,null)))}renderAddButton(e){return x.createElement(ge,{title:e?P.I18n.t("ra_Cannot add items with set filter"):P.I18n.t("ra_Add row"),slotProps:{popper:{sx:re.tooltip}}},x.createElement("span",null,x.createElement(se,{size:"small",color:"primary",disabled:!!e&&!this.props.schema.allowAddByFilter,onClick:this.onAdd},x.createElement(Un,null))))}enhancedTableHead(e,t){var s;const{schema:n}=this.props,{order:u,orderBy:i}=this.state;return x.createElement($o,null,x.createElement(ct,null,(s=n.items)==null?void 0:s.map((d,o)=>this.renderOneFilter({schema:n,style:{width:d.width},showAddButton:!o&&!n.noDelete,headCell:d,order:u,orderBy:i,index:o,doAnyFilterSet:t})),!n.noDelete&&x.createElement(Ee,{style:{paddingLeft:20,paddingRight:20,width:e,textAlign:"right"},padding:"checkbox"},this.renderImportExportButtons(n))))}onDelete=e=>()=>{const t=JSON.parse(JSON.stringify(this.state.value));t.splice(e,1);const n={...this.state.tableErrors};n[e]&&(Object.keys(n[e]).forEach(i=>{this.props.onError(i,void 0)}),delete n[e]);const u={};Object.keys(n).forEach(i=>{const s=parseInt(i,10);s>e?u[s-1]=n[s]:u[s]=n[s]}),this.setState({value:t,iteration:this.state.iteration+1e4,tableErrors:u},()=>this.applyFilter(!1,null,()=>this.onChangeWrapper(t)))};onExport(){const{schema:e}=this.props,{value:t}=this.state,u=[e.items.map(d=>d.attr).join(";")];t.forEach(d=>{const o=[];e.items.forEach(l=>{d[l.attr]&&typeof d[l.attr]=="string"&&d[l.attr].includes(";")?o.push(`"${d[l.attr]}"`):o.push(d[l.attr]??"")}),u.push(o.join(";"))});const i=document.createElement("a");i.setAttribute("href",`data:text/csv;charset=utf-8,${encodeURIComponent(u.join(` +`,"autocompletion.css",!1),n.AcePopup=b,n.$singleLineEditor=v,n.getAriaId=p}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(t,n,h){var i=(function(){function s(d){this.editor=d,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return s.prototype.setScreenReaderContent=function(d){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",function(){var l=this.popup.getRow(),r=this.popup.renderer.$textLayer,a=r.element.childNodes[l-r.config.firstRow];if(a){for(var c="doc-tooltip ",p=0;p=0&&o.test(s[r]);r--)l.push(s[r]);return l.reverse().join("")},n.retrieveFollowingIdentifier=function(s,d,o){o=o||i;for(var l=[],r=d;r0)for(var y=this.popup.getFirstVisibleRow();y<=this.popup.getLastVisibleRow();y++){var A=this.popup.getData(y);A&&(!w||A.hideInlinePreview)&&this.$seen(A)}},E.prototype.$onPopupShow=function(w){this.$onPopupChange(w),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},E.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var w=this.editor.container.parentNode,y=[];w;)y.push(w),w.addEventListener("scroll",this.onLayoutChange,{passive:!0}),w=w.parentNode;this.$elements=y}},E.prototype.unObserveLayoutChanges=function(){var w=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(y){y.removeEventListener("scroll",w.onLayoutChange,{passive:!0})}),this.$elements=null},E.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},E.prototype.$updatePopupPosition=function(){var w=this.editor,y=w.renderer,A=y.layerConfig.lineHeight,T=y.$cursorLayer.getPixelPosition(this.base,!0);T.left-=this.popup.getTextLeftOffset();var x=w.container.getBoundingClientRect();T.top+=x.top-y.layerConfig.offset,T.left+=x.left-w.renderer.scrollLeft,T.left+=y.gutterWidth;var M={top:T.top,left:T.left};y.$ghostText&&y.$ghostTextWidget&&this.base.row===y.$ghostText.position.row&&(M.top+=y.$ghostTextWidget.el.offsetHeight);var O=w.container.getBoundingClientRect().bottom-A,_=Othis.filterText&&w.lastIndexOf(this.filterText,0)===0)var y=this.filtered;else var y=this.all;this.filterText=w,y=this.filterCompletions(y,this.filterText),y=y.sort(function(T,x){return x.exactMatch-T.exactMatch||x.$score-T.$score||(T.caption||T.value).localeCompare(x.caption||x.value)});var A=null;y=y.filter(function(T){var x=T.snippet||T.caption||T.value;return x===A?!1:(A=x,!0)}),this.filtered=y},E.prototype.filterCompletions=function(w,y){var A=[],T=y.toUpperCase(),x=y.toLowerCase();e:for(var M=0,O;O=w[M];M++){if(O.skipFilter){O.$score=O.score,A.push(O);continue}var _=!this.ignoreCaption&&O.caption||O.value||O.snippet;if(_){var k=-1,S=0,C=0,L,I;if(this.exactMatch){if(y!==_.substr(0,y.length))continue e}else{var F=_.toLowerCase().indexOf(x);if(F>-1)C=F;else for(var R=0;R=0&&(N<0||B0&&(k===-1&&(C+=10),C+=I,S|=1<c)&&(v.range.start.row===f?u++:(f=v.range.start.row,u=0),!(u>200))){var b=v.range.clipRows(a,c);if(!(b.start.row===b.end.row&&b.start.column===b.end.column)){var D=b.toScreenRange(l);if(D.isEmpty()){p=l.getNextFoldLine(b.end.row,p),p&&p.end.row>b.end.row&&(a=p.end.row);continue}this.markerType==="fullLine"?o.drawFullLineMarker(d,D,v.className,r):D.isMultiLine()?this.markerType==="line"?o.drawMultiLineMarker(d,D,v.className,r):o.drawTextMarker(d,D,v.className,r):o.drawSingleLineMarker(d,D,v.className+" ace_br15",r)}}}},s})();i.prototype.MAX_MARKERS=1e4,n.MarkerGroup=i}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(t,n,h){function i(l,r){var a=l.getTextRange(d.fromPoints({row:0,column:0},r));return a.split(o).length-1}function s(l,r){var a=i(l,r),c=l.getValue().split(o),p=Object.create(null),u=c[a];return c.forEach(function(f,g){if(!(!f||f===u)){var v=Math.abs(a-g),b=c.length-v;p[f]?p[f]=Math.max(b,p[f]):p[f]=b}}),p}var d=t("../range").Range,o=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;n.getCompletions=function(l,r,a,c,p){var u=s(r,a),f=Object.keys(u);p(null,f.map(function(g){return{caption:g,value:g,score:u[g],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/marker_group","ace/autocomplete/text_completer","ace/editor","ace/config"],function(t,n,h){var i=t("../snippets").snippetManager,s=t("../autocomplete").Autocomplete,d=t("../config"),o=t("../lib/lang"),l=t("../autocomplete/util"),r=t("../marker_group").MarkerGroup,a=t("../autocomplete/text_completer"),c={getCompletions:function(x,M,O,_,k){if(M.$mode.completer)return M.$mode.completer.getCompletions(x,M,O,_,k);var S=x.session.getState(O.row),C=M.$mode.getCompletions(S,M,O,_);C=C.map(function(L){return L.completerId=c.id,L}),k(null,C)},id:"keywordCompleter"},p=function(x){var M={};return x.replace(/\${(\d+)(:(.*?))?}/g,function(O,_,k,S){return M[_]=S||""}).replace(/\$(\d+?)/g,function(O,_){return M[_]})},u={getCompletions:function(x,M,O,_,k){var S=[],C=M.getTokenAt(O.row,O.column);C&&C.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?S.push("html-tag"):S=i.getActiveScopes(x);var L=i.snippetMap,I=[];S.forEach(function(F){for(var R=L[F]||[],B=R.length;B--;){var N=R[B],z=N.name||N.tabTrigger;z&&I.push({caption:z,snippet:N.content,meta:N.tabTrigger&&!N.name?N.tabTrigger+"⇥ ":"snippet",completerId:u.id})}},this),k(null,I)},getDocTooltip:function(x){x.snippet&&!x.docHTML&&(x.docHTML=["",o.escapeHTML(x.caption),"","
",o.escapeHTML(p(x.snippet))].join(""))},id:"snippetCompleter"},f=[u,a,c];n.setCompleters=function(x){f.length=0,x&&f.push.apply(f,x)},n.addCompleter=function(x){f.push(x)},n.textCompleter=a,n.keyWordCompleter=c,n.snippetCompleter=u;var g={name:"expandSnippet",exec:function(x){return i.expandWithTab(x)},bindKey:"Tab"},v=function(x,M){b(M.session.$mode)},b=function(x){typeof x=="string"&&(x=d.$modes[x]),x&&(i.files||(i.files={}),D(x.$id,x.snippetFileId),x.modes&&x.modes.forEach(b))},D=function(x,M){!M||!x||i.files[x]||(i.files[x]={},d.loadModule(M,function(O){O&&(i.files[x]=O,!O.snippets&&O.snippetText&&(O.snippets=i.parseSnippetFile(O.snippetText)),i.register(O.snippets||[],O.scope),O.includeScopes&&(i.snippetMap[O.scope].includeScopes=O.includeScopes,O.includeScopes.forEach(function(_){b("ace/mode/"+_)})))}))},E=function(x){var M=x.editor,O=M.completer&&M.completer.activated;if(x.command.name==="backspace")O&&!l.getCompletionPrefix(M)&&M.completer.detach();else if(x.command.name==="insertstring"&&!O){w=x;var _=x.editor.$liveAutocompletionDelay;_?y.delay(_):A(x)}},w,y=o.delayedCall(function(){A(w)},0),A=function(x){var M=x.editor,O=l.getCompletionPrefix(M),_=x.args,k=l.triggerAutocomplete(M,_);if(O&&O.length>=M.$liveAutocompletionThreshold||k){var S=s.for(M);S.autoShown=!0,S.showPopup(M)}},T=t("../editor").Editor;t("../config").defineOptions(T.prototype,"editor",{enableBasicAutocompletion:{set:function(x){x?(s.for(this),this.completers||(this.completers=Array.isArray(x)?x:f),this.commands.addCommand(s.startCommand)):this.commands.removeCommand(s.startCommand)},value:!1},enableLiveAutocompletion:{set:function(x){x?(this.completers||(this.completers=Array.isArray(x)?x:f),this.commands.on("afterExec",E)):this.commands.off("afterExec",E)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(x){x?(this.commands.addCommand(g),this.on("changeMode",v),v(null,this)):(this.commands.removeCommand(g),this.off("changeMode",v))},value:!1}}),n.MarkerGroup=r}),(function(){ace.require(["ace/ext/language_tools"],function(t){m&&(m.exports=t)})})()})(Tp);const to={jsonError:{border:"1px solid red",minHeight:200},jsonNoError:{border:"1px solid #00000000",minHeight:200}};function sr(m){return $.createElement(Ep,{style:m.error===!0?to.jsonError:m.error===!1?to.jsonNoError:void 0,mode:m.mode||"json",width:"100%",height:"100%",showPrintMargin:m.editValueMode,showGutter:m.editValueMode,highlightActiveLine:m.editValueMode,defaultValue:m.defaultValue,theme:m.themeType==="dark"?"clouds_midnight":"chrome",value:m.value,readOnly:!m.onChange,onChange:e=>{var t;return(t=m.onChange)==null?void 0:t.call(m,e)},name:m.name||"UNIQUE_ID_OF_DIV1",fontSize:m.fontSize||14,setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:m.editValueMode,tabSize:m.editValueMode?2:void 0},editorProps:{$blockScrolling:!0}})}const vs={flex:{display:"flex"},button:{height:48,minWidth:48},wrapper:{width:"calc(100vw - 40px)",height:"calc(100vh - 188px)"}};class Lp extends V{async componentDidMount(){await super.componentDidMount();const{data:e,attr:t}=this.props,n=V.getValue(e,t)||"{}";this.setState({value:n,initialized:!0,jsonError:this.validateJson(n)})}validateJson(e){let t=!1;if(this.props.schema.validateJson!==!1&&(e||!this.props.schema.allowEmpty))try{this.props.schema.json5?Jo.parse(e):JSON.parse(e)}catch(n){console.log("Error in JSON",n),t=!0}return t}renderItem(e,t){if(!this.state.initialized)return null;const{schema:n,data:h,attr:i}=this.props,{value:s,showSelectId:d}=this.state,o=n.readOnly===!0||t;return $.createElement(fe,{fullWidth:!0,variant:"standard"},$.createElement("div",{style:vs.flex},$.createElement(ve,{color:"grey",style:vs.button,size:"small",variant:"outlined",onClick:()=>this.setState({showSelectId:!0})},P.I18n.t("ra_JSON editor"))),d?$.createElement(qs,{title:this.getText(n.label),overflowHidden:!0,applyDisabled:this.state.jsonError&&this.props.schema.doNotApplyWithError||o,onClose:()=>{o?this.setState({showSelectId:!1}):this.setState({showSelectId:!1,value:V.getValue(h,i)||{}})},onApply:o?void 0:()=>this.setState({showSelectId:!1},()=>this.onChange(i,s))},$.createElement("div",{style:{...vs.wrapper,border:this.state.jsonError?"2px solid red":"2px solid transparent"}},$.createElement(sr,{mode:this.props.schema.json5?"json5":"json",value:typeof s=="object"?JSON.stringify(s):s,onChange:o?void 0:l=>this.setState({value:l,jsonError:this.validateJson(l)}),name:"ConfigJsonEditor",themeType:this.props.oContext.themeType}))):null,n.help||this.state.jsonError?$.createElement(ge,null,this.state.jsonError?P.I18n.t("ra_Invalid JSON"):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const Mp=[{value:"en",label:"English"},{value:"de",label:"Deutsch"},{value:"ru",label:"русский"},{value:"pt",label:"Portugues"},{value:"nl",label:"Nederlands"},{value:"fr",label:"français"},{value:"it",label:"Italiano"},{value:"es",label:"Espanol"},{value:"pl",label:"Polski"},{value:"uk",label:"Український"},{value:"zh-cn",label:"简体中文"}];class Ip extends V{async componentDidMount(){await super.componentDidMount();const e=V.getValue(this.props.data,this.props.attr),t=[...Mp];this.props.schema.system?t.unshift({value:"",label:P.I18n.t("ra_System language")}):t.unshift({value:"",label:P.I18n.t("ra_none")}),this.setState({value:this.props.schema.system?e||"":e||P.I18n.getLanguage(),selectOptions:t})}renderItem(e,t){var h,i;if(!this.state.selectOptions)return null;const n=(h=this.state.selectOptions)==null?void 0:h.find(s=>s.value===this.state.value||!s.value&&!this.state.value);return $.createElement(fe,{fullWidth:!0,variant:"standard"},this.props.schema.label?$.createElement(_e,null,this.getText(this.props.schema.label)):null,$.createElement(Ne,{variant:"standard",error:!!e,disabled:t,value:this.state.value||"_",renderValue:()=>this.getText(n==null?void 0:n.label,this.props.schema.noTranslation),onChange:s=>{let{value:d}=s.target;d==="_"&&(d=""),this.setState({value:d},()=>{const o=this.onChange(this.props.attr,d);if(o instanceof Promise&&o.catch(l=>console.error(l)),this.props.schema.changeGuiLanguage)if(d){if(d===P.I18n.getLanguage())return;P.I18n.setLanguage(d),this.props.oContext.changeLanguage&&this.props.oContext.changeLanguage()}else this.props.oContext.socket.getSystemConfig().then(l=>{l.common.language!==P.I18n.getLanguage()&&l.common.language&&(P.I18n.setLanguage(l.common.language),this.props.oContext.changeLanguage&&this.props.oContext.changeLanguage())}).catch(l=>console.error(`Cannot read system config: ${l}`))})}},(i=this.state.selectOptions)==null?void 0:i.map(s=>$.createElement($e,{key:s.value,value:s.value},s.label))),this.props.schema.help?$.createElement(ge,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}class Op extends V{scrollRef;constructor(e){super(e),this.scrollRef=$.createRef()}scrolledDown(){return this.scrollRef.current?this.scrollRef.current.offsetHeight+this.scrollRef.current.scrollTop>=this.scrollRef.current.scrollHeight:!1}async componentDidMount(){await super.componentDidMount(),V.getValue(this.props.data,this.props.attr)||(this.props.schema.licenseUrl?(this.setState({showLicenseDialog:!0,loading:!0,scrolledDown:!1}),fetch(this.props.schema.licenseUrl).then(e=>e.text()).then(e=>this.setState({license:e,loading:!1})).catch(e=>this.setState({license:e.toString(),loading:!1,error:!0,scrolledDown:!1}))):this.setState({showLicenseDialog:!0,scrolledDown:!1}),setTimeout(()=>{this.scrollRef.current&&(this.scrolledDown()?this.setState({scrolledDown:!0}):this.scrollRef.current.addEventListener("scroll",()=>{!this.state.scrolledDown&&this.scrolledDown()&&this.setState({scrolledDown:!0})}))},1e3))}renderItem(e,t){return this.state.showLicenseDialog?$.createElement(Lt,{maxWidth:"lg",open:!0,onClose:(n,h)=>{h!=="escapeKeyDown"&&h!=="backdropClick"&&this.setState({showLicenseDialog:!1})}},$.createElement(yn,null,this.props.schema.title?P.I18n.t(this.props.schema.title):P.I18n.t("ra_License agreement")),$.createElement(Kt,null,this.props.schema.licenseUrl?$.createElement($.Fragment,null,this.state.loading?$.createElement(ji,null):null,$.createElement("pre",{ref:this.scrollRef,style:{width:"100%",height:"100%",overflowY:"auto",fontSize:14}},this.state.license)):null,!this.props.schema.licenseUrl&&this.props.schema.texts?$.createElement("div",{ref:this.scrollRef,style:{width:"100%",height:"100%",overflowY:"auto",fontSize:14}},this.props.schema.texts.map((n,h)=>this.props.schema.noTranslation?$.createElement("p",{key:h},n):$.createElement("p",{key:h},P.I18n.t(n)))):null),$.createElement(Gt,null,this.props.schema.checkBox?$.createElement(Xn,{control:$.createElement(Zt,{disabled:t,checked:!!this.state.licenseChecked,onClick:()=>this.setState({licenseChecked:!this.state.licenseChecked})}),label:P.I18n.t(this.props.schema.checkBox)}):null,$.createElement(ve,{disabled:t||this.state.loading||this.state.error||this.props.schema.checkBox&&!this.state.licenseChecked||!this.state.scrolledDown,onClick:()=>{this.setState({showLicenseDialog:!1});const n=this.onChange(this.props.attr,!0);n instanceof Promise&&n.catch(h=>console.error(`Cannot set value: ${h}`))},color:"primary",variant:"contained",startIcon:$.createElement(Gs,null)},this.props.schema.agreeText?P.I18n.t(this.props.schema.agreeText):P.I18n.t("ra_Accept license")),$.createElement(ve,{onClick:()=>{this.setState({showLicenseDialog:!1}),setTimeout(()=>this.setState({showLicenseDialog:!0}),2e3)},color:"grey",variant:"contained",startIcon:$.createElement(ht,null)},P.I18n.t("ra_Close")))):null}}const no={indeterminate:{opacity:.5},control:{flexDirection:"row",width:"100%"}};class Fp extends V{updateTimeout;async componentDidMount(){await super.componentDidMount();let e=V.getValue(this.props.data,this.props.attr);if(e==null&&(e=""),Array.isArray(e)&&this.props.oContext.multiEdit){e=V.DIFFERENT_VALUE,this.setState({_value:e,oldValue:e});return}this.setState({_value:e.toString(),oldValue:e.toString()})}static getDerivedStateFromProps(e,t){if(e.schema.min!==void 0&&e.schema.min<0||e.schema.max!==void 0&&e.schema.max<0)return null;const n=V.getValue(e.data,e.attr);return e.oContext.multiEdit&&t._value===V.DIFFERENT_VALUE?{_value:V.DIFFERENT_VALUE}:n==null||t.oldValue===null||t.oldValue===void 0||n.toString()!==parseFloat(t._value).toString()&&n.toString()!==t.oldValue.toString()?{_value:n}:null}checkValue(e){if(e==null||(e=e.toString().trim().replace(",","."),e==="-"))return null;const t=e===""?0:parseFloat(e);return e!==""&&Number.isNaN(t)?"ra_Not a number":e!==""&&window.isFinite(t)?this.props.schema.min!==void 0&&tthis.props.schema.max?"ra_Too big":e===""||e==="-"||Number.isNaN(t)?"ra_Not a number":null:"ra_Not a number"}renderItem(e,t){var i;const n=Array.isArray(this.state._value)||this.state._value===V.DIFFERENT_VALUE;if(this.state.oldValue!==null&&this.state.oldValue!==void 0?(this.updateTimeout&&clearTimeout(this.updateTimeout),this.updateTimeout=setTimeout(()=>{this.updateTimeout=void 0,this.setState({oldValue:null})},30)):this.updateTimeout&&(clearTimeout(this.updateTimeout),this.updateTimeout=void 0),n){const s=V.getValue(this.props.data,this.props.attr),d=(s==null?void 0:s.filter(o=>o||o===0).map(o=>({label:o.toString(),value:o})))||[];return d.unshift({label:P.I18n.t(V.DIFFERENT_LABEL),value:V.DIFFERENT_VALUE}),$.createElement(Wi,{style:no.indeterminate,fullWidth:!0,freeSolo:!0,value:d[0],getOptionSelected:(o,l)=>o.label===l.label,onChange:(o,l)=>{const r=this.onChange(this.props.attr,l==null?void 0:l.value,()=>{this.setState({_value:l==null?void 0:l.value,oldValue:this.state._value})});r instanceof Promise&&r.catch(a=>console.error(a))},options:d,getOptionLabel:o=>o.label,renderInput:o=>$.createElement(pe,{...o,label:this.getText(this.props.schema.label),variant:"standard",slotProps:{htmlInput:{...o.inputProps,readOnly:this.props.schema.readOnly||!1},input:{endAdornment:this.props.schema.unit?this.getText(this.props.schema.unit,this.props.schema.noTranslation):void 0}},error:!!e,placeholder:this.getText(this.props.schema.placeholder),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),disabled:!!t})})}!e&&this.state._value!==null&&this.state._value!==void 0&&this.state._value&&(e=this.checkValue(this.state._value),e&&(e=P.I18n.t(e)));const h=parseFloat(((i=this.state._value)==null?void 0:i.toString().replace(",","."))||"");return $.createElement(fe,{variant:"standard",style:no.control},$.createElement(pe,{sx:{"& .up-down":{display:"none"},"&:hover .up-down":{display:"block"}},variant:"standard",type:Number.isNaN(h)?"text":this.props.schema.min!==void 0&&this.props.schema.min>=0?"number":"text",fullWidth:!0,slotProps:{htmlInput:{min:this.props.schema.min,max:this.props.schema.max,step:this.props.schema.step,readOnly:this.props.schema.readOnly||!1},input:{endAdornment:this.props.schema.unit?this.getText(this.props.schema.unit,this.props.schema.noTranslation):null}},value:this.state._value??"",error:!!e,disabled:!!t,onChange:s=>{const d=s.target.value,o=this.checkValue(d);o?this.onError(this.props.attr,P.I18n.t(o)):this.onError(this.props.attr),this.setState({_value:d,oldValue:this.state._value},()=>{const l=parseFloat(d.toString().replace(",","."));Number.isNaN(l)?this.onChange(this.props.attr,d.toString().replace(",",".")):this.onChange(this.props.attr,l)})},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:e&&typeof e=="string"?e:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}))}}class Rp extends V{authWindow;oid;url;constructor(e){super(e),this.state={...this.state,accessTokens:"",success:!1,blocked:!1,running:!1,pressed:!1,clientId:"",clientSecret:"",accessTokenError:""},this.url=`https://oauth2.iobroker.in/${e.schema.identifier}?redirect=true`,e.schema.scope&&(this.url+=`&scope=${encodeURIComponent(e.schema.scope)}`),this.oid=`${this.props.oContext.adapterName}.${this.props.oContext.instance}.${this.props.schema.saveTokenIn||"oauth2Tokens"}`}async componentDidMount(){await super.componentDidMount(),window.addEventListener?window.addEventListener("message",this.onMessage,!1):window.attachEvent("onmessage",this.onMessage,!1),await this.props.oContext.socket.subscribeState(this.oid,this.onTokensUpdated);let e;this.props.schema.ownClientId&&(e={clientId:V.getValue(this.props.data,this.props.schema.ownClientId)}),this.props.schema.ownClientId&&(e||={},e.clientSecret=V.getValue(this.props.data,this.props.schema.ownClientSecret));const t=await this.props.oContext.socket.getState(this.oid);if(t){const n=JSON.parse(t.val);new Date(n.access_token_expires_on).getTime()>Date.now()&&(e||={},e.accessTokens=t.val)}e&&this.setState(e)}onTokensUpdated=(e,t)=>{if(t!=null&&t.val){const n=JSON.parse(t.val);if(new Date(n.access_token_expires_on).getTime()>Date.now()){this.state.accessTokens!==t.val&&this.setState({accessTokens:t.val});return}}this.setState({accessTokens:""})};componentWillUnmount(){super.componentWillUnmount(),window.removeEventListener?window.removeEventListener("message",this.onMessage,!1):window.detachEvent("onmessage",this.onMessage,!1),this.props.oContext.socket.unsubscribeState(this.oid,this.onTokensUpdated)}saveToken(e){try{e&&!e.startsWith("{")&&(e=atob(e));const t=JSON.parse(e);t.access_token&&t.refresh_token&&t.expires_in&&(t.access_token_expires_on||=new Date(Date.now()+t.expires_in*1e3).toISOString(),this.props.schema.ownClientId&&(t.client_id=V.getValue(this.props.data,this.props.schema.ownClientId)),this.props.oContext.socket.setState(this.oid,JSON.stringify(t),!0).catch(n=>console.log(`Error occurred: ${n.toString()}`)))}catch(t){console.warn(t)}}onMessage=e=>{var t,n,h;if(e.origin==="https://oauth2.iobroker.in"&&(typeof e.data=="string"&&e.data.startsWith(`${this.props.schema.identifier}-authentication:`)||typeof e.message=="string"&&e.message.startsWith(`${this.props.schema.identifier}-authentication:`))){const i=(e.data||e.message).split(":");i[1]==="success"?(this.setState({accessTokens:i[2],success:!0,pressed:!1},()=>this.saveToken(this.state.accessTokens)),(t=this.authWindow)==null||t.postMessage("close",e.origin),this.authWindow=null):(h=(n=this.props).onError)==null||h.call(n,i[2])}};onOpenUrl(){this.authWindow=window.open(this.url+(this.props.schema.ownClientId?`&client_id=${encodeURIComponent(this.state.clientId)}&client_secret=${encodeURIComponent(this.state.clientSecret)}`:""),this.props.schema.identifier),!this.authWindow||this.authWindow.closed||typeof this.authWindow.closed>"u"?this.setState({blocked:!0}):this.setState({pressed:!0})}renderItem(e,t){let n="";if(this.state.accessTokens)try{const s=JSON.parse(this.state.accessTokens);n=new Date(s.access_token_expires_on).toLocaleString()}catch{}let h;this.state.accessTokens?h=this.props.schema.refreshLabel?this.getText(this.props.schema.refreshLabel):P.I18n.t("ra_Renew %s access",this.props.schema.identifier[0].toUpperCase()+this.props.schema.identifier.slice(1)):h=this.props.schema.label?this.getText(this.props.schema.label):P.I18n.t("ra_Get %s access",this.props.schema.identifier[0].toUpperCase()+this.props.schema.identifier.slice(1));const i=this.getIcon();return $.createElement("div",{style:{width:"100%",margin:"0 0 1rem 0"}},this.props.schema.ownClientId?$.createElement(pe,{value:this.state.clientId,onChange:s=>{const d=s.target.value;this.setState({clientId:d},()=>this.onChange(this.props.schema.ownClientId,d))},style:{marginBottom:8},variant:"standard",fullWidth:!0,error:!this.state.clientId,disabled:!!t,label:P.I18n.t("ra_OAuth Client ID"),slotProps:{input:{endAdornment:this.state.clientId?$.createElement(se,{size:"small",tabIndex:-1,onClick:()=>this.setState({clientId:""},()=>this.onChange(this.props.schema.ownClientId,""))},$.createElement(ht,null)):null}}}):null,this.props.schema.ownClientSecret?$.createElement(pe,{value:this.state.clientSecret,onChange:s=>{const d=s.target.value;this.setState({clientSecret:d},()=>this.onChange(this.props.schema.ownClientSecret,d))},style:{marginBottom:8},variant:"standard",fullWidth:!0,error:!this.state.clientSecret,disabled:!!t,label:P.I18n.t("ra_OAuth Client secret"),slotProps:{input:{endAdornment:this.state.clientSecret?$.createElement(se,{size:"small",tabIndex:-1,onClick:()=>this.setState({clientSecret:""},()=>this.onChange(this.props.schema.ownClientSecret,""))},$.createElement(ht,null)):null}}}):null,$.createElement(ve,{disabled:this.state.running||this.props.schema.ownClientSecret&&!this.state.clientSecret||this.props.schema.ownClientId&&!this.state.clientId,endIcon:i||$.createElement(Tc,null),variant:"contained",onClick:()=>this.onOpenUrl()},h),this.state.blocked?$.createElement("div",{style:{color:"red",fontSize:16,marginTop:20}},P.I18n.t("ra_Please allow popups in your browser for this page!")):null,this.state.accessTokens?$.createElement("div",{style:{color:"green",fontSize:16,marginTop:20}},this.props.alive?P.I18n.t("ra_Successfully authorized. Token valid till %s and will be automatically renewed.",n):P.I18n.t("ra_Successfully authorized. Token valid till %s but it can expire as the instance is not running.",n)):null,this.state.pressed?$.createElement($.Fragment,null,$.createElement("div",{style:{width:"100%",margin:"1rem 0 1rem 0"}},$.createElement("span",{style:{marginRight:4}},`${P.I18n.t("ra_If the button above does not work, you can authorize manually this app by visiting this url")}`,":"),$.createElement("br",null),$.createElement("a",{target:this.props.schema.identifier,href:this.url,rel:"noreferrer"},this.url)),$.createElement(pe,{value:this.state.accessTokens,label:P.I18n.t("ra_Enter the code from that page here"),variant:"standard",error:!!this.state.accessTokenError,helperText:this.state.accessTokenError||"",onChange:s=>{let d=s.target.value;try{d!=null&&d.trim()&&!d.trim().startsWith("{")&&(d=atob(d.trim()))}catch{this.setState({accessTokenError:"Invalid access token. Cannot decode from base64"})}if(d!=null&&d.startsWith("{"))try{const o=JSON.parse(d);o.access_token&&(o.access_token_expires_on=new Date(Date.now()+(o.expires_in-10)*1e3).toISOString(),this.setState({accessTokens:JSON.stringify(o),accessTokenError:""},()=>this.saveToken(this.state.accessTokens)))}catch{this.setState({accessTokens:d,accessTokenError:"Invalid access token. Cannot parse JSON"})}else d&&this.setState({accessTokens:d,accessTokenError:"Invalid access token. Not JSON"})},fullWidth:!0})):null)}}const io={flex:{display:"flex"},button:{maxHeight:48,marginLeft:4,minWidth:48}};class Np extends V{fillOnSelect=[];async componentDidMount(){await super.componentDidMount();const{data:e,attr:t}=this.props,n=V.getValue(e,t)||"";if(this.props.schema.fillOnSelect){const h=this.props.schema.fillOnSelect.split(",").map(i=>i.trim());for(const i of h){const s=i.split("=>");if(s.length===2){const d={pathInObject:s[0],attr:s[1]};(d.attr.includes("(X)")||d.attr.includes("(x)"))&&(d.overwrite=!0,d.attr=d.attr.replace(/\(X\)|\(x\)/g,"")),this.fillOnSelect.push(d)}else console.error(`Invalid format for fillOnSelect: ${this.props.schema.fillOnSelect}`)}}this.setState({value:n,initialized:!0})}onObjectChanged=async(e,t)=>{if(await this.onChange(e,t),this.fillOnSelect.length)try{const n=await this.getCachedObject(t);for(const h of this.fillOnSelect)if(h.overwrite||!V.getValue(this.props.data,h.attr)){let i=V.getValue(n,h.pathInObject);typeof i=="object"&&(i=this.getText(i,!0)),await this.onChange(h.attr,i)}}catch(n){console.error(n.toString())}};renderItem(e,t){if(!this.state.initialized)return null;const n=this.props.oContext.socket,{schema:h,attr:i}=this.props,{value:s,showSelectId:d}=this.state;return $.createElement(fe,{fullWidth:!0,variant:"standard"},h.label?$.createElement(_e,{shrink:!0},this.getText(h.label)):null,$.createElement("div",{style:io.flex},$.createElement(pe,{variant:"standard",fullWidth:!0,value:s,error:!!e,disabled:t,placeholder:this.getText(h.placeholder),label:this.getText(h.label),helperText:this.renderHelp(h.help,h.helpLink,h.noTranslation),onChange:o=>{const l=Array.isArray(o.target.value)?o.target.value[0]:o.target.value;this.setState({value:l},()=>{this.onObjectChanged(i,l)})}}),$.createElement(ve,{color:"grey",disabled:t,style:io.button,size:"small",variant:"outlined",onClick:()=>this.setState({showSelectId:!0})},"...")),d?$.createElement(P.DialogSelectID,{imagePrefix:this.props.oContext.imagePrefix??"../..",dialogName:`admin.${this.props.oContext.adapterName}`,filterFunc:h.filterFunc,themeType:this.props.oContext.themeType,theme:this.props.oContext.theme,types:h.types?Array.isArray(h.types)?h.types:[h.types]:void 0,customFilter:h.customFilter,filters:h.filters,socket:n,selected:s,root:h.root,onClose:()=>this.setState({showSelectId:!1}),onOk:o=>{const l=Array.isArray(o)?o[0]:o;this.setState({showSelectId:!1,value:l},()=>{this.onObjectChanged(i,l)})}}):null)}}const ys={fullWidth:{width:"100%",display:"inline-block"},halfWidth1:{width:"calc(50% - 5px)",display:"inline-block",marginRight:8},halfWidth2:{width:"calc(50% - 5px)",display:"inline-block"}},mi="____ppp____";class Bp extends V{async componentDidMount(){await super.componentDidMount();const e=V.getValue(this.props.data,this.props.attr);this.setState({_repeat:e?mi:"",_visible:!1,value:e?mi:"",_notEqual:!1})}onChangePassword(e,t){e===void 0&&(e=this.state.value),t===void 0&&(t=this.state._repeat);const n=!!this.props.schema.repeat&&t!==e;this.setState({value:e,_repeat:t,_notEqual:n},()=>{if(n)this.onError(this.props.attr,P.I18n.t("ra_Passwords are not equal!"));else{this.onError(this.props.attr);const h=this.onChange(this.props.attr,e);h instanceof Promise&&h.catch(i=>this.onError(this.props.attr,i))}})}renderItem(e,t){if(this.state._notEqual===void 0)return null;const n=$.createElement(pe,{variant:"standard",fullWidth:!0,type:this.state._visible&&this.state.value!==mi?"text":"password",value:this.state.value,error:!!e||this.state._notEqual,disabled:!!t,onChange:h=>this.onChangePassword(h.target.value),label:this.getText(this.props.schema.label),slotProps:{input:{autoComplete:"new-password",endAdornment:this.state.value&&this.state.value!==mi&&this.props.schema.visible&&!t&&!this.props.schema.readOnly?$.createElement(vn,{position:"end"},$.createElement(se,{size:"large",tabIndex:-1,onClick:h=>{h.preventDefault(),h.stopPropagation(),this.setState({_visible:!this.state._visible})},edge:"end"},this.state._visible?$.createElement(Lc,null):$.createElement(zo,null))):void 0},htmlInput:{autoComplete:"new-password",form:{autoComplete:"off"},maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:this.props.schema.readOnly||!1}},helperText:this.state._notEqual?P.I18n.t("ra_Passwords are not equal!"):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)});if(this.props.schema.repeat&&!this.props.schema.readOnly){const h=this.state._visible?null:$.createElement(pe,{variant:"standard",fullWidth:!0,type:"password",value:this.state._repeat,error:!!e||this.state._notEqual,disabled:!!t,onChange:i=>this.onChangePassword(void 0,i.target.value),label:`${this.getText(this.props.schema.label)} (${P.I18n.t("ra_repeat")})`,slotProps:{input:{autoComplete:"new-password"},htmlInput:{autoComplete:"new-password",form:{autoComplete:"off"},maxLength:this.props.schema.maxLength||this.props.schema.max||void 0}},helperText:this.state._notEqual?P.I18n.t("ra_Passwords are not equal!"):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)});return $.createElement("div",{style:ys.fullWidth},$.createElement("div",{style:ys.halfWidth1},n),$.createElement("div",{style:ys.halfWidth2},h))}return n}}class Pp extends V{checkTimeout=null;async componentDidMount(){await super.componentDidMount();const e=await this.getPatternAsync(this.props.schema.pattern,null,!0)??"";this.setState({pattern:e})}componentWillUnmount(){this.checkTimeout&&(clearTimeout(this.checkTimeout),this.checkTimeout=null),super.componentWillUnmount()}checkIfInstanceChanged(){this.checkTimeout&&clearTimeout(this.checkTimeout),this.checkTimeout=setTimeout(async()=>{this.checkTimeout=null;const e=await this.getPatternAsync(this.props.schema.pattern,null,!0)??"";e!==this.state.pattern&&this.setState({pattern:e})},200)}renderItem(e,t){return this.checkIfInstanceChanged(),$.createElement(pe,{variant:"standard",fullWidth:!0,disabled:!!t,slotProps:{input:{endAdornment:this.props.schema.copyToClipboard?$.createElement(se,{tabIndex:-1,size:"small",onClick:async()=>{P.Utils.copyToClipboard(await this.getPatternAsync(this.props.schema.pattern,null,this.props.schema.noTranslation)),window.alert(P.I18n.t("ra_Copied"))}},$.createElement(P.IconCopy,null)):void 0}},value:this.state.pattern||"",label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}}const Wp={warning:{"& .Mui-error":{color:"orange"}}};class jp extends V{updateTimeout;async componentDidMount(){await super.componentDidMount();let e=V.getValue(this.props.data,this.props.attr);e==null&&(e=""),this.setState({_value:e.toString(),oldValue:e.toString()});const t=await this.props.oContext.socket.getAdapterInstances(),n=`system.adapter.${this.props.oContext.adapterName}.${this.props.oContext.instance}`,h=await this.getCachedObject(n),i=h==null?void 0:h.common.host,s=[];t.forEach(d=>{var l,r,a,c;if(!d||d._id===n||d.common.host!==i||!((l=d.native)!=null&&l.bind))return;if(d!=null&&d.native&&d.native.secure&&d.native.leEnabled&&d.native.leUpdate){const p=parseInt(d.native.leCheckPort||d.native.lePort,10);p&&s.push({name:`${d._id.replace("system.adapter.","")} (LE)`,port:p,v6bind:d.native.bind.includes(":")?d.native.bind:d.native.v6bind,bind:d.native.bind,enabled:!!((r=d.common)!=null&&r.enabled)})}const o=parseInt((a=d==null?void 0:d.native)==null?void 0:a.port,10);o&&s.push({name:d._id.replace("system.adapter.",""),bind:d.native.bind,v6bind:d.native.bind.includes(":")?d.native.bind:d.native.v6bind,port:o,enabled:!!((c=d.common)!=null&&c.enabled)})}),this.setState({ports:s})}static getDerivedStateFromProps(e,t){const n=V.getValue(e.data,e.attr);return n==null||t.oldValue===null||t.oldValue===void 0||n.toString()!==parseInt(t._value,10).toString()&&n.toString()!==t.oldValue.toString()?{_value:n}:null}checkValue(e){if(e==null)return null;const t=this.props.schema.min??20,n=this.props.schema.max||65535;e=e.toString().trim();const h=e===""?0:parseInt(e,10);return e!==""&&Number.isNaN(h)?"ra_Not a number":e!==""&&window.isFinite(Number(e))?hn?"ra_Too big":e===""||e==="-"||Number.isNaN(h)?"ra_Not a number":null:"ra_Not a number"}renderItem(e,t){this.state.oldValue!==null&&this.state.oldValue!==void 0?(this.updateTimeout&&clearTimeout(this.updateTimeout),this.updateTimeout=setTimeout(()=>{this.updateTimeout=void 0,this.setState({oldValue:null})},30)):this.updateTimeout&&(clearTimeout(this.updateTimeout),this.updateTimeout=void 0);const n=this.props.schema.min??20,h=this.props.schema.max||65535;let i;if(this.state.ports){const s=parseInt(this.state._value,10);if(s){const d=this.props.data.bind,o=this.state.ports.filter(r=>{if(r.port!==s)return!1;const a=r.bind,c=r.v6bind;return!d||!a||d==="0.0.0.0"||a==="0.0.0.0"||d==="::"||c==="::"||d===a||d===c});let l=o.findIndex(r=>r.port===s&&r.enabled);if(l!==-1){const r=this.state.ports.find(a=>a.port===s&&a.enabled&&o.some(c=>c.name===a.name&&c.bind===a.bind));e=P.I18n.t("ra_Port is already used by %s",(r==null?void 0:r.name)||o[l].name)}else if(l=o.findIndex(r=>r.port===s&&!r.enabled),l!==-1){i=!0;const r=this.state.ports.find(a=>a.port===s&&!a.enabled&&o.some(c=>c.name===a.name&&c.bind===a.bind));e=P.I18n.t("ra_Port could be used by %s",(r==null?void 0:r.name)||o[l].name)}}}return!e&&this.state._value!==null&&this.state._value!==void 0&&(e=this.checkValue(this.state._value),typeof e=="string"&&(e=P.I18n.t(e))),$.createElement(pe,{variant:"standard",type:"number",fullWidth:!0,slotProps:{htmlInput:{min:n,max:h,readOnly:this.props.schema.readOnly||!1}},value:this.state._value??"",error:!!e,disabled:!!t,sx:i?Wp.warning:void 0,onChange:s=>{const d=Number(s.target.value.toString().replace(/[^0-9]/g,"")).toString(),o=this.checkValue(d);o?this.onError(this.props.attr,P.I18n.t(o)):this.onError(this.props.attr),this.setState({_value:d,oldValue:this.state._value},()=>{if(d.trim()===parseInt(d,10).toString()){const l=this.onChange(this.props.attr,parseInt(d,10)||0);l instanceof Promise&&l.catch(r=>{console.error(`Cannot set value for ${this.props.attr}: ${r}`)})}})},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:e&&typeof e=="string"?e:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}}class Hp extends V{async componentDidMount(){await super.componentDidMount();const e=V.getValue(this.props.data,this.props.attr);this.props.oContext.socket.getEnums("rooms").then(t=>{const n=Object.keys(t).map(h=>({value:this.props.schema.short?h.replace("enum.rooms.",""):h,label:this.getText(t[h].common.name),obj:t[h]}));this.props.schema.allowDeactivate!==!1&&n.unshift({label:P.I18n.t(V.NONE_LABEL),value:V.NONE_VALUE}),this.setState({value:e,selectOptions:n})}).catch(t=>console.error(`Cannot get enums: ${t}`))}renderItem(e,t){if(!this.state.selectOptions)return null;const n=this.state.selectOptions.find(h=>h.value===this.state.value);return $.createElement(fe,{variant:"standard",fullWidth:!0},this.props.schema.label?$.createElement(_e,null,this.getText(this.props.schema.label)):null,$.createElement(Ne,{variant:"standard",error:!!e,disabled:!!t,value:this.state.value||"_",renderValue:()=>n?n.obj?$.createElement(P.TextWithIcon,{value:n.obj,themeType:this.props.oContext.themeType,lang:P.I18n.getLanguage()}):n.label:"",onChange:h=>{this.setState({value:h.target.value==="_"?"":h.target.value},()=>this.onChange(this.props.attr,this.state.value))}},this.state.selectOptions.map(h=>$.createElement($e,{key:h.value,value:h.value,style:h.value===V.DIFFERENT_VALUE?{opacity:.5}:{}},h.obj?$.createElement(P.TextWithIcon,{value:h.obj,themeType:this.props.oContext.themeType,lang:P.I18n.getLanguage()}):h.label))),this.props.schema.help?$.createElement(ge,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const on={noMargin:{"&>div":{marginTop:0}},icon:{width:20,height:20,marginRight:4}};class zp extends V{initialValue="";async componentDidMount(){await super.componentDidMount();let e=V.getValue(this.props.data,this.props.attr);this.props.schema.multiple&&(typeof e=="string"?e=[e]:e==null&&(e=[]));const t=[];for(const n of this.props.schema.options||[]){const h=n;if(Array.isArray(h.items)){const i={label:this.getText(n.label,this.props.schema.noTranslation),value:n.value,group:!0,color:n.color,description:this.getText(n.description)};i.hiddenValue=await this.isHidden(i),t.push(i);for(const s of h.items){const d={label:this.getText(s.label,this.props.schema.noTranslation),value:s.value,hidden:s.hidden,color:s.color,description:this.getText(s.description),icon:s.icon};d.hiddenValue=await this.isHidden(d),t.push(d)}}else{const i={label:this.getText(n.label,this.props.schema.noTranslation),value:n.value,hidden:n.hidden,color:n.color,description:this.getText(n.description),icon:n.icon};i.hiddenValue=await this.isHidden(i),t.push(i)}}if(this.props.onFilterLabelUpdate&&this.props.table){const n={};for(const h of t)!h.group&&h.value!==V.DIFFERENT_VALUE&&(n[h.value.toString()]=h.label);this.props.onFilterLabelUpdate(this.props.attr,n)}Array.isArray(e)&&!this.props.schema.multiple?(this.initialValue=[...e],t.unshift({label:P.I18n.t(V.DIFFERENT_LABEL),value:V.DIFFERENT_VALUE}),this.setState({value:V.DIFFERENT_VALUE,selectOptions:t})):this.setState({value:e,selectOptions:t})}_getValue(){let e=this.state.value===null||this.state.value===void 0?V.getValue(this.props.data,this.props.attr):this.state.value;return this.props.schema.multiple&&(typeof e=="string"?e=[e]:e==null&&(e=[])),e}async isHidden(e){return e.hidden?this.props.custom?!!await this.executeCustom(e.hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):!!await this.execute(e.hidden,this.props.schema.default,this.props.data,this.props.arrayIndex,this.props.globalData):!1}renderRadio(e,t){const n=this.state.selectOptions.filter(i=>!i.hiddenValue&&!i.group),h=this._getValue();return $.createElement(fe,{fullWidth:!0,error:!!e,disabled:!!t,id:`jsonSelect_${this.props.attr}_${this.props.index||this.props.index===0?this.props.index:""}`},this.props.schema.label?$.createElement(oc,null,this.getText(this.props.schema.label)):null,$.createElement(ac,{row:!!this.props.schema.horizontal,value:h==null?"":h.toString(),onChange:i=>{const s=n.find(o=>o.value.toString()===i.target.value),d=s?s.value:i.target.value;this.setState({value:d},()=>{const o=this.onChange(this.props.attr,d);o instanceof Promise&&o.catch(l=>console.error(l))})}},n.map((i,s)=>$.createElement(Xn,{key:s,value:i.value.toString(),control:$.createElement(lc,null),title:i.description||"",label:$.createElement("span",{style:{display:"flex",alignItems:"center"}},i.icon?$.createElement(P.Icon,{src:i.icon,style:on.icon}):null,$.createElement(yt,{component:"span",style:{color:i.color}},i.label)),style:i.value===V.DIFFERENT_VALUE?{opacity:.5}:{}}))),this.props.schema.help?$.createElement(ge,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}renderItem(e,t){if(!this.state.selectOptions)return null;if(this.props.schema.format==="radio")return this.renderRadio(e,t);const n=this.state.selectOptions.filter(s=>!s.hiddenValue),h=this._getValue(),i=this.props.schema.multiple?null:n.find(s=>s.value==h);return $.createElement(fe,{variant:"standard",fullWidth:!0,sx:this.props.table!==void 0?on.noMargin:void 0,id:`jsonSelect_${this.props.attr}_${this.props.index||this.props.index===0?this.props.index:""}`},this.props.schema.label?$.createElement(_e,null,this.getText(this.props.schema.label)):null,$.createElement(Ne,{variant:"standard",error:!!e,multiple:this.props.schema.multiple,disabled:!!t,value:h||"_",renderValue:s=>this.props.schema.multiple?$.createElement("div",{style:{display:"flex",flexWrap:"wrap",gap:.5}},s.map(d=>{const o=n.find(l=>l.value===d);if(o||this.props.schema.showAllValues!==!1){const l=(o==null?void 0:o.label)||d;return $.createElement(Vs,{key:d,label:l})}return null})):i!=null&&i.color?$.createElement("span",{style:{display:"flex",alignItems:"center"}},i.icon?$.createElement(P.Icon,{src:i.icon,style:on.icon}):null,$.createElement("span",null,$.createElement("div",{style:{color:i.color}},i.label??s),i.description?$.createElement("div",{style:{opacity:.7,fontStyle:"italic",fontSize:"smaller"}},i.description):null)):(i==null?void 0:i.label)===void 0?i!=null&&i.icon?$.createElement("span",{style:{display:"flex",alignItems:"center"}},$.createElement(P.Icon,{src:i.icon,style:on.icon}),s):s:$.createElement("span",{style:{display:"flex",alignItems:"center"}},i.icon?$.createElement(P.Icon,{src:i.icon,style:on.icon}):null,$.createElement("span",null,$.createElement("div",null,i.label),i.description?$.createElement("div",{style:{opacity:.7,fontStyle:"italic",fontSize:"smaller"}},i.description):null)),onChange:s=>{this.setState({value:s.target.value==="_"?"":s.target.value},()=>{let d;this.state.value===V.DIFFERENT_VALUE?d=this.onChange(this.props.attr,this.initialValue):d=this.onChange(this.props.attr,this.state.value),d instanceof Promise&&d.catch(o=>console.error(o))})}},n.map((s,d)=>s.group?$.createElement(Lo,{key:d,style:{color:s.color}},$.createElement("div",null,s.label),s.description?$.createElement("div",{style:{opacity:.7,fontStyle:"italic",fontSize:"smaller"}},s.description):null):$.createElement($e,{key:d,value:s.value,style:s.value===V.DIFFERENT_VALUE?{opacity:.5}:{}},this.props.schema.multiple?$.createElement(Zt,{checked:h.includes(s.value),onClick:()=>{const o=JSON.parse(JSON.stringify(this._getValue())),l=h.indexOf(s.value);l!==-1?o.splice(l,1):(o.push(s.value),o.sort()),this.setState({value:o},()=>this.onChange(this.props.attr,o))}}):null,s.icon?$.createElement(P.Icon,{src:s.icon,style:on.icon}):null,$.createElement(Us,{primary:s.label,secondary:s.description,slotProps:{secondary:{style:{fontSize:"smaller",fontStyle:"italic",opacity:.7}}},style:{color:s.color}})))),this.props.schema.help?$.createElement(ge,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const Vp={menuPaper:{maxHeight:800}};class Up extends V{initialized=!1;localContext;async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){const t=await this.getPatternAsync(this.props.schema.jsonData,null,!0);try{e=JSON.parse(t)}catch{console.error(`Cannot parse json data: ${t}`)}}e===void 0&&(e=null),this.setState({running:!0},async()=>{const t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){const n=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(n!=null&&n.val)){window.alert(P.I18n.t("ra_Instance %s is not alive",t));return}}try{const n=await this.props.oContext.socket.sendTo(t,this.props.schema.command||"send",e);this.reportFilterLabels(n);for(const h of n)h.hiddenValue=await this.isHidden(h);this.setState({list:n,running:!1})}catch(n){console.error(`Cannot send command: ${n}`)}})}else{const e=V.getValue(this.props.data,this.props.attr);this.setState({value:e,running:!1})}}reportFilterLabels(e){if(this.props.onFilterLabelUpdate&&this.props.table&&Array.isArray(e)){const t={};for(const n of e)n.value!==V.DIFFERENT_VALUE&&(t[n.value]=n.label);this.props.onFilterLabelUpdate(this.props.attr,t)}}getContext(){const e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=V.getValue(this.props.data,t)),JSON.stringify(e)}_getValue(){let e=this.state.value===null||this.state.value===void 0?V.getValue(this.props.data,this.props.attr):this.state.value;return this.props.schema.multiple&&(typeof e=="string"?e=[e]:e==null&&(e=[])),e}async isHidden(e){return e.hidden?this.props.custom?!!await this.executeCustom(e.hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):!!await this.execute(e.hidden,this.props.schema.default,this.props.data,this.props.arrayIndex,this.props.globalData):!1}renderItem(e,t){if(this.props.alive){const s=this.getContext();(s!==this.localContext||!this.initialized)&&(this.localContext=s,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}const n=this._getValue();if(!this.props.alive||!this.state.running&&!Array.isArray(this.state.list))return this.props.schema.multiple||this.props.schema.manual===!1?P.I18n.t("ra_Cannot retrieve options, as instance is offline"):$.createElement(pe,{variant:"standard",fullWidth:!0,value:n,error:!!e,disabled:!!t,onChange:s=>{const d=s.target.value;this.setState({value:d},()=>this.onChange(this.props.attr,(d||"").trim()))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),slotProps:{input:{endAdornment:this.state.value&&!this.props.schema.noClearButton?$.createElement(vn,{position:"end"},$.createElement(se,{tabIndex:-1,size:"small",onClick:()=>this.setState({value:""},()=>this.onChange(this.props.attr,""))},$.createElement(ht,null))):null}}});if(this.state.running)return $.createElement(Tt,{size:"24"});const h=this.state.list.filter(s=>!s.hiddenValue),i=h.find(s=>s.value===n);return $.createElement(fe,{variant:"standard",fullWidth:!0},this.props.schema.label?$.createElement(_e,null,this.getText(this.props.schema.label)):null,$.createElement(Ne,{variant:"standard",error:!!e,multiple:this.props.schema.multiple,disabled:!!t,sx:{"&.MuiSelect-paper":this.props.schema.multiple?Vp.menuPaper:void 0},value:n,renderValue:s=>this.props.schema.multiple?$.createElement(Ie,{sx:{display:"flex",flexWrap:"wrap",gap:.5}},s.map(d=>{const o=h.find(l=>l.value===d);if(o||this.props.schema.showAllValues!==!1){const l=(o==null?void 0:o.label)||d;return $.createElement(Vs,{key:d,label:l})}return null})):this.getText((i==null?void 0:i.label)||s,this.props.schema.noTranslation),onChange:s=>{const d=this.onChange(this.props.attr,s.target.value);d instanceof Promise&&d.catch(o=>console.error(`Cannot set value: ${o}`))}},h.map((s,d)=>s.group?$.createElement(Lo,{key:d},$.createElement("div",null,this.getText(s.label,this.props.schema.noTranslation)),s.description?$.createElement("div",{style:{opacity:.7,fontStyle:"italic",fontSize:"smaller"}},this.getText(s.description)):null):$.createElement($e,{key:d,value:s.value},this.props.schema.multiple?$.createElement(Zt,{checked:n.includes(s.value.toString()),onClick:()=>{const o=JSON.parse(JSON.stringify(this._getValue())),l=n.indexOf(s.value.toString());l!==-1?o.splice(l,1):(o.push(s.value),o.sort()),this.setState({value:o},()=>this.onChange(this.props.attr,o))}}):null,$.createElement(Us,{primary:this.getText(s.label),secondary:this.getText(s.description),slotProps:{secondary:{style:{fontSize:"smaller",fontStyle:"italic",opacity:.7}}}})))),this.props.schema.help?$.createElement(ge,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const so={fullWidth:{width:"100%"}};function At(m){return m.split(".").reduce((e,t)=>(e<<8)+parseInt(t,10),0)>>>0}function Kp(m,e){var h,i;const t=(i=(h=m==null?void 0:m.native)==null?void 0:h.hardware)==null?void 0:i.networkInterfaces;if(!t)return null;let n;return Object.keys(t).forEach(s=>t[s].forEach(d=>{d.internal||e.includes(":")&&d.family!=="IPv6"||e.includes(".")&&!e.match(/[^.\d]/)&&d.family!=="IPv4"||(d.family==="IPv4"&&!d.address.startsWith("172")&&(e==="127.0.0.0"||e==="localhost"||e.match(/[^.\d]/))?n=d.address:n||(d.family==="IPv4"&&e.includes(".")&&(At(e)&At(d.netmask),At(d.address)&At(d.netmask)),n=d.address))})),n||Object.keys(t).forEach(s=>t[s].forEach(d=>{d.internal||e.includes(":")&&d.family!=="IPv6"||e.includes(".")&&!e.match(/[^.\d]/)&&d.family!=="IPv4"||(d.family==="IPv6"&&(e==="127.0.0.0"||e==="localhost"||e.match(/[^.\d]/))?n=d.address:n||(d.family==="IPv4"&&e.includes(".")&&(At(e)&At(d.netmask),At(d.address)&At(d.netmask)),n=d.address))})),n||Object.keys(t).forEach(s=>{t[s].forEach(d=>{d.internal||e.includes(":")&&d.family!=="IPv6"||e.includes(".")&&!e.match(/[^.\d]/)&&d.family!=="IPv4"||(e==="127.0.0.0"||e==="localhost"||e.match(/[^.\d]/),n=d.address)})}),n||Object.keys(t).forEach(s=>{t[s].forEach(d=>{d.internal||(n=d.address)})}),n}class ro extends V{async componentDidMount(){var t;await super.componentDidMount();let e=window.location.hostname;if(this.props.schema.openUrl){const n=await this.props.oContext.socket.getCurrentInstance(),h=await this.getCachedObject(`system.adapter.${n}`);if(h){const i=await this.getCachedObject(`system.host.${(t=h==null?void 0:h.common)==null?void 0:t.host}`);if(i){const s=Kp(i,window.location.hostname);if(s)e=`${s}:${window.location.port}`;else{console.warn(`Cannot find suitable IP in host ${h.common.host} for ${h._id}`);return}}}}await new Promise(n=>{this.setState({_error:"",_message:"",hostname:e},n)}),this.props.schema.onLoaded&&this._onClick().catch(n=>console.error(n))}renderErrorDialog(){return this.state._error?$.createElement(P.DialogError,{text:this.state._error,onClose:()=>this.setState({_error:""})}):null}renderMessageDialog(){return this.state._message?$.createElement(P.DialogMessage,{text:this.state._message,onClose:()=>this.setState({_message:""})}):null}renderCopyDialog(){return this.state._copyDialog?$.createElement(qs,{title:this.getText(this.state._copyDialog.title||P.I18n.t("ra_Result")),overflowHidden:!0,onClose:()=>{this.setState({_copyDialog:null})},onApply:()=>{P.copy(this.state._copyDialog.text),window.alert(P.I18n.t("ra_Copied")),this.setState({_copyDialog:null})},titleButtonApply:P.I18n.t("ra_Copy content")},$.createElement("div",{style:{width:"calc(100vw - 40px)",height:"calc(100vh - 188px)"}},$.createElement(sr,{mode:this.state._copyDialog.type,value:this.state._copyDialog.text,name:"CopyDialog",themeType:this.props.oContext.themeType}))):null}async _onClick(){this.props.oContext.onCommandRunning(!0),this.setState({running:!0});const e=`${window.location.protocol}//${window.location.host}${window.location.pathname.replace(/\/index\.html$/,"")}`,t=`${window.location.protocol}//${this.state.hostname.split(":").length>3?`[${this.state.hostname}]`:this.state.hostname}${window.location.pathname.replace(/\/index\.html$/,"")}`;let n=this.props.schema.data;if(n===void 0&&this.props.schema.jsonData){const s=await this.getPatternAsync(this.props.schema.jsonData,{_origin:e,_originIp:t,...this.props.data},!0);try{n=JSON.parse(s)}catch{console.error(`Cannot parse json data: ${s}`)}}n===void 0&&(n=null),this.props.schema.openUrl&&!n&&(n={_origin:e,_originIp:t});let h;this.props.schema.timeout&&(h=setTimeout(()=>{this.props.oContext.onCommandRunning(!1),this.setState({_error:P.I18n.t("ra_Request timed out"),running:!1})},parseInt(this.props.schema.timeout,10)||1e4));const i=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(i!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){const s=await this.props.oContext.socket.getState(`system.adapter.${i}.alive`);if(!(s!=null&&s.val)){window.alert(P.I18n.t("ra_Instance %s is not alive",i));return}}this.props.oContext.socket.sendTo(i,this.props.schema.command||"send",n).then(async s=>{var d,o,l,r,a,c;if(h&&(clearTimeout(h),h=void 0),s!=null&&s.error)if((d=this.props.schema.error)!=null&&d[s.error]){let p=this.getText(this.props.schema.error[s.error]);(o=s.args)==null||o.forEach(u=>p=p.replace("%s",u)),this.setState({_error:p})}else this.setState({_error:s.error?typeof s.error=="string"?P.I18n.t(s.error):JSON.stringify(s.error):P.I18n.t("ra_Error")});else{if(s!=null&&s.command){(r=(l=this.props.oContext).onBackEndCommand)==null||r.call(l,s.command);return}if(s!=null&&s.reloadBrowser&&this.props.schema.reloadBrowser)window.location.reload();else if(s!=null&&s.openUrl&&this.props.schema.openUrl)window.open(s.openUrl,s.window||this.props.schema.window||"_blank");else if(s!=null&&s.result&&((a=this.props.schema.result)!=null&&a[s.result])){let p=this.getText(this.props.schema.result[s.result]);(c=s.args)==null||c.forEach(u=>p=p.replace("%s",u)),window.alert(p)}if(s!=null&&s.native&&this.props.schema.useNative){for(const[p,u]of Object.entries(s.native))await this.onChangeAsync(p,u);setTimeout(()=>this.props.oContext.forceUpdate(Object.keys(s.native),this.props.data),300)}else s!=null&&s.result?window.alert(typeof s.result=="object"?JSON.stringify(s.result):s.result):s!=null&&s.copyDialog?this.setState({_copyDialog:s.copyDialog}):window.alert(P.I18n.t("ra_Ok"));s!=null&&s.saveConfig&&this.props.onChange(null,null,null,!0)}}).catch(s=>{this.props.schema.error&&this.props.schema.error[s.toString()]?this.setState({_error:this.getText(this.props.schema.error[s.toString()])}):this.setState({_error:P.I18n.t(s.toString())||P.I18n.t("ra_Error")})}).then(()=>{this.props.oContext.onCommandRunning(!1),this.setState({running:!1})})}renderDialogConfirm(){if(!this.state.confirmDialog)return null;const e=this.state.confirmData||this.props.schema.confirm;let t=null;return e.type==="warning"?t=$.createElement(zn,null):e.type==="error"?t=$.createElement(Jt,null):e.type==="info"&&(t=$.createElement(Mi,null)),$.createElement(P.DialogConfirm,{title:this.getText(e.title)||P.I18n.t("ra_Please confirm"),text:this.getText(e.text),ok:this.getText(e.ok)||P.I18n.t("ra_Ok"),cancel:this.getText(e.cancel)||P.I18n.t("ra_Cancel"),icon:t||void 0,onClose:n=>this.setState({confirmDialog:!1},()=>n&&this._onClick())})}renderItem(e,t){const n=this.getIcon();return $.createElement("div",{style:so.fullWidth},$.createElement(ve,{variant:this.props.schema.variant||void 0,color:this.props.schema.color||"grey",style:{...so.fullWidth,...this.props.schema.controlStyle||void 0},disabled:t||!this.props.alive,startIcon:n,title:this.props.alive?this.getText(this.props.schema.title)||"":P.I18n.t("ra_Instance %s is not alive",this.props.oContext.instance.toString()),onClick:()=>{this.props.schema.confirm?this.setState({confirmDialog:!0}):this._onClick().catch(h=>console.error(h))}},this.props.schema.showProcess&&this.state.running?$.createElement(Tt,{size:20,style:{marginRight:8}}):null,this.getText(this.props.schema.label,this.props.schema.noTranslation)),this.renderErrorDialog(),this.renderMessageDialog(),this.renderCopyDialog())}}const Gp={fullWidth:{width:"100%"}};class Jp extends V{async _onClick(){var n,h;let e=this.props.schema.val;if(typeof e=="string"&&e.includes("${")){e=await this.getPatternAsync(e,null,!0);const i=await this.getCachedObject(this.props.schema.id);((n=i==null?void 0:i.common)==null?void 0:n.type)==="number"?e=parseFloat(e):((h=i==null?void 0:i.common)==null?void 0:h.type)==="boolean"&&(e=e==="true"||e===!0||e==="1"||e===1)}const t=(this.props.schema.id||"").replace(/%INSTANCE%/g,(this.props.oContext.instance||0).toString());try{await this.props.oContext.socket.setState(t,{val:e,ack:!!this.props.schema.ack}),this.props.schema.okText&&window.alert(this.getText(this.props.schema.okText))}catch(i){this.props.schema.error&&this.props.schema.error[i.toString()]?window.alert(this.getText(this.props.schema.error[i.toString()])):window.alert(P.I18n.t(i.toString())||P.I18n.t("ra_Error"))}}renderDialogConfirm(){if(!this.state.confirmDialog)return null;const e=this.state.confirmData||this.props.schema.confirm;let t=null;return e.type==="warning"?t=$.createElement(zn,null):e.type==="error"?t=$.createElement(Jt,null):e.type==="info"&&(t=$.createElement(Mi,null)),$.createElement(P.DialogConfirm,{title:this.getText(e.title)||P.I18n.t("ra_Please confirm"),text:this.getText(e.text),ok:this.getText(e.ok)||P.I18n.t("ra_Ok"),cancel:this.getText(e.cancel)||P.I18n.t("ra_Cancel"),icon:t,onClose:n=>this.setState({confirmDialog:!1},()=>n&&this._onClick())})}renderItem(e,t){const n=this.getIcon();return $.createElement(ve,{variant:this.props.schema.variant||void 0,color:this.props.schema.color||"grey",style:Gp.fullWidth,disabled:t,onClick:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0}):await this._onClick()},startIcon:n||void 0},this.getText(this.props.schema.label,this.props.schema.noTranslation))}}const oo={fullWidth:{width:"100%"},slider:{marginLeft:10,marginRight:10,width:"calc(100% - 20px)"}};class Yp extends V{async componentDidMount(){await super.componentDidMount();const e=V.getValue(this.props.data,this.props.attr);this.setState({_value:e})}static getDerivedStateFromProps(e,t){if(e.schema.min!==void 0&&e.schema.min<0||e.schema.max!==void 0&&e.schema.max<0)return null;const n=V.getValue(e.data,e.attr);return n==null||n.toString()!==parseFloat(t._value).toString()?{_value:n}:null}renderItem(e,t){const n=this.props.schema.min||0,h=this.props.schema.max||100,i=this.props.schema.unit?this.getText(this.props.schema.unit,this.props.schema.noTranslation):"",s=[{value:n,label:n+i},{value:h,label:h+i}];return $.createElement(Ie,{style:oo.fullWidth},this.props.schema.label?$.createElement(yt,{gutterBottom:!0},this.getText(this.props.schema.label)):null,$.createElement(Mo,{style:oo.slider,value:this.state._value,getAriaValueText:d=>d+i,step:this.props.schema.step||(h-n)/100,valueLabelDisplay:"auto",marks:s,min:n,max:h,disabled:!!t,onChange:d=>{const o=d.target.value;this.setState({_value:o},()=>this.onChange(this.props.attr,o))}}),this.props.schema.help?$.createElement(yt,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}function Dt(m,e){return m==="edit"||m==="rename"?$.createElement(Fo,{style:e}):m==="delete"?$.createElement(_t,{style:e}):m==="refresh"?$.createElement(Ks,{style:e}):m==="newDevice"||m==="new"||m==="add"?$.createElement(Un,{style:e}):m==="discover"||m==="search"?$.createElement(Oo,{style:e}):m==="unpairDevice"||m==="unpair"?$.createElement(Bo,{style:e}):m==="pairDevice"||m==="pair"?$.createElement(Po,{style:e}):m==="identify"?$.createElement(Mc,{style:e}):m==="play"?$.createElement(Js,{style:e}):m==="stop"?$.createElement(Ic,{style:e}):m==="pause"?$.createElement(Oc,{style:e}):m==="forward"||m==="next"?$.createElement(Fc,{style:e}):m==="rewind"||m==="previous"?$.createElement(Rc,{style:e}):m==="lamp"||m==="light"?$.createElement(Nc,{style:e}):m==="backlight"?$.createElement(Bc,{style:e}):m==="dimmer"?$.createElement(Pc,{style:e}):m==="socket"?$.createElement(Wc,{style:e}):m==="settings"?$.createElement(jc,{style:e}):m==="users"||m==="group"?$.createElement(No,{style:e}):m==="user"?$.createElement(Ro,{style:e}):m==="qrcode"?$.createElement(Hc,{style:e}):m==="connection"?$.createElement(zc,{style:e}):m==="no-connection"?$.createElement(Vc,{style:e}):m==="visible"?$.createElement(zo,{style:e}):null}function Qp(m,e){return typeof e=="string"?{"@keyframes newStateAnimationOnceColor":{"0%":{color:e},"100%":{color:m.palette.mode==="dark"?"#fff":"#000"}},animation:"newStateAnimationOnceColor 2s ease-in-out"}:{"@keyframes newStateAnimationOnce":{"0%":{color:"#00f900"},"80%":{color:m.palette.mode==="dark"?"#518851":"#008000"},"100%":{color:m.palette.mode==="dark"?"#fff":"#000"}},animation:"newStateAnimationOnce 2s ease-in-out"}}class Xp extends V{controlTimeout=null;delayedUpdate={timer:null,value:null};async getObjectID(){let e=(this.props.schema.oid||"").toString();return e.includes("${")&&(e=await this.getPatternAsync(e,null,!0)),this.props.schema.foreign?e:`${this.props.schema.system?"system.adapter.":""}${this.props.oContext.adapterName}.${this.props.oContext.instance||0}.${e}`}async componentDidMount(){var h,i;await super.componentDidMount();const e=await this.getObjectID(),t=await this.getCachedObject(e);if((h=t==null?void 0:t.common)!=null&&h.states&&!this.props.schema.options){if(Array.isArray((i=t==null?void 0:t.common)==null?void 0:i.states)){const s={};t.common.states.forEach((d,o)=>{s[o.toString()]=d}),t.common.states=s}Object.keys(t.common.states).length||(t.common.states=void 0)}const n=this.props.schema.control||this.detectType(t);try{const s=await this.props.oContext.socket.getState(e);this.setState({stateValue:s?s.val:null,controlType:n,obj:t,objId:e},async()=>{const d=await this.getObjectID();await this.props.oContext.socket.subscribeState(d,this.onStateChanged)})}catch(s){console.error(`Cannot get state ${e}: ${s}`),this.setState({controlType:n,obj:t,objId:e})}}componentWillUnmount(){super.componentWillUnmount(),this.state.objId&&this.props.oContext.socket.unsubscribeState(this.state.objId,this.onStateChanged),this.delayedUpdate.timer&&(clearTimeout(this.delayedUpdate.timer),this.delayedUpdate.timer=null),this.controlTimeout&&(clearTimeout(this.controlTimeout),this.controlTimeout=null,this.state.objId&&this.props.oContext.socket.setState(this.state.objId,this.state.stateValue,!1).catch(e=>console.error(`Cannot control value: ${e.toString()}`)))}onStateChanged=(e,t)=>{let n=t?t.val:null;this.state.controlType==="button"||this.state.controlType==="switch"?(n=!!n,this.state.stateValue!==n&&this.setState({stateValue:n})):n!==null&&(this.state.controlType==="slider"||this.state.controlType==="number")?(n=parseFloat(n),console.log(`${Date.now()} Received new value: ${n}`),n!==this.state.stateValue?(this.delayedUpdate.timer&&(clearTimeout(this.delayedUpdate.timer),this.delayedUpdate.timer=null),this.delayedUpdate.value=n,this.delayedUpdate.timer=setTimeout(()=>{this.setState({stateValue:this.delayedUpdate.value})},500)):this.delayedUpdate.timer&&(clearTimeout(this.delayedUpdate.timer),this.delayedUpdate.timer=null)):this.state.stateValue.toString()!==n.toString()&&this.setState({stateValue:n})};detectType(e){if(e||={},e.common||={},e.common.type==="boolean"){if(this.props.schema.controlled!==!1){if(e.common.read===!1||this.props.schema.controlled===!0)return"button";if(e.common.write||this.props.schema.controlled===!0)return"switch"}return"text"}return e.common.type==="number"&&this.props.schema.controlled!==!1?e.common.write||this.props.schema.controlled===!0?e.common.states||this.props.schema.options?"select":e.common.max!==void 0?"slider":"input":"text":e.common.write&&this.props.schema.controlled!==!1?e.common.states||this.props.schema.options?"select":"input":"text"}getNormalizedStates(){let e;return this.props.schema.options?e=this.props.schema.options.map(t=>typeof t=="string"?{value:t,label:this.getText(t,this.props.schema.noTranslation)}:{value:t.value,label:this.getText(t.label,this.props.schema.noTranslation),color:t.color}):this.state.obj.common.states?(e=[],Object.keys(this.state.obj.common.states).forEach(t=>{e.push({value:t,label:this.getText(this.state.obj.common.states[t],this.props.schema.noTranslation)})})):e=[],e}renderItem(e,t){var h,i,s,d,o;if(!this.state.obj)return null;let n;if(this.state.controlType==="select"||!this.state.controlType&&(this.state.obj.common.type==="number"||this.state.obj.common.type==="string")&&this.state.obj.common.write!==!1&&(this.props.schema.options||this.state.obj.common.states)){const l=this.getNormalizedStates(),r=l.find(a=>a.value===this.state.stateValue);n=$.createElement(fe,{fullWidth:!0},$.createElement(_e,null,this.getText(this.props.schema.label)),$.createElement(Ne,{value:this.state.stateValue,disabled:!!this.props.schema.readOnly||t,onChange:a=>{this.setState({stateValue:a.target.value},()=>{let c=this.state.stateValue;this.state.obj.common.type==="number"&&(c=parseFloat(c.toString().replace(",","."))),this.props.oContext.socket.setState(this.state.objId,c,!1)})},renderValue:a=>r!=null&&r.color?$.createElement("div",{style:{color:r.color}},r.label):a},l.map(a=>$.createElement($e,{key:(a.value??"").toString(),value:a.value,style:{color:a.color}},"$",a.label))))}else if(this.state.controlType==="button"||!this.state.controlType&&this.state.obj.common.type==="boolean"&&(this.state.obj.common.write&&this.state.obj.common.read===!1||(h=this.state.obj.common.role)!=null&&h.includes("button"))){let l=null;this.props.schema.falseImage&&(l=Dt(this.props.schema.falseImage));const r=this.getText(this.props.schema.falseText||this.props.schema.label,this.props.schema.noTranslation);!r&&l?n=$.createElement(se,{style:this.props.schema.falseTextStyle,disabled:!!this.props.schema.readOnly,onClick:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0,confirmCallback:async a=>{a&&await this.props.oContext.socket.setState(this.state.objId,this.props.schema.buttonValue!==void 0?this.props.schema.buttonValue:!0,!1)}}):await this.props.oContext.socket.setState(this.state.objId,this.props.schema.buttonValue!==void 0?this.props.schema.buttonValue:!0,!1)}},l):n=$.createElement(ve,{variant:this.props.schema.variant||"contained",startIcon:l,style:this.props.schema.falseTextStyle,disabled:t||!!this.props.schema.readOnly,onClick:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0,confirmCallback:async a=>{a&&await this.props.oContext.socket.setState(this.state.objId,this.props.schema.buttonValue!==void 0?this.props.schema.buttonValue:!0,!1)}}):await this.props.oContext.socket.setState(this.state.objId,this.props.schema.buttonValue!==void 0?this.props.schema.buttonValue:!0,!1)}},r||(this.state.objId||"").split(".").pop())}else if(this.state.controlType==="input"||!this.state.controlType&&this.state.obj.common.write&&this.state.obj.common.type==="string")n=$.createElement("div",{style:{width:"100%",display:"flex",flexDirection:"row",gap:8,alignItems:"baseline"}},$.createElement(pe,{style:{flex:1},value:this.state.stateValue,variant:"standard",disabled:!!this.props.schema.readOnly||t,slotProps:{input:{endAdornment:this.getText(this.props.schema.unit,this.props.schema.noTranslation)||this.state.obj.common.unit||void 0},htmlInput:{readOnly:!!this.props.schema.readOnly}},onKeyUp:l=>{this.props.schema.setOnEnterKey&&l.key==="Enter"&&this.props.oContext.socket.setState(this.state.objId,this.state.stateValue,!1)},onChange:l=>{this.setState({stateValue:l.target.value},()=>{this.props.schema.setOnEnterKey||this.props.schema.showEnterButton||(this.controlTimeout&&clearTimeout(this.controlTimeout),this.controlTimeout=setTimeout(async()=>{this.controlTimeout=null;let r=this.state.stateValue;this.state.obj.common.type==="number"&&(r=parseFloat(r.toString().replace(",","."))),await this.props.oContext.socket.setState(this.state.objId,r,!1)},this.props.schema.controlDelay||0))})},label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}),this.props.schema.showEnterButton&&!this.props.schema.readOnly&&$.createElement(ve,{variant:"outlined",disabled:t,onClick:()=>{this.props.oContext.socket.setState(this.state.objId,this.state.stateValue,!1)}},this.getText(typeof this.props.schema.showEnterButton=="string"?this.props.schema.showEnterButton:"Set")));else{let l;this.props.schema.size==="normal"?l=16:this.props.schema.size==="large"?l=20:typeof this.props.schema.size=="number"&&(l=this.props.schema.size);let r=this.getText(this.props.schema.label,this.props.schema.noTranslation);const a={display:"flex",alignItems:"center",fontSize:l||"1rem",gap:8};this.props.schema.narrow||(a.width="100%",a.justifyContent="space-between"),r.trim()&&!r.trim().endsWith(":")&&this.props.schema.addColon&&(r=`${r.trim()}:`);let c;this.props.schema.blinkOnUpdate&&(c=Qp(this.props.oContext.theme,this.props.schema.blinkOnUpdate));let p;this.props.schema.labelIcon&&(p=$.createElement(P.Icon,{src:this.props.schema.labelIcon,style:{marginRight:4}}));let u;if(r&&p?u=$.createElement("div",{style:{whiteSpace:"nowrap"}},p,r):r?u=$.createElement("div",{style:{whiteSpace:"nowrap"}},r):p&&(u=p),this.state.controlType==="switch"||!this.state.controlType&&this.state.obj.common.type==="boolean"&&(this.state.obj.common.write&&this.state.obj.common.read!==!1||(i=this.state.obj.common.role)!=null&&i.includes("switch"))){let f=null;const g=this.getText(this.props.schema.falseText,this.props.schema.noTranslation);this.props.schema.falseImage&&(f=Dt(this.props.schema.falseImage,g?{marginLeft:8}:void 0));let v=null;const b=this.getText(this.props.schema.trueText,this.props.schema.noTranslation);this.props.schema.trueImage&&(v=Dt(this.props.schema.trueImage,b?{marginRight:8}:void 0)),n=$.createElement(cc,{checked:!!this.state.stateValue,disabled:!!this.props.schema.readOnly||t,onChange:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0,confirmCallback:async D=>{D&&await this.props.oContext.socket.setState(this.state.objId,!this.state.stateValue,!1)}}):await this.props.oContext.socket.setState(this.state.objId,!this.state.stateValue,!1)}}),(g||f||b||v)&&(n=$.createElement("div",{style:{display:"flex",alignItems:"center",fontSize:14}},$.createElement("span",{style:this.props.schema.falseTextStyle},g,f),n,$.createElement("span",{style:this.props.schema.trueTextStyle},v,b))),u&&(n=$.createElement("div",{style:a},u,n))}else if(this.state.controlType==="slider"||!this.state.controlType&&this.state.obj.common.type==="number"&&(this.state.obj.common.write&&(this.state.obj.common.max!==void 0||this.state.obj.common.unit==="%")||(s=this.state.obj.common.role)!=null&&s.includes("slider")||(d=this.state.obj.common.role)!=null&&d.includes("dimmer")||(o=this.state.obj.common.role)!=null&&o.includes("blind"))){let f=null;const g=this.getText(this.props.schema.falseText,this.props.schema.noTranslation);this.props.schema.falseImage&&(f=Dt(this.props.schema.falseImage,g?{marginLeft:8}:void 0));let v=null;const b=this.getText(this.props.schema.trueText,this.props.schema.noTranslation);this.props.schema.trueImage&&(v=Dt(this.props.schema.trueImage,b?{marginRight:8}:void 0));const D=this.props.schema.min??(this.state.obj.common.min||0),E=this.props.schema.max??this.state.obj.common.max??100,w=this.props.schema.step??(this.state.obj.common.step||1);n=$.createElement(Mo,{style:{width:"100%",flexGrow:1},min:D,max:E,disabled:!!this.props.schema.readOnly||t,step:w,value:this.state.stateValue,valueLabelDisplay:"auto",valueLabelFormat:y=>{let A=this.props.schema.digits!==void 0?y.toFixed(this.props.schema.digits):y.toString();return this.props.oContext.isFloatComma&&(A=A.replace(".",",")),`${A}${this.getText(this.props.schema.unit,this.props.schema.noTranslation)||this.state.obj.common.unit||""}`},onChange:(y,A)=>{this.setState({stateValue:A},()=>{this.controlTimeout&&clearTimeout(this.controlTimeout),this.controlTimeout=setTimeout(async()=>{console.log(`${Date.now()} Send new value: ${this.state.stateValue}`),this.controlTimeout=null,await this.props.oContext.socket.setState(this.state.objId,this.state.stateValue,!1)},this.props.schema.controlDelay||0)})}}),(g||f||b||v)&&(n=$.createElement("div",{style:{display:"flex",width:"100%",flexGrow:1,alignItems:"center"}},$.createElement("span",{style:{marginRight:16,...this.props.schema.falseTextStyle}},g,f),n,$.createElement("span",{style:{marginLeft:16,...this.props.schema.trueTextStyle}},v,b))),u&&(n=$.createElement("div",{style:a},u,n))}else if(this.state.obj.common.type==="number"&&this.state.obj.common.write&&!this.state.controlType){const f=this.props.schema.min??this.state.obj.common.min??void 0,g=this.props.schema.max??this.state.obj.common.max??void 0,v=this.props.schema.step??this.state.obj.common.step??void 0;n=$.createElement(pe,{variant:"standard",style:{width:"100%"},value:this.state.stateValue,type:"number",disabled:!!this.props.schema.readOnly||t,slotProps:{htmlInput:{min:f,max:g,step:v,readOnly:!!this.props.schema.readOnly},input:{endAdornment:this.getText(this.props.schema.unit,this.props.schema.noTranslation)||this.state.obj.common.unit||void 0}},onChange:b=>{this.setState({stateValue:b.target.value},()=>{this.controlTimeout&&clearTimeout(this.controlTimeout),this.controlTimeout=setTimeout(async()=>{this.controlTimeout=null;const D=parseFloat(this.state.stateValue);await this.props.oContext.socket.setState(this.state.objId,D,!1)},this.props.schema.controlDelay||0)})},label:this.getText(this.props.schema.label,this.props.schema.noTranslation),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}else if(this.state.obj.common.type==="boolean"){let f=null,g,v;this.state.stateValue?(g=this.getText(this.props.schema.trueText,this.props.schema.noTranslation),this.props.schema.trueImage&&(f=Dt(this.props.schema.falseImage,g?{marginRight:8}:void 0)),v=this.props.schema.trueTextStyle):(g=this.getText(this.props.schema.falseText,this.props.schema.noTranslation),this.props.schema.falseImage&&(f=Dt(this.props.schema.falseImage,g?{marginLeft:8}:void 0)),v=this.props.schema.falseTextStyle),v=Object.assign(a,v),n=$.createElement("div",{style:v},u,$.createElement(Ie,{style:{display:"flex",alignItems:"center",gap:8},sx:c,key:this.props.schema.blinkOnUpdate?g:void 0},f,g||(this.state.stateValue?P.I18n.t("ra_true"):P.I18n.t("ra_false"))))}else{const f=this.getText(this.props.schema.unit,this.props.schema.noTranslation)||this.state.obj.common.unit;let g=this.state.stateValue;if(g!=null&&(this.props.schema.options||this.state.obj.common.states)){const E=this.getNormalizedStates().find(w=>w.value.toString()===g.toString());E&&(g=E.label)}let v,b;this.state.controlType==="html"?(b=(g||"").toString(),v=$.createElement("span",{dangerouslySetInnerHTML:{__html:g}})):this.state.stateValue===null?(v="null",b=v):this.state.stateValue===void 0?(v="undefined",b=v):(this.props.schema.digits!==void 0&&typeof g=="number"?(v=g.toFixed(this.props.schema.digits),this.props.oContext.isFloatComma&&(v=v.replace(".",","))):v=g.toString(),b=v),n=$.createElement("div",{style:a},u,$.createElement("div",{style:{display:"flex",alignItems:"baseline",gap:4}},$.createElement(Ie,{sx:c,key:this.props.schema.blinkOnUpdate?b:void 0},v),f?$.createElement("span",{style:{opacity:.7,fontSize:"smaller"}},f):null))}}return n}}const bs={fullWidth:m=>({width:"100%",backgroundColor:m.palette.mode==="dark"?"#FFF":"#000",borderStyle:"hidden"}),primary:m=>({backgroundColor:m.palette.primary.main}),secondary:m=>({backgroundColor:m.palette.secondary.main})};class Zp extends V{renderItem(){return $.createElement(Ie,{component:"hr",sx:P.Utils.getStyle(this.props.oContext.theme,bs.fullWidth,this.props.schema.color==="primary"?bs.primary:this.props.schema.color==="secondary"?bs.secondary:{backgroundColor:this.props.schema.color||(this.props.oContext.themeType==="dark"?"#333":"#ddd")},{height:this.props.schema.color?this.props.schema.height||2:this.props.schema.height||1})})}}const qp={header:m=>({width:"100%",background:m.palette.primary.main,color:m.palette.primary.contrastText,padding:"4px !important",borderRadius:"3px",marginBlockEnd:0,marginBlockStart:0})};class ed extends V{renderItem(){let e="h5";switch((this.props.schema.size||5).toString()){case"1":e="h1";break;case"2":e="h2";break;case"3":e="h3";break;case"4":e="h4";break;default:e="h5";break}return $.createElement(Ie,{component:e,sx:qp.header},this.getText(this.props.schema.label||this.props.schema.text,this.props.schema.noTranslation))}}class td extends V{getSrc(){let e=this.props.schema.src;return e&&!e.startsWith(".")&&!e.startsWith("http")&&!e.startsWith(`adapter/${this.props.oContext.adapterName}/`)&&!e.startsWith(`./adapter/${this.props.oContext.adapterName}/`)&&(e=`${this.props.oContext.imagePrefix}/adapter/${this.props.oContext.adapterName}/${e}`),e}renderItem(){const{schema:e}=this.props,t=this.getSrc();if(e.showInDialog){const n=e.showInDialogSmallSize||100,h=e.showInDialogButtonLabel?this.getText(e.showInDialogButtonLabel):"";return $.createElement($.Fragment,null,$.createElement(me,{title:P.I18n.t("ra_Click to see in full size")},$.createElement("img",{src:t,style:{cursor:"pointer",width:"auto",height:n,objectFit:"contain"},alt:"",onClick:()=>this.setState({showDialog:!0})}))," ",h?$.createElement(ve,{variant:"outlined",color:"grey",onClick:()=>this.setState({showDialog:!0})},h):null,this.state.showDialog?$.createElement(Lt,{open:!0,onClose:()=>this.setState({showDialog:!1}),maxWidth:"lg"},$.createElement(Kt,null,$.createElement(P.Icon,{src:t,style:{width:"100%",height:"100%",objectFit:"contain"}})),$.createElement(Gt,null,$.createElement(ve,{variant:"contained",onClick:()=>this.setState({showDialog:!1}),color:"primary"},P.I18n.t("ra_Close")))):null)}return $.createElement("img",{src:t,style:{cursor:e.href?"pointer":void 0,width:"100%",height:"100%"},onClick:e.href?()=>e.href&&window.open(e.href,"_blank"):null,alt:""})}}function ao(m,e,t){return typeof t=="string"?{"@keyframes newValueAnimationOnceColor":{"0%":{color:e?`${t} !important`:t},"100%":{color:m.palette.mode==="dark"?e?"#fff !important":"#fff":e?"#000 !important":"#000"}},animation:"newValueAnimationOnceColor 2s ease-in-out"}:{"@keyframes newValueAnimationOnce":{"0%":{color:e?"#00f900 !important":"#00f900"},"80%":{color:m.palette.mode==="dark"?e?"#518851 !important":"#518851":e?"#008000 !important":"#008000"},"100%":{color:m.palette.mode==="dark"?e?"#fff !important":"#fff":e?"#000 !important":"#000"}},animation:"newValueAnimationOnce 2s ease-in-out"}}function lo(m,e){return typeof e=="string"?{"@keyframes blinkAnimationColor":{"0%":{color:e},"100%":{color:m.palette.mode==="dark"?"#fff":"#000"}},animation:"blinkAnimationColor 2s ease-in-out infinite"}:{"@keyframes blinkAnimation":{"0%":{color:"#00f900"},"80%":{color:m.palette.mode==="dark"?"#518851":"#008000"},"100%":{color:m.palette.mode==="dark"?"#fff":"#000"}},animation:"blinkAnimation 2s ease-in-out infinite"}}const an={label:{fontWeight:"bold",whiteSpace:"nowrap"},valueImage:{maxHeight:"100%"},valueAndUnit:{display:"flex",gap:4,alignItems:"baseline"},value:{},unit:{fontSize:"smaller",opacity:.7}};class nd extends V{renderItem(e){let t=this.getText(this.props.schema.text||this.props.schema.label,this.props.schema.noTranslation);this.props.schema.addColon&&typeof t=="string"&&!t.trim().endsWith(":")&&(t=`${t.trim()}:`),t&&(t.includes("
")||t.includes(""))&&(t=P.Utils.renderTextWithA(t));let n;this.props.schema.size==="normal"?n=16:this.props.schema.size==="large"?n=20:typeof this.props.schema.size=="number"&&(n=this.props.schema.size);const h={width:"100%",height:"100%",display:"flex",alignItems:"center",position:"relative",fontSize:n};this.props.schema.narrow?h.gap=8:h.justifyContent="space-between";let i,s;this.props.schema.data&&typeof this.props.schema.data=="object"&&this.props.schema.data.en?s=this.getText(this.props.schema.data):typeof this.props.schema.data=="object"||this.props.schema.data===void 0||this.props.schema.data===null?s=JSON.stringify(this.props.schema.data):typeof this.props.schema.data=="number"?(s=this.props.schema.data.toString(),this.props.oContext.isFloatComma&&(s=s.replace(".",","))):(!this.props.schema.booleanAsCheckbox||typeof this.props.schema.data!="boolean")&&(s=this.props.schema.data.toString());let d=!1;if(this.props.schema.booleanAsCheckbox&&typeof this.props.schema.data=="boolean")i=$.createElement(Zt,{checked:!!i,disabled:!0,size:this.props.schema.size==="small"?"small":this.props.schema.size==="large"?"large":void 0});else if(s.startsWith("data:image/"))i=$.createElement("div",{style:{...an.value,...an.valueImage,...this.props.schema.styleValue||void 0}},$.createElement(P.Icon,{src:s}));else{const a={...an.value,...this.props.schema.styleValue||void 0};this.props.schema.html?i=$.createElement("div",{style:a,dangerouslySetInnerHTML:{__html:s}}):Array.isArray(this.props.schema.data)?(d=!0,i=$.createElement("div",{style:a},this.props.schema.data.map((c,p)=>$.createElement("div",{key:p},typeof c=="object"||c===null||c===void 0?JSON.stringify(c):c)))):s.includes(` +`)?(d=!0,i=$.createElement("div",{style:a},P.Utils.renderTextWithA(s))):i=$.createElement("div",{style:a},s)}if(this.props.schema.blinkOnUpdate&&this.props.schema.blink){const a=ao(this.props.oContext.theme,!0,this.props.schema.blinkOnUpdate),c=lo(this.props.oContext.theme,this.props.schema.blink);i=$.createElement(Ie,{key:s,sx:{...a,...c}},i)}else if(this.props.schema.blinkOnUpdate){const a=ao(this.props.oContext.theme,!1,this.props.schema.blinkOnUpdate);i=$.createElement(Ie,{key:s,sx:a},i)}else if(this.props.schema.blink){const a=lo(this.props.oContext.theme,this.props.schema.blink);i=$.createElement(Ie,{sx:a},i)}this.props.schema.unit&&(i=$.createElement("div",{style:an.valueAndUnit},i,$.createElement("div",{style:{...an.unit,...this.props.schema.styleUnit||void 0}},this.getText(this.props.schema.unit,this.props.schema.noTranslation))));let o;this.props.schema.labelIcon&&(o=$.createElement(P.Icon,{src:this.props.schema.labelIcon,style:{marginRight:4}}));let l;this.props.schema.copyToClipboard&&(l=$.createElement(fn,{className:"staticCopyButton",style:{position:"absolute",top:"calc(50% - 12px)",right:0,cursor:"pointer"},onClick:()=>{P.Utils.copyToClipboard(s),window.alert(P.I18n.t("ra_Copied"))}}));const r={"& .staticCopyButton":{display:"none"},"& .staticCopyButton:action":{transform:"scale(0.9)"},"&:hover .staticCopyButton":{display:"block"}};return this.props.schema.highlight&&(r["&:hover"]={backgroundColor:this.props.oContext.themeType==="dark"?"#51515180":"#b8b8b880"}),d&&(h.alignItems="top"),$.createElement(Ie,{component:"div",style:h,sx:r},$.createElement("div",{style:{...an.label,...this.props.schema.styleLabel||void 0}},o,t),i,l)}}const co={fullWidth:{height:"100%",width:"100%"},link:m=>({textDecoration:"underline",color:m.palette.mode==="dark"?"#4dabf5":"#254e72",cursor:"pointer"})};function ho(m,e,t){let n,h="";m?m.toString().startsWith("#")||m.toString().startsWith("/")?(n=e||"_self",h=m):m.startsWith("http://")||m.startsWith("https://")?(n=e||"_blank",h=m):(h=`#tab-instances/config/${t}/${m}`,n=e||"_self"):(h=`#tab-instances/config/${t}`,n=e||"_self"),n==="_self"?setTimeout(i=>{i.startsWith("#")?window.location.hash=i:i.startsWith("/")?h=`${window.location.protocol}:${window.location.host}${h}`:(i.startsWith("http://")||i.startsWith("https://"))&&(window.location.href=i)},100,h):(h.startsWith("#")?h=`${window.location.protocol}:${window.location.host}${window.location.pathname}${h}`:h.startsWith("/")&&(h=`${window.location.protocol}:${window.location.host}${h}`),window.open(h,n))}class uo extends V{renderItem(e,t){if(this.props.schema.button){const h=this.getIcon();return $.createElement(ve,{variant:this.props.schema.variant||void 0,color:this.props.schema.color||"grey",style:{...co.fullWidth,...this.props.schema.controlStyle||void 0},disabled:t,startIcon:h,onClick:this.props.schema.href?()=>{const i=this.props.schema.href?this.getText(this.props.schema.href,!0):null;i&&(this.props.oContext.onBackEndCommand?this.props.oContext.onBackEndCommand({command:"link",url:i,target:this.props.schema.target,close:this.props.schema.close}):ho(i,this.props.schema.target,`${this.props.oContext.adapterName}.${this.props.oContext.instance}`))}:null},this.getText(this.props.schema.text||this.props.schema.label,this.props.schema.noTranslation))}let n=this.getText(this.props.schema.text||this.props.schema.label,this.props.schema.noTranslation);if(this.props.schema.format==="html")n=$.createElement("div",{dangerouslySetInnerHTML:{__html:n}});else if(this.props.schema.format==="json")try{const h=typeof n=="string"?JSON.parse(n):n;n=$.createElement("pre",{style:{whiteSpace:"pre-wrap",wordBreak:"break-word",margin:0}},JSON.stringify(h,null,2))}catch{}else n&&(n.includes("")||n.includes(""))&&(n=P.Utils.renderTextWithA(n));return $.createElement(Ie,{component:"span",style:{...this.props.schema.controlStyle||void 0},sx:this.props.schema.href?co.link:void 0,onClick:this.props.schema.href?()=>{const h=this.props.schema.href?this.getText(this.props.schema.href,!0):null;h&&(this.props.oContext.onBackEndCommand?this.props.oContext.onBackEndCommand({command:"link",url:h,target:this.props.schema.target||"_blank",close:this.props.schema.close}):ho(h,this.props.schema.target||"_blank",`${this.props.oContext.adapterName}.${this.props.oContext.instance}`))}:null},n)}}const ws=1024*1024,re={paper:{width:"100%",marginBottom:16,backgroundColor:"rgba(255, 255, 255, 0.1)"},headerText:{width:"100%"},table:{minWidth:750},label:{display:"flex",justifyContent:"space-between"},title:{flex:"1 1 100%"},rootTool:{paddingLeft:16,paddingRight:8},silver:{opacity:.2},flex:{display:"flex",alignItems:"baseline"},filteredOut:{padding:10,display:"flex",textAlign:"center"},buttonEmpty:{width:34,display:"inline-block"},buttonCell:{whiteSpace:"nowrap"},dropZone:{width:"100%",height:100,position:"relative"},dropZoneEmpty:{},uploadDiv:{position:"relative",width:"100%",minHeight:300,opacity:.9,marginTop:30,cursor:"pointer",outline:"none"},uploadDivDragging:{opacity:1,background:"rgba(128,255,128,0.1)"},uploadCenterDiv:{margin:5,border:"3px dashed grey",borderRadius:5,width:"calc(100% - 10px)",height:"calc(100% - 10px)",minHeight:300,position:"relative",display:"flex"},uploadCenterIcon:{paddingTop:10,width:48,height:48},uploadCenterText:{fontSize:16},uploadCenterTextAndIcon:{textAlign:"center",position:"absolute",top:0,bottom:0,left:0,right:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},tooltip:{pointerEvents:"none"},cardHeader:m=>({color:m.palette.mode==="light"?m.palette.secondary.main:m.palette.text.primary,height:"100%",fontWeight:"bold",fontSize:20,fontStyle:"italic",padding:"4px 16px",backgroundColor:m.palette.primary.main,display:"flex",justifyContent:"space-between"})};function id(m,e,t){e=e||"key";const n=[];return Object.keys(m).forEach(h=>{const i={};i[e]=h,t?(i[t]=m[h],n.push(i)):n.push(Object.assign(i,m[h]))}),n}function po(m,e,t){e=e||"key";const n={};return m.forEach(h=>{const i=h[e]??"";delete h[e],t?n[i]=h[t]:n[i]=h}),n}function sd(m,e){let t="";for(let n=0;n{t.filter&&(this.filterRefs[t.attr]=Xl())}),this.refDiv=$.createRef()}async componentDidMount(){var i;await super.componentDidMount();const e=V.getValue(this.props.data,this.props.attr)||[];let t;if(this.props.schema.objKeyName?t=id(e,this.props.schema.objKeyName,this.props.schema.objValueName):t=e,Array.isArray(t)||(t=[]),this.props.schema.encryptedAttributes){let s;try{this.props.oContext.socket.getCompactSystemConfig?s=await this.props.oContext.socket.getCompactSystemConfig():s=await this.getCachedObject("system.config")}catch(d){console.error(`Cannot get system configuration: ${d}`)}this.secret=((i=s==null?void 0:s.native)==null?void 0:i.secret)||this.secret,e.forEach(d=>{this.props.schema.encryptedAttributes.forEach(o=>{d[o]&&(d[o]=rd(this.secret,d[o]))})})}const n=window.localStorage.getItem(`table.collapsed.${this.props.oContext.instance}.${this.props.attr}`);let h=[];if(n)try{h=JSON.parse(n)}catch{}this.setState({value:t,visibleValue:null,orderBy:"",order:"asc",iteration:0,filterOn:[],width:0,tableErrors:{},collapsed:h,filterLabelMap:{}},()=>this.validateUniqueProps())}componentWillUnmount(){this.typingTimer&&(clearTimeout(this.typingTimer),this.typingTimer=null),this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=null),this.refreshBecauseOfHiddenElements&&(clearTimeout(this.refreshBecauseOfHiddenElements),this.refreshBecauseOfHiddenElements=null),super.componentWillUnmount()}itemTable(e,t,n,h){var o;const{schema:i}=this.props,s=(o=i.items)==null?void 0:o.find(l=>l.attr===e);if(!s)return null;const d={items:{[e]:s}};return $.createElement(tn,{oContext:this.props.oContext,alive:this.props.alive,arrayIndex:n,changed:this.props.changed,common:this.props.common,expertMode:this.props.expertMode,custom:!0,data:t,globalData:this.props.data,index:n+this.state.iteration,onChange:(l,r)=>{const a=JSON.parse(JSON.stringify(this.state.value));a[n][l]=r,this.setState({value:a},()=>{this.validateUniqueProps(),this.onChangeWrapper(a,!0)})},onError:this.onTableRowError(n),originalData:this.props.originalData,schema:d,table:!0,themeName:this.props.themeName,onFilterLabelUpdate:(l,r)=>{const a=this.state.filterLabelMap[l],c={...a,...r};JSON.stringify(a)!==JSON.stringify(c)&&this.setState(p=>({filterLabelMap:{...p.filterLabelMap,[l]:c}}))},customComponents:this.props.customComponents,onHiddenChanged:h?(l,r)=>{if(r)this.listOfHiddenElements[n]||=[],this.listOfHiddenElements[n].includes(l)||(this.listOfHiddenElements[n].push(l),this.refreshBecauseOfHiddenElements&&clearTimeout(this.refreshBecauseOfHiddenElements),this.refreshBecauseOfHiddenElements=setTimeout(()=>{this.forceUpdate()},100));else if(this.listOfHiddenElements[n]){const a=this.listOfHiddenElements[n].indexOf(l);a!==-1&&(this.listOfHiddenElements[n].splice(a,1),this.refreshBecauseOfHiddenElements&&clearTimeout(this.refreshBecauseOfHiddenElements),this.refreshBecauseOfHiddenElements=setTimeout(()=>{this.forceUpdate()},100))}}:void 0})}validateUniqueProps(){if(!this.props.schema.uniqueColumns)return;let e=null,t=null;for(const n of this.props.schema.uniqueColumns){const h=[];this.state.value.find(s=>{const d=s[n];return h.includes(d)?(e||(e=n,t=d),this.onError(n,"is not unique"),!0):(h.push(d),!1)})||this.onError(n,null)}e?this.setState({errorMessage:P.I18n.t('Non-allowed duplicate entry "%s" in column "%s"',t,e)}):this.setState({errorMessage:""})}onTableRowError=e=>(t,n)=>{const h={...this.state.tableErrors};h[e]||(h[e]={}),n?h[e][t]=n:(delete h[e][t],Object.keys(h[e]).length===0&&delete h[e]),this.setState({tableErrors:h}),this.props.onError(t,n)};static descendingComparator(e,t,n){return t[n]e[n]?1:0}static getComparator(e,t){return e==="desc"?(n,h)=>Qe.descendingComparator(n,h,t):(n,h)=>-Qe.descendingComparator(n,h,t)}static getFilterValue(e){var t,n,h;return(h=(n=(t=e==null?void 0:e.current)==null?void 0:t.children[0])==null?void 0:n.children[0])==null?void 0:h.value}static setFilterValue(e,t){return e.current.children[0].children[0].value=t}handleRequestSort=(e,t=!1)=>{const{order:n,orderBy:h}=this.state,s=t?n:h===e&&n==="asc"?"desc":"asc",d=this.stableSort(s,e);JSON.stringify(d)!==JSON.stringify(this.state.value)&&this.setState({value:d,order:s,orderBy:e,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,d))};stableSort=(e,t)=>{const{value:n}=this.state,h=Qe.getComparator(e,t),i=n.map((s,d)=>({el:s,index:d}));return i.sort((s,d)=>{const o=h(s.el,d.el);return o!==0?o:s.index-d.index}),i.map(s=>s.el)};renderShowHideFilter(e){return e.filter?$.createElement(se,{title:P.I18n.t("ra_Show/hide filter input"),size:"small",onClick:()=>{const t=[...this.state.filterOn],n=this.state.filterOn.indexOf(e.attr);n===-1?t.push(e.attr):t.splice(n,1),this.setState({filterOn:t},()=>{n&&Qe.getFilterValue(this.filterRefs[e.attr])&&(Qe.setFilterValue(this.filterRefs[e.attr],""),this.applyFilter())})}},this.state.filterOn.includes(e.attr)?$.createElement(Uc,null):$.createElement(Kc,null)):null}renderImportExportButtons(e){return $.createElement($.Fragment,null,!e.noDelete&&e.import?$.createElement(me,{title:P.I18n.t("ra_Import data from %s file","CSV"),slotProps:{popper:{sx:re.tooltip}}},$.createElement(se,{size:"small",onClick:()=>this.setState({showImportDialog:!0})},$.createElement(Vn,null))):null,e.export?$.createElement(me,{title:P.I18n.t("ra_Export data to %s file","CSV"),slotProps:{popper:{sx:re.tooltip}}},$.createElement(se,{size:"small",onClick:()=>this.onExport()},$.createElement(Gc,null))):null,e.noDelete?null:$.createElement(se,{disabled:!0,size:"small"},$.createElement(_t,null)))}renderAddButton(e){return $.createElement(me,{title:e?P.I18n.t("ra_Cannot add items with set filter"):P.I18n.t("ra_Add row"),slotProps:{popper:{sx:re.tooltip}}},$.createElement("span",null,$.createElement(se,{size:"small",color:"primary",disabled:!!e&&!this.props.schema.allowAddByFilter,onClick:this.onAdd},$.createElement(Un,null))))}enhancedTableHead(e,t){var s;const{schema:n}=this.props,{order:h,orderBy:i}=this.state;return $.createElement(ko,null,$.createElement(ct,null,(s=n.items)==null?void 0:s.map((d,o)=>this.renderOneFilter({schema:n,style:{width:d.width},showAddButton:!o&&!n.noDelete,headCell:d,order:h,orderBy:i,index:o,doAnyFilterSet:t})),!n.noDelete&&$.createElement(Ee,{style:{paddingLeft:20,paddingRight:20,width:e,textAlign:"right"},padding:"checkbox"},this.renderImportExportButtons(n))))}onDelete=e=>()=>{const t=JSON.parse(JSON.stringify(this.state.value));t.splice(e,1);const n={...this.state.tableErrors};n[e]&&(Object.keys(n[e]).forEach(i=>{this.props.onError(i,void 0)}),delete n[e]);const h={};Object.keys(n).forEach(i=>{const s=parseInt(i,10);s>e?h[s-1]=n[s]:h[s]=n[s]}),this.setState({value:t,iteration:this.state.iteration+1e4,tableErrors:h},()=>this.applyFilter(!1,null,()=>this.onChangeWrapper(t)))};onExport(){const{schema:e}=this.props,{value:t}=this.state,h=[e.items.map(d=>d.attr).join(";")];t.forEach(d=>{const o=[];e.items.forEach(l=>{d[l.attr]&&typeof d[l.attr]=="string"&&d[l.attr].includes(";")?o.push(`"${d[l.attr]}"`):o.push(d[l.attr]??"")}),h.push(o.join(";"))});const i=document.createElement("a");i.setAttribute("href",`data:text/csv;charset=utf-8,${encodeURIComponent(h.join(` `))}`);const s=new Date;i.setAttribute("download",`${s.getFullYear()}_${(s.getMonth()+1).toString().padStart(2,"0")}_${s.getDate().toString().padStart(2,"0")}_${this.props.oContext.adapterName}.${this.props.oContext.instance}_${this.props.attr}.csv`),i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i)}onImport(e){var s;const t=e.split(` -`).map(d=>d.replace("\r","").trim()),{schema:n}=this.props,u=t.shift().split(";").filter(d=>d&&n.items.find(o=>o.attr===d)),i=[];t.forEach(d=>{const o=d.split(";"),l={};for(let r=0;rh.attr===u[r]);p&&p.type==="number"?c=parseFloat(a):c=a}else c=a;l[u[r]]=c}i.push(l)}),i.length?(s=this.state.value)!=null&&s.length?this.setState({showTypeOfImportDialog:i,showImportDialog:!1}):this.setState({value:i,showImportDialog:!1}):window.alert("ra_No data found in file")}onClone=e=>()=>{const t=JSON.parse(JSON.stringify(this.state.value)),n=JSON.parse(JSON.stringify(t[e]));if(typeof this.props.schema.clone=="string"&&typeof n[this.props.schema.clone]=="string"){let u=1,i=n[this.props.schema.clone];const s=i.match(/(\d+)$/);for(s?(i=i.replace(s[0],""),u=parseInt(s[0],10)+1):i+="_";t.find(d=>d[this.props.schema.clone]===i+u.toString());)u++;n[this.props.schema.clone]=`${n[this.props.schema.clone]}_${u}`}t.splice(e,0,n),this.setState({value:t,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,null,()=>this.onChangeWrapper(t)))};onChangeWrapper=(e,t)=>{this.typingTimer&&clearTimeout(this.typingTimer),this.typingTimer=setTimeout((n,u)=>{this.typingTimer=null;let i;if(this.props.schema.encryptedAttributes){const s=JSON.parse(JSON.stringify(n));if(s.forEach(d=>{this.props.schema.encryptedAttributes.forEach(o=>{d[o]&&(d[o]=td(this.secret,d[o]))})}),this.props.schema.objKeyName){const d=co(s,this.props.schema.objKeyName,this.props.schema.objValueName);i=this.onChange(this.props.attr,d)}else i=this.onChange(this.props.attr,s)}else if(this.props.schema.objKeyName){const s=co(JSON.parse(JSON.stringify(n)),this.props.schema.objKeyName,this.props.schema.objValueName);i=this.onChange(this.props.attr,s)}else i=this.onChange(this.props.attr,n);i instanceof Promise&&i.catch(s=>console.error(`Cannot save: ${s}`)),u&&(this.applyFilter(!1,n),this.handleRequestSort(this.state.orderBy,!0))},300,e,t)};onAdd=async()=>{const{schema:e}=this.props,t=JSON.parse(JSON.stringify(this.state.value)),n={};if(e.items)for(const u of e.items){let i;u.defaultFunc?this.props.custom?i=u.defaultFunc?await this.executeCustom(u.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,t.length,this.props.data):this.props.schema.default:i=u.defaultFunc?await this.execute(u.defaultFunc,this.props.schema.default,this.props.data,t.length,this.props.data):this.props.schema.default:i=u.default??null,n[u.attr]=i}t.push(n),this.setState({value:t},()=>this.applyFilter(!1,null,()=>this.onChangeWrapper(t)))};isAnyFilterSet(){return!!Object.keys(this.filterRefs).find(e=>Qe.getFilterValue(this.filterRefs[e]))}applyFilter=(e,t,n)=>{t=t||this.state.value;let u=t.map((i,s)=>s);if(Object.keys(this.filterRefs).forEach(i=>{var d;let s=Qe.getFilterValue(this.filterRefs[i]);if(!e&&s){s=s.toLowerCase();const o=(d=this.state.filterLabelMap)==null?void 0:d[i];u=u.filter(l=>{if(!t[l]||t[l][i]==null)return!1;if(t[l][i].toString().toLowerCase().includes(s))return!0;if(o){const a=o[t[l][i]];if(a&&a.toLowerCase().includes(s))return!0}return!1})}else this.filterRefs[i].current&&Qe.setFilterValue(this.filterRefs[i],"")}),u.length===t.length&&(u=null),u===null&&this.state.visibleValue===null){n&&n();return}JSON.stringify(u)!==JSON.stringify(this.state.visibleValue)?this.setState({visibleValue:u},()=>n&&n()):n&&n()};onMoveUp(e){const t=JSON.parse(JSON.stringify(this.state.value)),n=t[e];t.splice(e,1),t.splice(e-1,0,n),this.setState({value:t,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,null,()=>this.onChangeWrapper(t)))}onMoveDown(e){const t=JSON.parse(JSON.stringify(this.state.value)),n=t[e];t.splice(e,1),t.splice(e+1,0,n),this.setState({value:t,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,null,()=>this.onChangeWrapper(t)))}onDrop(e){const t=e[0],n=new FileReader;n.onabort=()=>console.log("file reading was aborted"),n.onerror=()=>console.log("file reading has failed"),n.onload=()=>{if(t.size>bs){window.alert(P.I18n.t("ra_File is too big. Max %sk allowed. Try use SVG.",Math.round(bs/1024)));return}const u=new Uint8Array(n.result).reduce((i,s)=>i+String.fromCharCode(s),"");this.onImport(u)},n.readAsArrayBuffer(t)}showTypeOfImportDialog(){return this.state.showTypeOfImportDialog?x.createElement(Lt,{open:!0,onClose:()=>this.setState({showTypeOfImportDialog:!1}),maxWidth:"md"},x.createElement(yn,null,P.I18n.t("ra_Append or replace?")),x.createElement(Kt,null,P.I18n.t("ra_Append %s entries or replace existing?",this.state.showTypeOfImportDialog.length)),x.createElement(Gt,null,x.createElement(me,{variant:"contained",color:"primary",autoFocus:!0,onClick:()=>{const e=JSON.parse(JSON.stringify(this.state.value));this.state.showTypeOfImportDialog.forEach(t=>e.push(t)),this.setState({value:e,iteration:this.state.iteration+1e4,showTypeOfImportDialog:!1},()=>this.applyFilter(!1,null,()=>this.onChangeWrapper(e)))}},P.I18n.t("ra_Append")),x.createElement(me,{variant:"contained",color:"secondary",autoFocus:!0,onClick:()=>{const e=this.state.showTypeOfImportDialog;this.setState({value:e,iteration:this.state.iteration+1e4,showTypeOfImportDialog:!1},()=>this.applyFilter(!1,null,()=>this.onChangeWrapper(e)))}},P.I18n.t("ra_Replace")))):null}showImportDialog(){return this.state.showImportDialog?x.createElement(Lt,{open:!0,onClose:()=>this.setState({showImportDialog:!1}),sx:{"& .MuiDialog-paper":{minHeight:500}},maxWidth:"md",fullWidth:!0},x.createElement(yn,null,P.I18n.t("ra_Import from %s","CSV")),x.createElement(Kt,null,x.createElement(jo,{multiple:!1,accept:{"text/csv":[".csv"]},maxSize:bs,onDragEnter:()=>this.setState({uploadFile:"dragging"}),onDragLeave:()=>this.setState({uploadFile:!0}),onDrop:(e,t)=>{this.setState({uploadFile:!1}),e.length?this.onDrop(e):window.alert(t&&t[0]&&t[0].errors&&t[0].errors[0]&&t[0].errors[0].message||P.I18n.t("ra_Cannot upload"))}},({getRootProps:e,getInputProps:t})=>x.createElement("div",{style:{...re.uploadDiv,...this.state.uploadFile==="dragging"?re.uploadDivDragging:void 0,...re.dropZone,...this.state.icon?void 0:re.dropZoneEmpty},...e()},x.createElement("input",{...t()}),x.createElement("div",{style:re.uploadCenterDiv},x.createElement("div",{style:re.uploadCenterTextAndIcon},x.createElement(Vn,{style:re.uploadCenterIcon}),x.createElement("div",{style:re.uploadCenterText},this.state.uploadFile==="dragging"?P.I18n.t("ra_Drop file here"):P.I18n.t("ra_Place your files here or click here to open the browse dialog"))))))),x.createElement(Gt,null,x.createElement(me,{variant:"contained",onClick:()=>this.setState({showImportDialog:!1}),color:"primary",startIcon:x.createElement(ht,null)},P.I18n.t("Cancel")))):null}renderOneFilter(e){return x.createElement(Ee,{key:`${e.headCell.attr}_${e.index}`,style:e.style,align:"left",sortDirection:e.orderBy===e.headCell.attr?e.order:!1},x.createElement("div",{style:{...re.flex,...e.schema.showFirstAddOnTop?{flexDirection:"column"}:void 0}},e.showAddButton?this.renderAddButton(e.doAnyFilterSet):null,e.headCell.sort&&x.createElement(ac,{active:!0,style:e.orderBy!==e.headCell.attr?re.silver:void 0,direction:e.orderBy===e.headCell.attr?e.order:"asc",onClick:()=>this.handleRequestSort(e.headCell.attr)}),e.headCell.filter&&this.state.filterOn.includes(e.headCell.attr)?x.createElement(pe,{variant:"standard",ref:this.filterRefs[e.headCell.attr],onChange:()=>this.applyFilter(),title:P.I18n.t("ra_You can filter entries by entering here some text"),slotProps:{input:{endAdornment:Qe.getFilterValue(this.filterRefs[e.headCell.attr])&&x.createElement(vn,{position:"end"},x.createElement(se,{size:"small",tabIndex:-1,onClick:()=>{Qe.setFilterValue(this.filterRefs[e.headCell.attr],""),this.applyFilter()}},x.createElement(ht,null)))}},fullWidth:!0,placeholder:this.getText(e.headCell.title)}):x.createElement("span",{style:re.headerText},this.getText(e.headCell.title)),this.renderShowHideFilter(e.headCell)))}enhancedFilterCard(){var s;const{schema:e}=this.props,{order:t,orderBy:n}=this.state;let u;this.props.schema.compact&&(u={paddingTop:1,paddingBottom:1});const i=!e.noDelete&&e.import||e.export;return i||e.items.find(d=>d.sort||d.filter)?x.createElement(He,{size:{xs:e.xs||12,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0}},x.createElement(as,null,x.createElement(In,{style:re.paper},x.createElement(Ws,{style:re.paper},x.createElement(js,{expandIcon:x.createElement(Mi,null)},x.createElement(yt,null,P.I18n.t("ra_Filter and Data Actions"))),x.createElement(zs,null,x.createElement(On,null,x.createElement(Fn,null,((s=e.items)==null?void 0:s.find(d=>d.sort||d.filter))&&e.items.map((d,o)=>x.createElement(ct,{key:`${d.attr}_${o}`},this.renderOneFilter({schema:e,style:u,showAddButton:!1,headCell:d,order:t,orderBy:n,index:o,doAnyFilterSet:!1}))),i?x.createElement(ct,null,x.createElement(Ee,{align:"left",style:u},x.createElement("span",{style:re.headerText},P.I18n.t("ra_Actions"))),x.createElement(Ee,{style:u},this.renderImportExportButtons(e))):null))))))):null}enhancedBottomCard(){const{schema:e}=this.props;let t;this.props.schema.compact&&(t={paddingTop:1,paddingBottom:1});const n=this.isAnyFilterSet();return x.createElement(He,{size:{xs:e.xs||12,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0}},x.createElement(as,null,x.createElement(In,{style:re.paper},x.createElement(On,null,x.createElement(Fn,null,x.createElement(ct,null,x.createElement(Ee,{colSpan:e.items.length+1,style:t},this.renderAddButton(n))))))))}renderCards(){const{schema:e}=this.props;let{visibleValue:t}=this.state,n;this.props.schema.compact&&(n={paddingTop:1,paddingBottom:1});const u={padding:0,borderBottom:"none"};t||=this.state.value.map((s,d)=>d);const i=this.isAnyFilterSet();return x.createElement(He,{container:!0},this.showImportDialog(),this.showTypeOfImportDialog(),this.enhancedFilterCard(),t.map((s,d)=>{var o,l,r;return x.createElement(He,{key:`${s}_${d}`,size:{xs:e.xs||12,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0}},x.createElement(as,{sx:this.state.tableErrors[s]?{outline:"1px solid red"}:void 0},x.createElement(In,{style:re.paper},this.props.schema.titleAttribute?x.createElement(Ie,{sx:re.cardHeader},x.createElement("div",null,this.state.value[s][this.props.schema.titleAttribute]),x.createElement("div",null,!i&&!this.state.orderBy?x.createElement(ge,{title:P.I18n.t("ra_Move up"),slotProps:{popper:{sx:re.tooltip}}},x.createElement("span",null,x.createElement(se,{size:"small",onClick:()=>this.onMoveUp(s),disabled:d===0},x.createElement(Ei,null)))):null,!i&&!this.state.orderBy?x.createElement(ge,{title:P.I18n.t("ra_Move down"),slotProps:{popper:{sx:re.tooltip}}},x.createElement("span",null,x.createElement(se,{size:"small",onClick:()=>this.onMoveDown(s),disabled:d===t.length-1},x.createElement(Ai,null)))):null,x.createElement(ge,{title:P.I18n.t("ra_Delete current row"),slotProps:{popper:{sx:re.tooltip}}},x.createElement(se,{size:"small",onClick:this.onDelete(s)},x.createElement(_t,null))),this.props.schema.clone?x.createElement(ge,{title:P.I18n.t("ra_Clone current row"),slotProps:{popper:{sx:re.tooltip}}},x.createElement(se,{size:"small",onClick:this.onClone(s)},x.createElement(fn,null))):null,x.createElement(ge,{title:P.I18n.t("ra_Expand/Collapse card"),slotProps:{popper:{sx:re.tooltip}}},x.createElement(se,{size:"small",onClick:()=>{const a=[...this.state.collapsed],c=a.indexOf(s);c===-1?a.push(s):a.splice(c,1),window.localStorage.setItem(`table.collapsed.${this.props.oContext.instance}.${this.props.attr}`,JSON.stringify(a)),this.setState({collapsed:a})}},x.createElement(Mi,{style:{rotate:(o=this.state.collapsed)!=null&&o.includes(s)?"0deg":"180deg",transition:"0.3s",transitionProperty:"rotate"}}))))):null,x.createElement(lc,{in:!((l=this.state.collapsed)!=null&&l.includes(s)),timeout:"auto",unmountOnExit:!0},x.createElement(On,null,x.createElement(Fn,null,(r=e.items)==null?void 0:r.map(a=>{var p,h;const c=(h=(p=this.listOfHiddenElements)==null?void 0:p[s])==null?void 0:h.includes(a.attr);return x.createElement(ct,{key:`${a.attr}_${s}`},x.createElement(Ee,{align:"left",style:c?u:n},c?null:x.createElement("span",{style:re.headerText},this.getText(a.title))),x.createElement(Ee,{align:"left",style:c?u:n},this.itemTable(a.attr,this.state.value[s],s,!0)))}),!this.props.schema.titleAttribute&&!e.noDelete&&x.createElement(ct,null,x.createElement(Ee,{align:"left",style:n},x.createElement("span",{style:re.headerText},this.getText("Actions"))),x.createElement(Ee,{align:"left",style:n},!i&&!this.state.orderBy?x.createElement(ge,{title:P.I18n.t("ra_Move up"),slotProps:{popper:{sx:re.tooltip}}},x.createElement("span",null,x.createElement(se,{size:"small",onClick:()=>this.onMoveUp(s),disabled:d===0},x.createElement(Ei,null)))):null,!i&&!this.state.orderBy?x.createElement(ge,{title:P.I18n.t("ra_Move down"),slotProps:{popper:{sx:re.tooltip}}},x.createElement("span",null,x.createElement(se,{size:"small",onClick:()=>this.onMoveDown(s),disabled:d===t.length-1},x.createElement(Ai,null)))):null,x.createElement(ge,{title:P.I18n.t("ra_Delete current row"),slotProps:{popper:{sx:re.tooltip}}},x.createElement(se,{size:"small",onClick:this.onDelete(s)},x.createElement(_t,null))),this.props.schema.clone?x.createElement(ge,{title:P.I18n.t("ra_Clone current row"),slotProps:{popper:{sx:re.tooltip}}},x.createElement(se,{size:"small",onClick:this.onClone(s)},x.createElement(fn,null))):null))))))))}),this.enhancedBottomCard())}renderTable(){const{schema:e}=this.props;let{visibleValue:t}=this.state;t=t||this.state.value.map((i,s)=>s);const n=this.isAnyFilterSet();let u;return this.props.schema.compact&&(u={paddingTop:1,paddingBottom:1}),x.createElement(In,{style:re.paper},this.showImportDialog(),this.showTypeOfImportDialog(),e.label?x.createElement("div",{style:re.label},x.createElement(Pn,{variant:"dense",style:re.rootTool},x.createElement(yt,{style:re.title,variant:"h6",id:"tableTitle",component:"div"},this.getText(e.label)))):null,x.createElement(Do,null,x.createElement(On,{style:re.table,size:"small"},this.enhancedTableHead(!n&&!this.state.orderBy?120:64,n),x.createElement(Fn,null,t.map((i,s)=>{var d;return x.createElement(ct,{hover:!0,key:`${i}_${s}`,sx:this.state.tableErrors[i]?{outline:"1px solid red"}:void 0},(d=e.items)==null?void 0:d.map(o=>x.createElement(Ee,{key:`${o.attr}_${i}`,align:"left",style:u},this.itemTable(o.attr,this.state.value[i],i,!1))),!e.noDelete&&x.createElement(Ee,{align:"left",style:{...u,...re.buttonCell}},!n&&!this.state.orderBy?s?x.createElement(ge,{title:P.I18n.t("ra_Move up"),slotProps:{popper:{sx:re.tooltip}}},x.createElement(se,{size:"small",onClick:()=>this.onMoveUp(i)},x.createElement(Ei,null))):x.createElement("div",{style:re.buttonEmpty}):null,!n&&!this.state.orderBy?sthis.onMoveDown(i)},x.createElement(Ai,null))):x.createElement("div",{style:re.buttonEmpty}):null,x.createElement(ge,{title:P.I18n.t("ra_Delete current row"),slotProps:{popper:{sx:re.tooltip}}},x.createElement(se,{size:"small",onClick:this.onDelete(i)},x.createElement(_t,null))),this.props.schema.clone?x.createElement(ge,{title:P.I18n.t("ra_Clone current row"),slotProps:{popper:{sx:re.tooltip}}},x.createElement(se,{size:"small",onClick:this.onClone(i)},x.createElement(fn,null))):null))}),!e.noDelete&&t.length>=(e.showSecondAddAt||5)?x.createElement(ct,null,x.createElement(Ee,{colSpan:e.items.length+1,style:{...u}},this.renderAddButton(n))):null)),!t.length&&this.state.value.length?x.createElement("div",{style:re.filteredOut},x.createElement(yt,{style:re.title,variant:"h6",id:"tableTitle",component:"div"},P.I18n.t("ra_All items are filtered out"),x.createElement(se,{size:"small",onClick:()=>this.applyFilter(!0)},x.createElement(ht,null)))):null),e.help?x.createElement(ve,{style:{paddingLeft:16}},this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null,this.state.errorMessage?x.createElement("div",{style:{display:"flex",padding:"5px"}},x.createElement(Hn,{color:"error"}),x.createElement("span",{style:{color:"red",alignSelf:"center"}},this.state.errorMessage)):null)}componentDidUpdate(){var e;(e=this.refDiv.current)!=null&&e.clientWidth&&this.refDiv.current.clientWidth!==this.state.width&&(this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{var t;this.resizeTimeout=null,this.setState({width:(t=this.refDiv.current)==null?void 0:t.clientWidth})},50))}getCurrentBreakpoint(){return this.state.width?this.state.width<600?"xs":this.state.width<900?"sm":this.state.width<1200?"md":this.state.width<1536?"lg":"xl":"md"}renderItem(){const{schema:e}=this.props;if(!this.state.value||!Array.isArray(this.state.value))return null;const t=this.getCurrentBreakpoint();let n;return t&&(e.useCardFor||["xs"]).includes(t)?n=this.renderCards():n=this.renderTable(),x.createElement("div",{ref:this.refDiv,style:{width:"100%"}},n)}}const mi={indeterminate:{opacity:.5},label:{width:"100%",fontSize:14,marginBottom:2},helper:{width:"100%",fontSize:12},error:{width:"100%",fontSize:12,color:"#FF0000"}};class id extends V{updateTimeout=null;async componentDidMount(){await super.componentDidMount();let e=V.getValue(this.props.data,this.props.attr);if(Array.isArray(e)&&this.props.oContext.multiEdit){e=V.DIFFERENT_VALUE,this.setState({value:e,oldValue:e,jsonError:!1});return}this.setState({value:e,oldValue:e,jsonError:this.validateJson(e)})}validateJson(e){let t=!1;if(this.props.schema.validateJson&&(e||!this.props.schema.allowEmpty))try{JSON.parse(e)}catch(n){console.log("Error in JSON",n),t=!0}return t}static getDerivedStateFromProps(e,t){if(e.oContext.multiEdit&&t.value===V.DIFFERENT_VALUE)return{value:V.DIFFERENT_VALUE};let n=V.getValue(e.data,e.attr);return n!=null&&(n=n.toString()),n==null||n!==t.value&&n!==t.oldValue?{value:n}:null}renderItem(e,t){const n=Array.isArray(this.state.value)||this.state.value===V.DIFFERENT_VALUE;if(this.props.schema.time){let s="";return typeof this.state.value=="number"?this.state.value&&this.state.value<9466596e5?s=new Date(this.state.value*1e3).toLocaleString():s=new Date(this.state.value).toLocaleString():typeof this.state.value=="string"&&(s=new Date(this.state.value).toLocaleString()),x.createElement(pe,{variant:"standard",fullWidth:!0,value:s,error:!!e||!!this.state.jsonError,disabled:!!t,slotProps:{htmlInput:{readOnly:!0}},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}if(this.state.oldValue!==null&&this.state.oldValue!==void 0?(this.updateTimeout&&clearTimeout(this.updateTimeout),this.updateTimeout=setTimeout(()=>{this.updateTimeout=null,this.setState({oldValue:null})},30)):this.updateTimeout&&(clearTimeout(this.updateTimeout),this.updateTimeout=null),n){const s=V.getValue(this.props.data,this.props.attr),d=(s==null?void 0:s.filter(o=>o||o===0).map(o=>({label:o.toString()||"",value:o})))||[];return d.unshift({label:P.I18n.t(V.DIFFERENT_LABEL),value:V.DIFFERENT_VALUE}),x.createElement(Pi,{style:mi.indeterminate,fullWidth:!0,value:d[0],onChange:(o,l)=>{const r=l?l.value:"",a=this.onChange(this.props.attr,r,()=>{this.setState({value:r,oldValue:r,jsonError:this.validateJson(l)})});a instanceof Promise&&a.catch(c=>console.error(`Cannot set value: ${c}`))},options:d,getOptionLabel:o=>o.label,renderInput:o=>x.createElement(pe,{variant:"standard",...o,error:!!e,placeholder:this.getText(this.props.schema.placeholder),slotProps:{htmlInput:{...o.inputProps,maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:this.props.schema.readOnly||!1}},label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),disabled:!!t})})}let u,i;if((this.props.schema.readOnly||t)&&this.props.schema.copyToClipboard?(this.props.schema.minRows>1&&(i={position:"absolute",right:3,top:20,zIndex:1e3}),u=x.createElement(se,{tabIndex:-1,style:i,size:"small",onClick:()=>{P.Utils.copyToClipboard(this.state.value),window.alert(P.I18n.t("ra_Copied"))}},x.createElement(P.IconCopy,null))):!this.props.schema.readOnly&&!t&&this.state.value&&!this.props.schema.noClearButton&&(this.props.schema.minRows>1&&(i={position:"absolute",right:3,top:20,zIndex:1e3}),u=x.createElement(se,{style:i,size:"small",tabIndex:-1,onClick:()=>this.setState({value:"",oldValue:this.state.value},()=>this.onChange(this.props.attr,""))},x.createElement(ht,null)),this.props.schema.minRows<=1&&(u=x.createElement(vn,{position:"end"},u))),this.props.schema.minRows>1){const s=this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation);return x.createElement("div",{style:{width:"100%",position:"relative"}},this.props.schema.label?x.createElement("div",{style:mi.label},this.getText(this.props.schema.label)):null,x.createElement(cc,{style:{width:"100%",resize:"vertical",backgroundColor:this.props.oContext.themeType==="dark"?"#363636":"#cccccc",color:this.props.oContext.themeType==="dark"?"#fff":"#111"},minRows:this.props.schema.minRows,maxRows:this.props.schema.maxRows,value:this.state.value??"",disabled:!!t,readOnly:this.props.schema.readOnly||!1,onChange:d=>{const o=d.target.value;this.setState({value:o,oldValue:this.state.value,jsonError:this.validateJson(o)},()=>this.onChange(this.props.attr,o||""))},placeholder:this.getText(this.props.schema.placeholder)}),s||e||this.state.jsonError?x.createElement("div",{style:e?mi.error:mi.helper},e||(this.state.jsonError?P.I18n.t("ra_Invalid JSON"):s)):null)}return x.createElement(pe,{variant:"standard",fullWidth:!0,value:this.state.value??"",error:!!e||!!this.state.jsonError,disabled:!!t,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:this.props.schema.readOnly||!1},input:{endAdornment:u}},onChange:s=>{const d=s.target.value;this.setState({value:d,oldValue:this.state.value,jsonError:this.validateJson(d)},()=>this.onChange(this.props.attr,d))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.state.jsonError?P.I18n.t("ra_Invalid JSON"):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}}const sd={fullWidth:{width:"100%"}};class rd extends V{initialized=!1;localContext;async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){const n=await this.getPatternAsync(this.props.schema.jsonData,null,!0);try{e=JSON.parse(n)}catch{console.error(`Cannot parse json data: ${n}`)}}e??=null;const t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){const n=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(n!=null&&n.val)){window.alert(P.I18n.t("ra_Instance %s is not alive",t));return}}this.props.oContext.socket.sendTo(t,this.props.schema.command||"send",e).then(n=>{if(typeof n=="object"){const u=n;this.setState({text:u.text||"",style:u.style,icon:u.icon,iconStyle:u.iconStyle})}else typeof n=="string"&&this.setState({text:n||""})}).catch(n=>console.error(`Cannot send command: ${n}`))}}getLocalContext(){const e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=V.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(){if(this.props.alive){const t=this.getLocalContext();(t!==this.localContext||!this.initialized)&&(this.localContext=t,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}if(this.state.text===void 0)return null;let e=null;return this.state.icon&&(e=Dt(this.state.icon,{marginRight:this.state.text?8:void 0,...this.state.iconStyle||void 0}),e||(e=x.createElement(P.Icon,{src:this.state.icon,style:{marginRight:this.state.text?8:void 0,...this.state.iconStyle||void 0}}))),this.props.schema.container==="text"?x.createElement(pe,{variant:"standard",fullWidth:!0,slotProps:{input:{endAdornment:this.props.schema.copyToClipboard?x.createElement(se,{tabIndex:-1,size:"small",onClick:()=>{P.Utils.copyToClipboard(this.state.text),window.alert(P.I18n.t("ra_Copied"))}},x.createElement(P.IconCopy,null)):void 0}},value:this.state.text,label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}):x.createElement("div",{style:{...sd.fullWidth,...this.state.style||void 0}},e,this.props.schema.container==="html"?x.createElement("span",{dangerouslySetInnerHTML:{__html:this.state.text||""}}):this.state.text)}}class od extends V{async componentDidMount(){await super.componentDidMount();const e=V.getValue(this.props.data,this.props.attr);this.setState({value:e})}renderItem(e,t){const n=this.props.schema.returnFormat!=="HH:mm:ss",u=new Date(Date.parse(`Thu, 01 Jan 1970 ${this.state.value||"00:00:00"}`));return x.createElement(Xc,{sx:i=>({width:"100%",borderBottom:`1px solid ${i.palette.text.primary}`,"& fieldset":{display:"none"},"& input":{padding:`${i.spacing(1.5)} 0 4px 0`},"& .MuiInputAdornment-root":{marginLeft:0,marginTop:1},"& label":{transform:"translate(0px, -9px) scale(0.75)"}}),ampm:this.props.oContext.systemConfig.dateFormat.includes("/"),timeSteps:this.props.schema.timeSteps||this.props.schema.timesteps||{hours:1,minutes:5,seconds:5},format:this.props.schema.format||"HH:mm:ss",disabled:!!t,value:u,onChange:i=>{let s;s=i instanceof Date?i.toTimeString().split(" ")[0]:i.toTimeString(),n&&(s=s.split(":").slice(0,2).join(":")),this.setState({value:s},()=>this.onChange(this.props.attr,this.state.value))},views:this.props.schema.views||["hours","minutes","seconds"],label:this.getText(this.props.schema.label)})}}function ad(m,e){let t;return e&&m.substring(0,e.length)===e?t=m.substring(e.length+1):t=m,t=t.replace(/\./g,"/").replace(/_/g," "),t}class ld extends V{async componentDidMount(){var t;await super.componentDidMount();const e=V.getValue(this.props.data,this.props.attr);if(!e&&((t=this.props.customObj)!=null&&t._id)){const n=ad(this.props.customObj._id,`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);this.setState({value:n})}else this.setState({value:e||""})}renderItem(e,t){return x.createElement(pe,{variant:"standard",fullWidth:!0,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0}},value:this.state.value,error:!!e,disabled:t,placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),onChange:n=>{const u=n.target.value;this.setState({value:u},()=>this.onChange(this.props.attr,u))}})}}class cd extends V{async componentDidMount(){var t;await super.componentDidMount();const e=await this.getCachedObject("system.meta.uuid");this.setState({uuid:((t=e==null?void 0:e.native)==null?void 0:t.uuid)||"unknown"})}renderItem(e,t){return x.createElement(pe,{variant:"standard",fullWidth:!0,error:!!e,disabled:!!t,slotProps:{htmlInput:{readOnly:!0},input:{endAdornment:x.createElement(se,{tabIndex:-1,onClick:()=>{P.Utils.copyToClipboard(this.state.uuid),window.alert(P.I18n.t("ra_Copied %s",this.state.uuid))}},x.createElement(fn,null))}},value:this.state.uuid||"",label:this.getText(this.props.schema.label)||P.I18n.t("ra_Serial number (UUID)"),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}}const ho={icon:{width:16,height:16,marginRight:8}};class hd extends V{async componentDidMount(){await super.componentDidMount(),this.props.oContext.socket.getUsers().then(e=>{const t={},n=P.I18n.getLanguage();this.props.schema.short?e.forEach(u=>{var i,s;return t[u._id]={color:(i=u.common)==null?void 0:i.color,icon:(s=u.common)==null?void 0:s.icon,name:P.Utils.getObjectNameFromObj(u,n)}}):e.forEach(u=>{var i,s;return t[u._id.replace(/^system\.user\./,"")]={color:(i=u.common)==null?void 0:i.color,icon:(s=u.common)==null?void 0:s.icon,name:P.Utils.getObjectNameFromObj(u,n)}}),this.setState({users:t})}).catch(e=>console.error(`Cannot get users: ${e}`))}renderItem(e,t){var u,i;const n=V.getValue(this.props.data,this.props.attr);return x.createElement(fe,{variant:"standard",fullWidth:!0},this.state.users&&this.props.schema.label?x.createElement(Te,null,this.getText(this.props.schema.label)):null,this.state.users?x.createElement(Be,{variant:"standard",error:!!e,disabled:!!t,value:n,renderValue:s=>{var d,o,l;return x.createElement("span",null,this.state.users&&((d=this.state.users[s])!=null&&d.icon)?x.createElement(P.Icon,{src:this.state.users&&((o=this.state.users[s])==null?void 0:o.icon),style:ho.icon}):null,this.state.users&&((l=this.state.users[s])==null?void 0:l.name)||s||"")},style:{color:this.state.users&&((u=this.state.users[n])==null?void 0:u.color)||void 0,backgroundColor:P.Utils.getInvertedColor(this.state.users&&((i=this.state.users[n])==null?void 0:i.color),this.props.oContext.themeType)},onChange:s=>this.onChange(this.props.attr,s.target.value)},this.state.users&&Object.keys(this.state.users).map(s=>x.createElement(xe,{style:{color:this.state.users[s].color||void 0,backgroundColor:P.Utils.getInvertedColor(this.state.users[s].color,this.props.oContext.themeType)},key:s,value:s},this.state.users[s].icon?x.createElement(P.Icon,{src:this.state.users[s].icon,style:ho.icon}):null,this.state.users[s].name))):x.createElement(pe,{variant:"standard",error:!!e,disabled:!!t,value:n,onChange:s=>this.onChange(this.props.attr,s.target.value),label:this.getText(this.props.schema.label)}),this.props.schema.help?x.createElement(ve,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const ir=Symbol.for("yaml.alias"),Is=Symbol.for("yaml.document"),kt=Symbol.for("yaml.map"),ia=Symbol.for("yaml.pair"),ut=Symbol.for("yaml.scalar"),En=Symbol.for("yaml.seq"),qe=Symbol.for("yaml.node.type"),en=m=>!!m&&typeof m=="object"&&m[qe]===ir,Vi=m=>!!m&&typeof m=="object"&&m[qe]===Is,Zn=m=>!!m&&typeof m=="object"&&m[qe]===kt,Me=m=>!!m&&typeof m=="object"&&m[qe]===ia,ye=m=>!!m&&typeof m=="object"&&m[qe]===ut,qn=m=>!!m&&typeof m=="object"&&m[qe]===En;function ke(m){if(m&&typeof m=="object")switch(m[qe]){case kt:case En:return!0}return!1}function Le(m){if(m&&typeof m=="object")switch(m[qe]){case ir:case kt:case ut:case En:return!0}return!1}const sa=m=>(ye(m)||ke(m))&&!!m.anchor,Ht=Symbol("break visit"),ud=Symbol("skip children"),jn=Symbol("remove node");function An(m,e){const t=pd(e);Vi(m)?un(null,m.contents,t,Object.freeze([m]))===jn&&(m.contents=null):un(null,m,t,Object.freeze([]))}An.BREAK=Ht;An.SKIP=ud;An.REMOVE=jn;function un(m,e,t,n){const u=dd(m,e,t,n);if(Le(u)||Me(u))return fd(m,n,u),un(m,u,t,n);if(typeof u!="symbol"){if(ke(e)){n=Object.freeze(n.concat(e));for(let i=0;im.replace(/[!,[\]{}]/g,e=>gd[e]);class We{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},We.defaultYaml,e),this.tags=Object.assign({},We.defaultTags,t)}clone(){const e=new We(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new We(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:We.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},We.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:We.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},We.defaultTags),this.atNextDocument=!1);const n=e.trim().split(/[ \t]+/),u=n.shift();switch(u){case"%TAG":{if(n.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;const[i,s]=n;return this.tags[i]=s,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;const[i]=n;if(i==="1.1"||i==="1.2")return this.yaml.version=i,!0;{const s=/^\d+\.\d+$/.test(i);return t(6,`Unsupported YAML version ${i}`,s),!1}}default:return t(0,`Unknown directive ${u}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const s=e.slice(2,-1);return s==="!"||s==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),s)}const[,n,u]=e.match(/^(.*!)([^!]*)$/s);u||t(`The ${e} tag has no suffix`);const i=this.tags[n];if(i)try{return i+decodeURIComponent(u)}catch(s){return t(String(s)),null}return n==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+md(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags);let u;if(e&&n.length>0&&Le(e.contents)){const i={};An(e.contents,(s,d)=>{Le(d)&&d.tag&&(i[d.tag]=!0)}),u=Object.keys(i)}else u=[];for(const[i,s]of n)i==="!!"&&s==="tag:yaml.org,2002:"||(!e||u.some(d=>d.startsWith(s)))&&t.push(`%TAG ${i} ${s}`);return t.join(` -`)}}We.defaultYaml={explicit:!1,version:"1.2"};We.defaultTags={"!!":"tag:yaml.org,2002:"};function ra(m){if(/[\x00-\x19\s,[\]{}]/.test(m)){const t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(m)}`;throw new Error(t)}return!0}function oa(m){const e=new Set;return An(m,{Value(t,n){n.anchor&&e.add(n.anchor)}}),e}function aa(m,e){for(let t=1;;++t){const n=`${m}${t}`;if(!e.has(n))return n}}function vd(m,e){const t=[],n=new Map;let u=null;return{onAnchor:i=>{t.push(i),u??(u=oa(m));const s=aa(e,u);return u.add(s),s},setAnchors:()=>{for(const i of t){const s=n.get(i);if(typeof s=="object"&&s.anchor&&(ye(s.node)||ke(s.node)))s.node.anchor=s.anchor;else{const d=new Error("Failed to resolve repeated object (this should not happen)");throw d.source=i,d}}},sourceObjects:n}}function pn(m,e,t,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let u=0,i=n.length;uZe(n,String(u),t));if(m&&typeof m.toJSON=="function"){if(!t||!sa(m))return m.toJSON(e,t);const n={aliasCount:0,count:1,res:void 0};t.anchors.set(m,n),t.onCreate=i=>{n.res=i,delete t.onCreate};const u=m.toJSON(e,t);return t.onCreate&&t.onCreate(u),u}return typeof m=="bigint"&&!(t!=null&&t.keep)?Number(m):m}class sr{constructor(e){Object.defineProperty(this,qe,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:u,reviver:i}={}){if(!Vi(e))throw new TypeError("A document argument is required");const s={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},d=Ze(this,"",s);if(typeof u=="function")for(const{count:o,res:l}of s.anchors.values())u(l,o);return typeof i=="function"?pn(i,{"":d},"",d):d}}class rr extends sr{constructor(e){super(ir),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){let n;t!=null&&t.aliasResolveCache?n=t.aliasResolveCache:(n=[],An(e,{Node:(i,s)=>{(en(s)||sa(s))&&n.push(s)}}),t&&(t.aliasResolveCache=n));let u;for(const i of n){if(i===this)break;i.anchor===this.source&&(u=i)}return u}toJSON(e,t){if(!t)return{source:this.source};const{anchors:n,doc:u,maxAliasCount:i}=t,s=this.resolve(u,t);if(!s){const o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(o)}let d=n.get(s);if(d||(Ze(s,null,t),d=n.get(s)),(d==null?void 0:d.res)===void 0){const o="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(o)}if(i>=0&&(d.count+=1,d.aliasCount===0&&(d.aliasCount=$i(u,s,n)),d.count*d.aliasCount>i)){const o="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(o)}return d.res}toString(e,t,n){const u=`*${this.source}`;if(e){if(ra(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(i)}if(e.implicitKey)return`${u} `}return u}}function $i(m,e,t){if(en(e)){const n=e.resolve(m),u=t&&n&&t.get(n);return u?u.count*u.aliasCount:0}else if(ke(e)){let n=0;for(const u of e.items){const i=$i(m,u,t);i>n&&(n=i)}return n}else if(Me(e)){const n=$i(m,e.key,t),u=$i(m,e.value,t);return Math.max(n,u)}return 1}const la=m=>!m||typeof m!="function"&&typeof m!="object";class ae extends sr{constructor(e){super(ut),this.value=e}toJSON(e,t){return t!=null&&t.keep?this.value:Ze(this.value,e,t)}toString(){return String(this.value)}}ae.BLOCK_FOLDED="BLOCK_FOLDED";ae.BLOCK_LITERAL="BLOCK_LITERAL";ae.PLAIN="PLAIN";ae.QUOTE_DOUBLE="QUOTE_DOUBLE";ae.QUOTE_SINGLE="QUOTE_SINGLE";const yd="tag:yaml.org,2002:";function bd(m,e,t){if(e){const n=t.filter(i=>i.tag===e),u=n.find(i=>!i.format)??n[0];if(!u)throw new Error(`Tag ${e} not found`);return u}return t.find(n=>{var u;return((u=n.identify)==null?void 0:u.call(n,m))&&!n.format})}function Yn(m,e,t){var a,c,p;if(Vi(m)&&(m=m.contents),Le(m))return m;if(Me(m)){const h=(c=(a=t.schema[kt]).createNode)==null?void 0:c.call(a,t.schema,null,t);return h.items.push(m),h}(m instanceof String||m instanceof Number||m instanceof Boolean||typeof BigInt<"u"&&m instanceof BigInt)&&(m=m.valueOf());const{aliasDuplicateObjects:n,onAnchor:u,onTagObj:i,schema:s,sourceObjects:d}=t;let o;if(n&&m&&typeof m=="object"){if(o=d.get(m),o)return o.anchor??(o.anchor=u(m)),new rr(o.anchor);o={anchor:null,node:null},d.set(m,o)}e!=null&&e.startsWith("!!")&&(e=yd+e.slice(2));let l=bd(m,e,s.tags);if(!l){if(m&&typeof m.toJSON=="function"&&(m=m.toJSON()),!m||typeof m!="object"){const h=new ae(m);return o&&(o.node=h),h}l=m instanceof Map?s[kt]:Symbol.iterator in Object(m)?s[En]:s[kt]}i&&(i(l),delete t.onTagObj);const r=l!=null&&l.createNode?l.createNode(t.schema,m,t):typeof((p=l==null?void 0:l.nodeClass)==null?void 0:p.from)=="function"?l.nodeClass.from(t.schema,m,t):new ae(m);return e?r.tag=e:l.default||(r.tag=l.tag),o&&(o.node=r),r}function Ni(m,e,t){let n=t;for(let u=e.length-1;u>=0;--u){const i=e[u];if(typeof i=="number"&&Number.isInteger(i)&&i>=0){const s=[];s[i]=n,n=s}else n=new Map([[i,n]])}return Yn(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:m,sourceObjects:new Map})}const Nn=m=>m==null||typeof m=="object"&&!!m[Symbol.iterator]().next().done;class ca extends sr{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(n=>Le(n)||Me(n)?n.clone(e):n),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Nn(e))this.add(t);else{const[n,...u]=e,i=this.get(n,!0);if(ke(i))i.addIn(u,t);else if(i===void 0&&this.schema)this.set(n,Ni(this.schema,u,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${u}`)}}deleteIn(e){const[t,...n]=e;if(n.length===0)return this.delete(t);const u=this.get(t,!0);if(ke(u))return u.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){const[n,...u]=e,i=this.get(n,!0);return u.length===0?!t&&ye(i)?i.value:i:ke(i)?i.getIn(u,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!Me(t))return!1;const n=t.value;return n==null||e&&ye(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){const[t,...n]=e;if(n.length===0)return this.has(t);const u=this.get(t,!0);return ke(u)?u.hasIn(n):!1}setIn(e,t){const[n,...u]=e;if(u.length===0)this.set(n,t);else{const i=this.get(n,!0);if(ke(i))i.setIn(u,t);else if(i===void 0&&this.schema)this.set(n,Ni(this.schema,u,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${u}`)}}}const wd=m=>m.replace(/^(?!$)(?: $)?/gm,"#");function vt(m,e){return/^\n+$/.test(m)?m.substring(1):e?m.replace(/^(?! *$)/gm,e):m}const Vt=(m,e,t)=>m.endsWith(` +`).map(d=>d.replace("\r","").trim()),{schema:n}=this.props,h=t.shift().split(";").filter(d=>d&&n.items.find(o=>o.attr===d)),i=[];t.forEach(d=>{const o=d.split(";"),l={};for(let r=0;ru.attr===h[r]);p&&p.type==="number"?c=parseFloat(a):c=a}else c=a;l[h[r]]=c}i.push(l)}),i.length?(s=this.state.value)!=null&&s.length?this.setState({showTypeOfImportDialog:i,showImportDialog:!1}):this.setState({value:i,showImportDialog:!1}):window.alert("ra_No data found in file")}onClone=e=>()=>{const t=JSON.parse(JSON.stringify(this.state.value)),n=JSON.parse(JSON.stringify(t[e]));if(typeof this.props.schema.clone=="string"&&typeof n[this.props.schema.clone]=="string"){let h=1,i=n[this.props.schema.clone];const s=i.match(/(\d+)$/);for(s?(i=i.replace(s[0],""),h=parseInt(s[0],10)+1):i+="_";t.find(d=>d[this.props.schema.clone]===i+h.toString());)h++;n[this.props.schema.clone]=`${n[this.props.schema.clone]}_${h}`}t.splice(e,0,n),this.setState({value:t,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,null,()=>this.onChangeWrapper(t)))};onChangeWrapper=(e,t)=>{this.typingTimer&&clearTimeout(this.typingTimer),this.typingTimer=setTimeout((n,h)=>{this.typingTimer=null;let i;if(this.props.schema.encryptedAttributes){const s=JSON.parse(JSON.stringify(n));if(s.forEach(d=>{this.props.schema.encryptedAttributes.forEach(o=>{d[o]&&(d[o]=sd(this.secret,d[o]))})}),this.props.schema.objKeyName){const d=po(s,this.props.schema.objKeyName,this.props.schema.objValueName);i=this.onChange(this.props.attr,d)}else i=this.onChange(this.props.attr,s)}else if(this.props.schema.objKeyName){const s=po(JSON.parse(JSON.stringify(n)),this.props.schema.objKeyName,this.props.schema.objValueName);i=this.onChange(this.props.attr,s)}else i=this.onChange(this.props.attr,n);i instanceof Promise&&i.catch(s=>console.error(`Cannot save: ${s}`)),h&&(this.applyFilter(!1,n),this.handleRequestSort(this.state.orderBy,!0))},300,e,t)};onAdd=async()=>{const{schema:e}=this.props,t=JSON.parse(JSON.stringify(this.state.value)),n={};if(e.items)for(const h of e.items){let i;h.defaultFunc?this.props.custom?i=h.defaultFunc?await this.executeCustom(h.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,t.length,this.props.data):this.props.schema.default:i=h.defaultFunc?await this.execute(h.defaultFunc,this.props.schema.default,this.props.data,t.length,this.props.data):this.props.schema.default:i=h.default??null,n[h.attr]=i}t.push(n),this.setState({value:t},()=>this.applyFilter(!1,null,()=>this.onChangeWrapper(t)))};isAnyFilterSet(){return!!Object.keys(this.filterRefs).find(e=>Qe.getFilterValue(this.filterRefs[e]))}applyFilter=(e,t,n)=>{t=t||this.state.value;let h=t.map((i,s)=>s);if(Object.keys(this.filterRefs).forEach(i=>{var d;let s=Qe.getFilterValue(this.filterRefs[i]);if(!e&&s){s=s.toLowerCase();const o=(d=this.state.filterLabelMap)==null?void 0:d[i];h=h.filter(l=>{if(!t[l]||t[l][i]==null)return!1;if(t[l][i].toString().toLowerCase().includes(s))return!0;if(o){const a=o[t[l][i]];if(a&&a.toLowerCase().includes(s))return!0}return!1})}else this.filterRefs[i].current&&Qe.setFilterValue(this.filterRefs[i],"")}),h.length===t.length&&(h=null),h===null&&this.state.visibleValue===null){n&&n();return}JSON.stringify(h)!==JSON.stringify(this.state.visibleValue)?this.setState({visibleValue:h},()=>n&&n()):n&&n()};onMoveUp(e){const t=JSON.parse(JSON.stringify(this.state.value)),n=t[e];t.splice(e,1),t.splice(e-1,0,n),this.setState({value:t,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,null,()=>this.onChangeWrapper(t)))}onMoveDown(e){const t=JSON.parse(JSON.stringify(this.state.value)),n=t[e];t.splice(e,1),t.splice(e+1,0,n),this.setState({value:t,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,null,()=>this.onChangeWrapper(t)))}onDrop(e){const t=e[0],n=new FileReader;n.onabort=()=>console.log("file reading was aborted"),n.onerror=()=>console.log("file reading has failed"),n.onload=()=>{if(t.size>ws){window.alert(P.I18n.t("ra_File is too big. Max %sk allowed. Try use SVG.",Math.round(ws/1024)));return}const h=new Uint8Array(n.result).reduce((i,s)=>i+String.fromCharCode(s),"");this.onImport(h)},n.readAsArrayBuffer(t)}showTypeOfImportDialog(){return this.state.showTypeOfImportDialog?$.createElement(Lt,{open:!0,onClose:()=>this.setState({showTypeOfImportDialog:!1}),maxWidth:"md"},$.createElement(yn,null,P.I18n.t("ra_Append or replace?")),$.createElement(Kt,null,P.I18n.t("ra_Append %s entries or replace existing?",this.state.showTypeOfImportDialog.length)),$.createElement(Gt,null,$.createElement(ve,{variant:"contained",color:"primary",autoFocus:!0,onClick:()=>{const e=JSON.parse(JSON.stringify(this.state.value));this.state.showTypeOfImportDialog.forEach(t=>e.push(t)),this.setState({value:e,iteration:this.state.iteration+1e4,showTypeOfImportDialog:!1},()=>this.applyFilter(!1,null,()=>this.onChangeWrapper(e)))}},P.I18n.t("ra_Append")),$.createElement(ve,{variant:"contained",color:"secondary",autoFocus:!0,onClick:()=>{const e=this.state.showTypeOfImportDialog;this.setState({value:e,iteration:this.state.iteration+1e4,showTypeOfImportDialog:!1},()=>this.applyFilter(!1,null,()=>this.onChangeWrapper(e)))}},P.I18n.t("ra_Replace")))):null}showImportDialog(){return this.state.showImportDialog?$.createElement(Lt,{open:!0,onClose:()=>this.setState({showImportDialog:!1}),sx:{"& .MuiDialog-paper":{minHeight:500}},maxWidth:"md",fullWidth:!0},$.createElement(yn,null,P.I18n.t("ra_Import from %s","CSV")),$.createElement(Kt,null,$.createElement(Vo,{multiple:!1,accept:{"text/csv":[".csv"]},maxSize:ws,onDragEnter:()=>this.setState({uploadFile:"dragging"}),onDragLeave:()=>this.setState({uploadFile:!0}),onDrop:(e,t)=>{this.setState({uploadFile:!1}),e.length?this.onDrop(e):window.alert(t&&t[0]&&t[0].errors&&t[0].errors[0]&&t[0].errors[0].message||P.I18n.t("ra_Cannot upload"))}},({getRootProps:e,getInputProps:t})=>$.createElement("div",{style:{...re.uploadDiv,...this.state.uploadFile==="dragging"?re.uploadDivDragging:void 0,...re.dropZone,...this.state.icon?void 0:re.dropZoneEmpty},...e()},$.createElement("input",{...t()}),$.createElement("div",{style:re.uploadCenterDiv},$.createElement("div",{style:re.uploadCenterTextAndIcon},$.createElement(Vn,{style:re.uploadCenterIcon}),$.createElement("div",{style:re.uploadCenterText},this.state.uploadFile==="dragging"?P.I18n.t("ra_Drop file here"):P.I18n.t("ra_Place your files here or click here to open the browse dialog"))))))),$.createElement(Gt,null,$.createElement(ve,{variant:"contained",onClick:()=>this.setState({showImportDialog:!1}),color:"primary",startIcon:$.createElement(ht,null)},P.I18n.t("Cancel")))):null}renderOneFilter(e){return $.createElement(Ee,{key:`${e.headCell.attr}_${e.index}`,style:e.style,align:"left",sortDirection:e.orderBy===e.headCell.attr?e.order:!1},$.createElement("div",{style:{...re.flex,...e.schema.showFirstAddOnTop?{flexDirection:"column"}:void 0}},e.showAddButton?this.renderAddButton(e.doAnyFilterSet):null,e.headCell.sort&&$.createElement(hc,{active:!0,style:e.orderBy!==e.headCell.attr?re.silver:void 0,direction:e.orderBy===e.headCell.attr?e.order:"asc",onClick:()=>this.handleRequestSort(e.headCell.attr)}),e.headCell.filter&&this.state.filterOn.includes(e.headCell.attr)?$.createElement(pe,{variant:"standard",ref:this.filterRefs[e.headCell.attr],onChange:()=>this.applyFilter(),title:P.I18n.t("ra_You can filter entries by entering here some text"),slotProps:{input:{endAdornment:Qe.getFilterValue(this.filterRefs[e.headCell.attr])&&$.createElement(vn,{position:"end"},$.createElement(se,{size:"small",tabIndex:-1,onClick:()=>{Qe.setFilterValue(this.filterRefs[e.headCell.attr],""),this.applyFilter()}},$.createElement(ht,null)))}},fullWidth:!0,placeholder:this.getText(e.headCell.title)}):$.createElement("span",{style:re.headerText},this.getText(e.headCell.title)),this.renderShowHideFilter(e.headCell)))}enhancedFilterCard(){var s;const{schema:e}=this.props,{order:t,orderBy:n}=this.state;let h;this.props.schema.compact&&(h={paddingTop:1,paddingBottom:1});const i=!e.noDelete&&e.import||e.export;return i||e.items.find(d=>d.sort||d.filter)?$.createElement(ze,{size:{xs:e.xs||12,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0}},$.createElement(ls,null,$.createElement(In,{style:re.paper},$.createElement(js,{style:re.paper},$.createElement(Hs,{expandIcon:$.createElement(Ii,null)},$.createElement(yt,null,P.I18n.t("ra_Filter and Data Actions"))),$.createElement(zs,null,$.createElement(On,null,$.createElement(Fn,null,((s=e.items)==null?void 0:s.find(d=>d.sort||d.filter))&&e.items.map((d,o)=>$.createElement(ct,{key:`${d.attr}_${o}`},this.renderOneFilter({schema:e,style:h,showAddButton:!1,headCell:d,order:t,orderBy:n,index:o,doAnyFilterSet:!1}))),i?$.createElement(ct,null,$.createElement(Ee,{align:"left",style:h},$.createElement("span",{style:re.headerText},P.I18n.t("ra_Actions"))),$.createElement(Ee,{style:h},this.renderImportExportButtons(e))):null))))))):null}enhancedBottomCard(){const{schema:e}=this.props;let t;this.props.schema.compact&&(t={paddingTop:1,paddingBottom:1});const n=this.isAnyFilterSet();return $.createElement(ze,{size:{xs:e.xs||12,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0}},$.createElement(ls,null,$.createElement(In,{style:re.paper},$.createElement(On,null,$.createElement(Fn,null,$.createElement(ct,null,$.createElement(Ee,{colSpan:e.items.length+1,style:t},this.renderAddButton(n))))))))}renderCards(){const{schema:e}=this.props;let{visibleValue:t}=this.state,n;this.props.schema.compact&&(n={paddingTop:1,paddingBottom:1});const h={padding:0,borderBottom:"none"};t||=this.state.value.map((s,d)=>d);const i=this.isAnyFilterSet();return $.createElement(ze,{container:!0},this.showImportDialog(),this.showTypeOfImportDialog(),this.enhancedFilterCard(),t.map((s,d)=>{var o,l,r;return $.createElement(ze,{key:`${s}_${d}`,size:{xs:e.xs||12,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0}},$.createElement(ls,{sx:this.state.tableErrors[s]?{outline:"1px solid red"}:void 0},$.createElement(In,{style:re.paper},this.props.schema.titleAttribute?$.createElement(Ie,{sx:re.cardHeader},$.createElement("div",null,this.state.value[s][this.props.schema.titleAttribute]),$.createElement("div",null,!i&&!this.state.orderBy?$.createElement(me,{title:P.I18n.t("ra_Move up"),slotProps:{popper:{sx:re.tooltip}}},$.createElement("span",null,$.createElement(se,{size:"small",onClick:()=>this.onMoveUp(s),disabled:d===0},$.createElement(Ai,null)))):null,!i&&!this.state.orderBy?$.createElement(me,{title:P.I18n.t("ra_Move down"),slotProps:{popper:{sx:re.tooltip}}},$.createElement("span",null,$.createElement(se,{size:"small",onClick:()=>this.onMoveDown(s),disabled:d===t.length-1},$.createElement(Di,null)))):null,$.createElement(me,{title:P.I18n.t("ra_Delete current row"),slotProps:{popper:{sx:re.tooltip}}},$.createElement(se,{size:"small",onClick:this.onDelete(s)},$.createElement(_t,null))),this.props.schema.clone?$.createElement(me,{title:P.I18n.t("ra_Clone current row"),slotProps:{popper:{sx:re.tooltip}}},$.createElement(se,{size:"small",onClick:this.onClone(s)},$.createElement(fn,null))):null,$.createElement(me,{title:P.I18n.t("ra_Expand/Collapse card"),slotProps:{popper:{sx:re.tooltip}}},$.createElement(se,{size:"small",onClick:()=>{const a=[...this.state.collapsed],c=a.indexOf(s);c===-1?a.push(s):a.splice(c,1),window.localStorage.setItem(`table.collapsed.${this.props.oContext.instance}.${this.props.attr}`,JSON.stringify(a)),this.setState({collapsed:a})}},$.createElement(Ii,{style:{rotate:(o=this.state.collapsed)!=null&&o.includes(s)?"0deg":"180deg",transition:"0.3s",transitionProperty:"rotate"}}))))):null,$.createElement(uc,{in:!((l=this.state.collapsed)!=null&&l.includes(s)),timeout:"auto",unmountOnExit:!0},$.createElement(On,null,$.createElement(Fn,null,(r=e.items)==null?void 0:r.map(a=>{var p,u;const c=(u=(p=this.listOfHiddenElements)==null?void 0:p[s])==null?void 0:u.includes(a.attr);return $.createElement(ct,{key:`${a.attr}_${s}`},$.createElement(Ee,{align:"left",style:c?h:n},c?null:$.createElement("span",{style:re.headerText},this.getText(a.title))),$.createElement(Ee,{align:"left",style:c?h:n},this.itemTable(a.attr,this.state.value[s],s,!0)))}),!this.props.schema.titleAttribute&&!e.noDelete&&$.createElement(ct,null,$.createElement(Ee,{align:"left",style:n},$.createElement("span",{style:re.headerText},this.getText("Actions"))),$.createElement(Ee,{align:"left",style:n},!i&&!this.state.orderBy?$.createElement(me,{title:P.I18n.t("ra_Move up"),slotProps:{popper:{sx:re.tooltip}}},$.createElement("span",null,$.createElement(se,{size:"small",onClick:()=>this.onMoveUp(s),disabled:d===0},$.createElement(Ai,null)))):null,!i&&!this.state.orderBy?$.createElement(me,{title:P.I18n.t("ra_Move down"),slotProps:{popper:{sx:re.tooltip}}},$.createElement("span",null,$.createElement(se,{size:"small",onClick:()=>this.onMoveDown(s),disabled:d===t.length-1},$.createElement(Di,null)))):null,$.createElement(me,{title:P.I18n.t("ra_Delete current row"),slotProps:{popper:{sx:re.tooltip}}},$.createElement(se,{size:"small",onClick:this.onDelete(s)},$.createElement(_t,null))),this.props.schema.clone?$.createElement(me,{title:P.I18n.t("ra_Clone current row"),slotProps:{popper:{sx:re.tooltip}}},$.createElement(se,{size:"small",onClick:this.onClone(s)},$.createElement(fn,null))):null))))))))}),this.enhancedBottomCard())}renderTable(){const{schema:e}=this.props;let{visibleValue:t}=this.state;t=t||this.state.value.map((i,s)=>s);const n=this.isAnyFilterSet();let h;return this.props.schema.compact&&(h={paddingTop:1,paddingBottom:1}),$.createElement(In,{style:re.paper},this.showImportDialog(),this.showTypeOfImportDialog(),e.label?$.createElement("div",{style:re.label},$.createElement(Pn,{variant:"dense",style:re.rootTool},$.createElement(yt,{style:re.title,variant:"h6",id:"tableTitle",component:"div"},this.getText(e.label)))):null,$.createElement(_o,null,$.createElement(On,{style:re.table,size:"small"},this.enhancedTableHead(!n&&!this.state.orderBy?120:64,n),$.createElement(Fn,null,t.map((i,s)=>{var d;return $.createElement(ct,{hover:!0,key:`${i}_${s}`,sx:this.state.tableErrors[i]?{outline:"1px solid red"}:void 0},(d=e.items)==null?void 0:d.map(o=>$.createElement(Ee,{key:`${o.attr}_${i}`,align:"left",style:h},this.itemTable(o.attr,this.state.value[i],i,!1))),!e.noDelete&&$.createElement(Ee,{align:"left",style:{...h,...re.buttonCell}},!n&&!this.state.orderBy?s?$.createElement(me,{title:P.I18n.t("ra_Move up"),slotProps:{popper:{sx:re.tooltip}}},$.createElement(se,{size:"small",onClick:()=>this.onMoveUp(i)},$.createElement(Ai,null))):$.createElement("div",{style:re.buttonEmpty}):null,!n&&!this.state.orderBy?sthis.onMoveDown(i)},$.createElement(Di,null))):$.createElement("div",{style:re.buttonEmpty}):null,$.createElement(me,{title:P.I18n.t("ra_Delete current row"),slotProps:{popper:{sx:re.tooltip}}},$.createElement(se,{size:"small",onClick:this.onDelete(i)},$.createElement(_t,null))),this.props.schema.clone?$.createElement(me,{title:P.I18n.t("ra_Clone current row"),slotProps:{popper:{sx:re.tooltip}}},$.createElement(se,{size:"small",onClick:this.onClone(i)},$.createElement(fn,null))):null))}),!e.noDelete&&t.length>=(e.showSecondAddAt||5)?$.createElement(ct,null,$.createElement(Ee,{colSpan:e.items.length+1,style:{...h}},this.renderAddButton(n))):null)),!t.length&&this.state.value.length?$.createElement("div",{style:re.filteredOut},$.createElement(yt,{style:re.title,variant:"h6",id:"tableTitle",component:"div"},P.I18n.t("ra_All items are filtered out"),$.createElement(se,{size:"small",onClick:()=>this.applyFilter(!0)},$.createElement(ht,null)))):null),e.help?$.createElement(ge,{style:{paddingLeft:16}},this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null,this.state.errorMessage?$.createElement("div",{style:{display:"flex",padding:"5px"}},$.createElement(zn,{color:"error"}),$.createElement("span",{style:{color:"red",alignSelf:"center"}},this.state.errorMessage)):null)}componentDidUpdate(){var e;(e=this.refDiv.current)!=null&&e.clientWidth&&this.refDiv.current.clientWidth!==this.state.width&&(this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{var t;this.resizeTimeout=null,this.setState({width:(t=this.refDiv.current)==null?void 0:t.clientWidth})},50))}getCurrentBreakpoint(){return this.state.width?this.state.width<600?"xs":this.state.width<900?"sm":this.state.width<1200?"md":this.state.width<1536?"lg":"xl":"md"}renderItem(){const{schema:e}=this.props;if(!this.state.value||!Array.isArray(this.state.value))return null;const t=this.getCurrentBreakpoint();let n;return t&&(e.useCardFor||["xs"]).includes(t)?n=this.renderCards():n=this.renderTable(),$.createElement("div",{ref:this.refDiv,style:{width:"100%"}},n)}}const vi={indeterminate:{opacity:.5},label:{width:"100%",fontSize:14,marginBottom:2},helper:{width:"100%",fontSize:12},error:{width:"100%",fontSize:12,color:"#FF0000"}};class od extends V{updateTimeout=null;async componentDidMount(){await super.componentDidMount();let e=V.getValue(this.props.data,this.props.attr);if(Array.isArray(e)&&this.props.oContext.multiEdit){e=V.DIFFERENT_VALUE,this.setState({value:e,oldValue:e,jsonError:!1});return}this.setState({value:e,oldValue:e,jsonError:this.validateJson(e)})}validateJson(e){let t=!1;if(this.props.schema.validateJson&&(e||!this.props.schema.allowEmpty))try{JSON.parse(e)}catch(n){console.log("Error in JSON",n),t=!0}return t}static getDerivedStateFromProps(e,t){if(e.oContext.multiEdit&&t.value===V.DIFFERENT_VALUE)return{value:V.DIFFERENT_VALUE};let n=V.getValue(e.data,e.attr);return n!=null&&(n=n.toString()),n==null||n!==t.value&&n!==t.oldValue?{value:n}:null}renderItem(e,t){const n=Array.isArray(this.state.value)||this.state.value===V.DIFFERENT_VALUE;if(this.props.schema.time){let s="";return typeof this.state.value=="number"?this.state.value&&this.state.value<9466596e5?s=new Date(this.state.value*1e3).toLocaleString():s=new Date(this.state.value).toLocaleString():typeof this.state.value=="string"&&(s=new Date(this.state.value).toLocaleString()),$.createElement(pe,{variant:"standard",fullWidth:!0,value:s,error:!!e||!!this.state.jsonError,disabled:!!t,slotProps:{htmlInput:{readOnly:!0}},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}if(this.state.oldValue!==null&&this.state.oldValue!==void 0?(this.updateTimeout&&clearTimeout(this.updateTimeout),this.updateTimeout=setTimeout(()=>{this.updateTimeout=null,this.setState({oldValue:null})},30)):this.updateTimeout&&(clearTimeout(this.updateTimeout),this.updateTimeout=null),n){const s=V.getValue(this.props.data,this.props.attr),d=(s==null?void 0:s.filter(o=>o||o===0).map(o=>({label:o.toString()||"",value:o})))||[];return d.unshift({label:P.I18n.t(V.DIFFERENT_LABEL),value:V.DIFFERENT_VALUE}),$.createElement(Wi,{style:vi.indeterminate,fullWidth:!0,value:d[0],onChange:(o,l)=>{const r=l?l.value:"",a=this.onChange(this.props.attr,r,()=>{this.setState({value:r,oldValue:r,jsonError:this.validateJson(l)})});a instanceof Promise&&a.catch(c=>console.error(`Cannot set value: ${c}`))},options:d,getOptionLabel:o=>o.label,renderInput:o=>$.createElement(pe,{variant:"standard",...o,error:!!e,placeholder:this.getText(this.props.schema.placeholder),slotProps:{htmlInput:{...o.inputProps,maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:this.props.schema.readOnly||!1}},label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),disabled:!!t})})}let h,i;if((this.props.schema.readOnly||t)&&this.props.schema.copyToClipboard?(this.props.schema.minRows>1&&(i={position:"absolute",right:3,top:20,zIndex:1e3}),h=$.createElement(se,{tabIndex:-1,style:i,size:"small",onClick:()=>{P.Utils.copyToClipboard(this.state.value),window.alert(P.I18n.t("ra_Copied"))}},$.createElement(P.IconCopy,null))):!this.props.schema.readOnly&&!t&&this.state.value&&!this.props.schema.noClearButton&&(this.props.schema.minRows>1&&(i={position:"absolute",right:3,top:20,zIndex:1e3}),h=$.createElement(se,{style:i,size:"small",tabIndex:-1,onClick:()=>this.setState({value:"",oldValue:this.state.value},()=>this.onChange(this.props.attr,""))},$.createElement(ht,null)),this.props.schema.minRows<=1&&(h=$.createElement(vn,{position:"end"},h))),this.props.schema.minRows>1){const s=this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation);return $.createElement("div",{style:{width:"100%",position:"relative"}},this.props.schema.label?$.createElement("div",{style:vi.label},this.getText(this.props.schema.label)):null,$.createElement(pc,{style:{width:"100%",resize:"vertical",backgroundColor:this.props.oContext.themeType==="dark"?"#363636":"#cccccc",color:this.props.oContext.themeType==="dark"?"#fff":"#111"},minRows:this.props.schema.minRows,maxRows:this.props.schema.maxRows,value:this.state.value??"",disabled:!!t,readOnly:this.props.schema.readOnly||!1,onChange:d=>{const o=d.target.value;this.setState({value:o,oldValue:this.state.value,jsonError:this.validateJson(o)},()=>this.onChange(this.props.attr,o||""))},placeholder:this.getText(this.props.schema.placeholder)}),s||e||this.state.jsonError?$.createElement("div",{style:e?vi.error:vi.helper},e||(this.state.jsonError?P.I18n.t("ra_Invalid JSON"):s)):null)}return $.createElement(pe,{variant:"standard",fullWidth:!0,value:this.state.value??"",error:!!e||!!this.state.jsonError,disabled:!!t,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:this.props.schema.readOnly||!1},input:{endAdornment:h}},onChange:s=>{const d=s.target.value;this.setState({value:d,oldValue:this.state.value,jsonError:this.validateJson(d)},()=>this.onChange(this.props.attr,d))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.state.jsonError?P.I18n.t("ra_Invalid JSON"):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}}const ad={fullWidth:{width:"100%"}};class ld extends V{initialized=!1;localContext;async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){const n=await this.getPatternAsync(this.props.schema.jsonData,null,!0);try{e=JSON.parse(n)}catch{console.error(`Cannot parse json data: ${n}`)}}e??=null;const t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){const n=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(n!=null&&n.val)){window.alert(P.I18n.t("ra_Instance %s is not alive",t));return}}this.props.oContext.socket.sendTo(t,this.props.schema.command||"send",e).then(n=>{if(typeof n=="object"){const h=n;this.setState({text:h.text||"",style:h.style,icon:h.icon,iconStyle:h.iconStyle})}else typeof n=="string"&&this.setState({text:n||""})}).catch(n=>console.error(`Cannot send command: ${n}`))}}getLocalContext(){const e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=V.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(){if(this.props.alive){const t=this.getLocalContext();(t!==this.localContext||!this.initialized)&&(this.localContext=t,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}if(this.state.text===void 0)return null;let e=null;return this.state.icon&&(e=Dt(this.state.icon,{marginRight:this.state.text?8:void 0,...this.state.iconStyle||void 0}),e||(e=$.createElement(P.Icon,{src:this.state.icon,style:{marginRight:this.state.text?8:void 0,...this.state.iconStyle||void 0}}))),this.props.schema.container==="text"?$.createElement(pe,{variant:"standard",fullWidth:!0,slotProps:{input:{endAdornment:this.props.schema.copyToClipboard?$.createElement(se,{tabIndex:-1,size:"small",onClick:()=>{P.Utils.copyToClipboard(this.state.text),window.alert(P.I18n.t("ra_Copied"))}},$.createElement(P.IconCopy,null)):void 0}},value:this.state.text,label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}):$.createElement("div",{style:{...ad.fullWidth,...this.state.style||void 0}},e,this.props.schema.container==="html"?$.createElement("span",{dangerouslySetInnerHTML:{__html:this.state.text||""}}):this.state.text)}}class cd extends V{async componentDidMount(){await super.componentDidMount();const e=V.getValue(this.props.data,this.props.attr);this.setState({value:e})}renderItem(e,t){const n=this.props.schema.returnFormat!=="HH:mm:ss",h=new Date(Date.parse(`Thu, 01 Jan 1970 ${this.state.value||"00:00:00"}`));return $.createElement(eh,{sx:i=>({width:"100%",borderBottom:`1px solid ${i.palette.text.primary}`,"& fieldset":{display:"none"},"& input":{padding:`${i.spacing(1.5)} 0 4px 0`},"& .MuiInputAdornment-root":{marginLeft:0,marginTop:1},"& label":{transform:"translate(0px, -9px) scale(0.75)"}}),ampm:this.props.oContext.systemConfig.dateFormat.includes("/"),timeSteps:this.props.schema.timeSteps||this.props.schema.timesteps||{hours:1,minutes:5,seconds:5},format:this.props.schema.format||"HH:mm:ss",disabled:!!t,value:h,onChange:i=>{let s;s=i instanceof Date?i.toTimeString().split(" ")[0]:i.toTimeString(),n&&(s=s.split(":").slice(0,2).join(":")),this.setState({value:s},()=>this.onChange(this.props.attr,this.state.value))},views:this.props.schema.views||["hours","minutes","seconds"],label:this.getText(this.props.schema.label)})}}function hd(m,e){let t;return e&&m.substring(0,e.length)===e?t=m.substring(e.length+1):t=m,t=t.replace(/\./g,"/").replace(/_/g," "),t}class ud extends V{async componentDidMount(){var t;await super.componentDidMount();const e=V.getValue(this.props.data,this.props.attr);if(!e&&((t=this.props.customObj)!=null&&t._id)){const n=hd(this.props.customObj._id,`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);this.setState({value:n})}else this.setState({value:e||""})}renderItem(e,t){return $.createElement(pe,{variant:"standard",fullWidth:!0,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0}},value:this.state.value,error:!!e,disabled:t,placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),onChange:n=>{const h=n.target.value;this.setState({value:h},()=>this.onChange(this.props.attr,h))}})}}class pd extends V{async componentDidMount(){var t;await super.componentDidMount();const e=await this.getCachedObject("system.meta.uuid");this.setState({uuid:((t=e==null?void 0:e.native)==null?void 0:t.uuid)||"unknown"})}renderItem(e,t){return $.createElement(pe,{variant:"standard",fullWidth:!0,error:!!e,disabled:!!t,slotProps:{htmlInput:{readOnly:!0},input:{endAdornment:$.createElement(se,{tabIndex:-1,onClick:()=>{P.Utils.copyToClipboard(this.state.uuid),window.alert(P.I18n.t("ra_Copied %s",this.state.uuid))}},$.createElement(fn,null))}},value:this.state.uuid||"",label:this.getText(this.props.schema.label)||P.I18n.t("ra_Serial number (UUID)"),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}}const fo={icon:{width:16,height:16,marginRight:8}};class dd extends V{async componentDidMount(){await super.componentDidMount(),this.props.oContext.socket.getUsers().then(e=>{const t={},n=P.I18n.getLanguage();this.props.schema.short?e.forEach(h=>{var i,s;return t[h._id]={color:(i=h.common)==null?void 0:i.color,icon:(s=h.common)==null?void 0:s.icon,name:P.Utils.getObjectNameFromObj(h,n)}}):e.forEach(h=>{var i,s;return t[h._id.replace(/^system\.user\./,"")]={color:(i=h.common)==null?void 0:i.color,icon:(s=h.common)==null?void 0:s.icon,name:P.Utils.getObjectNameFromObj(h,n)}}),this.setState({users:t})}).catch(e=>console.error(`Cannot get users: ${e}`))}renderItem(e,t){var h,i;const n=V.getValue(this.props.data,this.props.attr);return $.createElement(fe,{variant:"standard",fullWidth:!0},this.state.users&&this.props.schema.label?$.createElement(_e,null,this.getText(this.props.schema.label)):null,this.state.users?$.createElement(Ne,{variant:"standard",error:!!e,disabled:!!t,value:n,renderValue:s=>{var d,o,l;return $.createElement("span",null,this.state.users&&((d=this.state.users[s])!=null&&d.icon)?$.createElement(P.Icon,{src:this.state.users&&((o=this.state.users[s])==null?void 0:o.icon),style:fo.icon}):null,this.state.users&&((l=this.state.users[s])==null?void 0:l.name)||s||"")},style:{color:this.state.users&&((h=this.state.users[n])==null?void 0:h.color)||void 0,backgroundColor:P.Utils.getInvertedColor(this.state.users&&((i=this.state.users[n])==null?void 0:i.color),this.props.oContext.themeType)},onChange:s=>this.onChange(this.props.attr,s.target.value)},this.state.users&&Object.keys(this.state.users).map(s=>$.createElement($e,{style:{color:this.state.users[s].color||void 0,backgroundColor:P.Utils.getInvertedColor(this.state.users[s].color,this.props.oContext.themeType)},key:s,value:s},this.state.users[s].icon?$.createElement(P.Icon,{src:this.state.users[s].icon,style:fo.icon}):null,this.state.users[s].name))):$.createElement(pe,{variant:"standard",error:!!e,disabled:!!t,value:n,onChange:s=>this.onChange(this.props.attr,s.target.value),label:this.getText(this.props.schema.label)}),this.props.schema.help?$.createElement(ge,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}const rr=Symbol.for("yaml.alias"),Os=Symbol.for("yaml.document"),kt=Symbol.for("yaml.map"),oa=Symbol.for("yaml.pair"),ut=Symbol.for("yaml.scalar"),En=Symbol.for("yaml.seq"),qe=Symbol.for("yaml.node.type"),en=m=>!!m&&typeof m=="object"&&m[qe]===rr,Ui=m=>!!m&&typeof m=="object"&&m[qe]===Os,Zn=m=>!!m&&typeof m=="object"&&m[qe]===kt,Me=m=>!!m&&typeof m=="object"&&m[qe]===oa,ye=m=>!!m&&typeof m=="object"&&m[qe]===ut,qn=m=>!!m&&typeof m=="object"&&m[qe]===En;function Te(m){if(m&&typeof m=="object")switch(m[qe]){case kt:case En:return!0}return!1}function Le(m){if(m&&typeof m=="object")switch(m[qe]){case rr:case kt:case ut:case En:return!0}return!1}const aa=m=>(ye(m)||Te(m))&&!!m.anchor,zt=Symbol("break visit"),fd=Symbol("skip children"),jn=Symbol("remove node");function An(m,e){const t=gd(e);Ui(m)?un(null,m.contents,t,Object.freeze([m]))===jn&&(m.contents=null):un(null,m,t,Object.freeze([]))}An.BREAK=zt;An.SKIP=fd;An.REMOVE=jn;function un(m,e,t,n){const h=md(m,e,t,n);if(Le(h)||Me(h))return vd(m,n,h),un(m,h,t,n);if(typeof h!="symbol"){if(Te(e)){n=Object.freeze(n.concat(e));for(let i=0;im.replace(/[!,[\]{}]/g,e=>yd[e]);class We{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},We.defaultYaml,e),this.tags=Object.assign({},We.defaultTags,t)}clone(){const e=new We(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new We(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:We.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},We.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:We.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},We.defaultTags),this.atNextDocument=!1);const n=e.trim().split(/[ \t]+/),h=n.shift();switch(h){case"%TAG":{if(n.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;const[i,s]=n;return this.tags[i]=s,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;const[i]=n;if(i==="1.1"||i==="1.2")return this.yaml.version=i,!0;{const s=/^\d+\.\d+$/.test(i);return t(6,`Unsupported YAML version ${i}`,s),!1}}default:return t(0,`Unknown directive ${h}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const s=e.slice(2,-1);return s==="!"||s==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),s)}const[,n,h]=e.match(/^(.*!)([^!]*)$/s);h||t(`The ${e} tag has no suffix`);const i=this.tags[n];if(i)try{return i+decodeURIComponent(h)}catch(s){return t(String(s)),null}return n==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+bd(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags);let h;if(e&&n.length>0&&Le(e.contents)){const i={};An(e.contents,(s,d)=>{Le(d)&&d.tag&&(i[d.tag]=!0)}),h=Object.keys(i)}else h=[];for(const[i,s]of n)i==="!!"&&s==="tag:yaml.org,2002:"||(!e||h.some(d=>d.startsWith(s)))&&t.push(`%TAG ${i} ${s}`);return t.join(` +`)}}We.defaultYaml={explicit:!1,version:"1.2"};We.defaultTags={"!!":"tag:yaml.org,2002:"};function la(m){if(/[\x00-\x19\s,[\]{}]/.test(m)){const t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(m)}`;throw new Error(t)}return!0}function ca(m){const e=new Set;return An(m,{Value(t,n){n.anchor&&e.add(n.anchor)}}),e}function ha(m,e){for(let t=1;;++t){const n=`${m}${t}`;if(!e.has(n))return n}}function wd(m,e){const t=[],n=new Map;let h=null;return{onAnchor:i=>{t.push(i),h??(h=ca(m));const s=ha(e,h);return h.add(s),s},setAnchors:()=>{for(const i of t){const s=n.get(i);if(typeof s=="object"&&s.anchor&&(ye(s.node)||Te(s.node)))s.node.anchor=s.anchor;else{const d=new Error("Failed to resolve repeated object (this should not happen)");throw d.source=i,d}}},sourceObjects:n}}function pn(m,e,t,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let h=0,i=n.length;hZe(n,String(h),t));if(m&&typeof m.toJSON=="function"){if(!t||!aa(m))return m.toJSON(e,t);const n={aliasCount:0,count:1,res:void 0};t.anchors.set(m,n),t.onCreate=i=>{n.res=i,delete t.onCreate};const h=m.toJSON(e,t);return t.onCreate&&t.onCreate(h),h}return typeof m=="bigint"&&!(t!=null&&t.keep)?Number(m):m}class or{constructor(e){Object.defineProperty(this,qe,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:h,reviver:i}={}){if(!Ui(e))throw new TypeError("A document argument is required");const s={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},d=Ze(this,"",s);if(typeof h=="function")for(const{count:o,res:l}of s.anchors.values())h(l,o);return typeof i=="function"?pn(i,{"":d},"",d):d}}class ar extends or{constructor(e){super(rr),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){let n;t!=null&&t.aliasResolveCache?n=t.aliasResolveCache:(n=[],An(e,{Node:(i,s)=>{(en(s)||aa(s))&&n.push(s)}}),t&&(t.aliasResolveCache=n));let h;for(const i of n){if(i===this)break;i.anchor===this.source&&(h=i)}return h}toJSON(e,t){if(!t)return{source:this.source};const{anchors:n,doc:h,maxAliasCount:i}=t,s=this.resolve(h,t);if(!s){const o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(o)}let d=n.get(s);if(d||(Ze(s,null,t),d=n.get(s)),(d==null?void 0:d.res)===void 0){const o="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(o)}if(i>=0&&(d.count+=1,d.aliasCount===0&&(d.aliasCount=xi(h,s,n)),d.count*d.aliasCount>i)){const o="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(o)}return d.res}toString(e,t,n){const h=`*${this.source}`;if(e){if(la(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(i)}if(e.implicitKey)return`${h} `}return h}}function xi(m,e,t){if(en(e)){const n=e.resolve(m),h=t&&n&&t.get(n);return h?h.count*h.aliasCount:0}else if(Te(e)){let n=0;for(const h of e.items){const i=xi(m,h,t);i>n&&(n=i)}return n}else if(Me(e)){const n=xi(m,e.key,t),h=xi(m,e.value,t);return Math.max(n,h)}return 1}const ua=m=>!m||typeof m!="function"&&typeof m!="object";class ae extends or{constructor(e){super(ut),this.value=e}toJSON(e,t){return t!=null&&t.keep?this.value:Ze(this.value,e,t)}toString(){return String(this.value)}}ae.BLOCK_FOLDED="BLOCK_FOLDED";ae.BLOCK_LITERAL="BLOCK_LITERAL";ae.PLAIN="PLAIN";ae.QUOTE_DOUBLE="QUOTE_DOUBLE";ae.QUOTE_SINGLE="QUOTE_SINGLE";const Cd="tag:yaml.org,2002:";function Sd(m,e,t){if(e){const n=t.filter(i=>i.tag===e),h=n.find(i=>!i.format)??n[0];if(!h)throw new Error(`Tag ${e} not found`);return h}return t.find(n=>{var h;return((h=n.identify)==null?void 0:h.call(n,m))&&!n.format})}function Yn(m,e,t){var a,c,p;if(Ui(m)&&(m=m.contents),Le(m))return m;if(Me(m)){const u=(c=(a=t.schema[kt]).createNode)==null?void 0:c.call(a,t.schema,null,t);return u.items.push(m),u}(m instanceof String||m instanceof Number||m instanceof Boolean||typeof BigInt<"u"&&m instanceof BigInt)&&(m=m.valueOf());const{aliasDuplicateObjects:n,onAnchor:h,onTagObj:i,schema:s,sourceObjects:d}=t;let o;if(n&&m&&typeof m=="object"){if(o=d.get(m),o)return o.anchor??(o.anchor=h(m)),new ar(o.anchor);o={anchor:null,node:null},d.set(m,o)}e!=null&&e.startsWith("!!")&&(e=Cd+e.slice(2));let l=Sd(m,e,s.tags);if(!l){if(m&&typeof m.toJSON=="function"&&(m=m.toJSON()),!m||typeof m!="object"){const u=new ae(m);return o&&(o.node=u),u}l=m instanceof Map?s[kt]:Symbol.iterator in Object(m)?s[En]:s[kt]}i&&(i(l),delete t.onTagObj);const r=l!=null&&l.createNode?l.createNode(t.schema,m,t):typeof((p=l==null?void 0:l.nodeClass)==null?void 0:p.from)=="function"?l.nodeClass.from(t.schema,m,t):new ae(m);return e?r.tag=e:l.default||(r.tag=l.tag),o&&(o.node=r),r}function Bi(m,e,t){let n=t;for(let h=e.length-1;h>=0;--h){const i=e[h];if(typeof i=="number"&&Number.isInteger(i)&&i>=0){const s=[];s[i]=n,n=s}else n=new Map([[i,n]])}return Yn(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:m,sourceObjects:new Map})}const Nn=m=>m==null||typeof m=="object"&&!!m[Symbol.iterator]().next().done;class pa extends or{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(n=>Le(n)||Me(n)?n.clone(e):n),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Nn(e))this.add(t);else{const[n,...h]=e,i=this.get(n,!0);if(Te(i))i.addIn(h,t);else if(i===void 0&&this.schema)this.set(n,Bi(this.schema,h,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${h}`)}}deleteIn(e){const[t,...n]=e;if(n.length===0)return this.delete(t);const h=this.get(t,!0);if(Te(h))return h.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){const[n,...h]=e,i=this.get(n,!0);return h.length===0?!t&&ye(i)?i.value:i:Te(i)?i.getIn(h,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!Me(t))return!1;const n=t.value;return n==null||e&&ye(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){const[t,...n]=e;if(n.length===0)return this.has(t);const h=this.get(t,!0);return Te(h)?h.hasIn(n):!1}setIn(e,t){const[n,...h]=e;if(h.length===0)this.set(n,t);else{const i=this.get(n,!0);if(Te(i))i.setIn(h,t);else if(i===void 0&&this.schema)this.set(n,Bi(this.schema,h,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${h}`)}}}const Ed=m=>m.replace(/^(?!$)(?: $)?/gm,"#");function vt(m,e){return/^\n+$/.test(m)?m.substring(1):e?m.replace(/^(?! *$)/gm,e):m}const Vt=(m,e,t)=>m.endsWith(` `)?vt(t,e):t.includes(` `)?` -`+vt(t,e):(m.endsWith(" ")?"":" ")+t,ha="flow",Os="block",xi="quoted";function Ui(m,e,t="flow",{indentAtStart:n,lineWidth:u=80,minContentWidth:i=20,onFold:s,onOverflow:d}={}){if(!u||u<0)return m;uu-Math.max(2,i)?l.push(0):a=u-n);let c,p,h=!1,f=-1,g=-1,v=-1;t===Os&&(f=uo(m,f,e.length),f!==-1&&(a=f+o));for(let D;D=m[f+=1];){if(t===xi&&D==="\\"){switch(g=f,m[f+1]){case"x":f+=3;break;case"u":f+=5;break;case"U":f+=9;break;default:f+=1}v=f}if(D===` -`)t===Os&&(f=uo(m,f,e.length)),a=f+e.length+o,c=void 0;else{if(D===" "&&p&&p!==" "&&p!==` +`+vt(t,e):(m.endsWith(" ")?"":" ")+t,da="flow",Fs="block",_i="quoted";function Ki(m,e,t="flow",{indentAtStart:n,lineWidth:h=80,minContentWidth:i=20,onFold:s,onOverflow:d}={}){if(!h||h<0)return m;hh-Math.max(2,i)?l.push(0):a=h-n);let c,p,u=!1,f=-1,g=-1,v=-1;t===Fs&&(f=go(m,f,e.length),f!==-1&&(a=f+o));for(let D;D=m[f+=1];){if(t===_i&&D==="\\"){switch(g=f,m[f+1]){case"x":f+=3;break;case"u":f+=5;break;case"U":f+=9;break;default:f+=1}v=f}if(D===` +`)t===Fs&&(f=go(m,f,e.length)),a=f+e.length+o,c=void 0;else{if(D===" "&&p&&p!==" "&&p!==` `&&p!==" "){const E=m[f+1];E&&E!==" "&&E!==` -`&&E!==" "&&(c=f)}if(f>=a)if(c)l.push(c),a=c+o,c=void 0;else if(t===xi){for(;p===" "||p===" ";)p=D,D=m[f+=1],h=!0;const E=f>v+1?f-2:g-1;if(r[E])return m;l.push(E),r[E]=!0,a=E+o,c=void 0}else h=!0}p=D}if(h&&d&&d(),l.length===0)return m;s&&s();let b=m.slice(0,l[0]);for(let D=0;D({indentAtStart:e?m.indent.length:m.indentAtStart,lineWidth:m.options.lineWidth,minContentWidth:m.options.minContentWidth}),Gi=m=>/^(%|---|\.\.\.)/m.test(m);function Cd(m,e,t){if(!e||e<0)return!1;const n=e-t,u=m.length;if(u<=n)return!1;for(let i=0,s=0;in)return!0;if(s=i+1,u-s<=n)return!1}return!0}function zn(m,e){const t=JSON.stringify(m);if(e.options.doubleQuotedAsJSON)return t;const{implicitKey:n}=e,u=e.options.doubleQuotedMinMultiLineLength,i=e.indent||(Gi(m)?" ":"");let s="",d=0;for(let o=0,l=t[o];l;l=t[++o])if(l===" "&&t[o+1]==="\\"&&t[o+2]==="n"&&(s+=t.slice(d,o)+"\\ ",o+=1,d=o,l="\\"),l==="\\")switch(t[o+1]){case"u":{s+=t.slice(d,o);const r=t.substr(o+2,4);switch(r){case"0000":s+="\\0";break;case"0007":s+="\\a";break;case"000b":s+="\\v";break;case"001b":s+="\\e";break;case"0085":s+="\\N";break;case"00a0":s+="\\_";break;case"2028":s+="\\L";break;case"2029":s+="\\P";break;default:r.substr(0,2)==="00"?s+="\\x"+r.substr(2):s+=t.substr(o,6)}o+=5,d=o+1}break;case"n":if(n||t[o+2]==='"'||t.length=a)if(c)l.push(c),a=c+o,c=void 0;else if(t===_i){for(;p===" "||p===" ";)p=D,D=m[f+=1],u=!0;const E=f>v+1?f-2:g-1;if(r[E])return m;l.push(E),r[E]=!0,a=E+o,c=void 0}else u=!0}p=D}if(u&&d&&d(),l.length===0)return m;s&&s();let b=m.slice(0,l[0]);for(let D=0;D({indentAtStart:e?m.indent.length:m.indentAtStart,lineWidth:m.options.lineWidth,minContentWidth:m.options.minContentWidth}),Ji=m=>/^(%|---|\.\.\.)/m.test(m);function Ad(m,e,t){if(!e||e<0)return!1;const n=e-t,h=m.length;if(h<=n)return!1;for(let i=0,s=0;in)return!0;if(s=i+1,h-s<=n)return!1}return!0}function Hn(m,e){const t=JSON.stringify(m);if(e.options.doubleQuotedAsJSON)return t;const{implicitKey:n}=e,h=e.options.doubleQuotedMinMultiLineLength,i=e.indent||(Ji(m)?" ":"");let s="",d=0;for(let o=0,l=t[o];l;l=t[++o])if(l===" "&&t[o+1]==="\\"&&t[o+2]==="n"&&(s+=t.slice(d,o)+"\\ ",o+=1,d=o,l="\\"),l==="\\")switch(t[o+1]){case"u":{s+=t.slice(d,o);const r=t.substr(o+2,4);switch(r){case"0000":s+="\\0";break;case"0007":s+="\\a";break;case"000b":s+="\\v";break;case"001b":s+="\\e";break;case"0085":s+="\\N";break;case"00a0":s+="\\_";break;case"2028":s+="\\L";break;case"2029":s+="\\P";break;default:r.substr(0,2)==="00"?s+="\\x"+r.substr(2):s+=t.substr(o,6)}o+=5,d=o+1}break;case"n":if(n||t[o+2]==='"'||t.length `;let a,c;for(c=t.length;c>0;--c){const w=t[c-1];if(w!==` -`&&w!==" "&&w!==" ")break}let p=t.substring(c);const h=p.indexOf(` -`);h===-1?a="-":t===p||h!==p.length-1?(a="+",i&&i()):a="",p&&(t=t.slice(0,-p.length),p[p.length-1]===` -`&&(p=p.slice(0,-1)),p=p.replace(Rs,`$&${l}`));let f=!1,g,v=-1;for(g=0;g{y=!0});const T=Ui(`${b}${w}${p}`,l,Os,A);if(!y)return`>${E} +`&&w!==" "&&w!==" ")break}let p=t.substring(c);const u=p.indexOf(` +`);u===-1?a="-":t===p||u!==p.length-1?(a="+",i&&i()):a="",p&&(t=t.slice(0,-p.length),p[p.length-1]===` +`&&(p=p.slice(0,-1)),p=p.replace(Ns,`$&${l}`));let f=!1,g,v=-1;for(g=0;g{y=!0});const T=Ki(`${b}${w}${p}`,l,Fs,A);if(!y)return`>${E} ${l}${T}`}return t=t.replace(/\n+/g,`$&${l}`),`|${E} -${l}${b}${t}${p}`}function Sd(m,e,t,n){const{type:u,value:i}=m,{actualString:s,implicitKey:d,indent:o,indentStep:l,inFlow:r}=e;if(d&&i.includes(` +${l}${b}${t}${p}`}function Dd(m,e,t,n){const{type:h,value:i}=m,{actualString:s,implicitKey:d,indent:o,indentStep:l,inFlow:r}=e;if(d&&i.includes(` `)||r&&/[[\]{},]/.test(i))return dn(i,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(i))return d||r||!i.includes(` -`)?dn(i,e):_i(m,e,t,n);if(!d&&!r&&u!==ae.PLAIN&&i.includes(` -`))return _i(m,e,t,n);if(Gi(i)){if(o==="")return e.forceBlockIndent=!0,_i(m,e,t,n);if(d&&o===l)return dn(i,e)}const a=i.replace(/\n+/g,`$& -${o}`);if(s){const c=f=>{var g;return f.default&&f.tag!=="tag:yaml.org,2002:str"&&((g=f.test)==null?void 0:g.test(a))},{compat:p,tags:h}=e.doc.schema;if(h.some(c)||p!=null&&p.some(c))return dn(i,e)}return d?a:Ui(a,o,ha,Ki(e,!1))}function or(m,e,t,n){const{implicitKey:u,inFlow:i}=e,s=typeof m.value=="string"?m:Object.assign({},m,{value:String(m.value)});let{type:d}=m;d!==ae.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value)&&(d=ae.QUOTE_DOUBLE);const o=r=>{switch(r){case ae.BLOCK_FOLDED:case ae.BLOCK_LITERAL:return u||i?dn(s.value,e):_i(s,e,t,n);case ae.QUOTE_DOUBLE:return zn(s.value,e);case ae.QUOTE_SINGLE:return Fs(s.value,e);case ae.PLAIN:return Sd(s,e,t,n);default:return null}};let l=o(d);if(l===null){const{defaultKeyType:r,defaultStringType:a}=e.options,c=u&&r||a;if(l=o(c),l===null)throw new Error(`Unsupported default string type ${c}`)}return l}function ua(m,e){const t=Object.assign({blockQuote:!0,commentString:wd,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},m.schema.toStringOptions,e);let n;switch(t.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:m,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:n,options:t}}function Ed(m,e){var u;if(e.tag){const i=m.filter(s=>s.tag===e.tag);if(i.length>0)return i.find(s=>s.format===e.format)??i[0]}let t,n;if(ye(e)){n=e.value;let i=m.filter(s=>{var d;return(d=s.identify)==null?void 0:d.call(s,n)});if(i.length>1){const s=i.filter(d=>d.test);s.length>0&&(i=s)}t=i.find(s=>s.format===e.format)??i.find(s=>!s.format)}else n=e,t=m.find(i=>i.nodeClass&&n instanceof i.nodeClass);if(!t){const i=((u=n==null?void 0:n.constructor)==null?void 0:u.name)??(n===null?"null":typeof n);throw new Error(`Tag not resolved for ${i} value`)}return t}function Ad(m,e,{anchors:t,doc:n}){if(!n.directives)return"";const u=[],i=(ye(m)||ke(m))&&m.anchor;i&&ra(i)&&(t.add(i),u.push(`&${i}`));const s=m.tag??(e.default?null:e.tag);return s&&u.push(n.directives.tagString(s)),u.join(" ")}function wn(m,e,t,n){var o;if(Me(m))return m.toString(e,t,n);if(en(m)){if(e.doc.directives)return m.toString(e);if((o=e.resolvedAliases)!=null&&o.has(m))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(m):e.resolvedAliases=new Set([m]),m=m.resolve(e.doc)}let u;const i=Le(m)?m:e.doc.createNode(m,{onTagObj:l=>u=l});u??(u=Ed(e.doc.schema.tags,i));const s=Ad(i,u,e);s.length>0&&(e.indentAtStart=(e.indentAtStart??0)+s.length+1);const d=typeof u.stringify=="function"?u.stringify(i,e,t,n):ye(i)?or(i,e,t,n):i.toString(e,t,n);return s?ye(i)||d[0]==="{"||d[0]==="["?`${s} ${d}`:`${s} -${e.indent}${d}`:d}function Dd({key:m,value:e},t,n,u){const{allNullValues:i,doc:s,indent:d,indentStep:o,options:{commentString:l,indentSeq:r,simpleKeys:a}}=t;let c=Le(m)&&m.comment||null;if(a){if(c)throw new Error("With simple keys, key nodes cannot have comments");if(ke(m)||!Le(m)&&typeof m=="object"){const A="With simple keys, collection cannot be used as a key value";throw new Error(A)}}let p=!a&&(!m||c&&e==null&&!t.inFlow||ke(m)||(ye(m)?m.type===ae.BLOCK_FOLDED||m.type===ae.BLOCK_LITERAL:typeof m=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!p&&(a||!i),indent:d+o});let h=!1,f=!1,g=wn(m,t,()=>h=!0,()=>f=!0);if(!p&&!t.inFlow&&g.length>1024){if(a)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(t.inFlow){if(i||e==null)return h&&n&&n(),g===""?"?":p?`? ${g}`:g}else if(i&&!a||e==null&&p)return g=`? ${g}`,c&&!h?g+=Vt(g,t.indent,l(c)):f&&u&&u(),g;h&&(c=null),p?(c&&(g+=Vt(g,t.indent,l(c))),g=`? ${g} +`)?dn(i,e):ki(m,e,t,n);if(!d&&!r&&h!==ae.PLAIN&&i.includes(` +`))return ki(m,e,t,n);if(Ji(i)){if(o==="")return e.forceBlockIndent=!0,ki(m,e,t,n);if(d&&o===l)return dn(i,e)}const a=i.replace(/\n+/g,`$& +${o}`);if(s){const c=f=>{var g;return f.default&&f.tag!=="tag:yaml.org,2002:str"&&((g=f.test)==null?void 0:g.test(a))},{compat:p,tags:u}=e.doc.schema;if(u.some(c)||p!=null&&p.some(c))return dn(i,e)}return d?a:Ki(a,o,da,Gi(e,!1))}function lr(m,e,t,n){const{implicitKey:h,inFlow:i}=e,s=typeof m.value=="string"?m:Object.assign({},m,{value:String(m.value)});let{type:d}=m;d!==ae.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value)&&(d=ae.QUOTE_DOUBLE);const o=r=>{switch(r){case ae.BLOCK_FOLDED:case ae.BLOCK_LITERAL:return h||i?dn(s.value,e):ki(s,e,t,n);case ae.QUOTE_DOUBLE:return Hn(s.value,e);case ae.QUOTE_SINGLE:return Rs(s.value,e);case ae.PLAIN:return Dd(s,e,t,n);default:return null}};let l=o(d);if(l===null){const{defaultKeyType:r,defaultStringType:a}=e.options,c=h&&r||a;if(l=o(c),l===null)throw new Error(`Unsupported default string type ${c}`)}return l}function fa(m,e){const t=Object.assign({blockQuote:!0,commentString:Ed,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},m.schema.toStringOptions,e);let n;switch(t.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:m,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:n,options:t}}function $d(m,e){var h;if(e.tag){const i=m.filter(s=>s.tag===e.tag);if(i.length>0)return i.find(s=>s.format===e.format)??i[0]}let t,n;if(ye(e)){n=e.value;let i=m.filter(s=>{var d;return(d=s.identify)==null?void 0:d.call(s,n)});if(i.length>1){const s=i.filter(d=>d.test);s.length>0&&(i=s)}t=i.find(s=>s.format===e.format)??i.find(s=>!s.format)}else n=e,t=m.find(i=>i.nodeClass&&n instanceof i.nodeClass);if(!t){const i=((h=n==null?void 0:n.constructor)==null?void 0:h.name)??(n===null?"null":typeof n);throw new Error(`Tag not resolved for ${i} value`)}return t}function xd(m,e,{anchors:t,doc:n}){if(!n.directives)return"";const h=[],i=(ye(m)||Te(m))&&m.anchor;i&&la(i)&&(t.add(i),h.push(`&${i}`));const s=m.tag??(e.default?null:e.tag);return s&&h.push(n.directives.tagString(s)),h.join(" ")}function wn(m,e,t,n){var o;if(Me(m))return m.toString(e,t,n);if(en(m)){if(e.doc.directives)return m.toString(e);if((o=e.resolvedAliases)!=null&&o.has(m))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(m):e.resolvedAliases=new Set([m]),m=m.resolve(e.doc)}let h;const i=Le(m)?m:e.doc.createNode(m,{onTagObj:l=>h=l});h??(h=$d(e.doc.schema.tags,i));const s=xd(i,h,e);s.length>0&&(e.indentAtStart=(e.indentAtStart??0)+s.length+1);const d=typeof h.stringify=="function"?h.stringify(i,e,t,n):ye(i)?lr(i,e,t,n):i.toString(e,t,n);return s?ye(i)||d[0]==="{"||d[0]==="["?`${s} ${d}`:`${s} +${e.indent}${d}`:d}function _d({key:m,value:e},t,n,h){const{allNullValues:i,doc:s,indent:d,indentStep:o,options:{commentString:l,indentSeq:r,simpleKeys:a}}=t;let c=Le(m)&&m.comment||null;if(a){if(c)throw new Error("With simple keys, key nodes cannot have comments");if(Te(m)||!Le(m)&&typeof m=="object"){const A="With simple keys, collection cannot be used as a key value";throw new Error(A)}}let p=!a&&(!m||c&&e==null&&!t.inFlow||Te(m)||(ye(m)?m.type===ae.BLOCK_FOLDED||m.type===ae.BLOCK_LITERAL:typeof m=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!p&&(a||!i),indent:d+o});let u=!1,f=!1,g=wn(m,t,()=>u=!0,()=>f=!0);if(!p&&!t.inFlow&&g.length>1024){if(a)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(t.inFlow){if(i||e==null)return u&&n&&n(),g===""?"?":p?`? ${g}`:g}else if(i&&!a||e==null&&p)return g=`? ${g}`,c&&!u?g+=Vt(g,t.indent,l(c)):f&&h&&h(),g;u&&(c=null),p?(c&&(g+=Vt(g,t.indent,l(c))),g=`? ${g} ${d}:`):(g=`${g}:`,c&&(g+=Vt(g,t.indent,l(c))));let v,b,D;Le(e)?(v=!!e.spaceBefore,b=e.commentBefore,D=e.comment):(v=!1,b=null,D=null,e&&typeof e=="object"&&(e=s.createNode(e))),t.implicitKey=!1,!p&&!c&&ye(e)&&(t.indentAtStart=g.length+1),f=!1,!r&&o.length>=2&&!t.inFlow&&!p&&qn(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let E=!1;const w=wn(e,t,()=>E=!0,()=>f=!0);let y=" ";if(c||v||b){if(y=v?` `:"",b){const A=l(b);y+=` ${vt(A,t.indent)}`}w===""&&!t.inFlow?y===` `&&D&&(y=` `):y+=` -${t.indent}`}else if(!p&&ke(e)){const A=w[0],T=w.indexOf(` -`),$=T!==-1,M=t.inFlow??e.flow??e.items.length===0;if($||!M){let O=!1;if($&&(A==="&"||A==="!")){let _=w.indexOf(" ");A==="&"&&_!==-1&&_m===vi||typeof m=="symbol"&&m.description===vi,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new ae(Symbol(vi)),{addToJSMap:da}),stringify:()=>vi},$d=(m,e)=>(wt.identify(e)||ye(e)&&(!e.type||e.type===ae.PLAIN)&&wt.identify(e.value))&&(m==null?void 0:m.doc.schema.tags.some(t=>t.tag===wt.tag&&t.default));function da(m,e,t){if(t=m&&en(t)?t.resolve(m.doc):t,qn(t))for(const n of t.items)ws(m,e,n);else if(Array.isArray(t))for(const n of t)ws(m,e,n);else ws(m,e,t)}function ws(m,e,t){const n=m&&en(t)?t.resolve(m.doc):t;if(!Zn(n))throw new Error("Merge sources must be maps or map aliases");const u=n.toJSON(null,m,Map);for(const[i,s]of u)e instanceof Map?e.has(i)||e.set(i,s):e instanceof Set?e.add(i):Object.prototype.hasOwnProperty.call(e,i)||Object.defineProperty(e,i,{value:s,writable:!0,enumerable:!0,configurable:!0});return e}function fa(m,e,{key:t,value:n}){if(Le(t)&&t.addToJSMap)t.addToJSMap(m,e,n);else if($d(m,t))da(m,e,n);else{const u=Ze(t,"",m);if(e instanceof Map)e.set(u,Ze(n,u,m));else if(e instanceof Set)e.add(u);else{const i=xd(t,u,m),s=Ze(n,i,m);i in e?Object.defineProperty(e,i,{value:s,writable:!0,enumerable:!0,configurable:!0}):e[i]=s}}return e}function xd(m,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(Le(m)&&(t!=null&&t.doc)){const n=ua(t.doc,{});n.anchors=new Set;for(const i of t.anchors.keys())n.anchors.add(i.anchor);n.inFlow=!0,n.inStringifyKey=!0;const u=m.toString(n);if(!t.mapKeyWarned){let i=JSON.stringify(u);i.length>40&&(i=i.substring(0,36)+'..."'),pa(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${i}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return u}return JSON.stringify(e)}function ar(m,e,t){const n=Yn(m,void 0,t),u=Yn(e,void 0,t);return new ze(n,u)}class ze{constructor(e,t=null){Object.defineProperty(this,qe,{value:ia}),this.key=e,this.value=t}clone(e){let{key:t,value:n}=this;return Le(t)&&(t=t.clone(e)),Le(n)&&(n=n.clone(e)),new ze(t,n)}toJSON(e,t){const n=t!=null&&t.mapAsMap?new Map:{};return fa(t,n,this)}toString(e,t,n){return e!=null&&e.doc?Dd(this,e,t,n):JSON.stringify(this)}}function ga(m,e,t){return(e.inFlow??m.flow?kd:_d)(m,e,t)}function _d({comment:m,items:e},t,{blockItemPrefix:n,flowChars:u,itemIndent:i,onChompKeep:s,onComment:d}){const{indent:o,options:{commentString:l}}=t,r=Object.assign({},t,{indent:i,type:null});let a=!1;const c=[];for(let h=0;hg=null,()=>a=!0);g&&(v+=Vt(v,i,l(g))),a&&g&&(a=!1),c.push(n+v)}let p;if(c.length===0)p=u.start+u.end;else{p=c[0];for(let h=1;hm===yi||typeof m=="symbol"&&m.description===yi,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new ae(Symbol(yi)),{addToJSMap:ma}),stringify:()=>yi},kd=(m,e)=>(wt.identify(e)||ye(e)&&(!e.type||e.type===ae.PLAIN)&&wt.identify(e.value))&&(m==null?void 0:m.doc.schema.tags.some(t=>t.tag===wt.tag&&t.default));function ma(m,e,t){if(t=m&&en(t)?t.resolve(m.doc):t,qn(t))for(const n of t.items)Cs(m,e,n);else if(Array.isArray(t))for(const n of t)Cs(m,e,n);else Cs(m,e,t)}function Cs(m,e,t){const n=m&&en(t)?t.resolve(m.doc):t;if(!Zn(n))throw new Error("Merge sources must be maps or map aliases");const h=n.toJSON(null,m,Map);for(const[i,s]of h)e instanceof Map?e.has(i)||e.set(i,s):e instanceof Set?e.add(i):Object.prototype.hasOwnProperty.call(e,i)||Object.defineProperty(e,i,{value:s,writable:!0,enumerable:!0,configurable:!0});return e}function va(m,e,{key:t,value:n}){if(Le(t)&&t.addToJSMap)t.addToJSMap(m,e,n);else if(kd(m,t))ma(m,e,n);else{const h=Ze(t,"",m);if(e instanceof Map)e.set(h,Ze(n,h,m));else if(e instanceof Set)e.add(h);else{const i=Td(t,h,m),s=Ze(n,i,m);i in e?Object.defineProperty(e,i,{value:s,writable:!0,enumerable:!0,configurable:!0}):e[i]=s}}return e}function Td(m,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(Le(m)&&(t!=null&&t.doc)){const n=fa(t.doc,{});n.anchors=new Set;for(const i of t.anchors.keys())n.anchors.add(i.anchor);n.inFlow=!0,n.inStringifyKey=!0;const h=m.toString(n);if(!t.mapKeyWarned){let i=JSON.stringify(h);i.length>40&&(i=i.substring(0,36)+'..."'),ga(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${i}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return h}return JSON.stringify(e)}function cr(m,e,t){const n=Yn(m,void 0,t),h=Yn(e,void 0,t);return new He(n,h)}class He{constructor(e,t=null){Object.defineProperty(this,qe,{value:oa}),this.key=e,this.value=t}clone(e){let{key:t,value:n}=this;return Le(t)&&(t=t.clone(e)),Le(n)&&(n=n.clone(e)),new He(t,n)}toJSON(e,t){const n=t!=null&&t.mapAsMap?new Map:{};return va(t,n,this)}toString(e,t,n){return e!=null&&e.doc?_d(this,e,t,n):JSON.stringify(this)}}function ya(m,e,t){return(e.inFlow??m.flow?Md:Ld)(m,e,t)}function Ld({comment:m,items:e},t,{blockItemPrefix:n,flowChars:h,itemIndent:i,onChompKeep:s,onComment:d}){const{indent:o,options:{commentString:l}}=t,r=Object.assign({},t,{indent:i,type:null});let a=!1;const c=[];for(let u=0;ug=null,()=>a=!0);g&&(v+=Vt(v,i,l(g))),a&&g&&(a=!1),c.push(n+v)}let p;if(c.length===0)p=h.start+h.end;else{p=c[0];for(let u=1;ug=null);l||(l=a.length>r||v.includes(` -`)),h0&&(l||(l=a.reduce((b,D)=>b+D.length+2,2)+(v.length+2)>e.options.lineWidth)),l&&(v+=",")),g&&(v+=Vt(v,n,d(g))),a.push(v),r=a.length}const{start:c,end:p}=t;if(a.length===0)return c+p;if(!l){const h=a.reduce((f,g)=>f+g.length+2,2);l=e.options.lineWidth>0&&h>e.options.lineWidth}if(l){let h=c;for(const f of a)h+=f?` -${i}${u}${f}`:` -`;return`${h} -${u}${p}`}else return`${c}${s}${a.join(" ")}${s}${p}`}function Bi({indent:m,options:{commentString:e}},t,n,u){if(n&&u&&(n=n.replace(/^\n+/,"")),n){const i=vt(e(n),m);t.push(i.trimStart())}}function Ut(m,e){const t=ye(e)?e.value:e;for(const n of m)if(Me(n)&&(n.key===e||n.key===t||ye(n.key)&&n.key.value===t))return n}class Xe extends ca{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(kt,e),this.items=[]}static from(e,t,n){const{keepUndefined:u,replacer:i}=n,s=new this(e),d=(o,l)=>{if(typeof i=="function")l=i.call(t,o,l);else if(Array.isArray(i)&&!i.includes(o))return;(l!==void 0||u)&&s.items.push(ar(o,l,n))};if(t instanceof Map)for(const[o,l]of t)d(o,l);else if(t&&typeof t=="object")for(const o of Object.keys(t))d(o,t[o]);return typeof e.sortMapEntries=="function"&&s.items.sort(e.sortMapEntries),s}add(e,t){var s;let n;Me(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new ze(e,e==null?void 0:e.value):n=new ze(e.key,e.value);const u=Ut(this.items,n.key),i=(s=this.schema)==null?void 0:s.sortMapEntries;if(u){if(!t)throw new Error(`Key ${n.key} already set`);ye(u.value)&&la(n.value)?u.value.value=n.value:u.value=n.value}else if(i){const d=this.items.findIndex(o=>i(n,o)<0);d===-1?this.items.push(n):this.items.splice(d,0,n)}else this.items.push(n)}delete(e){const t=Ut(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){const n=Ut(this.items,e),u=n==null?void 0:n.value;return(!t&&ye(u)?u.value:u)??void 0}has(e){return!!Ut(this.items,e)}set(e,t){this.add(new ze(e,t),!0)}toJSON(e,t,n){const u=n?new n:t!=null&&t.mapAsMap?new Map:{};t!=null&&t.onCreate&&t.onCreate(u);for(const i of this.items)fa(t,u,i);return u}toString(e,t,n){if(!e)return JSON.stringify(this);for(const u of this.items)if(!Me(u))throw new Error(`Map items must all be pairs; found ${JSON.stringify(u)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),ga(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}}const Dn={collection:"map",default:!0,nodeClass:Xe,tag:"tag:yaml.org,2002:map",resolve(m,e){return Zn(m)||e("Expected a mapping for this tag"),m},createNode:(m,e,t)=>Xe.from(m,e,t)};class Xt extends ca{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(En,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=yi(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){const n=yi(e);if(typeof n!="number")return;const u=this.items[n];return!t&&ye(u)?u.value:u}has(e){const t=yi(e);return typeof t=="number"&&t=0?e:null}const $n={collection:"seq",default:!0,nodeClass:Xt,tag:"tag:yaml.org,2002:seq",resolve(m,e){return qn(m)||e("Expected a sequence for this tag"),m},createNode:(m,e,t)=>Xt.from(m,e,t)},Ji={identify:m=>typeof m=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:m=>m,stringify(m,e,t,n){return e=Object.assign({actualString:!0},e),or(m,e,t,n)}},Yi={identify:m=>m==null,createNode:()=>new ae(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new ae(null),stringify:({source:m},e)=>typeof m=="string"&&Yi.test.test(m)?m:e.options.nullStr},lr={identify:m=>typeof m=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:m=>new ae(m[0]==="t"||m[0]==="T"),stringify({source:m,value:e},t){if(m&&lr.test.test(m)){const n=m[0]==="t"||m[0]==="T";if(e===n)return m}return e?t.options.trueStr:t.options.falseStr}};function ot({format:m,minFractionDigits:e,tag:t,value:n}){if(typeof n=="bigint")return String(n);const u=typeof n=="number"?n:Number(n);if(!isFinite(u))return isNaN(u)?".nan":u<0?"-.inf":".inf";let i=Object.is(n,-0)?"-0":JSON.stringify(n);if(!m&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^\d/.test(i)){let s=i.indexOf(".");s<0&&(s=i.length,i+=".");let d=e-(i.length-s-1);for(;d-- >0;)i+="0"}return i}const ma={identify:m=>typeof m=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:m=>m.slice(-3).toLowerCase()==="nan"?NaN:m[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:ot},va={identify:m=>typeof m=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:m=>parseFloat(m),stringify(m){const e=Number(m.value);return isFinite(e)?e.toExponential():ot(m)}},ya={identify:m=>typeof m=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(m){const e=new ae(parseFloat(m)),t=m.indexOf(".");return t!==-1&&m[m.length-1]==="0"&&(e.minFractionDigits=m.length-t-1),e},stringify:ot},Qi=m=>typeof m=="bigint"||Number.isInteger(m),cr=(m,e,t,{intAsBigInt:n})=>n?BigInt(m):parseInt(m.substring(e),t);function ba(m,e,t){const{value:n}=m;return Qi(n)&&n>=0?t+n.toString(e):ot(m)}const wa={identify:m=>Qi(m)&&m>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(m,e,t)=>cr(m,2,8,t),stringify:m=>ba(m,8,"0o")},Ca={identify:Qi,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(m,e,t)=>cr(m,0,10,t),stringify:ot},Sa={identify:m=>Qi(m)&&m>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(m,e,t)=>cr(m,2,16,t),stringify:m=>ba(m,16,"0x")},Td=[Dn,$n,Ji,Yi,lr,wa,Ca,Sa,ma,va,ya];function po(m){return typeof m=="bigint"||Number.isInteger(m)}const bi=({value:m})=>JSON.stringify(m),Ld=[{identify:m=>typeof m=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:m=>m,stringify:bi},{identify:m=>m==null,createNode:()=>new ae(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:bi},{identify:m=>typeof m=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:m=>m==="true",stringify:bi},{identify:po,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(m,e,{intAsBigInt:t})=>t?BigInt(m):parseInt(m,10),stringify:({value:m})=>po(m)?m.toString():JSON.stringify(m)},{identify:m=>typeof m=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:m=>parseFloat(m),stringify:bi}],Md={default:!0,tag:"",test:/^/,resolve(m,e){return e(`Unresolved plain scalar ${JSON.stringify(m)}`),m}},Id=[Dn,$n].concat(Ld,Md),hr={identify:m=>m instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(m,e){if(typeof atob=="function"){const t=atob(m.replace(/[\n\r]/g,"")),n=new Uint8Array(t.length);for(let u=0;u1&&e("Each pair must have its own sequence indicator");const u=n.items[0]||new ze(new ae(null));if(n.commentBefore&&(u.key.commentBefore=u.key.commentBefore?`${n.commentBefore} -${u.key.commentBefore}`:n.commentBefore),n.comment){const i=u.value??u.key;i.comment=i.comment?`${n.comment} -${i.comment}`:n.comment}n=u}m.items[t]=Me(n)?n:new ze(n)}}else e("Expected a sequence for this tag");return m}function Aa(m,e,t){const{replacer:n}=t,u=new Xt(m);u.tag="tag:yaml.org,2002:pairs";let i=0;if(e&&Symbol.iterator in Object(e))for(let s of e){typeof n=="function"&&(s=n.call(e,String(i++),s));let d,o;if(Array.isArray(s))if(s.length===2)d=s[0],o=s[1];else throw new TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){const l=Object.keys(s);if(l.length===1)d=l[0],o=s[d];else throw new TypeError(`Expected tuple with one key, not ${l.length} keys`)}else d=s;u.items.push(ar(d,o,t))}return u}const ur={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Ea,createNode:Aa};class gn extends Xt{constructor(){super(),this.add=Xe.prototype.add.bind(this),this.delete=Xe.prototype.delete.bind(this),this.get=Xe.prototype.get.bind(this),this.has=Xe.prototype.has.bind(this),this.set=Xe.prototype.set.bind(this),this.tag=gn.tag}toJSON(e,t){if(!t)return super.toJSON(e);const n=new Map;t!=null&&t.onCreate&&t.onCreate(n);for(const u of this.items){let i,s;if(Me(u)?(i=Ze(u.key,"",t),s=Ze(u.value,i,t)):i=Ze(u,"",t),n.has(i))throw new Error("Ordered maps must not include duplicate keys");n.set(i,s)}return n}static from(e,t,n){const u=Aa(e,t,n),i=new this;return i.items=u.items,i}}gn.tag="tag:yaml.org,2002:omap";const pr={collection:"seq",identify:m=>m instanceof Map,nodeClass:gn,default:!1,tag:"tag:yaml.org,2002:omap",resolve(m,e){const t=Ea(m,e),n=[];for(const{key:u}of t.items)ye(u)&&(n.includes(u.value)?e(`Ordered maps must not include duplicate keys: ${u.value}`):n.push(u.value));return Object.assign(new gn,t)},createNode:(m,e,t)=>gn.from(m,e,t)};function Da({value:m,source:e},t){return e&&(m?$a:xa).test.test(e)?e:m?t.options.trueStr:t.options.falseStr}const $a={identify:m=>m===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new ae(!0),stringify:Da},xa={identify:m=>m===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new ae(!1),stringify:Da},Od={identify:m=>typeof m=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:m=>m.slice(-3).toLowerCase()==="nan"?NaN:m[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:ot},Fd={identify:m=>typeof m=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:m=>parseFloat(m.replace(/_/g,"")),stringify(m){const e=Number(m.value);return isFinite(e)?e.toExponential():ot(m)}},Rd={identify:m=>typeof m=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(m){const e=new ae(parseFloat(m.replace(/_/g,""))),t=m.indexOf(".");if(t!==-1){const n=m.substring(t+1).replace(/_/g,"");n[n.length-1]==="0"&&(e.minFractionDigits=n.length)}return e},stringify:ot},ei=m=>typeof m=="bigint"||Number.isInteger(m);function Xi(m,e,t,{intAsBigInt:n}){const u=m[0];if((u==="-"||u==="+")&&(e+=1),m=m.substring(e).replace(/_/g,""),n){switch(t){case 2:m=`0b${m}`;break;case 8:m=`0o${m}`;break;case 16:m=`0x${m}`;break}const s=BigInt(m);return u==="-"?BigInt(-1)*s:s}const i=parseInt(m,t);return u==="-"?-1*i:i}function dr(m,e,t){const{value:n}=m;if(ei(n)){const u=n.toString(e);return n<0?"-"+t+u.substr(1):t+u}return ot(m)}const Nd={identify:ei,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(m,e,t)=>Xi(m,2,2,t),stringify:m=>dr(m,2,"0b")},Bd={identify:ei,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(m,e,t)=>Xi(m,1,8,t),stringify:m=>dr(m,8,"0")},Pd={identify:ei,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(m,e,t)=>Xi(m,0,10,t),stringify:ot},Wd={identify:ei,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(m,e,t)=>Xi(m,2,16,t),stringify:m=>dr(m,16,"0x")};class mn extends Xe{constructor(e){super(e),this.tag=mn.tag}add(e){let t;Me(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new ze(e.key,null):t=new ze(e,null),Ut(this.items,t.key)||this.items.push(t)}get(e,t){const n=Ut(this.items,e);return!t&&Me(n)?ye(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);const n=Ut(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new ze(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,t,n){const{replacer:u}=n,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let s of t)typeof u=="function"&&(s=u.call(t,s,s)),i.items.push(ar(s,null,n));return i}}mn.tag="tag:yaml.org,2002:set";const fr={collection:"map",identify:m=>m instanceof Set,nodeClass:mn,default:!1,tag:"tag:yaml.org,2002:set",createNode:(m,e,t)=>mn.from(m,e,t),resolve(m,e){if(Zn(m)){if(m.hasAllNullValues(!0))return Object.assign(new mn,m);e("Set items must all have null values")}else e("Expected a mapping for this tag");return m}};function gr(m,e){const t=m[0],n=t==="-"||t==="+"?m.substring(1):m,u=s=>e?BigInt(s):Number(s),i=n.replace(/_/g,"").split(":").reduce((s,d)=>s*u(60)+u(d),u(0));return t==="-"?u(-1)*i:i}function _a(m){let{value:e}=m,t=s=>s;if(typeof e=="bigint")t=s=>BigInt(s);else if(isNaN(e)||!isFinite(e))return ot(m);let n="";e<0&&(n="-",e*=t(-1));const u=t(60),i=[e%u];return e<60?i.unshift(0):(e=(e-i[0])/u,i.unshift(e%u),e>=60&&(e=(e-i[0])/u,i.unshift(e))),n+i.map(s=>String(s).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const ka={identify:m=>typeof m=="bigint"||Number.isInteger(m),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(m,e,{intAsBigInt:t})=>gr(m,t),stringify:_a},Ta={identify:m=>typeof m=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:m=>gr(m,!1),stringify:_a},Zi={identify:m=>m instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(m){const e=m.match(Zi.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,t,n,u,i,s,d]=e.map(Number),o=e[7]?Number((e[7]+"00").substr(1,3)):0;let l=Date.UTC(t,n-1,u,i||0,s||0,d||0,o);const r=e[8];if(r&&r!=="Z"){let a=gr(r,!1);Math.abs(a)<30&&(a*=60),l-=6e4*a}return new Date(l)},stringify:({value:m})=>(m==null?void 0:m.toISOString().replace(/(T00:00:00)?\.000Z$/,""))??""},fo=[Dn,$n,Ji,Yi,$a,xa,Nd,Bd,Pd,Wd,Od,Fd,Rd,hr,wt,pr,ur,fr,ka,Ta,Zi],go=new Map([["core",Td],["failsafe",[Dn,$n,Ji]],["json",Id],["yaml11",fo],["yaml-1.1",fo]]),mo={binary:hr,bool:lr,float:ya,floatExp:va,floatNaN:ma,floatTime:Ta,int:Ca,intHex:Sa,intOct:wa,intTime:ka,map:Dn,merge:wt,null:Yi,omap:pr,pairs:ur,seq:$n,set:fr,timestamp:Zi},jd={"tag:yaml.org,2002:binary":hr,"tag:yaml.org,2002:merge":wt,"tag:yaml.org,2002:omap":pr,"tag:yaml.org,2002:pairs":ur,"tag:yaml.org,2002:set":fr,"tag:yaml.org,2002:timestamp":Zi};function Cs(m,e,t){const n=go.get(e);if(n&&!m)return t&&!n.includes(wt)?n.concat(wt):n.slice();let u=n;if(!u)if(Array.isArray(m))u=[];else{const i=Array.from(go.keys()).filter(s=>s!=="yaml11").map(s=>JSON.stringify(s)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${i} or define customTags array`)}if(Array.isArray(m))for(const i of m)u=u.concat(i);else typeof m=="function"&&(u=m(u.slice()));return t&&(u=u.concat(wt)),u.reduce((i,s)=>{const d=typeof s=="string"?mo[s]:s;if(!d){const o=JSON.stringify(s),l=Object.keys(mo).map(r=>JSON.stringify(r)).join(", ");throw new Error(`Unknown custom tag ${o}; use one of ${l}`)}return i.includes(d)||i.push(d),i},[])}const zd=(m,e)=>m.keye.key?1:0;class mr{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:u,schema:i,sortMapEntries:s,toStringDefaults:d}){this.compat=Array.isArray(e)?Cs(e,"compat"):e?Cs(null,e):null,this.name=typeof i=="string"&&i||"core",this.knownTags=u?jd:{},this.tags=Cs(t,this.name,n),this.toStringOptions=d??null,Object.defineProperty(this,kt,{value:Dn}),Object.defineProperty(this,ut,{value:Ji}),Object.defineProperty(this,En,{value:$n}),this.sortMapEntries=typeof s=="function"?s:s===!0?zd:null}clone(){const e=Object.create(mr.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function Hd(m,e){var o;const t=[];let n=e.directives===!0;if(e.directives!==!1&&m.directives){const l=m.directives.toString(m);l?(t.push(l),n=!0):m.directives.docStart&&(n=!0)}n&&t.push("---");const u=ua(m,e),{commentString:i}=u.options;if(m.commentBefore){t.length!==1&&t.unshift("");const l=i(m.commentBefore);t.unshift(vt(l,""))}let s=!1,d=null;if(m.contents){if(Le(m.contents)){if(m.contents.spaceBefore&&n&&t.push(""),m.contents.commentBefore){const a=i(m.contents.commentBefore);t.push(vt(a,""))}u.forceBlockIndent=!!m.comment,d=m.contents.comment}const l=d?void 0:()=>s=!0;let r=wn(m.contents,u,()=>d=null,l);d&&(r+=Vt(r,"",i(d))),(r[0]==="|"||r[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${r}`:t.push(r)}else t.push(wn(m.contents,u));if((o=m.directives)!=null&&o.docEnd)if(m.comment){const l=i(m.comment);l.includes(` +`+vt(l(m),o),d&&d()):a&&s&&s(),p}function Md({items:m},e,{flowChars:t,itemIndent:n}){const{indent:h,indentStep:i,flowCollectionPadding:s,options:{commentString:d}}=e;n+=i;const o=Object.assign({},e,{indent:n,inFlow:!0,type:null});let l=!1,r=0;const a=[];for(let u=0;ug=null);l||(l=a.length>r||v.includes(` +`)),u0&&(l||(l=a.reduce((b,D)=>b+D.length+2,2)+(v.length+2)>e.options.lineWidth)),l&&(v+=",")),g&&(v+=Vt(v,n,d(g))),a.push(v),r=a.length}const{start:c,end:p}=t;if(a.length===0)return c+p;if(!l){const u=a.reduce((f,g)=>f+g.length+2,2);l=e.options.lineWidth>0&&u>e.options.lineWidth}if(l){let u=c;for(const f of a)u+=f?` +${i}${h}${f}`:` +`;return`${u} +${h}${p}`}else return`${c}${s}${a.join(" ")}${s}${p}`}function Pi({indent:m,options:{commentString:e}},t,n,h){if(n&&h&&(n=n.replace(/^\n+/,"")),n){const i=vt(e(n),m);t.push(i.trimStart())}}function Ut(m,e){const t=ye(e)?e.value:e;for(const n of m)if(Me(n)&&(n.key===e||n.key===t||ye(n.key)&&n.key.value===t))return n}class Xe extends pa{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(kt,e),this.items=[]}static from(e,t,n){const{keepUndefined:h,replacer:i}=n,s=new this(e),d=(o,l)=>{if(typeof i=="function")l=i.call(t,o,l);else if(Array.isArray(i)&&!i.includes(o))return;(l!==void 0||h)&&s.items.push(cr(o,l,n))};if(t instanceof Map)for(const[o,l]of t)d(o,l);else if(t&&typeof t=="object")for(const o of Object.keys(t))d(o,t[o]);return typeof e.sortMapEntries=="function"&&s.items.sort(e.sortMapEntries),s}add(e,t){var s;let n;Me(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new He(e,e==null?void 0:e.value):n=new He(e.key,e.value);const h=Ut(this.items,n.key),i=(s=this.schema)==null?void 0:s.sortMapEntries;if(h){if(!t)throw new Error(`Key ${n.key} already set`);ye(h.value)&&ua(n.value)?h.value.value=n.value:h.value=n.value}else if(i){const d=this.items.findIndex(o=>i(n,o)<0);d===-1?this.items.push(n):this.items.splice(d,0,n)}else this.items.push(n)}delete(e){const t=Ut(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){const n=Ut(this.items,e),h=n==null?void 0:n.value;return(!t&&ye(h)?h.value:h)??void 0}has(e){return!!Ut(this.items,e)}set(e,t){this.add(new He(e,t),!0)}toJSON(e,t,n){const h=n?new n:t!=null&&t.mapAsMap?new Map:{};t!=null&&t.onCreate&&t.onCreate(h);for(const i of this.items)va(t,h,i);return h}toString(e,t,n){if(!e)return JSON.stringify(this);for(const h of this.items)if(!Me(h))throw new Error(`Map items must all be pairs; found ${JSON.stringify(h)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),ya(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}}const Dn={collection:"map",default:!0,nodeClass:Xe,tag:"tag:yaml.org,2002:map",resolve(m,e){return Zn(m)||e("Expected a mapping for this tag"),m},createNode:(m,e,t)=>Xe.from(m,e,t)};class Xt extends pa{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(En,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=bi(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){const n=bi(e);if(typeof n!="number")return;const h=this.items[n];return!t&&ye(h)?h.value:h}has(e){const t=bi(e);return typeof t=="number"&&t=0?e:null}const $n={collection:"seq",default:!0,nodeClass:Xt,tag:"tag:yaml.org,2002:seq",resolve(m,e){return qn(m)||e("Expected a sequence for this tag"),m},createNode:(m,e,t)=>Xt.from(m,e,t)},Yi={identify:m=>typeof m=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:m=>m,stringify(m,e,t,n){return e=Object.assign({actualString:!0},e),lr(m,e,t,n)}},Qi={identify:m=>m==null,createNode:()=>new ae(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new ae(null),stringify:({source:m},e)=>typeof m=="string"&&Qi.test.test(m)?m:e.options.nullStr},hr={identify:m=>typeof m=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:m=>new ae(m[0]==="t"||m[0]==="T"),stringify({source:m,value:e},t){if(m&&hr.test.test(m)){const n=m[0]==="t"||m[0]==="T";if(e===n)return m}return e?t.options.trueStr:t.options.falseStr}};function ot({format:m,minFractionDigits:e,tag:t,value:n}){if(typeof n=="bigint")return String(n);const h=typeof n=="number"?n:Number(n);if(!isFinite(h))return isNaN(h)?".nan":h<0?"-.inf":".inf";let i=Object.is(n,-0)?"-0":JSON.stringify(n);if(!m&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^\d/.test(i)){let s=i.indexOf(".");s<0&&(s=i.length,i+=".");let d=e-(i.length-s-1);for(;d-- >0;)i+="0"}return i}const ba={identify:m=>typeof m=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:m=>m.slice(-3).toLowerCase()==="nan"?NaN:m[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:ot},wa={identify:m=>typeof m=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:m=>parseFloat(m),stringify(m){const e=Number(m.value);return isFinite(e)?e.toExponential():ot(m)}},Ca={identify:m=>typeof m=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(m){const e=new ae(parseFloat(m)),t=m.indexOf(".");return t!==-1&&m[m.length-1]==="0"&&(e.minFractionDigits=m.length-t-1),e},stringify:ot},Xi=m=>typeof m=="bigint"||Number.isInteger(m),ur=(m,e,t,{intAsBigInt:n})=>n?BigInt(m):parseInt(m.substring(e),t);function Sa(m,e,t){const{value:n}=m;return Xi(n)&&n>=0?t+n.toString(e):ot(m)}const Ea={identify:m=>Xi(m)&&m>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(m,e,t)=>ur(m,2,8,t),stringify:m=>Sa(m,8,"0o")},Aa={identify:Xi,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(m,e,t)=>ur(m,0,10,t),stringify:ot},Da={identify:m=>Xi(m)&&m>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(m,e,t)=>ur(m,2,16,t),stringify:m=>Sa(m,16,"0x")},Id=[Dn,$n,Yi,Qi,hr,Ea,Aa,Da,ba,wa,Ca];function mo(m){return typeof m=="bigint"||Number.isInteger(m)}const wi=({value:m})=>JSON.stringify(m),Od=[{identify:m=>typeof m=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:m=>m,stringify:wi},{identify:m=>m==null,createNode:()=>new ae(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:wi},{identify:m=>typeof m=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:m=>m==="true",stringify:wi},{identify:mo,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(m,e,{intAsBigInt:t})=>t?BigInt(m):parseInt(m,10),stringify:({value:m})=>mo(m)?m.toString():JSON.stringify(m)},{identify:m=>typeof m=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:m=>parseFloat(m),stringify:wi}],Fd={default:!0,tag:"",test:/^/,resolve(m,e){return e(`Unresolved plain scalar ${JSON.stringify(m)}`),m}},Rd=[Dn,$n].concat(Od,Fd),pr={identify:m=>m instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(m,e){if(typeof atob=="function"){const t=atob(m.replace(/[\n\r]/g,"")),n=new Uint8Array(t.length);for(let h=0;h1&&e("Each pair must have its own sequence indicator");const h=n.items[0]||new He(new ae(null));if(n.commentBefore&&(h.key.commentBefore=h.key.commentBefore?`${n.commentBefore} +${h.key.commentBefore}`:n.commentBefore),n.comment){const i=h.value??h.key;i.comment=i.comment?`${n.comment} +${i.comment}`:n.comment}n=h}m.items[t]=Me(n)?n:new He(n)}}else e("Expected a sequence for this tag");return m}function xa(m,e,t){const{replacer:n}=t,h=new Xt(m);h.tag="tag:yaml.org,2002:pairs";let i=0;if(e&&Symbol.iterator in Object(e))for(let s of e){typeof n=="function"&&(s=n.call(e,String(i++),s));let d,o;if(Array.isArray(s))if(s.length===2)d=s[0],o=s[1];else throw new TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){const l=Object.keys(s);if(l.length===1)d=l[0],o=s[d];else throw new TypeError(`Expected tuple with one key, not ${l.length} keys`)}else d=s;h.items.push(cr(d,o,t))}return h}const dr={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:$a,createNode:xa};class gn extends Xt{constructor(){super(),this.add=Xe.prototype.add.bind(this),this.delete=Xe.prototype.delete.bind(this),this.get=Xe.prototype.get.bind(this),this.has=Xe.prototype.has.bind(this),this.set=Xe.prototype.set.bind(this),this.tag=gn.tag}toJSON(e,t){if(!t)return super.toJSON(e);const n=new Map;t!=null&&t.onCreate&&t.onCreate(n);for(const h of this.items){let i,s;if(Me(h)?(i=Ze(h.key,"",t),s=Ze(h.value,i,t)):i=Ze(h,"",t),n.has(i))throw new Error("Ordered maps must not include duplicate keys");n.set(i,s)}return n}static from(e,t,n){const h=xa(e,t,n),i=new this;return i.items=h.items,i}}gn.tag="tag:yaml.org,2002:omap";const fr={collection:"seq",identify:m=>m instanceof Map,nodeClass:gn,default:!1,tag:"tag:yaml.org,2002:omap",resolve(m,e){const t=$a(m,e),n=[];for(const{key:h}of t.items)ye(h)&&(n.includes(h.value)?e(`Ordered maps must not include duplicate keys: ${h.value}`):n.push(h.value));return Object.assign(new gn,t)},createNode:(m,e,t)=>gn.from(m,e,t)};function _a({value:m,source:e},t){return e&&(m?ka:Ta).test.test(e)?e:m?t.options.trueStr:t.options.falseStr}const ka={identify:m=>m===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new ae(!0),stringify:_a},Ta={identify:m=>m===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new ae(!1),stringify:_a},Nd={identify:m=>typeof m=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:m=>m.slice(-3).toLowerCase()==="nan"?NaN:m[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:ot},Bd={identify:m=>typeof m=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:m=>parseFloat(m.replace(/_/g,"")),stringify(m){const e=Number(m.value);return isFinite(e)?e.toExponential():ot(m)}},Pd={identify:m=>typeof m=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(m){const e=new ae(parseFloat(m.replace(/_/g,""))),t=m.indexOf(".");if(t!==-1){const n=m.substring(t+1).replace(/_/g,"");n[n.length-1]==="0"&&(e.minFractionDigits=n.length)}return e},stringify:ot},ei=m=>typeof m=="bigint"||Number.isInteger(m);function Zi(m,e,t,{intAsBigInt:n}){const h=m[0];if((h==="-"||h==="+")&&(e+=1),m=m.substring(e).replace(/_/g,""),n){switch(t){case 2:m=`0b${m}`;break;case 8:m=`0o${m}`;break;case 16:m=`0x${m}`;break}const s=BigInt(m);return h==="-"?BigInt(-1)*s:s}const i=parseInt(m,t);return h==="-"?-1*i:i}function gr(m,e,t){const{value:n}=m;if(ei(n)){const h=n.toString(e);return n<0?"-"+t+h.substr(1):t+h}return ot(m)}const Wd={identify:ei,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(m,e,t)=>Zi(m,2,2,t),stringify:m=>gr(m,2,"0b")},jd={identify:ei,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(m,e,t)=>Zi(m,1,8,t),stringify:m=>gr(m,8,"0")},Hd={identify:ei,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(m,e,t)=>Zi(m,0,10,t),stringify:ot},zd={identify:ei,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(m,e,t)=>Zi(m,2,16,t),stringify:m=>gr(m,16,"0x")};class mn extends Xe{constructor(e){super(e),this.tag=mn.tag}add(e){let t;Me(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new He(e.key,null):t=new He(e,null),Ut(this.items,t.key)||this.items.push(t)}get(e,t){const n=Ut(this.items,e);return!t&&Me(n)?ye(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);const n=Ut(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new He(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,t,n){const{replacer:h}=n,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let s of t)typeof h=="function"&&(s=h.call(t,s,s)),i.items.push(cr(s,null,n));return i}}mn.tag="tag:yaml.org,2002:set";const mr={collection:"map",identify:m=>m instanceof Set,nodeClass:mn,default:!1,tag:"tag:yaml.org,2002:set",createNode:(m,e,t)=>mn.from(m,e,t),resolve(m,e){if(Zn(m)){if(m.hasAllNullValues(!0))return Object.assign(new mn,m);e("Set items must all have null values")}else e("Expected a mapping for this tag");return m}};function vr(m,e){const t=m[0],n=t==="-"||t==="+"?m.substring(1):m,h=s=>e?BigInt(s):Number(s),i=n.replace(/_/g,"").split(":").reduce((s,d)=>s*h(60)+h(d),h(0));return t==="-"?h(-1)*i:i}function La(m){let{value:e}=m,t=s=>s;if(typeof e=="bigint")t=s=>BigInt(s);else if(isNaN(e)||!isFinite(e))return ot(m);let n="";e<0&&(n="-",e*=t(-1));const h=t(60),i=[e%h];return e<60?i.unshift(0):(e=(e-i[0])/h,i.unshift(e%h),e>=60&&(e=(e-i[0])/h,i.unshift(e))),n+i.map(s=>String(s).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const Ma={identify:m=>typeof m=="bigint"||Number.isInteger(m),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(m,e,{intAsBigInt:t})=>vr(m,t),stringify:La},Ia={identify:m=>typeof m=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:m=>vr(m,!1),stringify:La},qi={identify:m=>m instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(m){const e=m.match(qi.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,t,n,h,i,s,d]=e.map(Number),o=e[7]?Number((e[7]+"00").substr(1,3)):0;let l=Date.UTC(t,n-1,h,i||0,s||0,d||0,o);const r=e[8];if(r&&r!=="Z"){let a=vr(r,!1);Math.abs(a)<30&&(a*=60),l-=6e4*a}return new Date(l)},stringify:({value:m})=>(m==null?void 0:m.toISOString().replace(/(T00:00:00)?\.000Z$/,""))??""},vo=[Dn,$n,Yi,Qi,ka,Ta,Wd,jd,Hd,zd,Nd,Bd,Pd,pr,wt,fr,dr,mr,Ma,Ia,qi],yo=new Map([["core",Id],["failsafe",[Dn,$n,Yi]],["json",Rd],["yaml11",vo],["yaml-1.1",vo]]),bo={binary:pr,bool:hr,float:Ca,floatExp:wa,floatNaN:ba,floatTime:Ia,int:Aa,intHex:Da,intOct:Ea,intTime:Ma,map:Dn,merge:wt,null:Qi,omap:fr,pairs:dr,seq:$n,set:mr,timestamp:qi},Vd={"tag:yaml.org,2002:binary":pr,"tag:yaml.org,2002:merge":wt,"tag:yaml.org,2002:omap":fr,"tag:yaml.org,2002:pairs":dr,"tag:yaml.org,2002:set":mr,"tag:yaml.org,2002:timestamp":qi};function Ss(m,e,t){const n=yo.get(e);if(n&&!m)return t&&!n.includes(wt)?n.concat(wt):n.slice();let h=n;if(!h)if(Array.isArray(m))h=[];else{const i=Array.from(yo.keys()).filter(s=>s!=="yaml11").map(s=>JSON.stringify(s)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${i} or define customTags array`)}if(Array.isArray(m))for(const i of m)h=h.concat(i);else typeof m=="function"&&(h=m(h.slice()));return t&&(h=h.concat(wt)),h.reduce((i,s)=>{const d=typeof s=="string"?bo[s]:s;if(!d){const o=JSON.stringify(s),l=Object.keys(bo).map(r=>JSON.stringify(r)).join(", ");throw new Error(`Unknown custom tag ${o}; use one of ${l}`)}return i.includes(d)||i.push(d),i},[])}const Ud=(m,e)=>m.keye.key?1:0;class yr{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:h,schema:i,sortMapEntries:s,toStringDefaults:d}){this.compat=Array.isArray(e)?Ss(e,"compat"):e?Ss(null,e):null,this.name=typeof i=="string"&&i||"core",this.knownTags=h?Vd:{},this.tags=Ss(t,this.name,n),this.toStringOptions=d??null,Object.defineProperty(this,kt,{value:Dn}),Object.defineProperty(this,ut,{value:Yi}),Object.defineProperty(this,En,{value:$n}),this.sortMapEntries=typeof s=="function"?s:s===!0?Ud:null}clone(){const e=Object.create(yr.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function Kd(m,e){var o;const t=[];let n=e.directives===!0;if(e.directives!==!1&&m.directives){const l=m.directives.toString(m);l?(t.push(l),n=!0):m.directives.docStart&&(n=!0)}n&&t.push("---");const h=fa(m,e),{commentString:i}=h.options;if(m.commentBefore){t.length!==1&&t.unshift("");const l=i(m.commentBefore);t.unshift(vt(l,""))}let s=!1,d=null;if(m.contents){if(Le(m.contents)){if(m.contents.spaceBefore&&n&&t.push(""),m.contents.commentBefore){const a=i(m.contents.commentBefore);t.push(vt(a,""))}h.forceBlockIndent=!!m.comment,d=m.contents.comment}const l=d?void 0:()=>s=!0;let r=wn(m.contents,h,()=>d=null,l);d&&(r+=Vt(r,"",i(d))),(r[0]==="|"||r[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${r}`:t.push(r)}else t.push(wn(m.contents,h));if((o=m.directives)!=null&&o.docEnd)if(m.comment){const l=i(m.comment);l.includes(` `)?(t.push("..."),t.push(vt(l,""))):t.push(`... ${l}`)}else t.push("...");else{let l=m.comment;l&&s&&(l=l.replace(/^\n+/,"")),l&&((!s||d)&&t[t.length-1]!==""&&t.push(""),t.push(vt(i(l),"")))}return t.join(` `)+` -`}class qi{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,qe,{value:Is});let u=null;typeof t=="function"||Array.isArray(t)?u=t:n===void 0&&t&&(n=t,t=void 0);const i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},n);this.options=i;let{version:s}=i;n!=null&&n._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(s=this.directives.yaml.version)):this.directives=new We({version:s}),this.setSchema(s,n),this.contents=e===void 0?null:this.createNode(e,u,n)}clone(){const e=Object.create(qi.prototype,{[qe]:{value:Is}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=Le(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){ln(this.contents)&&this.contents.add(e)}addIn(e,t){ln(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const n=oa(this);e.anchor=!t||n.has(t)?aa(t||"a",n):t}return new rr(e.anchor)}createNode(e,t,n){let u;if(typeof t=="function")e=t.call({"":e},"",e),u=t;else if(Array.isArray(t)){const g=b=>typeof b=="number"||b instanceof String||b instanceof Number,v=t.filter(g).map(String);v.length>0&&(t=t.concat(v)),u=t}else n===void 0&&t&&(n=t,t=void 0);const{aliasDuplicateObjects:i,anchorPrefix:s,flow:d,keepUndefined:o,onTagObj:l,tag:r}=n??{},{onAnchor:a,setAnchors:c,sourceObjects:p}=vd(this,s||"a"),h={aliasDuplicateObjects:i??!0,keepUndefined:o??!1,onAnchor:a,onTagObj:l,replacer:u,schema:this.schema,sourceObjects:p},f=Yn(e,r,h);return d&&ke(f)&&(f.flow=!0),c(),f}createPair(e,t,n={}){const u=this.createNode(e,null,n),i=this.createNode(t,null,n);return new ze(u,i)}delete(e){return ln(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Nn(e)?this.contents==null?!1:(this.contents=null,!0):ln(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return ke(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return Nn(e)?!t&&ye(this.contents)?this.contents.value:this.contents:ke(this.contents)?this.contents.getIn(e,t):void 0}has(e){return ke(this.contents)?this.contents.has(e):!1}hasIn(e){return Nn(e)?this.contents!==void 0:ke(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=Ni(this.schema,[e],t):ln(this.contents)&&this.contents.set(e,t)}setIn(e,t){Nn(e)?this.contents=t:this.contents==null?this.contents=Ni(this.schema,Array.from(e),t):ln(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let n;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new We({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new We({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{const u=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${u}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new mr(Object.assign(n,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:u,onAnchor:i,reviver:s}={}){const d={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof u=="number"?u:100},o=Ze(this.contents,t??"",d);if(typeof i=="function")for(const{count:l,res:r}of d.anchors.values())i(r,l);return typeof s=="function"?pn(s,{"":o},"",o):o}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return Hd(this,e)}}function ln(m){if(ke(m))return!0;throw new Error("Expected a YAML collection as document contents")}class La extends Error{constructor(e,t,n,u){super(),this.name=e,this.code=n,this.message=u,this.pos=t}}class Bn extends La{constructor(e,t,n){super("YAMLParseError",e,t,n)}}class Vd extends La{constructor(e,t,n){super("YAMLWarning",e,t,n)}}const vo=(m,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(d=>e.linePos(d));const{line:n,col:u}=t.linePos[0];t.message+=` at line ${n}, column ${u}`;let i=u-1,s=m.substring(e.lineStarts[n-1],e.lineStarts[n]).replace(/[\n\r]+$/,"");if(i>=60&&s.length>80){const d=Math.min(i-39,s.length-79);s="…"+s.substring(d),i-=d-1}if(s.length>80&&(s=s.substring(0,79)+"…"),n>1&&/^ *$/.test(s.substring(0,i))){let d=m.substring(e.lineStarts[n-2],e.lineStarts[n-1]);d.length>80&&(d=d.substring(0,79)+`… -`),s=d+s}if(/[^ ]/.test(s)){let d=1;const o=t.linePos[1];(o==null?void 0:o.line)===n&&o.col>u&&(d=Math.max(1,Math.min(o.col-u,80-i)));const l=" ".repeat(i)+"^".repeat(d);t.message+=`: +`}class es{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,qe,{value:Os});let h=null;typeof t=="function"||Array.isArray(t)?h=t:n===void 0&&t&&(n=t,t=void 0);const i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},n);this.options=i;let{version:s}=i;n!=null&&n._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(s=this.directives.yaml.version)):this.directives=new We({version:s}),this.setSchema(s,n),this.contents=e===void 0?null:this.createNode(e,h,n)}clone(){const e=Object.create(es.prototype,{[qe]:{value:Os}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=Le(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){ln(this.contents)&&this.contents.add(e)}addIn(e,t){ln(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const n=ca(this);e.anchor=!t||n.has(t)?ha(t||"a",n):t}return new ar(e.anchor)}createNode(e,t,n){let h;if(typeof t=="function")e=t.call({"":e},"",e),h=t;else if(Array.isArray(t)){const g=b=>typeof b=="number"||b instanceof String||b instanceof Number,v=t.filter(g).map(String);v.length>0&&(t=t.concat(v)),h=t}else n===void 0&&t&&(n=t,t=void 0);const{aliasDuplicateObjects:i,anchorPrefix:s,flow:d,keepUndefined:o,onTagObj:l,tag:r}=n??{},{onAnchor:a,setAnchors:c,sourceObjects:p}=wd(this,s||"a"),u={aliasDuplicateObjects:i??!0,keepUndefined:o??!1,onAnchor:a,onTagObj:l,replacer:h,schema:this.schema,sourceObjects:p},f=Yn(e,r,u);return d&&Te(f)&&(f.flow=!0),c(),f}createPair(e,t,n={}){const h=this.createNode(e,null,n),i=this.createNode(t,null,n);return new He(h,i)}delete(e){return ln(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Nn(e)?this.contents==null?!1:(this.contents=null,!0):ln(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return Te(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return Nn(e)?!t&&ye(this.contents)?this.contents.value:this.contents:Te(this.contents)?this.contents.getIn(e,t):void 0}has(e){return Te(this.contents)?this.contents.has(e):!1}hasIn(e){return Nn(e)?this.contents!==void 0:Te(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=Bi(this.schema,[e],t):ln(this.contents)&&this.contents.set(e,t)}setIn(e,t){Nn(e)?this.contents=t:this.contents==null?this.contents=Bi(this.schema,Array.from(e),t):ln(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let n;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new We({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new We({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{const h=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${h}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new yr(Object.assign(n,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:h,onAnchor:i,reviver:s}={}){const d={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof h=="number"?h:100},o=Ze(this.contents,t??"",d);if(typeof i=="function")for(const{count:l,res:r}of d.anchors.values())i(r,l);return typeof s=="function"?pn(s,{"":o},"",o):o}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return Kd(this,e)}}function ln(m){if(Te(m))return!0;throw new Error("Expected a YAML collection as document contents")}class Oa extends Error{constructor(e,t,n,h){super(),this.name=e,this.code=n,this.message=h,this.pos=t}}class Bn extends Oa{constructor(e,t,n){super("YAMLParseError",e,t,n)}}class Gd extends Oa{constructor(e,t,n){super("YAMLWarning",e,t,n)}}const wo=(m,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(d=>e.linePos(d));const{line:n,col:h}=t.linePos[0];t.message+=` at line ${n}, column ${h}`;let i=h-1,s=m.substring(e.lineStarts[n-1],e.lineStarts[n]).replace(/[\n\r]+$/,"");if(i>=60&&s.length>80){const d=Math.min(i-39,s.length-79);s="…"+s.substring(d),i-=d-1}if(s.length>80&&(s=s.substring(0,79)+"…"),n>1&&/^ *$/.test(s.substring(0,i))){let d=m.substring(e.lineStarts[n-2],e.lineStarts[n-1]);d.length>80&&(d=d.substring(0,79)+`… +`),s=d+s}if(/[^ ]/.test(s)){let d=1;const o=t.linePos[1];(o==null?void 0:o.line)===n&&o.col>h&&(d=Math.max(1,Math.min(o.col-h,80-i)));const l=" ".repeat(i)+"^".repeat(d);t.message+=`: ${s} ${l} -`}};function Cn(m,{flow:e,indicator:t,next:n,offset:u,onError:i,parentIndent:s,startOnNewline:d}){let o=!1,l=d,r=d,a="",c="",p=!1,h=!1,f=null,g=null,v=null,b=null,D=null,E=null,w=null;for(const T of m)switch(h&&(T.type!=="space"&&T.type!=="newline"&&T.type!=="comma"&&i(T.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h=!1),f&&(l&&T.type!=="comment"&&T.type!=="newline"&&i(f,"TAB_AS_INDENT","Tabs are not allowed as indentation"),f=null),T.type){case"space":!e&&(t!=="doc-start"||(n==null?void 0:n.type)!=="flow-collection")&&T.source.includes(" ")&&(f=T),r=!0;break;case"comment":{r||i(T,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const $=T.source.substring(1)||" ";a?a+=c+$:a=$,c="",l=!1;break}case"newline":l?a?a+=T.source:(!E||t!=="seq-item-ind")&&(o=!0):c+=T.source,l=!0,p=!0,(g||v)&&(b=T),r=!0;break;case"anchor":g&&i(T,"MULTIPLE_ANCHORS","A node can have at most one anchor"),T.source.endsWith(":")&&i(T.offset+T.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=T,w??(w=T.offset),l=!1,r=!1,h=!0;break;case"tag":{v&&i(T,"MULTIPLE_TAGS","A node can have at most one tag"),v=T,w??(w=T.offset),l=!1,r=!1,h=!0;break}case t:(g||v)&&i(T,"BAD_PROP_ORDER",`Anchors and tags must be after the ${T.source} indicator`),E&&i(T,"UNEXPECTED_TOKEN",`Unexpected ${T.source} in ${e??"collection"}`),E=T,l=t==="seq-item-ind"||t==="explicit-key-ind",r=!1;break;case"comma":if(e){D&&i(T,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),D=T,l=!1,r=!1;break}default:i(T,"UNEXPECTED_TOKEN",`Unexpected ${T.type} token`),l=!1,r=!1}const y=m[m.length-1],A=y?y.offset+y.source.length:u;return h&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")&&i(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),f&&(l&&f.indent<=s||(n==null?void 0:n.type)==="block-map"||(n==null?void 0:n.type)==="block-seq")&&i(f,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:D,found:E,spaceBefore:o,comment:a,hasNewline:p,anchor:g,tag:v,newlineAfterProp:b,end:A,start:w??A}}function Qn(m){if(!m)return null;switch(m.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(m.source.includes(` -`))return!0;if(m.end){for(const e of m.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of m.items){for(const t of e.start)if(t.type==="newline")return!0;if(e.sep){for(const t of e.sep)if(t.type==="newline")return!0}if(Qn(e.key)||Qn(e.value))return!0}return!1;default:return!0}}function Ns(m,e,t){if((e==null?void 0:e.type)==="flow-collection"){const n=e.end[0];n.indent===m&&(n.source==="]"||n.source==="}")&&Qn(e)&&t(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Ma(m,e,t){const{uniqueKeys:n}=m.options;if(n===!1)return!1;const u=typeof n=="function"?n:(i,s)=>i===s||ye(i)&&ye(s)&&i.value===s.value;return e.some(i=>u(i.key,t))}const yo="All mapping items must start at the same column";function Ud({composeNode:m,composeEmptyNode:e},t,n,u,i){var r;const s=(i==null?void 0:i.nodeClass)??Xe,d=new s(t.schema);t.atRoot&&(t.atRoot=!1);let o=n.offset,l=null;for(const a of n.items){const{start:c,key:p,sep:h,value:f}=a,g=Cn(c,{indicator:"explicit-key-ind",next:p??(h==null?void 0:h[0]),offset:o,onError:u,parentIndent:n.indent,startOnNewline:!0}),v=!g.found;if(v){if(p&&(p.type==="block-seq"?u(o,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in p&&p.indent!==n.indent&&u(o,"BAD_INDENT",yo)),!g.anchor&&!g.tag&&!h){l=g.end,g.comment&&(d.comment?d.comment+=` -`+g.comment:d.comment=g.comment);continue}(g.newlineAfterProp||Qn(p))&&u(p??c[c.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((r=g.found)==null?void 0:r.indent)!==n.indent&&u(o,"BAD_INDENT",yo);t.atKey=!0;const b=g.end,D=p?m(t,p,g,u):e(t,b,c,null,g,u);t.schema.compat&&Ns(n.indent,p,u),t.atKey=!1,Ma(t,d.items,D)&&u(b,"DUPLICATE_KEY","Map keys must be unique");const E=Cn(h??[],{indicator:"map-value-ind",next:f,offset:D.range[2],onError:u,parentIndent:n.indent,startOnNewline:!p||p.type==="block-scalar"});if(o=E.end,E.found){v&&((f==null?void 0:f.type)==="block-map"&&!E.hasNewline&&u(o,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&g.startm&&(m.type==="block-map"||m.type==="block-seq");function Gd({composeNode:m,composeEmptyNode:e},t,n,u,i){var g;const s=n.start.source==="{",d=s?"flow map":"flow sequence",o=(i==null?void 0:i.nodeClass)??(s?Xe:Xt),l=new o(t.schema);l.flow=!0;const r=t.atRoot;r&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let a=n.offset+n.start.source.length;for(let v=0;v0){const v=ti(h,f,t.options.strict,u);v.comment&&(l.comment?l.comment+=` -`+v.comment:l.comment=v.comment),l.range=[n.offset,f,v.offset]}else l.range=[n.offset,f,f];return l}function As(m,e,t,n,u,i){const s=t.type==="block-map"?Ud(m,e,t,n,i):t.type==="block-seq"?Kd(m,e,t,n,i):Gd(m,e,t,n,i),d=s.constructor;return u==="!"||u===d.tagName?(s.tag=d.tagName,s):(u&&(s.tag=u),s)}function Jd(m,e,t,n,u){var c;const i=n.tag,s=i?e.directives.tagName(i.source,p=>u(i,"TAG_RESOLVE_FAILED",p)):null;if(t.type==="block-seq"){const{anchor:p,newlineAfterProp:h}=n,f=p&&i?p.offset>i.offset?p:i:p??i;f&&(!h||h.offsetp.tag===s&&p.collection===d);if(!o){const p=e.schema.knownTags[s];if((p==null?void 0:p.collection)===d)e.schema.tags.push(Object.assign({},p,{default:!1})),o=p;else return p?u(i,"BAD_COLLECTION_TYPE",`${p.tag} used for ${d} collection, but expects ${p.collection??"scalar"}`,!0):u(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,!0),As(m,e,t,u,s)}const l=As(m,e,t,u,s,o),r=((c=o.resolve)==null?void 0:c.call(o,l,p=>u(i,"TAG_RESOLVE_FAILED",p),e.options))??l,a=Le(r)?r:new ae(r);return a.range=l.range,a.tag=s,o!=null&&o.format&&(a.format=o.format),a}function Yd(m,e,t){const n=e.offset,u=Qd(e,m.options.strict,t);if(!u)return{value:"",type:null,comment:"",range:[n,n,n]};const i=u.mode===">"?ae.BLOCK_FOLDED:ae.BLOCK_LITERAL,s=e.source?Xd(e.source):[];let d=s.length;for(let f=s.length-1;f>=0;--f){const g=s[f][1];if(g===""||g==="\r")d=f;else break}if(d===0){const f=u.chomp==="+"&&s.length>0?` -`.repeat(Math.max(1,s.length-1)):"";let g=n+u.length;return e.source&&(g+=e.source.length),{value:f,type:i,comment:u.comment,range:[n,g,g]}}let o=e.indent+u.indent,l=e.offset+u.length,r=0;for(let f=0;fo&&(o=g.length);else{g.length=d;--f)s[f][0].length>o&&(d=f+1);let a="",c="",p=!1;for(let f=0;fi===s||ye(i)&&ye(s)&&i.value===s.value;return e.some(i=>h(i.key,t))}const Co="All mapping items must start at the same column";function Jd({composeNode:m,composeEmptyNode:e},t,n,h,i){var r;const s=(i==null?void 0:i.nodeClass)??Xe,d=new s(t.schema);t.atRoot&&(t.atRoot=!1);let o=n.offset,l=null;for(const a of n.items){const{start:c,key:p,sep:u,value:f}=a,g=Cn(c,{indicator:"explicit-key-ind",next:p??(u==null?void 0:u[0]),offset:o,onError:h,parentIndent:n.indent,startOnNewline:!0}),v=!g.found;if(v){if(p&&(p.type==="block-seq"?h(o,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in p&&p.indent!==n.indent&&h(o,"BAD_INDENT",Co)),!g.anchor&&!g.tag&&!u){l=g.end,g.comment&&(d.comment?d.comment+=` +`+g.comment:d.comment=g.comment);continue}(g.newlineAfterProp||Qn(p))&&h(p??c[c.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((r=g.found)==null?void 0:r.indent)!==n.indent&&h(o,"BAD_INDENT",Co);t.atKey=!0;const b=g.end,D=p?m(t,p,g,h):e(t,b,c,null,g,h);t.schema.compat&&Bs(n.indent,p,h),t.atKey=!1,Fa(t,d.items,D)&&h(b,"DUPLICATE_KEY","Map keys must be unique");const E=Cn(u??[],{indicator:"map-value-ind",next:f,offset:D.range[2],onError:h,parentIndent:n.indent,startOnNewline:!p||p.type==="block-scalar"});if(o=E.end,E.found){v&&((f==null?void 0:f.type)==="block-map"&&!E.hasNewline&&h(o,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&g.startm&&(m.type==="block-map"||m.type==="block-seq");function Qd({composeNode:m,composeEmptyNode:e},t,n,h,i){var g;const s=n.start.source==="{",d=s?"flow map":"flow sequence",o=(i==null?void 0:i.nodeClass)??(s?Xe:Xt),l=new o(t.schema);l.flow=!0;const r=t.atRoot;r&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let a=n.offset+n.start.source.length;for(let v=0;v0){const v=ti(u,f,t.options.strict,h);v.comment&&(l.comment?l.comment+=` +`+v.comment:l.comment=v.comment),l.range=[n.offset,f,v.offset]}else l.range=[n.offset,f,f];return l}function Ds(m,e,t,n,h,i){const s=t.type==="block-map"?Jd(m,e,t,n,i):t.type==="block-seq"?Yd(m,e,t,n,i):Qd(m,e,t,n,i),d=s.constructor;return h==="!"||h===d.tagName?(s.tag=d.tagName,s):(h&&(s.tag=h),s)}function Xd(m,e,t,n,h){var c;const i=n.tag,s=i?e.directives.tagName(i.source,p=>h(i,"TAG_RESOLVE_FAILED",p)):null;if(t.type==="block-seq"){const{anchor:p,newlineAfterProp:u}=n,f=p&&i?p.offset>i.offset?p:i:p??i;f&&(!u||u.offsetp.tag===s&&p.collection===d);if(!o){const p=e.schema.knownTags[s];if((p==null?void 0:p.collection)===d)e.schema.tags.push(Object.assign({},p,{default:!1})),o=p;else return p?h(i,"BAD_COLLECTION_TYPE",`${p.tag} used for ${d} collection, but expects ${p.collection??"scalar"}`,!0):h(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,!0),Ds(m,e,t,h,s)}const l=Ds(m,e,t,h,s,o),r=((c=o.resolve)==null?void 0:c.call(o,l,p=>h(i,"TAG_RESOLVE_FAILED",p),e.options))??l,a=Le(r)?r:new ae(r);return a.range=l.range,a.tag=s,o!=null&&o.format&&(a.format=o.format),a}function Zd(m,e,t){const n=e.offset,h=qd(e,m.options.strict,t);if(!h)return{value:"",type:null,comment:"",range:[n,n,n]};const i=h.mode===">"?ae.BLOCK_FOLDED:ae.BLOCK_LITERAL,s=e.source?ef(e.source):[];let d=s.length;for(let f=s.length-1;f>=0;--f){const g=s[f][1];if(g===""||g==="\r")d=f;else break}if(d===0){const f=h.chomp==="+"&&s.length>0?` +`.repeat(Math.max(1,s.length-1)):"";let g=n+h.length;return e.source&&(g+=e.source.length),{value:f,type:i,comment:h.comment,range:[n,g,g]}}let o=e.indent+h.indent,l=e.offset+h.length,r=0;for(let f=0;fo&&(o=g.length);else{g.length=d;--f)s[f][0].length>o&&(d=f+1);let a="",c="",p=!1;for(let f=0;fo||v[0]===" "?(c===" "?c=` `:!p&&c===` `&&(c=` @@ -1469,55 +1469,55 @@ ${l} `,p=!0):v===""?c===` `?a+=` `:c=` -`:(a+=c+v,c=" ",p=!1)}switch(u.chomp){case"-":break;case"+":for(let f=d;ft(n+c,p,h);switch(u){case"scalar":d=ae.PLAIN,o=qd(i,l);break;case"single-quoted-scalar":d=ae.QUOTE_SINGLE,o=ef(i,l);break;case"double-quoted-scalar":d=ae.QUOTE_DOUBLE,o=tf(i,l);break;default:return t(m,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${u}`),{value:"",type:null,comment:"",range:[n,n+i.length,n+i.length]}}const r=n+i.length,a=ti(s,r,e,t);return{value:o,type:d,comment:a.comment,range:[n,r,a.offset]}}function qd(m,e){let t="";switch(m[0]){case" ":t="a tab character";break;case",":t="flow indicator character ,";break;case"%":t="directive indicator character %";break;case"|":case">":{t=`block scalar indicator ${m[0]}`;break}case"@":case"`":{t=`reserved character ${m[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),Ia(m)}function ef(m,e){return(m[m.length-1]!=="'"||m.length===1)&&e(m.length,"MISSING_CHAR","Missing closing 'quote"),Ia(m.slice(1,-1)).replace(/''/g,"'")}function Ia(m){let e,t;try{e=new RegExp(`(.*?)(?t(n+c,p,u);switch(h){case"scalar":d=ae.PLAIN,o=nf(i,l);break;case"single-quoted-scalar":d=ae.QUOTE_SINGLE,o=sf(i,l);break;case"double-quoted-scalar":d=ae.QUOTE_DOUBLE,o=rf(i,l);break;default:return t(m,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${h}`),{value:"",type:null,comment:"",range:[n,n+i.length,n+i.length]}}const r=n+i.length,a=ti(s,r,e,t);return{value:o,type:d,comment:a.comment,range:[n,r,a.offset]}}function nf(m,e){let t="";switch(m[0]){case" ":t="a tab character";break;case",":t="flow indicator character ,";break;case"%":t="directive indicator character %";break;case"|":case">":{t=`block scalar indicator ${m[0]}`;break}case"@":case"`":{t=`reserved character ${m[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),Ra(m)}function sf(m,e){return(m[m.length-1]!=="'"||m.length===1)&&e(m.length,"MISSING_CHAR","Missing closing 'quote"),Ra(m.slice(1,-1)).replace(/''/g,"'")}function Ra(m){let e,t;try{e=new RegExp(`(.*?)(?i?m.slice(i,n+1):u)}else t+=u}return(m[m.length-1]!=='"'||m.length===1)&&e(m.length,"MISSING_CHAR",'Missing closing "quote'),t}function nf(m,e){let t="",n=m[e+1];for(;(n===" "||n===" "||n===` +`)&&(t+=n>i?m.slice(i,n+1):h)}else t+=h}return(m[m.length-1]!=='"'||m.length===1)&&e(m.length,"MISSING_CHAR",'Missing closing "quote'),t}function of(m,e){let t="",n=m[e+1];for(;(n===" "||n===" "||n===` `||n==="\r")&&!(n==="\r"&&m[e+2]!==` `);)n===` `&&(t+=` -`),e+=1,n=m[e+1];return t||(t=" "),{fold:t,offset:e}}const sf={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:` -`,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function rf(m,e,t,n){const u=m.substr(e,t),s=u.length===t&&/^[0-9a-fA-F]+$/.test(u)?parseInt(u,16):NaN;if(isNaN(s)){const d=m.substr(e-2,t+2);return n(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${d}`),d}return String.fromCodePoint(s)}function Oa(m,e,t,n){const{value:u,type:i,comment:s,range:d}=e.type==="block-scalar"?Yd(m,e,n):Zd(e,m.options.strict,n),o=t?m.directives.tagName(t.source,a=>n(t,"TAG_RESOLVE_FAILED",a)):null;let l;m.options.stringKeys&&m.atKey?l=m.schema[ut]:o?l=of(m.schema,u,o,t,n):e.type==="scalar"?l=af(m,u,e,n):l=m.schema[ut];let r;try{const a=l.resolve(u,c=>n(t??e,"TAG_RESOLVE_FAILED",c),m.options);r=ye(a)?a:new ae(a)}catch(a){const c=a instanceof Error?a.message:String(a);n(t??e,"TAG_RESOLVE_FAILED",c),r=new ae(u)}return r.range=d,r.source=u,i&&(r.type=i),o&&(r.tag=o),l.format&&(r.format=l.format),s&&(r.comment=s),r}function of(m,e,t,n,u){var d;if(t==="!")return m[ut];const i=[];for(const o of m.tags)if(!o.collection&&o.tag===t)if(o.default&&o.test)i.push(o);else return o;for(const o of i)if((d=o.test)!=null&&d.test(e))return o;const s=m.knownTags[t];return s&&!s.collection?(m.tags.push(Object.assign({},s,{default:!1,test:void 0})),s):(u(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),m[ut])}function af({atKey:m,directives:e,schema:t},n,u,i){const s=t.tags.find(d=>{var o;return(d.default===!0||m&&d.default==="key")&&((o=d.test)==null?void 0:o.test(n))})||t[ut];if(t.compat){const d=t.compat.find(o=>{var l;return o.default&&((l=o.test)==null?void 0:l.test(n))})??t[ut];if(s.tag!==d.tag){const o=e.tagString(s.tag),l=e.tagString(d.tag),r=`Value may be parsed as either ${o} or ${l}`;i(u,"TAG_RESOLVE_FAILED",r,!0)}}return s}function lf(m,e,t){if(e){t??(t=e.length);for(let n=t-1;n>=0;--n){let u=e[n];switch(u.type){case"space":case"comment":case"newline":m-=u.source.length;continue}for(u=e[++n];(u==null?void 0:u.type)==="space";)m+=u.source.length,u=e[++n];break}}return m}const cf={composeNode:Fa,composeEmptyNode:vr};function Fa(m,e,t,n){const u=m.atKey,{spaceBefore:i,comment:s,anchor:d,tag:o}=t;let l,r=!0;switch(e.type){case"alias":l=hf(m,e,n),(d||o)&&n(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":l=Oa(m,e,o,n),d&&(l.anchor=d.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{l=Jd(cf,m,e,t,n),d&&(l.anchor=d.source.substring(1))}catch(a){const c=a instanceof Error?a.message:String(a);n(e,"RESOURCE_EXHAUSTION",c)}break;default:{const a=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;n(e,"UNEXPECTED_TOKEN",a),r=!1}}return l??(l=vr(m,e.offset,void 0,null,t,n)),d&&l.anchor===""&&n(d,"BAD_ALIAS","Anchor cannot be an empty string"),u&&m.options.stringKeys&&(!ye(l)||typeof l.value!="string"||l.tag&&l.tag!=="tag:yaml.org,2002:str")&&n(o??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),i&&(l.spaceBefore=!0),s&&(e.type==="scalar"&&e.source===""?l.comment=s:l.commentBefore=s),m.options.keepSourceTokens&&r&&(l.srcToken=e),l}function vr(m,e,t,n,{spaceBefore:u,comment:i,anchor:s,tag:d,end:o},l){const r={type:"scalar",offset:lf(e,t,n),indent:-1,source:""},a=Oa(m,r,d,l);return s&&(a.anchor=s.source.substring(1),a.anchor===""&&l(s,"BAD_ALIAS","Anchor cannot be an empty string")),u&&(a.spaceBefore=!0),i&&(a.comment=i,a.range[2]=o),a}function hf({options:m},{offset:e,source:t,end:n},u){const i=new rr(t.substring(1));i.source===""&&u(e,"BAD_ALIAS","Alias cannot be an empty string"),i.source.endsWith(":")&&u(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const s=e+t.length,d=ti(n,s,m.strict,u);return i.range=[e,s,d.offset],d.comment&&(i.comment=d.comment),i}function uf(m,e,{offset:t,start:n,value:u,end:i},s){const d=Object.assign({_directives:e},m),o=new qi(void 0,d),l={atKey:!1,atRoot:!0,directives:o.directives,options:o.options,schema:o.schema},r=Cn(n,{indicator:"doc-start",next:u??(i==null?void 0:i[0]),offset:t,onError:s,parentIndent:0,startOnNewline:!0});r.found&&(o.directives.docStart=!0,u&&(u.type==="block-map"||u.type==="block-seq")&&!r.hasNewline&&s(r.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),o.contents=u?Fa(l,u,r,s):vr(l,r.end,n,null,r,s);const a=o.contents.range[2],c=ti(i,a,!1,s);return c.comment&&(o.comment=c.comment),o.range=[t,a,c.offset],o}function Mn(m){if(typeof m=="number")return[m,m+1];if(Array.isArray(m))return m.length===2?m:[m[0],m[1]];const{offset:e,source:t}=m;return[e,e+(typeof t=="string"?t.length:1)]}function bo(m){var u;let e="",t=!1,n=!1;for(let i=0;in(t,"TAG_RESOLVE_FAILED",a)):null;let l;m.options.stringKeys&&m.atKey?l=m.schema[ut]:o?l=cf(m.schema,h,o,t,n):e.type==="scalar"?l=hf(m,h,e,n):l=m.schema[ut];let r;try{const a=l.resolve(h,c=>n(t??e,"TAG_RESOLVE_FAILED",c),m.options);r=ye(a)?a:new ae(a)}catch(a){const c=a instanceof Error?a.message:String(a);n(t??e,"TAG_RESOLVE_FAILED",c),r=new ae(h)}return r.range=d,r.source=h,i&&(r.type=i),o&&(r.tag=o),l.format&&(r.format=l.format),s&&(r.comment=s),r}function cf(m,e,t,n,h){var d;if(t==="!")return m[ut];const i=[];for(const o of m.tags)if(!o.collection&&o.tag===t)if(o.default&&o.test)i.push(o);else return o;for(const o of i)if((d=o.test)!=null&&d.test(e))return o;const s=m.knownTags[t];return s&&!s.collection?(m.tags.push(Object.assign({},s,{default:!1,test:void 0})),s):(h(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),m[ut])}function hf({atKey:m,directives:e,schema:t},n,h,i){const s=t.tags.find(d=>{var o;return(d.default===!0||m&&d.default==="key")&&((o=d.test)==null?void 0:o.test(n))})||t[ut];if(t.compat){const d=t.compat.find(o=>{var l;return o.default&&((l=o.test)==null?void 0:l.test(n))})??t[ut];if(s.tag!==d.tag){const o=e.tagString(s.tag),l=e.tagString(d.tag),r=`Value may be parsed as either ${o} or ${l}`;i(h,"TAG_RESOLVE_FAILED",r,!0)}}return s}function uf(m,e,t){if(e){t??(t=e.length);for(let n=t-1;n>=0;--n){let h=e[n];switch(h.type){case"space":case"comment":case"newline":m-=h.source.length;continue}for(h=e[++n];(h==null?void 0:h.type)==="space";)m+=h.source.length,h=e[++n];break}}return m}const pf={composeNode:Ba,composeEmptyNode:br};function Ba(m,e,t,n){const h=m.atKey,{spaceBefore:i,comment:s,anchor:d,tag:o}=t;let l,r=!0;switch(e.type){case"alias":l=df(m,e,n),(d||o)&&n(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":l=Na(m,e,o,n),d&&(l.anchor=d.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{l=Xd(pf,m,e,t,n),d&&(l.anchor=d.source.substring(1))}catch(a){const c=a instanceof Error?a.message:String(a);n(e,"RESOURCE_EXHAUSTION",c)}break;default:{const a=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;n(e,"UNEXPECTED_TOKEN",a),r=!1}}return l??(l=br(m,e.offset,void 0,null,t,n)),d&&l.anchor===""&&n(d,"BAD_ALIAS","Anchor cannot be an empty string"),h&&m.options.stringKeys&&(!ye(l)||typeof l.value!="string"||l.tag&&l.tag!=="tag:yaml.org,2002:str")&&n(o??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),i&&(l.spaceBefore=!0),s&&(e.type==="scalar"&&e.source===""?l.comment=s:l.commentBefore=s),m.options.keepSourceTokens&&r&&(l.srcToken=e),l}function br(m,e,t,n,{spaceBefore:h,comment:i,anchor:s,tag:d,end:o},l){const r={type:"scalar",offset:uf(e,t,n),indent:-1,source:""},a=Na(m,r,d,l);return s&&(a.anchor=s.source.substring(1),a.anchor===""&&l(s,"BAD_ALIAS","Anchor cannot be an empty string")),h&&(a.spaceBefore=!0),i&&(a.comment=i,a.range[2]=o),a}function df({options:m},{offset:e,source:t,end:n},h){const i=new ar(t.substring(1));i.source===""&&h(e,"BAD_ALIAS","Alias cannot be an empty string"),i.source.endsWith(":")&&h(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const s=e+t.length,d=ti(n,s,m.strict,h);return i.range=[e,s,d.offset],d.comment&&(i.comment=d.comment),i}function ff(m,e,{offset:t,start:n,value:h,end:i},s){const d=Object.assign({_directives:e},m),o=new es(void 0,d),l={atKey:!1,atRoot:!0,directives:o.directives,options:o.options,schema:o.schema},r=Cn(n,{indicator:"doc-start",next:h??(i==null?void 0:i[0]),offset:t,onError:s,parentIndent:0,startOnNewline:!0});r.found&&(o.directives.docStart=!0,h&&(h.type==="block-map"||h.type==="block-seq")&&!r.hasNewline&&s(r.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),o.contents=h?Ba(l,h,r,s):br(l,r.end,n,null,r,s);const a=o.contents.range[2],c=ti(i,a,!1,s);return c.comment&&(o.comment=c.comment),o.range=[t,a,c.offset],o}function Mn(m){if(typeof m=="number")return[m,m+1];if(Array.isArray(m))return m.length===2?m:[m[0],m[1]];const{offset:e,source:t}=m;return[e,e+(typeof t=="string"?t.length:1)]}function So(m){var h;let e="",t=!1,n=!1;for(let i=0;i{const s=Mn(t);i?this.warnings.push(new Vd(s,n,u)):this.errors.push(new Bn(s,n,u))},this.directives=new We({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:n,afterEmptyLine:u}=bo(this.prelude);if(n){const i=e.contents;if(t)e.comment=e.comment?`${e.comment} -${n}`:n;else if(u||e.directives.docStart||!i)e.commentBefore=n;else if(ke(i)&&!i.flow&&i.items.length>0){let s=i.items[0];Me(s)&&(s=s.key);const d=s.commentBefore;s.commentBefore=d?`${n} +`)+(s.substring(1)||" "),t=!0,n=!1;break;case"%":((h=m[i+1])==null?void 0:h[0])!=="#"&&(i+=1),t=!1;break;default:t||(n=!0),t=!1}}return{comment:e,afterEmptyLine:n}}class gf{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,n,h,i)=>{const s=Mn(t);i?this.warnings.push(new Gd(s,n,h)):this.errors.push(new Bn(s,n,h))},this.directives=new We({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:n,afterEmptyLine:h}=So(this.prelude);if(n){const i=e.contents;if(t)e.comment=e.comment?`${e.comment} +${n}`:n;else if(h||e.directives.docStart||!i)e.commentBefore=n;else if(Te(i)&&!i.flow&&i.items.length>0){let s=i.items[0];Me(s)&&(s=s.key);const d=s.commentBefore;s.commentBefore=d?`${n} ${d}`:n}else{const s=i.commentBefore;i.commentBefore=s?`${n} -${s}`:n}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:bo(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(const u of e)yield*this.next(u);yield*this.end(t,n)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,n,u)=>{const i=Mn(e);i[0]+=t,this.onError(i,"BAD_DIRECTIVE",n,u)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=uf(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new Bn(Mn(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){const n="Unexpected doc-end without preceding document";this.errors.push(new Bn(Mn(e),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;const t=ti(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const n=this.doc.comment;this.doc.comment=n?`${n} -${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new Bn(Mn(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const n=Object.assign({_directives:this.directives},this.options),u=new qi(void 0,n);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),u.range=[0,t,t],this.decorate(u,!1),yield u}}}const Ra="\uFEFF",Na="",Ba="",Bs="";function df(m){switch(m){case Ra:return"byte-order-mark";case Na:return"doc-mode";case Ba:return"flow-error-end";case Bs:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case` +${s}`:n}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:So(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(const h of e)yield*this.next(h);yield*this.end(t,n)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,n,h)=>{const i=Mn(e);i[0]+=t,this.onError(i,"BAD_DIRECTIVE",n,h)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=ff(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new Bn(Mn(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){const n="Unexpected doc-end without preceding document";this.errors.push(new Bn(Mn(e),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;const t=ti(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const n=this.doc.comment;this.doc.comment=n?`${n} +${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new Bn(Mn(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const n=Object.assign({_directives:this.directives},this.options),h=new es(void 0,n);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),h.range=[0,t,t],this.decorate(h,!1),yield h}}}const Pa="\uFEFF",Wa="",ja="",Ps="";function mf(m){switch(m){case Pa:return"byte-order-mark";case Wa:return"doc-mode";case ja:return"flow-error-end";case Ps:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case` `:case`\r `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(m[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function it(m){switch(m){case void 0:case" ":case` -`:case"\r":case" ":return!0;default:return!1}}const wo=new Set("0123456789ABCDEFabcdef"),ff=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),wi=new Set(",[]{}"),gf=new Set(` ,[]{} -\r `),Ds=m=>!m||gf.has(m);class mf{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??"stream";for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===` +`:case"\r":case" ":return!0;default:return!1}}const Eo=new Set("0123456789ABCDEFabcdef"),vf=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Ci=new Set(",[]{}"),yf=new Set(` ,[]{} +\r `),$s=m=>!m||yf.has(m);class bf{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??"stream";for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===` `?!0:t==="\r"?this.buffer[e+1]===` -`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t===" ";)t=this.buffer[++n+e];if(t==="\r"){const u=this.buffer[n+e+1];if(u===` -`||!u&&!this.atEnd)return e+n+1}return t===` +`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t===" ";)t=this.buffer[++n+e];if(t==="\r"){const h=this.buffer[n+e+1];if(h===` +`||!h&&!this.atEnd)return e+n+1}return t===` `||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t==="-"||t==="."){const n=this.buffer.substr(e,3);if((n==="---"||n==="...")&&it(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&ethis.indentValue&&!it(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&it(t)){const n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Ds),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);const u=this.getLine();if(u===null)return this.setNext("flow");if((n!==-1&&n"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>it(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,n;e:for(let i=this.pos;n=this.buffer[i];++i)switch(n){case" ":t+=1;break;case` +`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Pa&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,n=e.indexOf("#");for(;n!==-1;){const i=e[n-1];if(i===" "||i===" "){t=n-1;break}else n=e.indexOf("#",n+1)}for(;;){const i=e[t-1];if(i===" "||i===" ")t-=1;else break}const h=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-h),this.pushNewline(),"stream"}if(this.atLineEnd()){const t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield Wa,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const t=this.peek(3);if((t==="---"||t==="...")&&it(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!it(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&it(t)){const n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil($s),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);const h=this.getLine();if(h===null)return this.setNext("flow");if((n!==-1&&n"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>it(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,n;e:for(let i=this.pos;n=this.buffer[i];++i)switch(n){case" ":t+=1;break;case` `:e=i,t=0;break;case"\r":{const s=this.buffer[i+1];if(!s&&!this.atEnd)return this.setNext("block-scalar");if(s===` `)break}default:break e}if(!n&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const i=this.continueScalar(e+1);if(i===-1)break;e=this.buffer.indexOf(` -`,i)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let u=e+1;for(n=this.buffer[u];n===" ";)n=this.buffer[++u];if(n===" "){for(;n===" "||n===" "||n==="\r"||n===` -`;)n=this.buffer[++u];e=u-1}else if(!this.blockScalarKeep)do{let i=e-1,s=this.buffer[i];s==="\r"&&(s=this.buffer[--i]);const d=i;for(;s===" ";)s=this.buffer[--i];if(s===` -`&&i>=this.pos&&i+1+t>d)e=i;else break}while(!0);return yield Bs,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t=this.pos-1,n=this.pos-1,u;for(;u=this.buffer[++n];)if(u===":"){const i=this.buffer[n+1];if(it(i)||e&&wi.has(i))break;t=n}else if(it(u)){let i=this.buffer[n+1];if(u==="\r"&&(i===` -`?(n+=1,u=` -`,i=this.buffer[n+1]):t=n),i==="#"||e&&wi.has(i))break;if(u===` -`){const s=this.continueScalar(n+1);if(s===-1)break;n=Math.max(n,s-2)}}else{if(e&&wi.has(u))break;t=n}return!u&&!this.atEnd?this.setNext("plain-scalar"):(yield Bs,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Ds))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,t=this.charAt(1);if(it(t)||e&&wi.has(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!it(t)&&t!==">";)t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(ff.has(t))t=this.buffer[++e];else if(t==="%"&&wo.has(this.buffer[e+1])&&wo.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===` +`,i)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let h=e+1;for(n=this.buffer[h];n===" ";)n=this.buffer[++h];if(n===" "){for(;n===" "||n===" "||n==="\r"||n===` +`;)n=this.buffer[++h];e=h-1}else if(!this.blockScalarKeep)do{let i=e-1,s=this.buffer[i];s==="\r"&&(s=this.buffer[--i]);const d=i;for(;s===" ";)s=this.buffer[--i];if(s===` +`&&i>=this.pos&&i+1+t>d)e=i;else break}while(!0);return yield Ps,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t=this.pos-1,n=this.pos-1,h;for(;h=this.buffer[++n];)if(h===":"){const i=this.buffer[n+1];if(it(i)||e&&Ci.has(i))break;t=n}else if(it(h)){let i=this.buffer[n+1];if(h==="\r"&&(i===` +`?(n+=1,h=` +`,i=this.buffer[n+1]):t=n),i==="#"||e&&Ci.has(i))break;if(h===` +`){const s=this.continueScalar(n+1);if(s===-1)break;n=Math.max(n,s-2)}}else{if(e&&Ci.has(h))break;t=n}return!h&&!this.atEnd?this.setNext("plain-scalar"):(yield Ps,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil($s))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,t=this.charAt(1);if(it(t)||e&&Ci.has(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!it(t)&&t!==">";)t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(vf.has(t))t=this.buffer[++e];else if(t==="%"&&Eo.has(this.buffer[e+1])&&Eo.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===` `?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===` -`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===" "||e&&n===" ");const u=t-this.pos;return u>0&&(yield this.buffer.substr(this.pos,u),this.pos=t),u}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}class vf{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t>1;this.lineStarts[i]=0;)switch(m[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((t=m[++e])==null?void 0:t.type)==="space";);return m.splice(e,m.length)}function So(m){if(m.start.type==="flow-seq-start")for(const e of m.items)e.sep&&!e.value&&!xt(e.start,"explicit-key-ind")&&!xt(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Pa(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}class yf{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new mf,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const t=df(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const n=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:n,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if(this.type==="doc-end"&&(e==null?void 0:e.type)!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{const n=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in n?n.indent:0:t.type==="flow-collection"&&n.type==="document"&&(t.indent=0),t.type==="flow-collection"&&So(t),n.type){case"document":n.value=t;break;case"block-scalar":n.props.push(t);break;case"block-map":{const u=n.items[n.items.length-1];if(u.value){n.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(u.sep)u.value=t;else{Object.assign(u,{key:t,sep:[]}),this.onKeyLine=!u.explicitKey;return}break}case"block-seq":{const u=n.items[n.items.length-1];u.value?n.items.push({start:[],value:t}):u.value=t;break}case"flow-collection":{const u=n.items[n.items.length-1];!u||u.value?n.items.push({start:[],key:t,sep:[]}):u.sep?u.value=t:Object.assign(u,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((n.type==="document"||n.type==="block-map"||n.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){const u=t.items[t.items.length-1];u&&!u.sep&&!u.value&&u.start.length>0&&Co(u.start)===-1&&(t.indent===0||u.start.every(i=>i.type!=="comment"||i.indent0&&(yield this.buffer.substr(this.pos,h),this.pos=t),h}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}class wf{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t>1;this.lineStarts[i]=0;)switch(m[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((t=m[++e])==null?void 0:t.type)==="space";);return m.splice(e,m.length)}function Do(m){if(m.start.type==="flow-seq-start")for(const e of m.items)e.sep&&!e.value&&!xt(e.start,"explicit-key-ind")&&!xt(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Ha(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}class Cf{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new bf,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const t=mf(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const n=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:n,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if(this.type==="doc-end"&&(e==null?void 0:e.type)!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{const n=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in n?n.indent:0:t.type==="flow-collection"&&n.type==="document"&&(t.indent=0),t.type==="flow-collection"&&Do(t),n.type){case"document":n.value=t;break;case"block-scalar":n.props.push(t);break;case"block-map":{const h=n.items[n.items.length-1];if(h.value){n.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(h.sep)h.value=t;else{Object.assign(h,{key:t,sep:[]}),this.onKeyLine=!h.explicitKey;return}break}case"block-seq":{const h=n.items[n.items.length-1];h.value?n.items.push({start:[],value:t}):h.value=t;break}case"flow-collection":{const h=n.items[n.items.length-1];!h||h.value?n.items.push({start:[],key:t,sep:[]}):h.sep?h.value=t:Object.assign(h,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((n.type==="document"||n.type==="block-map"||n.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){const h=t.items[t.items.length-1];h&&!h.sep&&!h.value&&h.start.length>0&&Ao(h.start)===-1&&(t.indent===0||h.start.every(i=>i.type!=="comment"||i.indent=e.indent){const u=!this.onKeyLine&&this.indent===e.indent,i=u&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind";let s=[];if(i&&t.sep&&!t.value){const d=[];for(let o=0;oe.indent&&(d.length=0);break;default:d.length=0}}d.length>=2&&(s=t.sep.splice(d[1]))}switch(this.type){case"anchor":case"tag":i||t.value?(s.push(this.sourceToken),e.items.push({start:s}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):i||t.value?(s.push(this.sourceToken),e.items.push({start:s,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(xt(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(Pa(t.key)&&!xt(t.sep,"newline")){const d=cn(t.start),o=t.key,l=t.sep;l.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:d,key:o,sep:l}]})}else s.length>0?t.sep=t.sep.concat(s,this.sourceToken):t.sep.push(this.sourceToken);else if(xt(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const d=cn(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:d,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||i?e.items.push({start:s,key:null,sep:[this.sourceToken]}):xt(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const d=this.flowScalar(this.type);i||t.value?(e.items.push({start:s,key:d,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(d):(Object.assign(t,{key:d,sep:[]}),this.onKeyLine=!0);return}default:{const d=this.startBlockValue(e);if(d){if(d.type==="block-seq"){if(!t.explicitKey&&t.sep&&!xt(t.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else u&&e.items.push({start:s});this.stack.push(d);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var n;const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const u="end"in t.value?t.value.end:void 0,i=Array.isArray(u)?u[u.length-1]:void 0;(i==null?void 0:i.type)==="comment"?u==null||u.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const u=e.items[e.items.length-2],i=(n=u==null?void 0:u.value)==null?void 0:n.end;if(Array.isArray(i)){Array.prototype.push.apply(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||xt(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){const u=this.startBlockValue(e);if(u){this.stack.push(u);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let n;do yield*this.pop(),n=this.peek(1);while((n==null?void 0:n.type)==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const u=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:u,sep:[]}):t.sep?this.stack.push(u):Object.assign(t,{key:u,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{const n=this.peek(2);if(n.type==="block-map"&&(this.type==="map-value-ind"&&n.indent===e.indent||this.type==="newline"&&!n.items[n.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&n.type!=="flow-collection"){const u=Ci(n),i=cn(u);So(e);const s=e.end.splice(1,e.end.length);s.push(this.sourceToken);const d={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=d}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(` +`,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var n;const t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){const h="end"in t.value?t.value.end:void 0,i=Array.isArray(h)?h[h.length-1]:void 0;(i==null?void 0:i.type)==="comment"?h==null||h.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){const h=e.items[e.items.length-2],i=(n=h==null?void 0:h.value)==null?void 0:n.end;if(Array.isArray(i)){Array.prototype.push.apply(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const h=!this.onKeyLine&&this.indent===e.indent,i=h&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind";let s=[];if(i&&t.sep&&!t.value){const d=[];for(let o=0;oe.indent&&(d.length=0);break;default:d.length=0}}d.length>=2&&(s=t.sep.splice(d[1]))}switch(this.type){case"anchor":case"tag":i||t.value?(s.push(this.sourceToken),e.items.push({start:s}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):i||t.value?(s.push(this.sourceToken),e.items.push({start:s,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(xt(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]});else if(Ha(t.key)&&!xt(t.sep,"newline")){const d=cn(t.start),o=t.key,l=t.sep;l.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:d,key:o,sep:l}]})}else s.length>0?t.sep=t.sep.concat(s,this.sourceToken):t.sep.push(this.sourceToken);else if(xt(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const d=cn(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:d,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||i?e.items.push({start:s,key:null,sep:[this.sourceToken]}):xt(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const d=this.flowScalar(this.type);i||t.value?(e.items.push({start:s,key:d,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(d):(Object.assign(t,{key:d,sep:[]}),this.onKeyLine=!0);return}default:{const d=this.startBlockValue(e);if(d){if(d.type==="block-seq"){if(!t.explicitKey&&t.sep&&!xt(t.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else h&&e.items.push({start:s});this.stack.push(d);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var n;const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const h="end"in t.value?t.value.end:void 0,i=Array.isArray(h)?h[h.length-1]:void 0;(i==null?void 0:i.type)==="comment"?h==null||h.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const h=e.items[e.items.length-2],i=(n=h==null?void 0:h.value)==null?void 0:n.end;if(Array.isArray(i)){Array.prototype.push.apply(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||xt(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){const h=this.startBlockValue(e);if(h){this.stack.push(h);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let n;do yield*this.pop(),n=this.peek(1);while((n==null?void 0:n.type)==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const h=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:h,sep:[]}):t.sep?this.stack.push(h):Object.assign(t,{key:h,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{const n=this.peek(2);if(n.type==="block-map"&&(this.type==="map-value-ind"&&n.indent===e.indent||this.type==="newline"&&!n.items[n.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&n.type!=="flow-collection"){const h=Si(n),i=cn(h);Do(e);const s=e.end.splice(1,e.end.length);s.push(this.sourceToken);const d={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=d}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(` `)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(` -`,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=Ci(e),n=cn(t);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const t=Ci(e),n=cn(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function bf(m){const e=m.prettyErrors!==!1;return{lineCounter:m.lineCounter||e&&new vf||null,prettyErrors:e}}function wf(m,e={}){const{lineCounter:t,prettyErrors:n}=bf(e),u=new yf(t==null?void 0:t.addNewLine),i=new pf(e);let s=null;for(const d of i.compose(u.parse(m),!0,m.length))if(!s)s=d;else if(s.options.logLevel!=="silent"){s.errors.push(new Bn(d.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&t&&(s.errors.forEach(vo(m,t)),s.warnings.forEach(vo(m,t))),s}function Cf(m,e,t){let n;const u=wf(m,t);if(!u)return null;if(u.warnings.forEach(i=>pa(u.options.logLevel,i)),u.errors.length>0){if(u.options.logLevel!=="silent")throw u.errors[0];u.errors=[]}return u.toJS(Object.assign({reviver:n},t))}const $s={flex:{display:"flex"},button:{height:48,minWidth:48},wrapper:{width:"calc(100vw - 40px)",height:"calc(100vh - 188px)"}};class Sf extends V{async componentDidMount(){await super.componentDidMount();const{data:e,attr:t}=this.props,n=V.getValue(e,t)||"";this.setState({value:n,initialized:!0,yamlError:this.validateYaml(n)})}validateYaml(e){let t=!1;if(this.props.schema.validateYaml!==!1&&(e||!this.props.schema.allowEmpty))try{Cf(e)}catch(n){console.log("Error in YAML",n),t=!0}return t}renderItem(e,t){if(!this.state.initialized)return null;const{schema:n,data:u,attr:i}=this.props,{value:s,showSelectId:d}=this.state,o=n.readOnly===!0||t;return x.createElement(fe,{fullWidth:!0,variant:"standard"},x.createElement("div",{style:$s.flex},x.createElement(me,{color:"grey",style:$s.button,size:"small",variant:"outlined",onClick:()=>this.setState({showSelectId:!0})},P.I18n.t("ra_YAML editor"))),d?x.createElement(Xs,{title:this.getText(n.label),overflowHidden:!0,applyDisabled:this.state.yamlError&&this.props.schema.doNotApplyWithError||o,onClose:()=>{o?this.setState({showSelectId:!1}):this.setState({showSelectId:!1,value:V.getValue(u,i)||""})},onApply:o?void 0:()=>this.setState({showSelectId:!1},()=>this.onChange(i,s))},x.createElement("div",{style:{...$s.wrapper,border:this.state.yamlError?"2px solid red":"2px solid transparent"}},x.createElement(nr,{mode:"yaml",value:typeof s=="object"?JSON.stringify(s):s,onChange:o?void 0:l=>this.setState({value:l,yamlError:this.validateYaml(l)}),name:"ConfigYamlEditor",themeType:this.props.oContext.themeType}))):null,n.help||this.state.yamlError?x.createElement(ve,null,this.state.yamlError?P.I18n.t("ra_Invalid YAML"):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}class Ef extends V{async componentDidMount(){await super.componentDidMount();const e=await zo(()=>import("./index-B5DqCD_a.js").then(t=>t.i),__vite__mapDeps([0,1,2,3]),import.meta.url);this.setState({QRCode:e.default})}renderItem(){const e=this.state.QRCode;if(!e)return null;const t=Math.max(32,Math.round((this.props.schema.size||256)*.15));return x.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:this.props.schema.bgColor||"white",padding:t,width:"100%",height:"100%"}},x.createElement(e,{title:this.getText(this.props.schema.tooltip),value:this.props.schema.data,size:this.props.schema.size,fgColor:this.props.schema.fgColor,bgColor:this.props.schema.bgColor,level:this.props.schema.level}))}}class Af extends V{initialized=!1;localContext;async componentDidMount(){await super.componentDidMount();const e=await zo(()=>import("./index-B5DqCD_a.js").then(t=>t.i),__vite__mapDeps([0,1,2,3]),import.meta.url);this.setState({QRCode:e.default}),this.props.schema.sendFirstByClick||await this.askInstance()}async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){const n=await this.getPatternAsync(this.props.schema.jsonData,null,!0);if(n)try{e=JSON.parse(n)}catch{console.error(`Cannot parse json data: ${JSON.stringify(e)}`)}}e===void 0&&(e=null);const t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){const n=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(n!=null&&n.val)){window.alert(P.I18n.t("ra_Instance %s is not alive",t));return}}this.setState({loading:!0},()=>this.props.oContext.socket.sendTo(t,this.props.schema.command||"send",e).then(n=>this.setState({qrData:n||"",loading:!1})))}}getContext(){const e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=V.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(){if(this.props.alive){const n=this.getContext();(n!==this.localContext||!this.initialized)&&(this.localContext=n,(!this.props.schema.sendFirstByClick||this.state.qrData!==void 0)&&setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}if(!this.state.qrData&&this.props.schema.sendFirstByClick)return this.props.alive?x.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",cursor:this.state.loading?"default":"pointer"},onClick:()=>!this.state.loading&&this.askInstance()},this.state.loading?x.createElement(Tt,null):typeof this.props.schema.sendFirstByClick=="boolean"?P.I18n.t("ra_Click to show"):this.getText(this.props.schema.sendFirstByClick,this.props.schema.noTranslation)):x.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",cursor:this.state.loading?"default":"pointer"},onClick:()=>!this.state.loading&&this.askInstance()},P.I18n.t("ra_Instance %s is not alive",this.props.oContext.instance.toString()));const e=this.state.QRCode;if(!e||this.state.qrData===void 0)return null;const t=Math.max(32,Math.round((this.props.schema.size||256)*.15));return x.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:this.props.schema.bgColor||"white",padding:t,width:"100%",height:"100%"}},x.createElement(e,{title:this.getText(this.props.schema.tooltip),value:this.state.qrData,size:this.props.schema.size,fgColor:this.props.schema.fgColor,bgColor:this.props.schema.bgColor,level:this.props.schema.level}))}}const Df={accordion:bh,alive:wh,autocomplete:Ch,autocompleteSendTo:Sh,certCollection:$h,certificate:Ah,certificates:Dh,checkbox:_h,checkDocker:xh,checkLicense:$t,chip:jr,chips:jr,color:Ih,coordinates:Oh,cron:Eh,custom:Kn,datePicker:Fh,deviceManager:Rh,divider:Yp,file:Gh,fileSelector:ji,func:Jh,header:Xp,iframe:Yh,iframeSendTo:Qh,image:qh,imageSendTo:Zh,infoBox:eu,instance:tu,interface:nu,ip:Xh,jsonEditor:_p,language:Tp,license:Lp,number:Mp,oauth2:Ip,objectId:Op,password:Fp,pattern:Rp,port:Bp,qrCode:Ef,qrCodeSendTo:Af,room:Pp,select:Wp,selectSendTo:zp,sendto:no,sendTo:no,setState:Up,slider:Kp,state:Jp,staticImage:Zp,staticInfo:qp,staticLink:lo,staticText:lo,table:Qe,text:id,textSendTo:rd,timePicker:od,topic:ld,uuid:cd,user:hd,yamlEditor:Sf},lt={fullWidth:{width:"100%"},paper:{margin:1,width:"auto !important",overflowY:"auto",paddingBottom:1},paperWithIcons:{height:"calc(100vh - 259px) !important"},paperWithoutIcons:{height:"calc(100vh - 235px) !important"},padding:{padding:"10px"},heading:{},primary:m=>({backgroundColor:m.palette.primary.main,color:m.palette.mode==="dark"?"inherit":"#FFF"}),secondary:m=>({backgroundColor:m.palette.secondary.main})};class tn extends V{async componentDidMount(){var e;await super.componentDidMount(),(e=this.props.schema)!=null&&e.collapsable&&this.setState({expanded:(window._localStorage||window.localStorage).getItem(`${this.props.oContext.adapterName}.${this.props.attr}`)==="true"})}renderItems(e,t){return e?Object.keys(e).map(n=>{if(this.props.oContext.multiEdit&&e[n].noMultiEdit)return null;const u=e[n].type||"panel";let i,s="Use this.props.oContext.socket!";if(u==="custom")e[n].url?i=Kn:this.props.oContext.customs&&this.props.oContext.customs[e[n].component]?i=this.props.oContext.customs[e[n].component]:(console.error(`Cannot find custom component: ${e[n].component}`),i=V),s=this.props.oContext.socket;else if(u==="component")if(this.props.customComponents[e[n].subType])i=this.props.customComponents[e[n].subType];else return x.createElement("div",{key:`${n}_${this.props.index??""}`},`Component ${e[n].subType} not provided`);else u==="panel"?i=tn:i=Df[u]||V;return x.createElement(i,{socket:s,globalData:this.props.globalData,oContext:this.props.oContext,key:`${n}_${this.props.index??""}`,index:this.props.index,changed:this.props.changed,arrayIndex:this.props.arrayIndex,expertMode:this.props.expertMode,commandRunning:this.props.commandRunning,style:lt.panel,common:this.props.common,alive:this.props.alive,themeName:this.props.themeName,data:this.props.data,originalData:this.props.originalData,onError:this.props.onError,onHiddenChanged:this.props.onHiddenChanged,onFilterLabelUpdate:this.props.onFilterLabelUpdate,onChange:this.props.onChange,disabled:t,customObj:this.props.customObj,custom:this.props.custom,schema:e[n],attr:n,table:this.props.table,customComponents:this.props.customComponents})}):null}render(){const e=this.props.schema;if(!e||(this.updateCalculatedValues(),!this.state.calculatedValues))return null;const t=this.props.schema.items,n=this.props.schema.style||{};if(this.state.calculatedValues.hidden){if(e.hideOnlyControl){const i=x.createElement(He,{size:{xs:e.xs||void 0,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0},sx:P.Utils.getStyle(this.props.oContext.theme,{marginBottom:0,textAlign:"left"},n,this.props.oContext.themeType==="dark"&&e.darkStyle)});return e.newLine?x.createElement(x.Fragment,null,x.createElement("div",{style:{flexBasis:"100%",height:0}}),i):i}return null}if(this.props.table)return this.renderItems(t,this.state.calculatedValues.disabled);if(this.props.custom)return x.createElement(He,{key:`${this.props.attr}_${this.props.index}`,container:!0,style:lt.fullWidth,columnSpacing:2,rowSpacing:1,sx:n},this.renderItems(t,this.state.calculatedValues.disabled));let u;if(e.collapsable)u=x.createElement(Ws,{key:`${this.props.attr}_${this.props.index}`,style:lt.fullWidth,expanded:!!this.state.expanded,onChange:()=>{(window._localStorage||window.localStorage).setItem(`${this.props.oContext.adapterName}.${this.props.attr}`,this.state.expanded?"false":"true"),this.setState({expanded:!this.state.expanded})}},x.createElement(js,{expandIcon:x.createElement(Mi,null),sx:P.Utils.getStyle(this.props.oContext.theme,n,this.props.oContext.themeType&&e.darkStyle,e.color==="primary"?lt.primary:e.color==="secondary"&<.secondary,{width:"100%"})},x.createElement(yt,{style:lt.heading},this.getText(e.label))),x.createElement(zs,null,x.createElement(He,{container:!0,columnSpacing:2,rowSpacing:1,sx:{...n,width:"100%",padding:"10px"}},this.renderItems(t,this.state.calculatedValues.disabled))));else{const i=P.Utils.getStyle(this.props.oContext.theme,this.props.style,n,{width:"100%"},this.props.isParentTab&<.paper,this.props.isParentTab&&(this.props.withoutSaveButtons?this.props.withIcons?{height:"calc(100% - 88px) !important"}:{height:"calc(100% - 64px) !important"}:this.props.withIcons?lt.paperWithIcons:lt.paperWithoutIcons));u=x.createElement(Ie,{component:"div",key:`${this.props.attr}_${this.props.index}`,className:this.props.className,sx:i},x.createElement(He,{container:!0,columnSpacing:2,rowSpacing:1,sx:P.Utils.getStyle(this.props.oContext.theme,{width:"100%"},this.props.isParentTab&<.padding,this.props.schema.innerStyle)},this.renderItems(t,this.state.calculatedValues.disabled)))}if(!this.props.isParentTab){const i=x.createElement(He,{title:this.getText(e.tooltip),size:{xs:e.xs||void 0,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0},sx:{marginBottom:0,textAlign:"left",...n}},u);return e.newLine?x.createElement(x.Fragment,null,x.createElement("div",{style:{flexBasis:"100%",height:0}}),i):i}return u}}const Si={tabs:{height:"100%",width:"100%"},panel:{width:"100%",display:"block"},panelWithIcons:{height:"calc(100% - 72px)"},panelWithoutIcons:{height:"calc(100% - 48px)"}};class $f extends V{resizeTimeout=null;calculateTimeoutTable=null;refDiv;constructor(e){super(e);let t;if(this.props.root){const n=(window.location.hash||"").replace(/^#/,"").split("/");if(n.length>=3&&n[1]==="config"){const u=n[3],i=parseInt(u,10);u&&i.toString()===u?i>=0&&i{const n=this.state.tab;if(!n){this.props.onError(e,t);return}const u={...this.state.tabErrors};u[n]||(u[n]={}),t?u[n][e]=t:(delete u[n][e],Object.keys(u[n]).length===0&&delete u[n]),this.setState({tabErrors:u}),this.props.onError(e,t)};hasTabErrors=e=>!!(this.state.tabErrors[e]&&Object.keys(this.state.tabErrors[e]).length>0);componentWillUnmount(){this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=null),this.calculateTimeoutTable&&(clearTimeout(this.calculateTimeoutTable),this.calculateTimeoutTable=null),window.removeEventListener("hashchange",this.onHashTabsChanged,!1),super.componentWillUnmount()}onHashTabsChanged=()=>{const e=(window.location.hash||"").replace(/^#/,"").split("/");if(e.length>3&&e[1]==="config"){const t=e[3],n=parseInt(t,10);let u;n.toString()===t?n>=0&&n{this.setState({initialBreakpoint:e})},50),e}return this.state.initialBreakpoint}componentDidUpdate(){var e;!this.state.initialBreakpoint&&((e=this.refDiv.current)!=null&&e.clientWidth)&&this.refDiv.current.clientWidth!==this.state.width&&(this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{var t;this.resizeTimeout=null,this.setState({width:(t=this.refDiv.current)==null?void 0:t.clientWidth})},50))}onMenuChange(e){(window._localStorage||window.localStorage).setItem(`${this.props.dialogName||"App"}.${this.props.oContext.adapterName}`,e),this.setState({tab:e},()=>{if(this.props.root){const t=(window.location.hash||"").split("/");t.length>=3&&t[1]==="config"&&(t[3]=this.state.tab,window.location.hash=t.join("/"))}})}updateCalculatedValuesForTable(){this.calculateTimeoutTable&&clearTimeout(this.calculateTimeoutTable),this.calculateTimeoutTable=setTimeout(async()=>{this.calculateTimeoutTable=null;const e=this.props.schema.items,t={};for(const n in e){let u;if(e[n].expertMode&&!this.props.expertMode){t[n]={hidden:!0,disabled:!1};continue}if(this.props.custom){const i=!!await this.executeCustom(e[n].hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.index,this.props.globalData);if(i){t[n]={hidden:!0,disabled:!1};continue}u=!!await this.executeCustom(e[n].disabled,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.index,this.props.globalData),t[n]={hidden:i,disabled:u}}else{if(!!await this.execute(e[n].hidden,!1,this.props.data,this.props.index,this.props.globalData)){t[n]={hidden:!0,disabled:!1};continue}u=!!await this.execute(e[n].disabled,!1,this.props.data,this.props.index,this.props.globalData),t[n]={hidden:!1,disabled:u}}}JSON.stringify(t)!==JSON.stringify(this.state.calculatedValuesTable)&&this.setState({calculatedValuesTable:t})},50)}render(){const e=this.props.schema.items;let t=!1;if(this.updateCalculatedValuesForTable(),!this.state.calculatedValuesTable)return null;const n=[];Object.keys(e).filter(s=>{var d;return!((d=this.state.calculatedValuesTable[s])!=null&&d.hidden)}).map(s=>{var o;const d=this.getIcon(e[s].icon);t||=!!d,n.push({icon:d,disabled:(o=this.state.calculatedValuesTable[s])==null?void 0:o.disabled,label:this.getText(e[s].label),name:s})}),n.find(s=>s.name===this.state.tab)||setTimeout(()=>this.setState({tab:n[0].name}),50);const u=this.getCurrentBreakpoint();let i;return u==="xs"&&n.length>2?i=x.createElement(Pn,{style:{top:2,backgroundColor:this.props.oContext.themeType==="dark"?"#222":"#DDD"},variant:"dense"},x.createElement(se,{onClick:s=>this.setState({openMenu:s.currentTarget})},x.createElement(Uc,null)),this.state.openMenu?x.createElement(hc,{open:!0,anchorEl:this.state.openMenu,onClose:()=>this.setState({openMenu:null})},n.map(s=>{const d=this.hasTabErrors(s.name);return x.createElement(xe,{disabled:s.disabled,key:s.name,onClick:()=>{this.setState({openMenu:null},()=>this.onMenuChange(s.name))},selected:s.name===this.state.tab,sx:d?{color:"error.main"}:void 0},t?x.createElement(xo,null,s.icon):null,x.createElement(Ie,{sx:{display:"flex",alignItems:"center",gap:.5,width:"100%"}},s.label,d&&x.createElement(Jt,{sx:{fontSize:16,color:"error.main"}})))})):null):i=x.createElement(uc,{variant:"scrollable",scrollButtons:"auto",style:this.props.schema.tabsStyle,value:this.state.tab,onChange:(s,d)=>this.onMenuChange(d)},n.map(s=>{const d=this.hasTabErrors(s.name),o=d?x.createElement(Ie,{sx:{display:"flex",alignItems:"center",gap:.5}},s.label,x.createElement(Jt,{sx:{fontSize:16,color:"error.main"}})):s.label;return x.createElement(pc,{id:s.name,wrapped:!0,disabled:s.disabled,key:s.name,value:s.name,iconPosition:this.props.schema.iconPosition||"start",icon:s.icon,label:o,sx:d?{"& .MuiTab-wrapper":{color:"error.main"}}:void 0})})),x.createElement("div",{style:Si.tabs,ref:this.refDiv},i,x.createElement(tn,{oContext:this.props.oContext,withoutSaveButtons:this.props.withoutSaveButtons,isParentTab:!0,changed:this.props.changed,key:this.state.tab,expertMode:this.props.expertMode,index:1001,arrayIndex:this.props.arrayIndex,globalData:this.props.globalData,commandRunning:this.props.commandRunning,style:{...Si.panel,...t?Si.panelWithIcons:Si.panelWithoutIcons},common:this.props.common,alive:this.props.alive,themeName:this.props.themeName,data:this.props.data,originalData:this.props.originalData,onChange:this.props.onChange,onError:this.onTabError,customObj:this.props.customObj,custom:this.props.custom,schema:e[this.state.tab],table:this.props.table,withIcons:t,customComponents:this.props.customComponents}))}}const xf={root:{width:"100%",height:"100%"}};class ki extends Ao{forceUpdateHandlers;errorTimeout=null;errorCached=null;oContext;cachedObjects={};constructor(e){super(e),this.state={originalData:JSON.stringify(this.props.data),changed:!1,errors:{},updateData:this.props.updateData||0,systemConfig:null,alive:!1,commandRunning:!1,schema:JSON.parse(JSON.stringify(this.props.schema))},this.forceUpdateHandlers={},this.buildDependencies(this.state.schema),this.readData().catch(t=>console.error(`Cannot read data: ${t}`))}static getDerivedStateFromProps(e,t){return e.updateData!==t.updateData?{updateData:e.updateData,originalData:JSON.stringify(e.data),schema:JSON.parse(JSON.stringify(e.schema))}:null}static async loadI18n(e,t,n){if(t===!0||t&&typeof t=="string"){const u=P.I18n.getLanguage(),i=typeof t=="string"?t:"i18n";let s=await e.fileExists(`${n}.admin`,`${i}/${u}.json`),d;if(s?d=`${i}/${u}.json`:(s=await e.fileExists(`${n}.admin`,`${i}/${u}/translations.json`),s?d=`${i}/${u}/translations.json`:u!=="en"&&(s=await e.fileExists(`${n}.admin`,`${i}/en.json`),s?d=`${i}/en.json`:(s=await e.fileExists(`${n}.admin`,`${i}/en/translations.json`),s&&(d=`${i}/en/translations.json`)))),d){const o=await e.readFile(`${n}.admin`,d);let l;o.file!==void 0?l=o.file:l=o;try{const r=JSON.parse(l);P.I18n.extendTranslations(r,u)}catch(r){return console.error(`Cannot parse language file "${n}.admin/${d}: ${r}`),""}return d}return console.warn(`Cannot find i18n for ${n} / ${d}`),""}return t&&typeof t=="object"&&P.I18n.extendTranslations(t),""}onCommandRunning=e=>this.setState({commandRunning:e});async readData(){let e;try{this.props.socket.getCompactSystemConfig?e=await this.props.socket.getCompactSystemConfig():e=await this.getCachedObject("system.config")||void 0;const t=await this.props.socket.getState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`);this.setState({systemConfig:e.common,alive:!!(t&&t.val)},()=>{this.updateContext(!0),this.props.custom||this.props.socket.subscribeState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`,this.onAlive)})}catch(t){console.error(`Cannot read system config: ${t}`)}}onAlive=(e,t)=>{!!(t!=null&&t.val)!==this.state.alive&&this.setState({alive:!!(t!=null&&t.val)})};onChange=(e,t,n,u)=>{if(this.props.onValueChange)this.props.onValueChange(e,t,u),n&&n();else if(e&&this.props.onChange){const i={changed:JSON.stringify(e)!==this.state.originalData};this.setState(i,()=>{this.props.onChange(e,i.changed,u),n&&n()})}else u&&this.props.onChange(null,null,u)};onError=(e,t)=>{this.errorCached=this.errorCached||JSON.parse(JSON.stringify(this.state.errors));const n=this.errorCached;t?n[e]=t:delete n[e],this.errorTimeout&&clearTimeout(this.errorTimeout),JSON.stringify(n)!==JSON.stringify(this.state.errors)?this.errorTimeout=setTimeout(()=>this.setState({errors:this.errorCached},()=>{this.errorTimeout=null,this.errorCached=null,this.props.onError(!!Object.keys(this.state.errors).length)}),50):this.errorCached=null};flatten(e,t){return t=t||{},e.items&&Object.keys(e.items).forEach(n=>{t[n]=e.items[n],this.flatten(e.items[n],t)}),t}buildDependencies(e){const t=this.flatten(e);Object.keys(t).forEach(n=>{var u,i,s,d,o,l,r,a,c,p;(u=t[n].confirm)!=null&&u.alsoDependsOn&&((i=t[n].confirm)==null||i.alsoDependsOn.forEach(h=>{if(!t[h])console.error(`[JsonConfigComponent] Attribute ${h} does not exist!`),h.startsWith("data.")&&console.warn(`[JsonConfigComponent] please use "${h.replace(/^data\./,"")}" instead of "${h}"`);else{t[h].confirmDependsOn=t[h].confirmDependsOn||[];const f={...t[n],attr:n};f.confirm&&(f.confirm.cancel="Undo"),t[h].confirmDependsOn.push(f)}})),(s=t[n].onChange)!=null&&s.alsoDependsOn&&((d=t[n].onChange)==null||d.alsoDependsOn.forEach(h=>{if(!t[h])console.error(`[JsonConfigComponent] Attribute ${h} does not exist!`),h.startsWith("data.")&&console.warn(`[JsonConfigComponent] please use "${h.replace(/^data\./,"")}" instead of "${h}"`);else{t[h].onChangeDependsOn=t[h].onChangeDependsOn||[];const f={...t[n],attr:n};t[h].onChangeDependsOn.push(f)}})),(o=t[n].hidden)!=null&&o.alsoDependsOn&&((l=t[n].hidden)==null||l.alsoDependsOn.forEach(h=>{if(!t[h])console.error(`[JsonConfigComponent] Attribute ${h} does not exist!`),h.startsWith("data.")&&console.warn(`[JsonConfigComponent] please use "${h.replace(/^data\./,"")}" instead of "${h}"`);else{t[h].hiddenDependsOn=t[h].hiddenDependsOn||[];const f={...t[n],attr:n};t[h].hiddenDependsOn.push(f)}})),(r=t[n].label)!=null&&r.alsoDependsOn&&((a=t[n].label)==null||a.alsoDependsOn.forEach(h=>{if(!t[h])console.error(`[JsonConfigComponent] Attribute ${h} does not exist!`),h.startsWith("data.")&&console.warn(`[JsonConfigComponent] please use "${h.replace(/^data\./,"")}" instead of "${h}"`);else{t[h].labelDependsOn=t[h].labelDependsOn||[];const f={...t[n],attr:n};t[h].labelDependsOn.push(f)}})),(c=t[n].help)!=null&&c.alsoDependsOn&&((p=t[n].help)==null||p.alsoDependsOn.forEach(h=>{if(!t[h])console.error(`[JsonConfigComponent] Attribute ${h} does not exist!`),h.startsWith("data.")&&console.warn(`[JsonConfigComponent] please use "${h.replace(/^data\./,"")}" instead of "${h}"`);else{t[h].helpDependsOn=t[h].helpDependsOn||[];const f={...t[n],attr:n};t[h].helpDependsOn.push(f)}}))})}getCachedObject=async e=>{if(this.cachedObjects[e]!==void 0)return this.cachedObjects[e];try{this.cachedObjects[e]=await this.props.socket.getObject(e)??null}catch(t){console.error(t),this.cachedObjects[e]=null}return this.cachedObjects[e]};updateContext(e){this.oContext={DeviceManager:this.props.DeviceManager,adapterName:this.props.adapterName,changeLanguage:this.changeLanguage,common:this.props.common,customs:this.props.customs,dateFormat:this.props.dateFormat,embedded:this.props.embedded,forceUpdate:this.forceAttrUpdate,imagePrefix:this.props.imagePrefix,instance:this.props.instance,instanceObj:this.props.instanceObj,isFloatComma:this.props.isFloatComma,multiEdit:this.props.multiEdit,onBackEndCommand:this.props.onBackEndCommand,onCommandRunning:this.onCommandRunning,onValueChange:this.props.onValueChange,registerOnForceUpdate:this.registerOnForceUpdate,socket:this.props.socket,systemConfig:this.state.systemConfig,theme:this.props.theme,themeType:this.props.themeType,_themeName:this.props.themeName,updateData:this.state.updateData,getCachedObject:this.getCachedObject},e&&this.forceUpdate()}renderItem(e){return e.type==="tabs"?x.createElement($f,{withoutSaveButtons:this.props.withoutSaveButtons,oContext:this.oContext,alive:this.state.alive,changed:this.state.changed,commandRunning:this.state.commandRunning,common:this.props.common,custom:this.props.custom,customObj:this.props.customObj,data:this.props.data,onChange:this.onChange,onError:(t,n)=>this.onError(t,n),originalData:JSON.parse(this.state.originalData),root:!0,schema:e,expertMode:this.props.expertMode,themeName:this.props.themeName,customComponents:this.props.customComponents}):e.type==="panel"||!e.type?x.createElement(tn,{withoutSaveButtons:this.props.withoutSaveButtons,oContext:this.oContext,alive:this.state.alive,changed:this.state.changed,commandRunning:this.state.commandRunning,common:this.props.common,custom:this.props.custom,customObj:this.props.customObj,data:this.props.data,expertMode:this.props.expertMode,index:1e3,isParentTab:!this.props.embedded&&!this.props.withoutSaveButtons,onChange:this.onChange,onError:(t,n)=>this.onError(t,n),originalData:JSON.parse(this.state.originalData),root:!0,schema:e,themeName:this.props.themeName,customComponents:this.props.customComponents}):(console.error(`Unknown item type in root: ${JSON.stringify(e)}`),null)}changeLanguage=()=>{this.forceUpdate()};forceAttrUpdate=(e,t)=>{Array.isArray(e)?e.forEach(n=>this.forceUpdateHandlers[n]&&this.forceUpdateHandlers[n](t)):this.forceUpdateHandlers[e]&&this.forceUpdateHandlers[e](t)};registerOnForceUpdate=(e,t)=>{t?this.forceUpdateHandlers[e]=t:this.forceUpdateHandlers[e]&&delete this.forceUpdateHandlers[e]};render(){return!this.state.systemConfig||!this.oContext?x.createElement(Wi,null):(this.oContext._themeName!==this.props.themeName&&(this.oContext._themeName=this.props.themeName,setTimeout(()=>this.updateContext(!0),0)),x.createElement("div",{style:{...!this.props.embedded||this.props.withoutSaveButtons?xf.root:void 0,...this.props.style,...this.state.schema.style}},this.renderItem(this.state.schema)))}}const jt={root:{width:"100%",height:"100%",overflow:"hidden",position:"relative"},scroll:{height:"calc(100% - 48px)",overflowY:"auto"},exportImportButtons:{position:"absolute",top:5,right:0,zIndex:3},button:{marginRight:"5px"},tooltip:{pointerEvents:"none"}};function _f(m,e){let t="";for(let n=0;n{const u=document.createElement("script");u.setAttribute("id",e),u.onload=n,u.src=m,document.getElementsByTagName("head")[0].appendChild(u)})}let Mf=class extends P.Router{fileSubscribed=[];fileLangSubscribed="";secret;constructor(e){super(e),this.state={updateData:0,changed:!1,confirmDialog:!1,theme:P.Theme(e.themeName),saveConfigDialog:!1,hash:"_"},this.secret=e.secret||"",this.getInstanceObject().then(t=>this.getConfigFile().then(n=>ki.loadI18n(this.props.socket,n==null?void 0:n.i18n,this.props.adapterName).then(u=>{u&&(this.fileLangSubscribed||(this.fileLangSubscribed=u,this.props.socket.subscribeFiles(`${this.props.adapterName}.admin`,this.fileLangSubscribed,this.onFileChange))),t?this.setState({schema:n,data:t.native,common:t.common,hash:Pr(JSON.stringify(n)).toString()}):window.alert(`Instance system.adapter.${this.props.adapterName}.${this.props.instance} not found!`)})))}componentWillUnmount(){super.componentWillUnmount(),this.fileSubscribed.length&&(this.props.socket.unsubscribeFiles(`${this.props.adapterName}.admin`,this.fileSubscribed,this.onFileChange),this.fileSubscribed=[]),this.fileLangSubscribed&&(this.props.socket.unsubscribeFiles(`${this.props.adapterName}.admin`,this.fileLangSubscribed,this.onFileChange),this.fileLangSubscribed="")}handleFileSelect=e=>{const t=e.target.files[0];if(t){const n=new FileReader;n.onload=u=>{if(!u.target)return;const i=u.target.result;try{const s=JSON.parse(i);this.setState({data:s,changed:JSON.stringify(s)!==JSON.stringify(this.state.originalData)})}catch{window.alert(P.I18n.t("[JsonConfig] Failed to parse JSON file"))}},n.readAsText(t)}else window.alert(P.I18n.t("[JsonConfig] Failed to open JSON File"))};getExportImportButtons(){return x.createElement("div",{style:jt.exportImportButtons},x.createElement(ge,{title:this.props.t("Import settings from JSON file"),slotProps:{popper:{sx:jt.tooltip}}},x.createElement(Ti,{size:"small",sx:{"&.MuiFab-root":jt.button},onClick:()=>{const e=document.createElement("input");e.setAttribute("type","file"),e.setAttribute("id","files"),e.setAttribute("opacity",0),e.addEventListener("change",t=>this.handleFileSelect(t),!1),e.click()}},x.createElement(Rr,null))),x.createElement(ge,{title:this.props.t("Export setting to JSON file"),slotProps:{popper:{sx:jt.tooltip}}},x.createElement(Ti,{size:"small",sx:{"&.MuiFab-root":jt.button},onClick:()=>{this.state.data&&P.Utils.generateFile(`${this.props.adapterName}.${this.props.instance}.json`,this.state.data)}},x.createElement(Rr,{style:{transform:"rotate(180deg)"}}))))}onFileChange=async(e,t,n)=>{var u;if(e===`${this.props.adapterName}.admin`&&n){if(t===this.fileLangSubscribed)try{await ki.loadI18n(this.props.socket,(u=this.state.schema)==null?void 0:u.i18n,this.props.adapterName),this.setState({hash:`${this.state.hash}1`})}catch{}else if(this.fileSubscribed.includes(t))try{const i=await this.getConfigFile(this.fileSubscribed[0]);this.setState({schema:i,hash:Pr(JSON.stringify(i)).toString()})}catch{}}};async getInstanceObject(){var e;try{const t=await this.props.socket.getObject(`system.adapter.${this.props.adapterName}.${this.props.instance}`);if(Array.isArray(t.encryptedNative)){if(!this.secret){const n=await this.props.socket.getSystemConfig();await Eo("../../lib/js/crypto-js/crypto-js.js","crypto-js"),this.secret=n.native.secret}return(e=t.encryptedNative)==null||e.forEach(n=>{t.native[n]&&(t.native[n]=Tf(this.secret,t.native[n]))}),t}return t}catch(t){window.alert(`[JsonConfig] Cannot read instance object: ${t}`)}return null}renderDialogConfirm(){return this.state.confirmDialog?x.createElement(P.DialogConfirm,{title:P.I18n.t("ra_Please confirm"),text:P.I18n.t("ra_Some data are not stored. Discard?"),ok:P.I18n.t("ra_Discard"),cancel:P.I18n.t("ra_Cancel"),onClose:e=>this.setState({confirmDialog:!1},()=>e&&P.Router.doNavigate(null))}):null}async scanForInclude(e,t){if(typeof e["#include"]=="string"){const u=await this._getConfigFile(e["#include"],[...t]);return delete e["#include"],u&&(e={...e,...u}),e}const n=Object.keys(e);for(let u=0;u ${t.join(" => ")}`),null;t.push(e);try{await this.props.socket.fileExists(`${this.props.adapterName}.admin`,e)||(e="jsonConfig.json");const u=await this.props.socket.readFile(`${this.props.adapterName}.admin`,e);let i="",s="";if(u.file!==void 0&&(s=u.file),typeof s=="string")i=s;else if(s.type==="Buffer"){let d="";const o=new Uint8Array(s.data),l=o.byteLength;for(let r=0;rthis.setState({saveConfigDialog:!1},()=>e&&this.onSave(!0))}):null}findAttr(e,t){if(t=t||this.state.schema,t!=null&&t.items){if(e in t.items)return t.items[e];for(const n of Object.values(t.items)){const u=this.findAttr(e,n);if(u)return u}}return null}postProcessing(e,t,n){if(n=n||this.state.schema,!e){console.error(`Data is empty in postProcessing: ${t}, ${JSON.stringify(n)}`);return}const u=e[t];if(n.items)if(n.type==="table"){const i=u;if(!Array.isArray(i))return;for(const s of i)for(const d of n.items)this.postProcessing(s,d.attr,d)}else for(const[i,s]of Object.entries(n.items)){if(s.type==="panel"||s.type==="tabs"||s.type==="accordion")return;this.postProcessing(e,i,s)}else if(t&&typeof u=="string")if(n.type==="text")n.trim!==!1&&(e[t]=u.trim());else if(n.type==="ip")e[t]=u.trim();else if(n.type==="number"){const i=parseFloat(u.toString().replace(",","."));n.min!==void 0&&in.max?e[t]=n.max:e[t]=i}else if(n.type==="port"){const i=parseInt(u.toString(),10);n.min!==void 0&&in.max&&(e[t]=n.max),e[t]!==0&&i<20?e[t]=20:i>65535?e[t]=65535:e[t]=i}else n.type==="checkbox"&&(e[t]=e[t]===!0||e[t]==="true"||e[t]==="on"||e[t]===1||e[t]==="1")}async onSave(e,t){if(e){const n=await this.getInstanceObject();if(!n){console.error("Something went wrong: may be no connection?"),window.alert("Something went wrong: may be no connection?");return}if(!this.state.data||!this.state.schema)return;const u={};for(const s of Object.keys(this.state.data)){const d=this.findAttr(s);(!d||!d.doNotSave||d.type==="state")&&!s.startsWith("_")?V.setValue(n.native,s,this.state.data[s]):(V.setValue(n.native,s,null),u[s]=this.state.data[s])}try{const s=JSON.parse(JSON.stringify(n));if(Array.isArray(s.encryptedNative)){await Eo("../../lib/js/crypto-js/crypto-js.js","crypto-js");for(const d of s.encryptedNative)s.native[d]&&(s.native[d]=Lf(this.secret,s.native[d]))}await this.props.socket.setObject(s._id,s)}catch(s){window.alert(`[JsonConfig] Cannot set object: ${s}`)}const i={...n.native,...u};console.log(i),this.setState({changed:!1,data:i,updateData:this.state.updateData+1,originalData:i},()=>t&&P.Router.doNavigate(null))}else this.state.changed?this.setState({confirmDialog:!0}):P.Router.doNavigate(null)}componentDidUpdate(e,t){t.changed!==this.state.changed&&this.props.configStored(!this.state.changed)}async componentDidMount(){const e=`${window.location.protocol}//${window.location.host}${window.location.pathname}validate_config/${this.props.adapterName}`;console.log(`fetch ${e}`),await fetch(e)}render(){return!this.state.data||!this.state.schema?x.createElement(Wi,null):x.createElement("div",{style:jt.root},this.renderDialogConfirm(),this.getExportImportButtons(),this.renderSaveConfigDialog(),x.createElement(ki,{key:this.state.hash,style:jt.scroll,socket:this.props.socket,themeName:this.props.themeName,themeType:this.props.themeType,adapterName:this.props.adapterName,instance:this.props.instance,isFloatComma:this.props.isFloatComma,dateFormat:this.props.dateFormat,schema:this.state.schema,common:this.state.common,expertMode:this.props.expertMode,data:this.state.data,updateData:this.state.updateData,onError:e=>this.setState({error:e}),onChange:(e,t,n)=>{n&&this.state.error&&(window.alert(P.I18n.t("Cannot save configuration because of error in configuration")),n=!1),n&&!this.state.changed&&!t&&(n=!1),e?this.setState({data:e,changed:t,saveConfigDialog:n}):n!==void 0&&this.setState({saveConfigDialog:n})},DeviceManager:this.props.DeviceManager,theme:this.state.theme,customComponents:this.props.customComponents,imagePrefix:"."}),x.createElement(P.SaveCloseButtons,{isIFrame:!1,dense:!0,paddingLeft:0,newReact:!0,theme:this.state.theme,noTextOnButtons:this.props.width==="xs"||this.props.width==="sm"||this.props.width==="md",changed:!!(this.state.error||this.state.changed),error:!!this.state.error,onSave:e=>this.onSave(!0,e),onClose:()=>this.onSave(!1)}))}};export{V as ConfigGeneric,tn as ConfigPanel,Mf as JsonConfig,ki as JsonConfigComponent}; +`,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=Si(e),n=cn(t);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const t=Si(e),n=cn(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function Sf(m){const e=m.prettyErrors!==!1;return{lineCounter:m.lineCounter||e&&new wf||null,prettyErrors:e}}function Ef(m,e={}){const{lineCounter:t,prettyErrors:n}=Sf(e),h=new Cf(t==null?void 0:t.addNewLine),i=new gf(e);let s=null;for(const d of i.compose(h.parse(m),!0,m.length))if(!s)s=d;else if(s.options.logLevel!=="silent"){s.errors.push(new Bn(d.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&t&&(s.errors.forEach(wo(m,t)),s.warnings.forEach(wo(m,t))),s}function Af(m,e,t){let n;const h=Ef(m,t);if(!h)return null;if(h.warnings.forEach(i=>ga(h.options.logLevel,i)),h.errors.length>0){if(h.options.logLevel!=="silent")throw h.errors[0];h.errors=[]}return h.toJS(Object.assign({reviver:n},t))}const xs={flex:{display:"flex"},button:{height:48,minWidth:48},wrapper:{width:"calc(100vw - 40px)",height:"calc(100vh - 188px)"}};class Df extends V{async componentDidMount(){await super.componentDidMount();const{data:e,attr:t}=this.props,n=V.getValue(e,t)||"";this.setState({value:n,initialized:!0,yamlError:this.validateYaml(n)})}validateYaml(e){let t=!1;if(this.props.schema.validateYaml!==!1&&(e||!this.props.schema.allowEmpty))try{Af(e)}catch(n){console.log("Error in YAML",n),t=!0}return t}renderItem(e,t){if(!this.state.initialized)return null;const{schema:n,data:h,attr:i}=this.props,{value:s,showSelectId:d}=this.state,o=n.readOnly===!0||t;return $.createElement(fe,{fullWidth:!0,variant:"standard"},$.createElement("div",{style:xs.flex},$.createElement(ve,{color:"grey",style:xs.button,size:"small",variant:"outlined",onClick:()=>this.setState({showSelectId:!0})},P.I18n.t("ra_YAML editor"))),d?$.createElement(qs,{title:this.getText(n.label),overflowHidden:!0,applyDisabled:this.state.yamlError&&this.props.schema.doNotApplyWithError||o,onClose:()=>{o?this.setState({showSelectId:!1}):this.setState({showSelectId:!1,value:V.getValue(h,i)||""})},onApply:o?void 0:()=>this.setState({showSelectId:!1},()=>this.onChange(i,s))},$.createElement("div",{style:{...xs.wrapper,border:this.state.yamlError?"2px solid red":"2px solid transparent"}},$.createElement(sr,{mode:"yaml",value:typeof s=="object"?JSON.stringify(s):s,onChange:o?void 0:l=>this.setState({value:l,yamlError:this.validateYaml(l)}),name:"ConfigYamlEditor",themeType:this.props.oContext.themeType}))):null,n.help||this.state.yamlError?$.createElement(ge,null,this.state.yamlError?P.I18n.t("ra_Invalid YAML"):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}}class $f extends V{async componentDidMount(){await super.componentDidMount();const e=await Uo(()=>import("./index-B5DqCD_a.js").then(t=>t.i),__vite__mapDeps([0,1,2,3]),import.meta.url);this.setState({QRCode:e.default})}renderItem(){const e=this.state.QRCode;if(!e)return null;const t=Math.max(32,Math.round((this.props.schema.size||256)*.15));return $.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:this.props.schema.bgColor||"white",padding:t,width:"100%",height:"100%"}},$.createElement(e,{title:this.getText(this.props.schema.tooltip),value:this.props.schema.data,size:this.props.schema.size,fgColor:this.props.schema.fgColor,bgColor:this.props.schema.bgColor,level:this.props.schema.level}))}}class xf extends V{initialized=!1;localContext;async componentDidMount(){await super.componentDidMount();const e=await Uo(()=>import("./index-B5DqCD_a.js").then(t=>t.i),__vite__mapDeps([0,1,2,3]),import.meta.url);this.setState({QRCode:e.default}),this.props.schema.sendFirstByClick||await this.askInstance()}async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){const n=await this.getPatternAsync(this.props.schema.jsonData,null,!0);if(n)try{e=JSON.parse(n)}catch{console.error(`Cannot parse json data: ${JSON.stringify(e)}`)}}e===void 0&&(e=null);const t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){const n=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(n!=null&&n.val)){window.alert(P.I18n.t("ra_Instance %s is not alive",t));return}}this.setState({loading:!0},()=>this.props.oContext.socket.sendTo(t,this.props.schema.command||"send",e).then(n=>this.setState({qrData:n||"",loading:!1})))}}getContext(){const e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=V.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(){if(this.props.alive){const n=this.getContext();(n!==this.localContext||!this.initialized)&&(this.localContext=n,(!this.props.schema.sendFirstByClick||this.state.qrData!==void 0)&&setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}if(!this.state.qrData&&this.props.schema.sendFirstByClick)return this.props.alive?$.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",cursor:this.state.loading?"default":"pointer"},onClick:()=>!this.state.loading&&this.askInstance()},this.state.loading?$.createElement(Tt,null):typeof this.props.schema.sendFirstByClick=="boolean"?P.I18n.t("ra_Click to show"):this.getText(this.props.schema.sendFirstByClick,this.props.schema.noTranslation)):$.createElement("div",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",cursor:this.state.loading?"default":"pointer"},onClick:()=>!this.state.loading&&this.askInstance()},P.I18n.t("ra_Instance %s is not alive",this.props.oContext.instance.toString()));const e=this.state.QRCode;if(!e||this.state.qrData===void 0)return null;const t=Math.max(32,Math.round((this.props.schema.size||256)*.15));return $.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:this.props.schema.bgColor||"white",padding:t,width:"100%",height:"100%"}},$.createElement(e,{title:this.getText(this.props.schema.tooltip),value:this.state.qrData,size:this.props.schema.size,fgColor:this.props.schema.fgColor,bgColor:this.props.schema.bgColor,level:this.props.schema.level}))}}const _f={accordion:Sh,alive:Eh,autocomplete:Ah,autocompleteSendTo:Dh,certCollection:kh,certificate:xh,certificates:_h,checkbox:Lh,checkDocker:Th,checkLicense:$t,chip:Vr,chips:Vr,color:Rh,coordinates:Nh,credential:Zs,cron:$h,custom:Kn,datePicker:Bh,deviceManager:Ph,divider:Zp,file:Qh,fileSelector:Hi,func:Xh,header:ed,iframe:Zh,iframeSendTo:qh,image:nu,imageSendTo:tu,infoBox:iu,instance:su,interface:ru,ip:eu,jsonEditor:Lp,language:Ip,license:Op,number:Fp,oauth2:Rp,objectId:Np,password:Bp,pattern:Pp,port:jp,qrCode:$f,qrCodeSendTo:xf,room:Hp,select:zp,selectSendTo:Up,sendto:ro,sendTo:ro,setState:Jp,slider:Yp,state:Xp,staticImage:td,staticInfo:nd,staticLink:uo,staticText:uo,table:Qe,text:od,textSendTo:ld,timePicker:cd,topic:ud,uuid:pd,user:dd,yamlEditor:Df},lt={fullWidth:{width:"100%"},paper:{margin:1,width:"auto !important",overflowY:"auto",paddingBottom:1},paperWithIcons:{height:"calc(100vh - 259px) !important"},paperWithoutIcons:{height:"calc(100vh - 235px) !important"},padding:{padding:"10px"},heading:{},primary:m=>({backgroundColor:m.palette.primary.main,color:m.palette.mode==="dark"?"inherit":"#FFF"}),secondary:m=>({backgroundColor:m.palette.secondary.main})};class tn extends V{async componentDidMount(){var e;await super.componentDidMount(),(e=this.props.schema)!=null&&e.collapsable&&this.setState({expanded:(window._localStorage||window.localStorage).getItem(`${this.props.oContext.adapterName}.${this.props.attr}`)==="true"})}renderItems(e,t){return e?Object.keys(e).map(n=>{if(this.props.oContext.multiEdit&&e[n].noMultiEdit)return null;const h=e[n].type||"panel";let i,s="Use this.props.oContext.socket!";if(h==="custom")e[n].url?i=Kn:this.props.oContext.customs&&this.props.oContext.customs[e[n].component]?i=this.props.oContext.customs[e[n].component]:(console.error(`Cannot find custom component: ${e[n].component}`),i=V),s=this.props.oContext.socket;else if(h==="component")if(this.props.customComponents[e[n].subType])i=this.props.customComponents[e[n].subType];else return $.createElement("div",{key:`${n}_${this.props.index??""}`},`Component ${e[n].subType} not provided`);else h==="panel"?i=tn:i=_f[h]||V;return $.createElement(i,{socket:s,globalData:this.props.globalData,oContext:this.props.oContext,key:`${n}_${this.props.index??""}`,index:this.props.index,changed:this.props.changed,arrayIndex:this.props.arrayIndex,expertMode:this.props.expertMode,commandRunning:this.props.commandRunning,style:lt.panel,common:this.props.common,alive:this.props.alive,themeName:this.props.themeName,data:this.props.data,originalData:this.props.originalData,onError:this.props.onError,onHiddenChanged:this.props.onHiddenChanged,onFilterLabelUpdate:this.props.onFilterLabelUpdate,onChange:this.props.onChange,disabled:t,customObj:this.props.customObj,custom:this.props.custom,schema:e[n],attr:n,table:this.props.table,customComponents:this.props.customComponents})}):null}render(){const e=this.props.schema;if(!e||(this.updateCalculatedValues(),!this.state.calculatedValues))return null;const t=this.props.schema.items,n=this.props.schema.style||{};if(this.state.calculatedValues.hidden){if(e.hideOnlyControl){const i=$.createElement(ze,{size:{xs:e.xs||void 0,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0},sx:P.Utils.getStyle(this.props.oContext.theme,{marginBottom:0,textAlign:"left"},n,this.props.oContext.themeType==="dark"&&e.darkStyle)});return e.newLine?$.createElement($.Fragment,null,$.createElement("div",{style:{flexBasis:"100%",height:0}}),i):i}return null}if(this.props.table)return this.renderItems(t,this.state.calculatedValues.disabled);if(this.props.custom)return $.createElement(ze,{key:`${this.props.attr}_${this.props.index}`,container:!0,style:lt.fullWidth,columnSpacing:2,rowSpacing:1,sx:n},this.renderItems(t,this.state.calculatedValues.disabled));let h;if(e.collapsable)h=$.createElement(js,{key:`${this.props.attr}_${this.props.index}`,style:lt.fullWidth,expanded:!!this.state.expanded,onChange:()=>{(window._localStorage||window.localStorage).setItem(`${this.props.oContext.adapterName}.${this.props.attr}`,this.state.expanded?"false":"true"),this.setState({expanded:!this.state.expanded})}},$.createElement(Hs,{expandIcon:$.createElement(Ii,null),sx:P.Utils.getStyle(this.props.oContext.theme,n,this.props.oContext.themeType&&e.darkStyle,e.color==="primary"?lt.primary:e.color==="secondary"&<.secondary,{width:"100%"})},$.createElement(yt,{style:lt.heading},this.getText(e.label))),$.createElement(zs,null,$.createElement(ze,{container:!0,columnSpacing:2,rowSpacing:1,sx:{...n,width:"100%",padding:"10px"}},this.renderItems(t,this.state.calculatedValues.disabled))));else{const i=P.Utils.getStyle(this.props.oContext.theme,this.props.style,n,{width:"100%"},this.props.isParentTab&<.paper,this.props.isParentTab&&(this.props.withoutSaveButtons?this.props.withIcons?{height:"calc(100% - 88px) !important"}:{height:"calc(100% - 64px) !important"}:this.props.withIcons?lt.paperWithIcons:lt.paperWithoutIcons));h=$.createElement(Ie,{component:"div",key:`${this.props.attr}_${this.props.index}`,className:this.props.className,sx:i},$.createElement(ze,{container:!0,columnSpacing:2,rowSpacing:1,sx:P.Utils.getStyle(this.props.oContext.theme,{width:"100%"},this.props.isParentTab&<.padding,this.props.schema.innerStyle)},this.renderItems(t,this.state.calculatedValues.disabled)))}if(!this.props.isParentTab){const i=$.createElement(ze,{title:this.getText(e.tooltip),size:{xs:e.xs||void 0,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0},sx:{marginBottom:0,textAlign:"left",...n}},h);return e.newLine?$.createElement($.Fragment,null,$.createElement("div",{style:{flexBasis:"100%",height:0}}),i):i}return h}}const Ei={tabs:{height:"100%",width:"100%"},panel:{width:"100%",display:"block"},panelWithIcons:{height:"calc(100% - 72px)"},panelWithoutIcons:{height:"calc(100% - 48px)"}};class kf extends V{resizeTimeout=null;calculateTimeoutTable=null;refDiv;constructor(e){super(e);let t;if(this.props.root){const n=(window.location.hash||"").replace(/^#/,"").split("/");if(n.length>=3&&n[1]==="config"){const h=n[3],i=parseInt(h,10);h&&i.toString()===h?i>=0&&i{const n=this.state.tab;if(!n){this.props.onError(e,t);return}const h={...this.state.tabErrors};h[n]||(h[n]={}),t?h[n][e]=t:(delete h[n][e],Object.keys(h[n]).length===0&&delete h[n]),this.setState({tabErrors:h}),this.props.onError(e,t)};hasTabErrors=e=>!!(this.state.tabErrors[e]&&Object.keys(this.state.tabErrors[e]).length>0);componentWillUnmount(){this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=null),this.calculateTimeoutTable&&(clearTimeout(this.calculateTimeoutTable),this.calculateTimeoutTable=null),window.removeEventListener("hashchange",this.onHashTabsChanged,!1),super.componentWillUnmount()}onHashTabsChanged=()=>{const e=(window.location.hash||"").replace(/^#/,"").split("/");if(e.length>3&&e[1]==="config"){const t=e[3],n=parseInt(t,10);let h;n.toString()===t?n>=0&&n{this.setState({initialBreakpoint:e})},50),e}return this.state.initialBreakpoint}componentDidUpdate(){var e;!this.state.initialBreakpoint&&((e=this.refDiv.current)!=null&&e.clientWidth)&&this.refDiv.current.clientWidth!==this.state.width&&(this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{var t;this.resizeTimeout=null,this.setState({width:(t=this.refDiv.current)==null?void 0:t.clientWidth})},50))}onMenuChange(e){(window._localStorage||window.localStorage).setItem(`${this.props.dialogName||"App"}.${this.props.oContext.adapterName}`,e),this.setState({tab:e},()=>{if(this.props.root){const t=(window.location.hash||"").split("/");t.length>=3&&t[1]==="config"&&(t[3]=this.state.tab,window.location.hash=t.join("/"))}})}updateCalculatedValuesForTable(){this.calculateTimeoutTable&&clearTimeout(this.calculateTimeoutTable),this.calculateTimeoutTable=setTimeout(async()=>{this.calculateTimeoutTable=null;const e=this.props.schema.items,t={};for(const n in e){let h;if(e[n].expertMode&&!this.props.expertMode){t[n]={hidden:!0,disabled:!1};continue}if(this.props.custom){const i=!!await this.executeCustom(e[n].hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.index,this.props.globalData);if(i){t[n]={hidden:!0,disabled:!1};continue}h=!!await this.executeCustom(e[n].disabled,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.index,this.props.globalData),t[n]={hidden:i,disabled:h}}else{if(!!await this.execute(e[n].hidden,!1,this.props.data,this.props.index,this.props.globalData)){t[n]={hidden:!0,disabled:!1};continue}h=!!await this.execute(e[n].disabled,!1,this.props.data,this.props.index,this.props.globalData),t[n]={hidden:!1,disabled:h}}}JSON.stringify(t)!==JSON.stringify(this.state.calculatedValuesTable)&&this.setState({calculatedValuesTable:t})},50)}render(){const e=this.props.schema.items;let t=!1;if(this.updateCalculatedValuesForTable(),!this.state.calculatedValuesTable)return null;const n=[];Object.keys(e).filter(s=>{var d;return!((d=this.state.calculatedValuesTable[s])!=null&&d.hidden)}).map(s=>{var o;const d=this.getIcon(e[s].icon);t||=!!d,n.push({icon:d,disabled:(o=this.state.calculatedValuesTable[s])==null?void 0:o.disabled,label:this.getText(e[s].label),name:s})}),n.find(s=>s.name===this.state.tab)||setTimeout(()=>this.setState({tab:n[0].name}),50);const h=this.getCurrentBreakpoint();let i;return h==="xs"&&n.length>2?i=$.createElement(Pn,{style:{top:2,backgroundColor:this.props.oContext.themeType==="dark"?"#222":"#DDD"},variant:"dense"},$.createElement(se,{onClick:s=>this.setState({openMenu:s.currentTarget})},$.createElement(Jc,null)),this.state.openMenu?$.createElement(dc,{open:!0,anchorEl:this.state.openMenu,onClose:()=>this.setState({openMenu:null})},n.map(s=>{const d=this.hasTabErrors(s.name);return $.createElement($e,{disabled:s.disabled,key:s.name,onClick:()=>{this.setState({openMenu:null},()=>this.onMenuChange(s.name))},selected:s.name===this.state.tab,sx:d?{color:"error.main"}:void 0},t?$.createElement(To,null,s.icon):null,$.createElement(Ie,{sx:{display:"flex",alignItems:"center",gap:.5,width:"100%"}},s.label,d&&$.createElement(Jt,{sx:{fontSize:16,color:"error.main"}})))})):null):i=$.createElement(fc,{variant:"scrollable",scrollButtons:"auto",style:this.props.schema.tabsStyle,value:this.state.tab,onChange:(s,d)=>this.onMenuChange(d)},n.map(s=>{const d=this.hasTabErrors(s.name),o=d?$.createElement(Ie,{sx:{display:"flex",alignItems:"center",gap:.5}},s.label,$.createElement(Jt,{sx:{fontSize:16,color:"error.main"}})):s.label;return $.createElement(gc,{id:s.name,wrapped:!0,disabled:s.disabled,key:s.name,value:s.name,iconPosition:this.props.schema.iconPosition||"start",icon:s.icon,label:o,sx:d?{"& .MuiTab-wrapper":{color:"error.main"}}:void 0})})),$.createElement("div",{style:Ei.tabs,ref:this.refDiv},i,$.createElement(tn,{oContext:this.props.oContext,withoutSaveButtons:this.props.withoutSaveButtons,isParentTab:!0,changed:this.props.changed,key:this.state.tab,expertMode:this.props.expertMode,index:1001,arrayIndex:this.props.arrayIndex,globalData:this.props.globalData,commandRunning:this.props.commandRunning,style:{...Ei.panel,...t?Ei.panelWithIcons:Ei.panelWithoutIcons},common:this.props.common,alive:this.props.alive,themeName:this.props.themeName,data:this.props.data,originalData:this.props.originalData,onChange:this.props.onChange,onError:this.onTabError,customObj:this.props.customObj,custom:this.props.custom,schema:e[this.state.tab],table:this.props.table,withIcons:t,customComponents:this.props.customComponents}))}}const Tf={root:{width:"100%",height:"100%"}};class Ti extends xo{forceUpdateHandlers;errorTimeout=null;errorCached=null;oContext;cachedObjects={};constructor(e){super(e),this.state={originalData:JSON.stringify(this.props.data),changed:!1,errors:{},updateData:this.props.updateData||0,systemConfig:null,alive:!1,commandRunning:!1,schema:JSON.parse(JSON.stringify(this.props.schema))},this.forceUpdateHandlers={},this.buildDependencies(this.state.schema),this.readData().catch(t=>console.error(`Cannot read data: ${t}`))}static getDerivedStateFromProps(e,t){return e.updateData!==t.updateData?{updateData:e.updateData,originalData:JSON.stringify(e.data),schema:JSON.parse(JSON.stringify(e.schema))}:null}static async loadI18n(e,t,n){if(t===!0||t&&typeof t=="string"){const h=P.I18n.getLanguage(),i=typeof t=="string"?t:"i18n";let s=await e.fileExists(`${n}.admin`,`${i}/${h}.json`),d;if(s?d=`${i}/${h}.json`:(s=await e.fileExists(`${n}.admin`,`${i}/${h}/translations.json`),s?d=`${i}/${h}/translations.json`:h!=="en"&&(s=await e.fileExists(`${n}.admin`,`${i}/en.json`),s?d=`${i}/en.json`:(s=await e.fileExists(`${n}.admin`,`${i}/en/translations.json`),s&&(d=`${i}/en/translations.json`)))),d){const o=await e.readFile(`${n}.admin`,d);let l;o.file!==void 0?l=o.file:l=o;try{const r=JSON.parse(l);P.I18n.extendTranslations(r,h)}catch(r){return console.error(`Cannot parse language file "${n}.admin/${d}: ${r}`),""}return d}return console.warn(`Cannot find i18n for ${n} / ${d}`),""}return t&&typeof t=="object"&&P.I18n.extendTranslations(t),""}onCommandRunning=e=>this.setState({commandRunning:e});async readData(){let e;try{this.props.socket.getCompactSystemConfig?e=await this.props.socket.getCompactSystemConfig():e=await this.getCachedObject("system.config")||void 0;const t=await this.props.socket.getState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`);this.setState({systemConfig:e.common,alive:!!(t&&t.val)},()=>{this.updateContext(!0),this.props.custom||this.props.socket.subscribeState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`,this.onAlive)})}catch(t){console.error(`Cannot read system config: ${t}`)}}onAlive=(e,t)=>{!!(t!=null&&t.val)!==this.state.alive&&this.setState({alive:!!(t!=null&&t.val)})};onChange=(e,t,n,h)=>{if(this.props.onValueChange)this.props.onValueChange(e,t,h),n&&n();else if(e&&this.props.onChange){const i={changed:JSON.stringify(e)!==this.state.originalData};this.setState(i,()=>{this.props.onChange(e,i.changed,h),n&&n()})}else h&&this.props.onChange(null,null,h)};onError=(e,t)=>{this.errorCached=this.errorCached||JSON.parse(JSON.stringify(this.state.errors));const n=this.errorCached;t?n[e]=t:delete n[e],this.errorTimeout&&clearTimeout(this.errorTimeout),JSON.stringify(n)!==JSON.stringify(this.state.errors)?this.errorTimeout=setTimeout(()=>this.setState({errors:this.errorCached},()=>{this.errorTimeout=null,this.errorCached=null,this.props.onError(!!Object.keys(this.state.errors).length)}),50):this.errorCached=null};flatten(e,t){return t=t||{},e.items&&Object.keys(e.items).forEach(n=>{t[n]=e.items[n],this.flatten(e.items[n],t)}),t}buildDependencies(e){const t=this.flatten(e);Object.keys(t).forEach(n=>{var h,i,s,d,o,l,r,a,c,p;(h=t[n].confirm)!=null&&h.alsoDependsOn&&((i=t[n].confirm)==null||i.alsoDependsOn.forEach(u=>{if(!t[u])console.error(`[JsonConfigComponent] Attribute ${u} does not exist!`),u.startsWith("data.")&&console.warn(`[JsonConfigComponent] please use "${u.replace(/^data\./,"")}" instead of "${u}"`);else{t[u].confirmDependsOn=t[u].confirmDependsOn||[];const f={...t[n],attr:n};f.confirm&&(f.confirm.cancel="Undo"),t[u].confirmDependsOn.push(f)}})),(s=t[n].onChange)!=null&&s.alsoDependsOn&&((d=t[n].onChange)==null||d.alsoDependsOn.forEach(u=>{if(!t[u])console.error(`[JsonConfigComponent] Attribute ${u} does not exist!`),u.startsWith("data.")&&console.warn(`[JsonConfigComponent] please use "${u.replace(/^data\./,"")}" instead of "${u}"`);else{t[u].onChangeDependsOn=t[u].onChangeDependsOn||[];const f={...t[n],attr:n};t[u].onChangeDependsOn.push(f)}})),(o=t[n].hidden)!=null&&o.alsoDependsOn&&((l=t[n].hidden)==null||l.alsoDependsOn.forEach(u=>{if(!t[u])console.error(`[JsonConfigComponent] Attribute ${u} does not exist!`),u.startsWith("data.")&&console.warn(`[JsonConfigComponent] please use "${u.replace(/^data\./,"")}" instead of "${u}"`);else{t[u].hiddenDependsOn=t[u].hiddenDependsOn||[];const f={...t[n],attr:n};t[u].hiddenDependsOn.push(f)}})),(r=t[n].label)!=null&&r.alsoDependsOn&&((a=t[n].label)==null||a.alsoDependsOn.forEach(u=>{if(!t[u])console.error(`[JsonConfigComponent] Attribute ${u} does not exist!`),u.startsWith("data.")&&console.warn(`[JsonConfigComponent] please use "${u.replace(/^data\./,"")}" instead of "${u}"`);else{t[u].labelDependsOn=t[u].labelDependsOn||[];const f={...t[n],attr:n};t[u].labelDependsOn.push(f)}})),(c=t[n].help)!=null&&c.alsoDependsOn&&((p=t[n].help)==null||p.alsoDependsOn.forEach(u=>{if(!t[u])console.error(`[JsonConfigComponent] Attribute ${u} does not exist!`),u.startsWith("data.")&&console.warn(`[JsonConfigComponent] please use "${u.replace(/^data\./,"")}" instead of "${u}"`);else{t[u].helpDependsOn=t[u].helpDependsOn||[];const f={...t[n],attr:n};t[u].helpDependsOn.push(f)}}))})}getCachedObject=async e=>{if(this.cachedObjects[e]!==void 0)return this.cachedObjects[e];try{this.cachedObjects[e]=await this.props.socket.getObject(e)??null}catch(t){console.error(t),this.cachedObjects[e]=null}return this.cachedObjects[e]};updateContext(e){this.oContext={DeviceManager:this.props.DeviceManager,adapterName:this.props.adapterName,changeLanguage:this.changeLanguage,common:this.props.common,customs:this.props.customs,dateFormat:this.props.dateFormat,embedded:this.props.embedded,forceUpdate:this.forceAttrUpdate,imagePrefix:this.props.imagePrefix,instance:this.props.instance,instanceObj:this.props.instanceObj,isFloatComma:this.props.isFloatComma,multiEdit:this.props.multiEdit,onBackEndCommand:this.props.onBackEndCommand,onCommandRunning:this.onCommandRunning,onValueChange:this.props.onValueChange,registerOnForceUpdate:this.registerOnForceUpdate,socket:this.props.socket,systemConfig:this.state.systemConfig,theme:this.props.theme,themeType:this.props.themeType,_themeName:this.props.themeName,updateData:this.state.updateData,getCachedObject:this.getCachedObject},e&&this.forceUpdate()}renderItem(e){return e.type==="tabs"?$.createElement(kf,{withoutSaveButtons:this.props.withoutSaveButtons,oContext:this.oContext,alive:this.state.alive,changed:this.state.changed,commandRunning:this.state.commandRunning,common:this.props.common,custom:this.props.custom,customObj:this.props.customObj,data:this.props.data,onChange:this.onChange,onError:(t,n)=>this.onError(t,n),originalData:JSON.parse(this.state.originalData),root:!0,schema:e,expertMode:this.props.expertMode,themeName:this.props.themeName,customComponents:this.props.customComponents}):e.type==="panel"||!e.type?$.createElement(tn,{withoutSaveButtons:this.props.withoutSaveButtons,oContext:this.oContext,alive:this.state.alive,changed:this.state.changed,commandRunning:this.state.commandRunning,common:this.props.common,custom:this.props.custom,customObj:this.props.customObj,data:this.props.data,expertMode:this.props.expertMode,index:1e3,isParentTab:!this.props.embedded&&!this.props.withoutSaveButtons,onChange:this.onChange,onError:(t,n)=>this.onError(t,n),originalData:JSON.parse(this.state.originalData),root:!0,schema:e,themeName:this.props.themeName,customComponents:this.props.customComponents}):(console.error(`Unknown item type in root: ${JSON.stringify(e)}`),null)}changeLanguage=()=>{this.forceUpdate()};forceAttrUpdate=(e,t)=>{Array.isArray(e)?e.forEach(n=>this.forceUpdateHandlers[n]&&this.forceUpdateHandlers[n](t)):this.forceUpdateHandlers[e]&&this.forceUpdateHandlers[e](t)};registerOnForceUpdate=(e,t)=>{t?this.forceUpdateHandlers[e]=t:this.forceUpdateHandlers[e]&&delete this.forceUpdateHandlers[e]};render(){return!this.state.systemConfig||!this.oContext?$.createElement(ji,null):(this.oContext._themeName!==this.props.themeName&&(this.oContext._themeName=this.props.themeName,setTimeout(()=>this.updateContext(!0),0)),$.createElement("div",{style:{...!this.props.embedded||this.props.withoutSaveButtons?Tf.root:void 0,...this.props.style,...this.state.schema.style}},this.renderItem(this.state.schema)))}}const jt={root:{width:"100%",height:"100%",overflow:"hidden",position:"relative"},scroll:{height:"calc(100% - 48px)",overflowY:"auto"},exportImportButtons:{position:"absolute",top:5,right:0,zIndex:3},button:{marginRight:"5px"},tooltip:{pointerEvents:"none"}};function Lf(m,e){let t="";for(let n=0;n{const h=document.createElement("script");h.setAttribute("id",e),h.onload=n,h.src=m,document.getElementsByTagName("head")[0].appendChild(h)})}let Ff=class extends P.Router{fileSubscribed=[];fileLangSubscribed="";secret;constructor(e){super(e),this.state={updateData:0,changed:!1,confirmDialog:!1,theme:P.Theme(e.themeName),saveConfigDialog:!1,hash:"_"},this.secret=e.secret||"",this.getInstanceObject().then(t=>this.getConfigFile().then(n=>Ti.loadI18n(this.props.socket,n==null?void 0:n.i18n,this.props.adapterName).then(h=>{h&&(this.fileLangSubscribed||(this.fileLangSubscribed=h,this.props.socket.subscribeFiles(`${this.props.adapterName}.admin`,this.fileLangSubscribed,this.onFileChange))),t?this.setState({schema:n,data:t.native,common:t.common,hash:jr(JSON.stringify(n)).toString()}):window.alert(`Instance system.adapter.${this.props.adapterName}.${this.props.instance} not found!`)})))}componentWillUnmount(){super.componentWillUnmount(),this.fileSubscribed.length&&(this.props.socket.unsubscribeFiles(`${this.props.adapterName}.admin`,this.fileSubscribed,this.onFileChange),this.fileSubscribed=[]),this.fileLangSubscribed&&(this.props.socket.unsubscribeFiles(`${this.props.adapterName}.admin`,this.fileLangSubscribed,this.onFileChange),this.fileLangSubscribed="")}handleFileSelect=e=>{const t=e.target.files[0];if(t){const n=new FileReader;n.onload=h=>{if(!h.target)return;const i=h.target.result;try{const s=JSON.parse(i);this.setState({data:s,changed:JSON.stringify(s)!==JSON.stringify(this.state.originalData)})}catch{window.alert(P.I18n.t("[JsonConfig] Failed to parse JSON file"))}},n.readAsText(t)}else window.alert(P.I18n.t("[JsonConfig] Failed to open JSON File"))};getExportImportButtons(){return $.createElement("div",{style:jt.exportImportButtons},$.createElement(me,{title:this.props.t("Import settings from JSON file"),slotProps:{popper:{sx:jt.tooltip}}},$.createElement(Li,{size:"small",sx:{"&.MuiFab-root":jt.button},onClick:()=>{const e=document.createElement("input");e.setAttribute("type","file"),e.setAttribute("id","files"),e.setAttribute("opacity",0),e.addEventListener("change",t=>this.handleFileSelect(t),!1),e.click()}},$.createElement(Br,null))),$.createElement(me,{title:this.props.t("Export setting to JSON file"),slotProps:{popper:{sx:jt.tooltip}}},$.createElement(Li,{size:"small",sx:{"&.MuiFab-root":jt.button},onClick:()=>{this.state.data&&P.Utils.generateFile(`${this.props.adapterName}.${this.props.instance}.json`,this.state.data)}},$.createElement(Br,{style:{transform:"rotate(180deg)"}}))))}onFileChange=async(e,t,n)=>{var h;if(e===`${this.props.adapterName}.admin`&&n){if(t===this.fileLangSubscribed)try{await Ti.loadI18n(this.props.socket,(h=this.state.schema)==null?void 0:h.i18n,this.props.adapterName),this.setState({hash:`${this.state.hash}1`})}catch{}else if(this.fileSubscribed.includes(t))try{const i=await this.getConfigFile(this.fileSubscribed[0]);this.setState({schema:i,hash:jr(JSON.stringify(i)).toString()})}catch{}}};async getInstanceObject(){var e;try{const t=await this.props.socket.getObject(`system.adapter.${this.props.adapterName}.${this.props.instance}`);if(Array.isArray(t.encryptedNative)){if(!this.secret){const n=await this.props.socket.getSystemConfig();await $o("../../lib/js/crypto-js/crypto-js.js","crypto-js"),this.secret=n.native.secret}return(e=t.encryptedNative)==null||e.forEach(n=>{t.native[n]&&(t.native[n]=If(this.secret,t.native[n]))}),t}return t}catch(t){window.alert(`[JsonConfig] Cannot read instance object: ${t}`)}return null}renderDialogConfirm(){return this.state.confirmDialog?$.createElement(P.DialogConfirm,{title:P.I18n.t("ra_Please confirm"),text:P.I18n.t("ra_Some data are not stored. Discard?"),ok:P.I18n.t("ra_Discard"),cancel:P.I18n.t("ra_Cancel"),onClose:e=>this.setState({confirmDialog:!1},()=>e&&P.Router.doNavigate(null))}):null}async scanForInclude(e,t){if(typeof e["#include"]=="string"){const h=await this._getConfigFile(e["#include"],[...t]);return delete e["#include"],h&&(e={...e,...h}),e}const n=Object.keys(e);for(let h=0;h ${t.join(" => ")}`),null;t.push(e);try{await this.props.socket.fileExists(`${this.props.adapterName}.admin`,e)||(e="jsonConfig.json");const h=await this.props.socket.readFile(`${this.props.adapterName}.admin`,e);let i="",s="";if(h.file!==void 0&&(s=h.file),typeof s=="string")i=s;else if(s.type==="Buffer"){let d="";const o=new Uint8Array(s.data),l=o.byteLength;for(let r=0;rthis.setState({saveConfigDialog:!1},()=>e&&this.onSave(!0))}):null}findAttr(e,t){if(t=t||this.state.schema,t!=null&&t.items){if(e in t.items)return t.items[e];for(const n of Object.values(t.items)){const h=this.findAttr(e,n);if(h)return h}}return null}postProcessing(e,t,n){if(n=n||this.state.schema,!e){console.error(`Data is empty in postProcessing: ${t}, ${JSON.stringify(n)}`);return}const h=e[t];if(n.items)if(n.type==="table"){const i=h;if(!Array.isArray(i))return;for(const s of i)for(const d of n.items)this.postProcessing(s,d.attr,d)}else for(const[i,s]of Object.entries(n.items)){if(s.type==="panel"||s.type==="tabs"||s.type==="accordion")return;this.postProcessing(e,i,s)}else if(t&&typeof h=="string")if(n.type==="text")n.trim!==!1&&(e[t]=h.trim());else if(n.type==="ip")e[t]=h.trim();else if(n.type==="number"){const i=parseFloat(h.toString().replace(",","."));n.min!==void 0&&in.max?e[t]=n.max:e[t]=i}else if(n.type==="port"){const i=parseInt(h.toString(),10);n.min!==void 0&&in.max&&(e[t]=n.max),e[t]!==0&&i<20?e[t]=20:i>65535?e[t]=65535:e[t]=i}else n.type==="checkbox"&&(e[t]=e[t]===!0||e[t]==="true"||e[t]==="on"||e[t]===1||e[t]==="1")}async onSave(e,t){if(e){const n=await this.getInstanceObject();if(!n){console.error("Something went wrong: may be no connection?"),window.alert("Something went wrong: may be no connection?");return}if(!this.state.data||!this.state.schema)return;const h={};for(const s of Object.keys(this.state.data)){const d=this.findAttr(s);(!d||!d.doNotSave||d.type==="state")&&!s.startsWith("_")?V.setValue(n.native,s,this.state.data[s]):(V.setValue(n.native,s,null),h[s]=this.state.data[s])}try{const s=JSON.parse(JSON.stringify(n));if(Array.isArray(s.encryptedNative)){await $o("../../lib/js/crypto-js/crypto-js.js","crypto-js");for(const d of s.encryptedNative)s.native[d]&&(s.native[d]=Of(this.secret,s.native[d]))}await this.props.socket.setObject(s._id,s)}catch(s){window.alert(`[JsonConfig] Cannot set object: ${s}`)}const i={...n.native,...h};console.log(i),this.setState({changed:!1,data:i,updateData:this.state.updateData+1,originalData:i},()=>t&&P.Router.doNavigate(null))}else this.state.changed?this.setState({confirmDialog:!0}):P.Router.doNavigate(null)}componentDidUpdate(e,t){t.changed!==this.state.changed&&this.props.configStored(!this.state.changed)}async componentDidMount(){const e=`${window.location.protocol}//${window.location.host}${window.location.pathname}validate_config/${this.props.adapterName}`;console.log(`fetch ${e}`),await fetch(e)}render(){return!this.state.data||!this.state.schema?$.createElement(ji,null):$.createElement("div",{style:jt.root},this.renderDialogConfirm(),this.getExportImportButtons(),this.renderSaveConfigDialog(),$.createElement(Ti,{key:this.state.hash,style:jt.scroll,socket:this.props.socket,themeName:this.props.themeName,themeType:this.props.themeType,adapterName:this.props.adapterName,instance:this.props.instance,isFloatComma:this.props.isFloatComma,dateFormat:this.props.dateFormat,schema:this.state.schema,common:this.state.common,expertMode:this.props.expertMode,data:this.state.data,updateData:this.state.updateData,onError:e=>this.setState({error:e}),onChange:(e,t,n)=>{n&&this.state.error&&(window.alert(P.I18n.t("Cannot save configuration because of error in configuration")),n=!1),n&&!this.state.changed&&!t&&(n=!1),e?this.setState({data:e,changed:t,saveConfigDialog:n}):n!==void 0&&this.setState({saveConfigDialog:n})},DeviceManager:this.props.DeviceManager,theme:this.state.theme,customComponents:this.props.customComponents,imagePrefix:"."}),$.createElement(P.SaveCloseButtons,{isIFrame:!1,dense:!0,paddingLeft:0,newReact:!0,theme:this.state.theme,noTextOnButtons:this.props.width==="xs"||this.props.width==="sm"||this.props.width==="md",changed:!!(this.state.error||this.state.changed),error:!!this.state.error,onSave:e=>this.onSave(!0,e),onClose:()=>this.onSave(!1)}))}};export{V as ConfigGeneric,tn as ConfigPanel,Ff as JsonConfig,Ti as JsonConfigComponent}; diff --git a/admin/custom/assets/index-qs6J40Tp.js b/admin/custom/assets/index-DSGXVHGh.js similarity index 94% rename from admin/custom/assets/index-qs6J40Tp.js rename to admin/custom/assets/index-DSGXVHGh.js index 1f7332766..100cdb17e 100644 --- a/admin/custom/assets/index-qs6J40Tp.js +++ b/admin/custom/assets/index-DSGXVHGh.js @@ -368,7 +368,7 @@ Url: ${Gi(i)}`),!0}return!1}function NL(i,e){return e!=null&&e.length?xc(i).some @keyframes loaderHA-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } -}`;function Og(i){const e=i.themeType||"dark",t=i.size||270,s=t*1.5,r=t*14/270,o=t*280/270;return n.useEffect(()=>{if(!window.document.getElementById(On)){const M=window.document.createElement("style");M.setAttribute("id",On),M.innerHTML=pg,window.document.head.appendChild(M)}},[]),n.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",top:0,left:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundImage:i.backgroundImage&&i.backgroundImage!=="@@loginBackgroundImage@@"?i.backgroundImage:window.loadingBackgroundImage&&window.loadingBackgroundImage!=="@@loginBackgroundImage@@"?`url(${window.loadingBackgroundImage})`:void 0,backgroundColor:i.backgroundColor&&i.backgroundColor!=="@@loginBackgroundColor@@"?i.backgroundColor:window.loadingBackgroundColor&&window.loadingBackgroundColor!=="@@loginBackgroundColor@@"?window.loadingBackgroundColor:e==="dark"?"#000":"#FFF",backgroundSize:"cover"}},n.createElement("div",{style:{position:"relative",width:s,height:s,display:"flex",justifyContent:"center",alignItems:"center"}},n.createElement("div",{style:{position:"absolute",top:-r,left:-r,right:-r,bottom:-r,border:`${r}px solid transparent`,borderTop:`${r}px solid rgba(219, 10, 51, 0.50)`,borderRadius:"50%",animation:"loaderHA-spin 3.6s linear infinite"}}),n.createElement("div",{style:{position:"absolute",width:"100%",height:"100%",border:`${r}px solid transparent`,borderTop:`${r}px solid rgba(219, 10, 51, 0.75)`,borderRadius:"50%",animation:"loaderHA-spin 2.2s linear infinite"}}),n.createElement("div",{style:{width:t,height:t,zIndex:1,display:"flex",justifyContent:"center",alignItems:"center"}},n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 69.6 148.1",style:{width:"100%",height:"100%"}},n.createElement("path",{fill:"#db0a33",d:"M69.5,100.6c0-.4,0-.8-.2-1.1v-.7c-.2-.4-.3-.8-.5-1.2,0-.2-.2-.5-.3-.7,0,0,0-.2,0-.2,0-.2,0-.3-.2-.5l-.4-.7-.4-.6c-1-1.6-2.4-3-4.2-4.3-.3-.2-.6-.4-.9-.6,0,0-.2,0-.3-.2-.3-.2-.6-.3-.9-.5-.2,0-.3-.2-.5-.3-.3-.2-.6-.3-.9-.5,0,0-.2,0-.3-.2-1-2.7-2.4-4.9-3.8-6.7h0c2.5,0,6.6-.3,7.5-3,3.5-3,2.5-9.7,2.5-10,0-.6-.2-1.1-.4-1.7h0v-.3c.5-3-.4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,.1-3.6.3-2.7,3.1,0,0,.2,3.6,5.8,2.9,1.8-.1,7.5-.5,9.1-.3,1.6.2,2.8.2,3.7.1,1.3,0,3.8,0,5.3-.4.4,1.8,3.2,2.4,6,1.5,3.6,1.6,13.5,2,15.6-1.6,2.4-4.1-2.4-8.6-4.1-12.6-3.8-9.3-.8-14-1.6-16.8,0-.7-.2-1.8-.4-3.2.8-.4,1.5-.8,2.2-1.3,1-.7,1.7-1.4,2.3-2.1l.2-.2c0,0,.2-.3.3-.4l.6-.9.6-1.2.4-1.1.3-1.2v-.8c0-.3,0-.5,0-.7h0v-2.4h.2ZM52.6,131.9c-.3.4-.7.9-1.2,1.6-1-.6-2.7-2.2-3.3-4.3,0-.2,0-.3-.2-.5-1.1-6.9-2.6-9.7-3.2-10.6-1-3.7-1.7-7.4-1.3-9.6,0,0,3.6,8.2,6.4,10,0,0,3.7,8.5,4.5,9.9.6,1-.9,2.3-1.7,3.5ZM63.6,102.7h0v.2h0v.9c0,0-.3.4-.3.4,0,0,0,.2,0,.3v.2h0v.2h0l-.2.2c-.3.6-.8,1.1-1.3,1.5h0c-.3-2.4-.6-5.1-.8-8.2.2-.5.3-1.1.4-1.7l.2.2c.2.2.4.4.5.6.2.2.3.4.5.7,0,.2.3.4.4.7h0c0,.3.2.5.3.7,0,.2.2.5.2.7h0v.3c0,.2,0,.4,0,.6v.7h0v.7h0Z"}))),n.createElement("div",{style:{position:"absolute",width:o,zIndex:2,top:"57.5%",left:"50%",transform:"translate(-50%, -155%)"}},n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 7152 512",width:"100%",height:"auto"},n.createElement("path",{fill:"#fff",d:"M4566 0h1053v5h25c2 5 2 5 1 8h16q3 3 2 7l3 1 4 1 2 7h2l12 1q3 1 2 6v3h7q3 4 2 10v6h3l4 1 1 8 3-1 5 2 1 7 7 1 1 14v2h3q3 0 5 2l1 9v22l3 1 4 1 1 7v41q0 3-3 5l-5 1v26q1 3-2 5h-8l1 2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24 0v3q1 5-2 6l-6 1h-4l-5-1v3l-1 5-7 2v8q0 6-2 7l-7 1v210c0 7 0 7-2 10h-7v32q-3 3-8 2v15q-2 3-5 2h-3v2q1 8-2 15l-7 1v7l-1 3-1 6h-7v7l-6 2-2-1v3q1 5-2 6l-9 2h-6v5q-4 3-9 2v3q1 3-2 5h-15l1 3-2 5h-33l1 3-1 2h-589v-5h-8v-8h-7l-3-10v-6l-3-1-4-1-1-7v-48l2-5 7-1v-10q-1-3 2-5 2-2 6-2l1-3 2-5h32v-7q6-3 12-2h498l8 1v-3q0-3 2-5l7-2h8l2-7 7-1v-11q0-3 2-5h6V167l1-8q4-4 8-3v-44l1-5h8V84l1-3h7V66l8-4v-2l3-5 6-1v-9l1-6h8v-8q8-3 15-2l1-3 3-5h6v-3q-1-3 2-5h15v-3q-1-3 2-5h24z"})))))}function Eg(i){const e=window.vendorPrefix;return e==="PT"?n.createElement(mg,{themeType:i.themeType}):e==="MV"?n.createElement(dg,{themeType:i.themeType}):e==="NW"?n.createElement(zg,{themeType:"dark"}):e==="HA"?n.createElement(Og,{themeType:"dark"}):e&&e!=="@@vendorPrefix@@"?n.createElement(Ig,{themeType:i.themeType}):n.createElement(Cg,{themeType:i.themeType})}class qs extends ze{onHashChangedBound;constructor(e){super(e),this.onHashChangedBound=this.onHashChanged.bind(this)}componentDidMount(){window.addEventListener("hashchange",this.onHashChangedBound)}componentWillUnmount(){window.removeEventListener("hashchange",this.onHashChangedBound)}onHashChanged(){}static getLocation(){let e=window.location.hash;e=e.replace(/^#/,"");const t=e.split("/").map(s=>{try{return s?decodeURIComponent(s):""}catch{return console.error(`Router: Cannot decode ${s}`),s}});return{tab:t[0]||"",dialog:t[1]||"",id:t[2]||"",arg:t[3]||""}}static doNavigate(e,t,s,r){let o="";const M=qs.getLocation();r!==void 0&&!s&&(s=M.id),s&&!t&&(t=M.dialog),(t&&!e||e===null)&&(e=M.tab),e&&(o=`#${e}`,t&&(o+=`/${t}`,s&&(o+=`/${s}`,r!==void 0&&(o+=`/${r}`)))),window.location.hash!==o&&(window.location.hash=o)}}function _g(){const i=document.getSelection();if(!(i!=null&&i.rangeCount))return()=>{};let e=document.activeElement;const t=[];for(let s=0;s{i.type==="Caret"&&i.removeAllRanges(),i.rangeCount||t.forEach(s=>i.addRange(s)),e&&e.focus()}}const En={"text/plain":"Text","text/html":"Url",default:"Text"},fg="Copy to clipboard: #{key}, Enter";function Sg(i){const e=`${/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl"}+C`;return i.replace(/#{\s*key\s*}/g,e)}function Hc(i,e){let t,s,r,o,M=!1;e=e||{};const a=e.debug||!1;try{if(t=_g(),s=document.createRange(),r=document.getSelection(),o=document.createElement("span"),o.textContent=i,o.ariaHidden="true",o.style.all="unset",o.style.position="fixed",o.style.top="0px",o.style.clip="rect(0, 0, 0, 0)",o.style.whiteSpace="pre",o.style.userSelect="text",o.addEventListener("copy",l=>{var N,c,L,j;if(l.stopPropagation(),e!=null&&e.format)if(l.preventDefault(),typeof l.clipboardData>"u"){a&&console.warn("unable to use e.clipboardData"),a&&console.warn("trying IE specific stuff"),(N=window.clipboardData)==null||N.clearData();const g=En[e.format]||En.default;(c=window.clipboardData)==null||c.setData(g,i)}else(L=l.clipboardData)==null||L.clearData(),(j=l.clipboardData)==null||j.setData(e.format,i)}),document.body.appendChild(o),s.selectNodeContents(o),r==null||r.addRange(s),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");M=!0}catch(u){a&&console.error("unable to copy using execCommand: ",u),a&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",i),M=!0}catch(l){a&&console.error("unable to copy using clipboardData: ",l),a&&console.error("falling back to prompt");const N=Sg("message"in e?e.message||"":fg);window.prompt(N,i)}}finally{r&&(s&&typeof r.removeRange=="function"?r.removeRange(s):r.removeAllRanges()),o&&document.body.removeChild(o),t&&t()}return M}class D{static translations={};static unknownTranslations=[];static lang=window.sysLang||"en";static _disableWarning=!1;static setLanguage(e){e&&(D.lang=e)}static extendTranslations(e,t){if(e.prefix){const s=e;if(typeof s.prefix=="string"){const r=s.prefix;delete s.prefix,Object.keys(s).forEach(o=>{const M=o,a={},u=s[M];Object.keys(u).forEach(l=>{l&&u&&(l.startsWith(r)?a[l]=u[l]:a[`${r}${l}`]=u[l])}),e[M]=a})}else console.warn("Found prefix in translations, but it is not a string")}try{if(!t)e.en&&e.de&&e.ru?Object.keys(e).forEach(s=>{const r=s;D.translations[r]||={},Object.assign(D.translations[r],e[r])}):Object.keys(e).forEach(s=>{const r=e[s];Object.keys(r).forEach(o=>{const M=o,a=D.translations[M];a?a[s]?a[s]!==r[M]&&console.warn(`Translation for word "${s}" in "${M}" was ignored: existing = "${a[s]}", new = ${r[M]}`):a[s]=r[M]:console.warn(`Used unknown language: ${M}`)})});else{D.translations[t]||console.warn(`Used unknown language: ${t}`),D.translations[t]||={};const s=D.translations[t];Object.keys(e).forEach(r=>{s[r]?s[r]!==e[r]&&console.warn(`Translation for word "${r}" in "${t}" was ignored: existing = "${s[r]}", new = ${e[r]}`):s[r]=e[r]})}}catch(s){console.error(`Cannot apply translations: ${s}`)}}static setTranslations(e){e&&(D.translations=e)}static getLanguage(){return D.lang}static t(e,...t){const s=D.translations[D.lang];if(s){const r=s[e];if(r)e=r;else if(D.unknownTranslations.includes(e)||(D.unknownTranslations.push(e),!D._disableWarning&&console.log(`Translate: ${e}`)),D.lang!=="en"&&D.translations.en){const o=D.translations.en[e];o&&(e=o)}}for(const r of t)e=e.replace("%s",r);return e}static i18nShow(e){const t={};e?typeof e=="string"?(D.unknownTranslations.forEach(s=>{s.startsWith(e)&&(t[s]=s.replace(e,""))}),console.log(JSON.stringify(t,null,2))):e&&typeof e=="object"&&(D.unknownTranslations.forEach(s=>{e.test(s)&&(t[s]=s)}),console.log(JSON.stringify(t,null,2))):(D.unknownTranslations.forEach(s=>t[s]=s),console.log(JSON.stringify(t,null,2)))}static disableWarning(e){D._disableWarning=!!e}}window.i18nShow=D.i18nShow;window.i18nDisableWarning=D.disableWarning;const rt="material",xg=["Su","Mo","Tu","We","Th","Fr","Sa"],kg=["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Er={0:"0x00 - good",1:"0x01 - general problem",2:"0x02 - no connection problem",16:"0x10 - substitute value from controller",32:"0x20 - substitute initial value",64:"0x40 - substitute value from device or instance",128:"0x80 - substitute value from sensor",17:"0x11 - general problem by instance",65:"0x41 - general problem by device",129:"0x81 - general problem by sensor",18:"0x12 - instance not connected",66:"0x42 - device not connected",130:"0x82 - sensor not connected",68:"0x44 - device reports error",132:"0x84 - sensor reports error"},_n={JVBERi0:"pdf",R0lGODdh:"gif",R0lGODlh:"gif",iVBORw0KGgo:"png","/9j/":"jpg",PHN2Zw:"svg",Qk1:"bmp",AAABAA:"ico"};class E{static namespace=rt;static INSTANCES="instances";static dateFormat=["DD","MM"];static FORBIDDEN_CHARS=/[^._\-/ :!#$%&()+=@^{}|~\p{Ll}\p{Lu}\p{Nd}]+/gu;static CapitalWords(e){return(e||"").split(/[\s_]/).filter(t=>t).map(t=>t?t[0].toUpperCase()+t.substring(1).toLowerCase():"").join(" ")}static formatSeconds(e){const t=Math.floor(e/86400);e%=3600*24;const s=Math.floor(e/3600).toString().padStart(2,"0");e%=3600;const r=Math.floor(e/60).toString().padStart(2,"0");e%=60;const o=Math.floor(e).toString().padStart(2,"0");let M="";return t&&(M+=`${t} ${D.t("ra_daysShortText")} `),M+=`${s}:${r}:${o}`,M}static getObjectName(e,t,s,r,o){var u;const M=e[t];let a;if(typeof s=="string"&&!r&&(r={language:s},s=null),r=r||{},r.language||(r.language=e["system.config"]&&e["system.config"].common&&e["system.config"].common.language||window.sysLang||"en"),s!=null&&s.name){const l=s.name;typeof l=="object"?a=r.language&&l[r.language]||l.en:a=l}else if(o&&((u=M==null?void 0:M.common)!=null&&u.desc)){const l=M.common.desc;typeof l=="object"?a=r.language&&l[r.language]||l.en||l.de||l.ru||"":a=l,a=(a||"").toString().replace(/[_.]/g," "),a===a.toUpperCase()&&(a=a[0]+a.substring(1).toLowerCase())}else if(!o&&(M!=null&&M.common)){const l=M.common.name||M.common.desc;l&&typeof l=="object"?a=r.language&&l[r.language]||l.en||l.de||l.ru||"":a=l,a=(a||"").toString().replace(/[_.]/g," "),a===a.toUpperCase()&&(a=a[0]+a.substring(1).toLowerCase())}else{const l=t.lastIndexOf(".");a=t.substring(l+1).replace(/[_.]/g," "),a=E.CapitalWords(a)}return(a==null?void 0:a.trim())||""}static getObjectNameFromObj(e,t,s,r,o){var u,l;const M=e;let a=(e==null?void 0:e._id)||"";if(typeof t=="string"&&!s&&(s={language:t},t=null),s=s||{},t!=null&&t.name){const N=t.name;typeof N=="object"?a=s.language&&N[s.language]||N.en:a=N}else if(r&&((u=M==null?void 0:M.common)!=null&&u.desc)){const N=M.common.desc;typeof N=="object"?a=s.language&&N[s.language]||N.en:a=N,a=(a||"").toString().replace(/[_.]/g," "),a===a.toUpperCase()&&(a=a[0]+a.substring(1).toLowerCase())}else if(!r&&((l=M==null?void 0:M.common)!=null&&l.name)){let N=M.common.name;!N&&M.common.desc&&(N=M.common.desc),typeof N=="object"?a=s.language&&N[s.language]||N.en:a=N,a=(a||"").toString().replace(/[_.]/g," "),a===a.toUpperCase()&&(a=a[0]+a.substring(1).toLowerCase())}return o?a:a.trim()}static getSettingsOrder(e,t,s){let r;e&&Object.prototype.hasOwnProperty.call(e,"common")?r=e.common:r=e;let o;if(r!=null&&r.custom){o=r.custom[rt];const M=s.user||"admin";if(o&&o[M]){if(t){if(o[M].subOrder&&o[M].subOrder[t])return JSON.parse(JSON.stringify(o[M].subOrder[t]))}else if(o[M].order)return JSON.parse(JSON.stringify(o[M].order))}}return null}static getSettingsCustomURLs(e,t,s){let r;e&&Object.prototype.hasOwnProperty.call(e,"common")?r=e.common:r=e;let o;if(r!=null&&r.custom){o=r.custom[rt];const M=s.user||"admin";if(o&&o[M]){if(t){if(o[M].subURLs&&o[M].subURLs[t])return JSON.parse(JSON.stringify(o[M].subURLs[t]))}else if(o[M].URLs)return JSON.parse(JSON.stringify(o[M].URLs))}}return null}static reorder(e,t,s){const r=Array.from(e),[o]=r.splice(t,1);return r.splice(s,0,o),r}static getSettings(e,t,s){let r;const o=(e==null?void 0:e._id)||(t==null?void 0:t.id);let M;if(e&&Object.prototype.hasOwnProperty.call(e,"common")?M=e.common:M=e,M!=null&&M.custom?(r=M.custom,r=r[rt]&&r[rt][t.user||"admin"]?JSON.parse(JSON.stringify(r[rt][t.user||"admin"])):{enabled:!0}):r={enabled:s===void 0?!0:s,useCustom:!1},Object.prototype.hasOwnProperty.call(r,"enabled")||(r.enabled=s===void 0?!0:s),t&&(!r.name&&t.name&&(r.name=t.name),!r.icon&&t.icon&&(r.icon=t.icon),!r.color&&t.color&&(r.color=t.color)),M&&(!r.color&&M.color&&(r.color=M.color),!r.icon&&M.icon&&(r.icon=M.icon),!r.name&&M.name&&(r.name=M.name)),typeof r.name=="object"&&(r.name=t.language&&r.name[t.language]||r.name.en,r.name=(r.name||"").toString().replace(/_/g," "),r.name===r.name.toUpperCase()&&(r.name=r.name[0]+r.name.substring(1).toLowerCase())),!r.name&&o){const a=o.lastIndexOf(".");r.name=o.substring(a+1).replace(/[_.]/g," "),r.name=(r.name||"").toString().replace(/_/g," "),r.name=E.CapitalWords(r.name)}return r}static setSettings(e,t,s){if(e){e.common=e.common||{},e.common.custom=e.common.custom||{},e.common.custom[rt]=e.common.custom[rt]||{},e.common.custom[rt][s.user||"admin"]=t;const r=e.common.custom[rt][s.user||"admin"];return r.useCommon&&(r.color!==void 0&&(e.common.color=r.color,delete r.color),r.icon!==void 0&&(e.common.icon=r.icon,delete r.icon),r.name!==void 0&&(typeof e.common.name!="object"&&s.language?e.common.name={[s.language]:r.name}:typeof e.common.name=="object"&&s.language&&(e.common.name[s.language]=r.name),delete r.name)),!0}return!1}static getIcon(e,t){return e!=null&&e.icon?e.icon.length<=2?n.createElement("span",{style:t||{}},e.icon):e.icon.startsWith("data:image")?n.createElement("img",{alt:e.name,src:e.icon,style:t||{}}):n.createElement("img",{alt:e.name,src:(e.prefix||"")+e.icon,style:t}):null}static getObjectIcon(e,t){var s;if(typeof e=="object"&&(t=e,e=t==null?void 0:t._id),(s=t==null?void 0:t.common)!=null&&s.icon){let r=t.common.icon;if(typeof r=="string"&&r.length<=2||r.startsWith("data:image"))return r;const o=e.split(".");return o[0]==="system"?r=`adapter/${o[2]}${r.startsWith("/")?"":"/"}${r}`:r=`adapter/${o[0]}${r.startsWith("/")?"":"/"}${r}`,window.location.pathname.match(/adapter\/[^/]+\/[^/]+\.html/)?r=`../../${r}`:window.location.pathname.match(/material\/[.\d]+/)?r=`../../${r}`:window.location.pathname.match(/material\//)&&(r=`../${r}`),r}return null}static splitCamelCase(e){return e?E.CapitalWords(e):""}static isUseBright(e,t){if(!e)return t===void 0?!0:t;e=e.toString(),e.startsWith("#")&&(e=e.slice(1));let s,r,o;const M=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);if(M&&M.length===4)s=parseInt(M[1],10),r=parseInt(M[2],10),o=parseInt(M[3],10);else{if(e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),e.length===8)e=e.substring(0,6);else if(e.length!==6)return!1;s=parseInt(e.slice(0,2),16),r=parseInt(e.slice(2,4),16),o=parseInt(e.slice(4,6),16)}return s*.299+r*.587+o*.114<=186}static getTimeString(e){if(e=parseFloat(e),Number.isNaN(e))return"--:--";const t=Math.floor(e/3600),s=Math.floor(e%3600/60).toString().padStart(2,"0"),r=(e%60).toString().padStart(2,"0");return t?`${t}:${s}:${r}`:`${s}:${r}`}static getWindDirection(e){return e>=0&&e<11.25?"N":e>=11.25&&e<33.75?"NNE":e>=33.75&&e<56.25?"NE":e>=56.25&&e<78.75?"ENE":e>=78.75&&e<101.25?"E":e>=101.25&&e<123.75?"ESE":e>=123.75&&e<146.25?"SE":e>=146.25&&e<168.75?"SSE":e>=168.75&&e<191.25?"S":e>=191.25&&e<213.75?"SSW":e>=213.75&&e<236.25?"SW":e>=236.25&&e<258.75?"WSW":e>=258.75&&e<281.25?"W":e>=281.25&&e<303.75?"WNW":e>=303.75&&e<326.25?"NW":e>=326.25&&e<348.75?"NNW":"N"}static padding(e){return typeof e=="string"?e.length<2?`0${e}`:e:e<10?`0${e}`:e.toString()}static setDataFormat(e){e&&(E.dateFormat=e.toUpperCase().split(/[.-/]/),E.dateFormat.splice(E.dateFormat.indexOf("YYYY"),1))}static date2string(e){if(typeof e=="string"){if(e=e.trim(),!e)return"";if(e.match(/^[\w\s]+$/))return e;const s=e.match(/(\d{1,4})[-./](\d{1,2})[-./](\d{1,4})/);if(s){const r=[parseInt(s[1],10),parseInt(s[2],10),parseInt(s[3],10)],o=r.find(M=>M>31);if(o!==void 0){r.splice(r.indexOf(o),1);const M=r.find(a=>a>12);M?(r.splice(r.indexOf(M),1),e=new Date(o,r[0]-1,M)):E.dateFormat[0][0]==="M"&&E.dateFormat[1][0]==="D"?(e=new Date(o,r[0]-1,r[1]),Math.abs(e.getTime()-Date.now())>36e5*24*10&&(e=new Date(o,r[1]-1,r[0]))):E.dateFormat[0][0]==="D"&&E.dateFormat[1][0]==="M"?(e=new Date(o,r[1]-1,r[0]),Math.abs(e.getTime()-Date.now())>36e5*24*10&&(e=new Date(o,r[0]-1,r[1]))):e=new Date(e)}else e=new Date(e)}else e=new Date(e)}else e=new Date(e);let t=D.t(`ra_dow_${xg[e.getDay()]}`).replace("ra_dow_","");return t+=`. ${e.getDate()} ${D.t(`ra_month_${kg[e.getMonth()]}`).replace("ra_month_","")}`,t}static renderTextWithA(e){let t=e.match(/||[^<]+<\/b>|[^<]+<\/i>/);if(t){const s=[];let r=1;do{const o=e.substring(0,t.index);if(e=e.substring((t.index||0)+t[0].length),o&&s.push(n.createElement("span",{key:`a${r++}`},o)),t[0].startsWith(""))s.push(n.createElement("b",{key:`a${r++}`},t[0].substring(3,t[0].length-4)));else if(t[0].startsWith(""))s.push(n.createElement("i",{key:`a${r++}`},t[0].substring(3,t[0].length-4)));else if(t[0].startsWith("([^<]*)||[^<]+<\/b>|[^<]+<\/i>/):null,!t&&e&&s.push(n.createElement("span",{key:`a${r++}`},e))}while(t);return s}return e}static getSmartName(e,t,s,r){var M,a;if(!t){if(!r)return!e.common||e&&!e.common?e.smartName:e.common.smartName;if(e&&!e.common)return e.smartName;const u=e;return(M=u==null?void 0:u.common)!=null&&M.custom&&u.common.custom[s]?u.common.custom[s].smartName:void 0}if(!r)return e[t].common.smartName;const o=e[t];return(a=o==null?void 0:o.common)!=null&&a.custom&&o.common.custom[s]&&o.common.custom[s].smartName||null}static getSmartNameFromObj(e,t,s){var o,M;if(!s)return!e.common||e&&!e.common?e.smartName:e.common.smartName;if(e&&!e.common)return e.smartName;const r=(M=(o=e==null?void 0:e.common)==null?void 0:o.custom)==null?void 0:M[t];return r?r.smartName:void 0}static enableSmartName(e,t,s){const r=e;s?(r.common.custom||={},r.common.custom[t]||={},r.common.custom[t].smartName={}):r.common.smartName={}}static removeSmartName(e,t,s){var o,M;const r=e;s?(M=(o=r==null?void 0:r.common)==null?void 0:o.custom)!=null&&M[t]&&(r.common.custom[t]=null):r.common.smartName=null}static updateSmartName(e,t,s,r,o,M){var l,N;const a=D.getLanguage(),u=e;if(typeof u.common.smartName=="string"){const c=u.common.smartName;u.common.smartName={},u.common.smartName[a]=c}if((l=u.native)!=null&&l.byON){delete u.native.byON;let c=u.common.smartName;c&&typeof c!="object"&&(c={en:c,[a]:c}),u.common.smartName=c}if(r!==void 0&&(M?(u.common.custom||={},u.common.custom[o]||={},u.common.custom[o].smartName||={},r?u.common.custom[o].smartName.smartType=r:delete u.common.custom[o].smartName.smartType):(u.common.smartName||={},r?u.common.smartName.smartType=r:delete u.common.smartName.smartType)),s!==void 0&&(M?(u.common.custom||={},u.common.custom[o]||={},u.common.custom[o].smartName||={},u.common.custom[o].smartName.byON=s):(u.common.smartName||={},u.common.smartName.byON=s)),t!==void 0){let c;if(M?(u.common.custom||={},u.common.custom[o]||={},u.common.custom[o].smartName||={},c=u.common.custom[o].smartName):(u.common.smartName||={},c=u.common.smartName),c[a]=t,c&&(!c[a]||c[a]===u.common.name&&!u.common.role)){delete c[a];let L=!0;for(const j in c)if(Object.prototype.hasOwnProperty.call(c,j)){L=!1;break}if(L)if(M&&((N=u.common.custom)!=null&&N[o]))u.common.custom[o].smartName.byON===void 0?delete u.common.custom[o]:(delete u.common.custom[o].en,delete u.common.custom[o].de,delete u.common.custom[o].ru,delete u.common.custom[o].nl,delete u.common.custom[o].pl,delete u.common.custom[o].it,delete u.common.custom[o].fr,delete u.common.custom[o].pt,delete u.common.custom[o].es,delete u.common.custom[o].uk,delete u.common.custom[o]["zh-cn"]);else if(u.common.smartName&&u.common.smartName.byON!==void 0){const j=u.common.smartName;delete j.en,delete j.de,delete j.ru,delete j.nl,delete j.pl,delete j.it,delete j.fr,delete j.pt,delete j.es,delete j.uk,delete j["zh-cn"]}else u.common.smartName=null}}}static updateSmartNameEx(e,t){var o,M,a,u;const s=D.getLanguage(),r=e;if(typeof r.common.smartName=="string"){const l=r.common.smartName;r.common.smartName={},r.common.smartName[s]=l}if((o=r.native)!=null&&o.byON){delete r.native.byON;let l=r.common.smartName;l&&typeof l!="object"&&(l={en:l,[s]:l}),r.common.smartName=l}if(t.smartType!==void 0&&(t.noCommon?(r.common.custom||={},r.common.custom[t.instanceId]||={},r.common.custom[t.instanceId].smartName||={},t.smartType?r.common.custom[t.instanceId].smartName.smartType=t.smartType:delete r.common.custom[t.instanceId].smartName.smartType):(r.common.smartName||={},t.smartType?r.common.smartName.smartType=t.smartType:delete r.common.smartName.smartType)),t.byON!==void 0&&(t.noCommon?(r.common.custom||={},r.common.custom[t.instanceId]||={},r.common.custom[t.instanceId].smartName||={},r.common.custom[t.instanceId].smartName.byON=t.byON):(r.common.smartName||={},r.common.smartName.byON=t.byON)),t.noAutoDetect!==void 0&&(t.noCommon?t.noAutoDetect?(r.common.custom||={},r.common.custom[t.instanceId]||={},r.common.custom[t.instanceId].smartName||={},r.common.custom[t.instanceId].smartName.noAutoDetect=t.noAutoDetect):(a=(M=r.common.custom)==null?void 0:M[t.instanceId])!=null&&a.smartName&&delete r.common.custom[t.instanceId].smartName.noAutoDetect:!t.noAutoDetect&&r.common.smartName?delete r.common.smartName.noAutoDetect:(r.common.smartName||={},r.common.smartName.noAutoDetect=t.noAutoDetect)),t.smartName!==void 0){let l;if(t.noCommon?(r.common.custom||={},r.common.custom[t.instanceId]||={},r.common.custom[t.instanceId].smartName||={},l=r.common.custom[t.instanceId].smartName):(r.common.smartName||={},l=r.common.smartName),l[s]=t.smartName,l&&(!l[s]||l[s]===r.common.name&&!r.common.role)){delete l[s];let N=!0;for(const c in l)if(Object.prototype.hasOwnProperty.call(l,c)){N=!1;break}if(N)if(t.noCommon&&((u=r.common.custom)!=null&&u[t.instanceId]))r.common.custom[t.instanceId].smartName.byON===void 0?delete r.common.custom[t.instanceId]:(delete r.common.custom[t.instanceId].en,delete r.common.custom[t.instanceId].de,delete r.common.custom[t.instanceId].ru,delete r.common.custom[t.instanceId].nl,delete r.common.custom[t.instanceId].pl,delete r.common.custom[t.instanceId].it,delete r.common.custom[t.instanceId].fr,delete r.common.custom[t.instanceId].pt,delete r.common.custom[t.instanceId].es,delete r.common.custom[t.instanceId].uk,delete r.common.custom[t.instanceId]["zh-cn"]);else if(r.common.smartName&&r.common.smartName.byON!==void 0){const c=r.common.smartName;delete c.en,delete c.de,delete c.ru,delete c.nl,delete c.pl,delete c.it,delete c.fr,delete c.pt,delete c.es,delete c.uk,delete c["zh-cn"]}else r.common.smartName=null}}}static disableSmartName(e,t,s){const r=e;s?(r.common.custom||={},r.common.custom[t]||={},r.common.custom[t].smartName=!1):r.common.smartName=!1}static copyToClipboard(e,t){return t&&(t.stopPropagation(),t.preventDefault()),Hc(e)}static getFileExtension(e){const t=(e||"").lastIndexOf(".");return t!==-1?e.substring(t+1).toLowerCase():null}static formatBytes(e){if(Math.abs(e)<1024)return`${e} B`;const t=["KB","MB","GB"];let s=-1;do e/=1024,++s;while(Math.abs(e)>=1024&&s186?`#000000${s||""}`:`#FFFFFF${s||""}`;const a=(255-r).toString(16),u=(255-o).toString(16),l=(255-M).toString(16);return`#${a.padStart(2,"0")}${u.padStart(2,"0")}${l.padStart(2,"0")}${s||""}`}static color2rgb(e){if(e==null||e===""||typeof e!="string")return!1;if(e.startsWith("rgba")){const t=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+),\s*([.\d]+)\)/);t&&(e=parseInt(t[1],10).toString(16).padStart(2,"0")+parseInt(t[2],10).toString(16).padStart(2,"0")+parseInt(t[2],10).toString(16).padStart(2,"0"))}else if(e.startsWith("rgb")){const t=e.match(/rgb?\((\d+),\s*(\d+),\s*(\d+)\)/);t&&(e=parseInt(t[1],10).toString(16).padStart(2,"0")+parseInt(t[2],10).toString(16).padStart(2,"0")+parseInt(t[2],10).toString(16).padStart(2,"0"))}else e.startsWith("#")&&(e=e.slice(1));return e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),e.length!==6&&e.length!==8?(console.warn(`Cannot invert color: ${e}`),!1):[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)]}static rgb2lab(e){let t=e[0]/255,s=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,s=s>.04045?((s+.055)/1.055)**2.4:s/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;let o=(t*.4124+s*.3576+r*.1805)/.95047,M=t*.2126+s*.7152+r*.0722,a=(t*.0193+s*.1192+r*.9505)/1.08883;return o=o>.008856?o**.33333333:7.787*o+.137931,M=M>.008856?M**.33333333:7.787*M+.137931,a=a>.008856?a**.33333333:7.787*a+.137931,[116*M-16,500*(o-M),200*(M-a)]}static colorDistance(e,t){const s=E.color2rgb(e),r=E.color2rgb(t);if(!s||!r)return 0;const o=E.rgb2lab(s),M=E.rgb2lab(r),a=o[0]-M[0],u=o[1]-M[1],l=o[2]-M[2],N=Math.sqrt(o[1]*o[1]+o[2]*o[2]),c=Math.sqrt(M[1]*M[1]+M[2]*M[2]),L=N-c;let j=u*u+l*l-L*L;j=j<0?0:Math.sqrt(j);const g=1+.045*N,y=1+.015*N,d=a,I=L/g,m=j/y,w=d*d+I*I+m*m;return w<0?0:w}static _toVal(e){let t,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e))for(let r=0;r{if(s=s.trim(),s){const r=s.split("="),o=decodeURIComponent(r[0]).trim();if(r.length>1){const M=decodeURIComponent(r[1]);if(M==="true")t[o]=!0;else if(M==="false")t[o]=!1;else{const a=parseFloat(M);a.toString()===M?t[o]=a:t[o]=M}}else t[o]=!0}}),t}static getParentId(e){const t=(e||"").toString().split(".");return t.length>1?(t.pop(),t.join(".")):null}static formatDate(e,t){if(!e)return"";let s;const r=(e.getMonth()+1).toString().padStart(2,"0"),o=e.getDate().toString().padStart(2,"0");return t==="MM/DD/YYYY"?s=`${r}/${o}/${e.getFullYear()}`:s=`${e.getFullYear()}-${r}-${o}`,s+=` ${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}:${e.getSeconds().toString().padStart(2,"0")}.${e.getMilliseconds().toString().padStart(3,"0")}`,s}static formatTime(e){if(e){e=Math.round(e);const t=Math.floor(e/(3600*24)),s=Math.floor(e%(3600*24)/3600),r=Math.floor(e%3600/60),o=e%60;return t?`${t}.${s.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`:s?`${s}:${r.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`:`0:${r.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`}return"0:00:00"}static MDtext2link(e){const t=e.match(/\d+\.\)\s/);return t&&(e=e.replace(t[0],t[0].replace(/\s/," "))),e.replace(/[^a-zA-Zа-яА-Я0-9]/g,"").trim().replace(/\s/g,"").toLowerCase()}static openLink(e,t){e=e.replace(/\/\/([0-9a-f]*:[0-9a-f]*:[0-9a-f]*:[0-9a-f]*:[0-9a-f]*:[0-9a-f]*)(:\d+)?\//i,"//[$1]$2/"),t==="this"?window.location.href=e:window.open(e,t||"_blank")}static MDgetTitle(e){var o;const t=E.MDextractHeader(e),s=t.header;let r=t.body;if(!s.title){r=r.replace(/{[^}]*}/g,""),r=r.trim();const M=r.replace(/\r/g,"").split(` +}`;function Og(i){const e=i.themeType||"dark",t=i.size||270,s=t*1.5,r=t*14/270,o=t*280/270;return n.useEffect(()=>{if(!window.document.getElementById(On)){const M=window.document.createElement("style");M.setAttribute("id",On),M.innerHTML=pg,window.document.head.appendChild(M)}},[]),n.createElement("div",{style:{width:"100%",height:"100%",position:"absolute",top:0,left:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundImage:i.backgroundImage&&i.backgroundImage!=="@@loginBackgroundImage@@"?i.backgroundImage:window.loadingBackgroundImage&&window.loadingBackgroundImage!=="@@loginBackgroundImage@@"?`url(${window.loadingBackgroundImage})`:void 0,backgroundColor:i.backgroundColor&&i.backgroundColor!=="@@loginBackgroundColor@@"?i.backgroundColor:window.loadingBackgroundColor&&window.loadingBackgroundColor!=="@@loginBackgroundColor@@"?window.loadingBackgroundColor:e==="dark"?"#000":"#FFF",backgroundSize:"cover"}},n.createElement("div",{style:{position:"relative",width:s,height:s,display:"flex",justifyContent:"center",alignItems:"center"}},n.createElement("div",{style:{position:"absolute",top:-r,left:-r,right:-r,bottom:-r,border:`${r}px solid transparent`,borderTop:`${r}px solid rgba(219, 10, 51, 0.50)`,borderRadius:"50%",animation:"loaderHA-spin 3.6s linear infinite"}}),n.createElement("div",{style:{position:"absolute",width:"100%",height:"100%",border:`${r}px solid transparent`,borderTop:`${r}px solid rgba(219, 10, 51, 0.75)`,borderRadius:"50%",animation:"loaderHA-spin 2.2s linear infinite"}}),n.createElement("div",{style:{width:t,height:t,zIndex:1,display:"flex",justifyContent:"center",alignIt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.1.4-1.7l.2.2c.2.2.4.4.5.6.2.2.3.4.5.7,0,.2.3.4.4.7h0c0,.3.2.5.3.7,0,.2.2.5.2.7h0v.3c0,.2,0,.4,0,.6v.7h0v.7h0Z"}))),n.createElement("div",{style:{position:"absolute",width:o,zIndex:2,top:"57.5%",left:"50%",transform:"translate(-50%, -155%)"}},n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 7152 512",width:"100%",height:"auto"},n.createElement("path",{fill:"#fff",d:"M4566 0h1053v5h25c2 5 2 5 1 8h16q3 3 2 7l3 1 4 1 2 7h2l12 1q3 1 2 6v3h7q3 4 2 10v6h3l4 1 1 8 3-1 5 2 1 7 7 1 1 14v2h3q3 0 5 2l1 9v22l3 1 4 1 1 7v41q0 3-3 5l-5 1v26q1 3-2 5h-8l1 2v8l-1 8h-8v16q-3 3-7 2l-1 3-2 5h-6v6l-1 11h-7l-1 8-10 1h-6l-1 3-1 4-7 2v3l-2 4h-16l1 2-2 6h-15v3l-3 6-10 1h-11l-10 2q1 3-2 5l-8 1h-796l-4-1-2-7h-2q-7 0-14-2v-8h-8l-1-7h-3l-4-1q-2-5-2-10v-62l2-6 7-1v-3l2-4h7v-8l5-1h3v-3l1-5q3-2 8-1h57l140-1h602v-3l2-4h7l1-8 8-1v-31l-7-1q-2-2-2-5v-2l-3-1q-5 0-6-4v-5h-3l-11 1-2-2v-7h-917l-1 8-23 1h-14l-5-1v7l-9 3h-7l-1 3-1 4-9 1h-6l-1 3-2 5h-6v3q0 3-2 5l-6 1v3q0 3-4 5h-5v15l-2 2h-7v16h-8v110h8v24h6l3 3v5l3 1q4 0 6 4l-1 5 9 2v6h3q3 0 5 2l1 6h2l5 1q2 4 0 8h2q12-3 23 1l1 5v3l2-1h1069l9 1 1 8h18l7 2 1 6h3q3 0 5 4l1 5h3q3 0 5 4v12l3 1 5 2v21l1 17v3l-1 8-5 3-3 1v8l-2 7h-8l1 2-1 6h-16v5H4571v-5h-42v-8h-16q-2-3-2-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3l2-14h5zM0 0h126l1 8v144l-1 5h932l106-1 7 1h4q3 0 5 2l2 6h52l5 2v7h9l8 1q2 4 1 8h2q7-2 14 1l1 7h11l5 1q2 4 1 8l3-1 5 3v7h8v16h7l4 8h2l5 3v23h3q3 0 5 2v24h7q3 7 2 14v137l-1 32v16q1 6-2 7h-5v7l-1 3-1 6h-16l1 3-1 2h-79v-4h-7l-3-1-6-1-1-8v-7h-6q-2-4-2-10V338h-3q-3 1-5-2l-1-9v-6h-3l-5-2v-16h-16l-2-6 1-2h-16l-1-1v-7H126l1 2v188c0 11 0 11-3 14h-7v15l-4 1h-12v5H22l-1-3 1-2h-3q-5 1-6-2v-5h-3l-5-2v-7H0zM6537 0h606v5l8 1 1 16v82l-3 4-8 1h-6v3l-1 4q-5 2-10 1h-509v3l-1 5q-13 2-24 0v3q1 5-2 6l-6 1h-4l-5-1v3l-1 5-7 2v8q0 6-2 7l-7 1v210c0 7 0 7-2 10h-7v32q-3 3-8 2v15q-2 3-5 2h-3v2q1 8-2 15l-7 1v7l-1 3-1 6h-7v7l-6 2-2-1v3q1 5-2 6l-9 2h-6v5q-4 3-9 2v3q1 3-2 5h-15l1 3-2 5h-33l1 3-1 2h-589v-5h-8v-8h-7l-3-10v-6l-3-1-4-1-1-7v-48l2-5 7-1v-10q-1-3 2-5 2-2 6-2l1-3 2-5h32v-7q6-3 12-2h498l8 1v-3q0-3 2-5l7-2h8l2-7 7-1v-11q0-3 2-5h6V167l1-8q4-4 8-3v-44l1-5h8V84l1-3h7V66l8-4v-2l3-5 6-1v-9l1-6h8v-8q8-3 15-2l1-3 3-5h6v-3q-1-3 2-5h15v-3q-1-3 2-5h24z"})))))}function Eg(i){const e=window.vendorPrefix;return e==="PT"?n.createElement(mg,{themeType:i.themeType}):e==="MV"?n.createElement(dg,{themeType:i.themeType}):e==="NW"?n.createElement(zg,{themeType:"dark"}):e==="HA"?n.createElement(Og,{themeType:"dark"}):e&&e!=="@@vendorPrefix@@"?n.createElement(Ig,{themeType:i.themeType}):n.createElement(Cg,{themeType:i.themeType})}class qs extends ze{onHashChangedBound;constructor(e){super(e),this.onHashChangedBound=this.onHashChanged.bind(this)}componentDidMount(){window.addEventListener("hashchange",this.onHashChangedBound)}componentWillUnmount(){window.removeEventListener("hashchange",this.onHashChangedBound)}onHashChanged(){}static getLocation(){let e=window.location.hash;e=e.replace(/^#/,"");const t=e.split("/").map(s=>{try{return s?decodeURIComponent(s):""}catch{return console.error(`Router: Cannot decode ${s}`),s}});return{tab:t[0]||"",dialog:t[1]||"",id:t[2]||"",arg:t[3]||""}}static doNavigate(e,t,s,r){let o="";const M=qs.getLocation();r!==void 0&&!s&&(s=M.id),s&&!t&&(t=M.dialog),(t&&!e||e===null)&&(e=M.tab),e&&(o=`#${e}`,t&&(o+=`/${t}`,s&&(o+=`/${s}`,r!==void 0&&(o+=`/${r}`)))),window.location.hash!==o&&(window.location.hash=o)}}function _g(){const i=document.getSelection();if(!(i!=null&&i.rangeCount))return()=>{};let e=document.activeElement;const t=[];for(let s=0;s{i.type==="Caret"&&i.removeAllRanges(),i.rangeCount||t.forEach(s=>i.addRange(s)),e&&e.focus()}}const En={"text/plain":"Text","text/html":"Url",default:"Text"},fg="Copy to clipboard: #{key}, Enter";function Sg(i){const e=`${/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl"}+C`;return i.replace(/#{\s*key\s*}/g,e)}function Hc(i,e){let t,s,r,o,M=!1;e=e||{};const a=e.debug||!1;try{if(t=_g(),s=document.createRange(),r=document.getSelection(),o=document.createElement("span"),o.textContent=i,o.ariaHidden="true",o.style.all="unset",o.style.position="fixed",o.style.top="0px",o.style.clip="rect(0, 0, 0, 0)",o.style.whiteSpace="pre",o.style.userSelect="text",o.addEventListener("copy",l=>{var N,c,L,j;if(l.stopPropagation(),e!=null&&e.format)if(l.preventDefault(),typeof l.clipboardData>"u"){a&&console.warn("unable to use e.clipboardData"),a&&console.warn("trying IE specific stuff"),(N=window.clipboardData)==null||N.clearData();const g=En[e.format]||En.default;(c=window.clipboardData)==null||c.setData(g,i)}else(L=l.clipboardData)==null||L.clearData(),(j=l.clipboardData)==null||j.setData(e.format,i)}),document.body.appendChild(o),s.selectNodeContents(o),r==null||r.addRange(s),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");M=!0}catch(u){a&&console.error("unable to copy using execCommand: ",u),a&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",i),M=!0}catch(l){a&&console.error("unable to copy using clipboardData: ",l),a&&console.error("falling back to prompt");const N=Sg("message"in e?e.message||"":fg);window.prompt(N,i)}}finally{r&&(s&&typeof r.removeRange=="function"?r.removeRange(s):r.removeAllRanges()),o&&document.body.removeChild(o),t&&t()}return M}class D{static translations={};static unknownTranslations=[];static lang=window.sysLang||"en";static _disableWarning=!1;static setLanguage(e){e&&(D.lang=e)}static extendTranslations(e,t){if(e.prefix){const s=e;if(typeof s.prefix=="string"){const r=s.prefix;delete s.prefix,Object.keys(s).forEach(o=>{const M=o,a={},u=s[M];Object.keys(u).forEach(l=>{l&&u&&(l.startsWith(r)?a[l]=u[l]:a[`${r}${l}`]=u[l])}),e[M]=a})}else console.warn("Found prefix in translations, but it is not a string")}try{if(!t)e.en&&e.de&&e.ru?Object.keys(e).forEach(s=>{const r=s;D.translations[r]||={},Object.assign(D.translations[r],e[r])}):Object.keys(e).forEach(s=>{const r=e[s];Object.keys(r).forEach(o=>{const M=o,a=D.translations[M];a?a[s]?a[s]!==r[M]&&console.warn(`Translation for word "${s}" in "${M}" was ignored: existing = "${a[s]}", new = ${r[M]}`):a[s]=r[M]:console.warn(`Used unknown language: ${M}`)})});else{D.translations[t]||console.warn(`Used unknown language: ${t}`),D.translations[t]||={};const s=D.translations[t];Object.keys(e).forEach(r=>{s[r]?s[r]!==e[r]&&console.warn(`Translation for word "${r}" in "${t}" was ignored: existing = "${s[r]}", new = ${e[r]}`):s[r]=e[r]})}}catch(s){console.error(`Cannot apply translations: ${s}`)}}static setTranslations(e){e&&(D.translations=e)}static getLanguage(){return D.lang}static t(e,...t){const s=D.translations[D.lang];if(s){const r=s[e];if(r)e=r;else if(D.unknownTranslations.includes(e)||(D.unknownTranslations.push(e),!D._disableWarning&&console.log(`Translate: ${e}`)),D.lang!=="en"&&D.translations.en){const o=D.translations.en[e];o&&(e=o)}}for(const r of t)e=e.replace("%s",r);return e}static i18nShow(e){const t={};e?typeof e=="string"?(D.unknownTranslations.forEach(s=>{s.startsWith(e)&&(t[s]=s.replace(e,""))}),console.log(JSON.stringify(t,null,2))):e&&typeof e=="object"&&(D.unknownTranslations.forEach(s=>{e.test(s)&&(t[s]=s)}),console.log(JSON.stringify(t,null,2))):(D.unknownTranslations.forEach(s=>t[s]=s),console.log(JSON.stringify(t,null,2)))}static disableWarning(e){D._disableWarning=!!e}}window.i18nShow=D.i18nShow;window.i18nDisableWarning=D.disableWarning;const rt="material",xg=["Su","Mo","Tu","We","Th","Fr","Sa"],kg=["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Er={0:"0x00 - good",1:"0x01 - general problem",2:"0x02 - no connection problem",16:"0x10 - substitute value from controller",32:"0x20 - substitute initial value",64:"0x40 - substitute value from device or instance",128:"0x80 - substitute value from sensor",17:"0x11 - general problem by instance",65:"0x41 - general problem by device",129:"0x81 - general problem by sensor",18:"0x12 - instance not connected",66:"0x42 - device not connected",130:"0x82 - sensor not connected",68:"0x44 - device reports error",132:"0x84 - sensor reports error"},_n={JVBERi0:"pdf",R0lGODdh:"gif",R0lGODlh:"gif",iVBORw0KGgo:"png","/9j/":"jpg",PHN2Zw:"svg",Qk1:"bmp",AAABAA:"ico"};class E{static namespace=rt;static INSTANCES="instances";static dateFormat=["DD","MM"];static FORBIDDEN_CHARS=/[^._\-/ :!#$%&()+=@^{}|~\p{Ll}\p{Lu}\p{Nd}]+/gu;static CapitalWords(e){return(e||"").split(/[\s_]/).filter(t=>t).map(t=>t?t[0].toUpperCase()+t.substring(1).toLowerCase():"").join(" ")}static formatSeconds(e){const t=Math.floor(e/86400);e%=3600*24;const s=Math.floor(e/3600).toString().padStart(2,"0");e%=3600;const r=Math.floor(e/60).toString().padStart(2,"0");e%=60;const o=Math.floor(e).toString().padStart(2,"0");let M="";return t&&(M+=`${t} ${D.t("ra_daysShortText")} `),M+=`${s}:${r}:${o}`,M}static getObjectName(e,t,s,r,o){var u;const M=e[t];let a;if(typeof s=="string"&&!r&&(r={language:s},s=null),r=r||{},r.language||(r.language=e["system.config"]&&e["system.config"].common&&e["system.config"].common.language||window.sysLang||"en"),s!=null&&s.name){const l=s.name;typeof l=="object"?a=r.language&&l[r.language]||l.en:a=l}else if(o&&((u=M==null?void 0:M.common)!=null&&u.desc)){const l=M.common.desc;typeof l=="object"?a=r.language&&l[r.language]||l.en||l.de||l.ru||"":a=l,a=(a||"").toString().replace(/[_.]/g," "),a===a.toUpperCase()&&(a=a[0]+a.substring(1).toLowerCase())}else if(!o&&(M!=null&&M.common)){const l=M.common.name||M.common.desc;l&&typeof l=="object"?a=r.language&&l[r.language]||l.en||l.de||l.ru||"":a=l,a=(a||"").toString().replace(/[_.]/g," "),a===a.toUpperCase()&&(a=a[0]+a.substring(1).toLowerCase())}else{const l=t.lastIndexOf(".");a=t.substring(l+1).replace(/[_.]/g," "),a=E.CapitalWords(a)}return(a==null?void 0:a.trim())||""}static getObjectNameFromObj(e,t,s,r,o){var u,l;const M=e;let a=(e==null?void 0:e._id)||"";if(typeof t=="string"&&!s&&(s={language:t},t=null),s=s||{},t!=null&&t.name){const N=t.name;typeof N=="object"?a=s.language&&N[s.language]||N.en:a=N}else if(r&&((u=M==null?void 0:M.common)!=null&&u.desc)){const N=M.common.desc;typeof N=="object"?a=s.language&&N[s.language]||N.en:a=N,a=(a||"").toString().replace(/[_.]/g," "),a===a.toUpperCase()&&(a=a[0]+a.substring(1).toLowerCase())}else if(!r&&((l=M==null?void 0:M.common)!=null&&l.name)){let N=M.common.name;!N&&M.common.desc&&(N=M.common.desc),typeof N=="object"?a=s.language&&N[s.language]||N.en:a=N,a=(a||"").toString().replace(/[_.]/g," "),a===a.toUpperCase()&&(a=a[0]+a.substring(1).toLowerCase())}return o?a:a.trim()}static getSettingsOrder(e,t,s){let r;e&&Object.prototype.hasOwnProperty.call(e,"common")?r=e.common:r=e;let o;if(r!=null&&r.custom){o=r.custom[rt];const M=s.user||"admin";if(o&&o[M]){if(t){if(o[M].subOrder&&o[M].subOrder[t])return JSON.parse(JSON.stringify(o[M].subOrder[t]))}else if(o[M].order)return JSON.parse(JSON.stringify(o[M].order))}}return null}static getSettingsCustomURLs(e,t,s){let r;e&&Object.prototype.hasOwnProperty.call(e,"common")?r=e.common:r=e;let o;if(r!=null&&r.custom){o=r.custom[rt];const M=s.user||"admin";if(o&&o[M]){if(t){if(o[M].subURLs&&o[M].subURLs[t])return JSON.parse(JSON.stringify(o[M].subURLs[t]))}else if(o[M].URLs)return JSON.parse(JSON.stringify(o[M].URLs))}}return null}static reorder(e,t,s){const r=Array.from(e),[o]=r.splice(t,1);return r.splice(s,0,o),r}static getSettings(e,t,s){let r;const o=(e==null?void 0:e._id)||(t==null?void 0:t.id);let M;if(e&&Object.prototype.hasOwnProperty.call(e,"common")?M=e.common:M=e,M!=null&&M.custom?(r=M.custom,r=r[rt]&&r[rt][t.user||"admin"]?JSON.parse(JSON.stringify(r[rt][t.user||"admin"])):{enabled:!0}):r={enabled:s===void 0?!0:s,useCustom:!1},Object.prototype.hasOwnProperty.call(r,"enabled")||(r.enabled=s===void 0?!0:s),t&&(!r.name&&t.name&&(r.name=t.name),!r.icon&&t.icon&&(r.icon=t.icon),!r.color&&t.color&&(r.color=t.color)),M&&(!r.color&&M.color&&(r.color=M.color),!r.icon&&M.icon&&(r.icon=M.icon),!r.name&&M.name&&(r.name=M.name)),typeof r.name=="object"&&(r.name=t.language&&r.name[t.language]||r.name.en,r.name=(r.name||"").toString().replace(/_/g," "),r.name===r.name.toUpperCase()&&(r.name=r.name[0]+r.name.substring(1).toLowerCase())),!r.name&&o){const a=o.lastIndexOf(".");r.name=o.substring(a+1).replace(/[_.]/g," "),r.name=(r.name||"").toString().replace(/_/g," "),r.name=E.CapitalWords(r.name)}return r}static setSettings(e,t,s){if(e){e.common=e.common||{},e.common.custom=e.common.custom||{},e.common.custom[rt]=e.common.custom[rt]||{},e.common.custom[rt][s.user||"admin"]=t;const r=e.common.custom[rt][s.user||"admin"];return r.useCommon&&(r.color!==void 0&&(e.common.color=r.color,delete r.color),r.icon!==void 0&&(e.common.icon=r.icon,delete r.icon),r.name!==void 0&&(typeof e.common.name!="object"&&s.language?e.common.name={[s.language]:r.name}:typeof e.common.name=="object"&&s.language&&(e.common.name[s.language]=r.name),delete r.name)),!0}return!1}static getIcon(e,t){return e!=null&&e.icon?e.icon.length<=2?n.createElement("span",{style:t||{}},e.icon):e.icon.startsWith("data:image")?n.createElement("img",{alt:e.name,src:e.icon,style:t||{}}):n.createElement("img",{alt:e.name,src:(e.prefix||"")+e.icon,style:t}):null}static getObjectIcon(e,t){var s;if(typeof e=="object"&&(t=e,e=t==null?void 0:t._id),(s=t==null?void 0:t.common)!=null&&s.icon){let r=t.common.icon;if(typeof r=="string"&&r.length<=2||r.startsWith("data:image"))return r;const o=e.split(".");return o[0]==="system"?r=`adapter/${o[2]}${r.startsWith("/")?"":"/"}${r}`:r=`adapter/${o[0]}${r.startsWith("/")?"":"/"}${r}`,window.location.pathname.match(/adapter\/[^/]+\/[^/]+\.html/)?r=`../../${r}`:window.location.pathname.match(/material\/[.\d]+/)?r=`../../${r}`:window.location.pathname.match(/material\//)&&(r=`../${r}`),r}return null}static splitCamelCase(e){return e?E.CapitalWords(e):""}static isUseBright(e,t){if(!e)return t===void 0?!0:t;e=e.toString(),e.startsWith("#")&&(e=e.slice(1));let s,r,o;const M=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);if(M&&M.length===4)s=parseInt(M[1],10),r=parseInt(M[2],10),o=parseInt(M[3],10);else{if(e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),e.length===8)e=e.substring(0,6);else if(e.length!==6)return!1;s=parseInt(e.slice(0,2),16),r=parseInt(e.slice(2,4),16),o=parseInt(e.slice(4,6),16)}return s*.299+r*.587+o*.114<=186}static getTimeString(e){if(e=parseFloat(e),Number.isNaN(e))return"--:--";const t=Math.floor(e/3600),s=Math.floor(e%3600/60).toString().padStart(2,"0"),r=(e%60).toString().padStart(2,"0");return t?`${t}:${s}:${r}`:`${s}:${r}`}static getWindDirection(e){return e>=0&&e<11.25?"N":e>=11.25&&e<33.75?"NNE":e>=33.75&&e<56.25?"NE":e>=56.25&&e<78.75?"ENE":e>=78.75&&e<101.25?"E":e>=101.25&&e<123.75?"ESE":e>=123.75&&e<146.25?"SE":e>=146.25&&e<168.75?"SSE":e>=168.75&&e<191.25?"S":e>=191.25&&e<213.75?"SSW":e>=213.75&&e<236.25?"SW":e>=236.25&&e<258.75?"WSW":e>=258.75&&e<281.25?"W":e>=281.25&&e<303.75?"WNW":e>=303.75&&e<326.25?"NW":e>=326.25&&e<348.75?"NNW":"N"}static padding(e){return typeof e=="string"?e.length<2?`0${e}`:e:e<10?`0${e}`:e.toString()}static setDataFormat(e){e&&(E.dateFormat=e.toUpperCase().split(/[.-/]/),E.dateFormat.splice(E.dateFormat.indexOf("YYYY"),1))}static date2string(e){if(typeof e=="string"){if(e=e.trim(),!e)return"";if(e.match(/^[\w\s]+$/))return e;const s=e.match(/(\d{1,4})[-./](\d{1,2})[-./](\d{1,4})/);if(s){const r=[parseInt(s[1],10),parseInt(s[2],10),parseInt(s[3],10)],o=r.find(M=>M>31);if(o!==void 0){r.splice(r.indexOf(o),1);const M=r.find(a=>a>12);M?(r.splice(r.indexOf(M),1),e=new Date(o,r[0]-1,M)):E.dateFormat[0][0]==="M"&&E.dateFormat[1][0]==="D"?(e=new Date(o,r[0]-1,r[1]),Math.abs(e.getTime()-Date.now())>36e5*24*10&&(e=new Date(o,r[1]-1,r[0]))):E.dateFormat[0][0]==="D"&&E.dateFormat[1][0]==="M"?(e=new Date(o,r[1]-1,r[0]),Math.abs(e.getTime()-Date.now())>36e5*24*10&&(e=new Date(o,r[0]-1,r[1]))):e=new Date(e)}else e=new Date(e)}else e=new Date(e)}else e=new Date(e);let t=D.t(`ra_dow_${xg[e.getDay()]}`).replace("ra_dow_","");return t+=`. ${e.getDate()} ${D.t(`ra_month_${kg[e.getMonth()]}`).replace("ra_month_","")}`,t}static renderTextWithA(e){let t=e.match(/||[^<]+<\/b>|[^<]+<\/i>/);if(t){const s=[];let r=1;do{const o=e.substring(0,t.index);if(e=e.substring((t.index||0)+t[0].length),o&&s.push(n.createElement("span",{key:`a${r++}`},o)),t[0].startsWith(""))s.push(n.createElement("b",{key:`a${r++}`},t[0].substring(3,t[0].length-4)));else if(t[0].startsWith(""))s.push(n.createElement("i",{key:`a${r++}`},t[0].substring(3,t[0].length-4)));else if(t[0].startsWith("([^<]*)||[^<]+<\/b>|[^<]+<\/i>/):null,!t&&e&&s.push(n.createElement("span",{key:`a${r++}`},e))}while(t);return s}return e}static getSmartName(e,t,s,r){var M,a;if(!t){if(!r)return!e.common||e&&!e.common?e.smartName:e.common.smartName;if(e&&!e.common)return e.smartName;const u=e;return(M=u==null?void 0:u.common)!=null&&M.custom&&u.common.custom[s]?u.common.custom[s].smartName:void 0}if(!r)return e[t].common.smartName;const o=e[t];return(a=o==null?void 0:o.common)!=null&&a.custom&&o.common.custom[s]&&o.common.custom[s].smartName||null}static getSmartNameFromObj(e,t,s){var o,M;if(!s)return!e.common||e&&!e.common?e.smartName:e.common.smartName;if(e&&!e.common)return e.smartName;const r=(M=(o=e==null?void 0:e.common)==null?void 0:o.custom)==null?void 0:M[t];return r?r.smartName:void 0}static enableSmartName(e,t,s){const r=e;s?(r.common.custom||={},r.common.custom[t]||={},r.common.custom[t].smartName={}):r.common.smartName={}}static removeSmartName(e,t,s){var o,M;const r=e;s?(M=(o=r==null?void 0:r.common)==null?void 0:o.custom)!=null&&M[t]&&(r.common.custom[t]=null):r.common.smartName=null}static updateSmartName(e,t,s,r,o,M){var l,N;const a=D.getLanguage(),u=e;if(typeof u.common.smartName=="string"){const c=u.common.smartName;u.common.smartName={},u.common.smartName[a]=c}if((l=u.native)!=null&&l.byON){delete u.native.byON;let c=u.common.smartName;c&&typeof c!="object"&&(c={en:c,[a]:c}),u.common.smartName=c}if(r!==void 0&&(M?(u.common.custom||={},u.common.custom[o]||={},u.common.custom[o].smartName||={},r?u.common.custom[o].smartName.smartType=r:delete u.common.custom[o].smartName.smartType):(u.common.smartName||={},r?u.common.smartName.smartType=r:delete u.common.smartName.smartType)),s!==void 0&&(M?(u.common.custom||={},u.common.custom[o]||={},u.common.custom[o].smartName||={},u.common.custom[o].smartName.byON=s):(u.common.smartName||={},u.common.smartName.byON=s)),t!==void 0){let c;if(M?(u.common.custom||={},u.common.custom[o]||={},u.common.custom[o].smartName||={},c=u.common.custom[o].smartName):(u.common.smartName||={},c=u.common.smartName),c[a]=t,c&&(!c[a]||c[a]===u.common.name&&!u.common.role)){delete c[a];let L=!0;for(const j in c)if(Object.prototype.hasOwnProperty.call(c,j)){L=!1;break}if(L)if(M&&((N=u.common.custom)!=null&&N[o]))u.common.custom[o].smartName.byON===void 0?delete u.common.custom[o]:(delete u.common.custom[o].en,delete u.common.custom[o].de,delete u.common.custom[o].ru,delete u.common.custom[o].nl,delete u.common.custom[o].pl,delete u.common.custom[o].it,delete u.common.custom[o].fr,delete u.common.custom[o].pt,delete u.common.custom[o].es,delete u.common.custom[o].uk,delete u.common.custom[o]["zh-cn"]);else if(u.common.smartName&&u.common.smartName.byON!==void 0){const j=u.common.smartName;delete j.en,delete j.de,delete j.ru,delete j.nl,delete j.pl,delete j.it,delete j.fr,delete j.pt,delete j.es,delete j.uk,delete j["zh-cn"]}else u.common.smartName=null}}}static updateSmartNameEx(e,t){var o,M,a,u;const s=D.getLanguage(),r=e;if(typeof r.common.smartName=="string"){const l=r.common.smartName;r.common.smartName={},r.common.smartName[s]=l}if((o=r.native)!=null&&o.byON){delete r.native.byON;let l=r.common.smartName;l&&typeof l!="object"&&(l={en:l,[s]:l}),r.common.smartName=l}if(t.smartType!==void 0&&(t.noCommon?(r.common.custom||={},r.common.custom[t.instanceId]||={},r.common.custom[t.instanceId].smartName||={},t.smartType?r.common.custom[t.instanceId].smartName.smartType=t.smartType:delete r.common.custom[t.instanceId].smartName.smartType):(r.common.smartName||={},t.smartType?r.common.smartName.smartType=t.smartType:delete r.common.smartName.smartType)),t.byON!==void 0&&(t.noCommon?(r.common.custom||={},r.common.custom[t.instanceId]||={},r.common.custom[t.instanceId].smartName||={},r.common.custom[t.instanceId].smartName.byON=t.byON):(r.common.smartName||={},r.common.smartName.byON=t.byON)),t.noAutoDetect!==void 0&&(t.noCommon?t.noAutoDetect?(r.common.custom||={},r.common.custom[t.instanceId]||={},r.common.custom[t.instanceId].smartName||={},r.common.custom[t.instanceId].smartName.noAutoDetect=t.noAutoDetect):(a=(M=r.common.custom)==null?void 0:M[t.instanceId])!=null&&a.smartName&&delete r.common.custom[t.instanceId].smartName.noAutoDetect:!t.noAutoDetect&&r.common.smartName?delete r.common.smartName.noAutoDetect:(r.common.smartName||={},r.common.smartName.noAutoDetect=t.noAutoDetect)),t.smartName!==void 0){let l;if(t.noCommon?(r.common.custom||={},r.common.custom[t.instanceId]||={},r.common.custom[t.instanceId].smartName||={},l=r.common.custom[t.instanceId].smartName):(r.common.smartName||={},l=r.common.smartName),l[s]=t.smartName,l&&(!l[s]||l[s]===r.common.name&&!r.common.role)){delete l[s];let N=!0;for(const c in l)if(Object.prototype.hasOwnProperty.call(l,c)){N=!1;break}if(N)if(t.noCommon&&((u=r.common.custom)!=null&&u[t.instanceId]))r.common.custom[t.instanceId].smartName.byON===void 0?delete r.common.custom[t.instanceId]:(delete r.common.custom[t.instanceId].en,delete r.common.custom[t.instanceId].de,delete r.common.custom[t.instanceId].ru,delete r.common.custom[t.instanceId].nl,delete r.common.custom[t.instanceId].pl,delete r.common.custom[t.instanceId].it,delete r.common.custom[t.instanceId].fr,delete r.common.custom[t.instanceId].pt,delete r.common.custom[t.instanceId].es,delete r.common.custom[t.instanceId].uk,delete r.common.custom[t.instanceId]["zh-cn"]);else if(r.common.smartName&&r.common.smartName.byON!==void 0){const c=r.common.smartName;delete c.en,delete c.de,delete c.ru,delete c.nl,delete c.pl,delete c.it,delete c.fr,delete c.pt,delete c.es,delete c.uk,delete c["zh-cn"]}else r.common.smartName=null}}}static disableSmartName(e,t,s){const r=e;s?(r.common.custom||={},r.common.custom[t]||={},r.common.custom[t].smartName=!1):r.common.smartName=!1}static copyToClipboard(e,t){return t&&(t.stopPropagation(),t.preventDefault()),Hc(e)}static getFileExtension(e){const t=(e||"").lastIndexOf(".");return t!==-1?e.substring(t+1).toLowerCase():null}static formatBytes(e){if(Math.abs(e)<1024)return`${e} B`;const t=["KB","MB","GB"];let s=-1;do e/=1024,++s;while(Math.abs(e)>=1024&&s186?`#000000${s||""}`:`#FFFFFF${s||""}`;const a=(255-r).toString(16),u=(255-o).toString(16),l=(255-M).toString(16);return`#${a.padStart(2,"0")}${u.padStart(2,"0")}${l.padStart(2,"0")}${s||""}`}static color2rgb(e){if(e==null||e===""||typeof e!="string")return!1;if(e.startsWith("rgba")){const t=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+),\s*([.\d]+)\)/);t&&(e=parseInt(t[1],10).toString(16).padStart(2,"0")+parseInt(t[2],10).toString(16).padStart(2,"0")+parseInt(t[2],10).toString(16).padStart(2,"0"))}else if(e.startsWith("rgb")){const t=e.match(/rgb?\((\d+),\s*(\d+),\s*(\d+)\)/);t&&(e=parseInt(t[1],10).toString(16).padStart(2,"0")+parseInt(t[2],10).toString(16).padStart(2,"0")+parseInt(t[2],10).toString(16).padStart(2,"0"))}else e.startsWith("#")&&(e=e.slice(1));return e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),e.length!==6&&e.length!==8?(console.warn(`Cannot invert color: ${e}`),!1):[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)]}static rgb2lab(e){let t=e[0]/255,s=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,s=s>.04045?((s+.055)/1.055)**2.4:s/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;let o=(t*.4124+s*.3576+r*.1805)/.95047,M=t*.2126+s*.7152+r*.0722,a=(t*.0193+s*.1192+r*.9505)/1.08883;return o=o>.008856?o**.33333333:7.787*o+.137931,M=M>.008856?M**.33333333:7.787*M+.137931,a=a>.008856?a**.33333333:7.787*a+.137931,[116*M-16,500*(o-M),200*(M-a)]}static colorDistance(e,t){const s=E.color2rgb(e),r=E.color2rgb(t);if(!s||!r)return 0;const o=E.rgb2lab(s),M=E.rgb2lab(r),a=o[0]-M[0],u=o[1]-M[1],l=o[2]-M[2],N=Math.sqrt(o[1]*o[1]+o[2]*o[2]),c=Math.sqrt(M[1]*M[1]+M[2]*M[2]),L=N-c;let j=u*u+l*l-L*L;j=j<0?0:Math.sqrt(j);const g=1+.045*N,y=1+.015*N,d=a,I=L/g,m=j/y,w=d*d+I*I+m*m;return w<0?0:w}static _toVal(e){let t,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e))for(let r=0;r{if(s=s.trim(),s){const r=s.split("="),o=decodeURIComponent(r[0]).trim();if(r.length>1){const M=decodeURIComponent(r[1]);if(M==="true")t[o]=!0;else if(M==="false")t[o]=!1;else{const a=parseFloat(M);a.toString()===M?t[o]=a:t[o]=M}}else t[o]=!0}}),t}static getParentId(e){const t=(e||"").toString().split(".");return t.length>1?(t.pop(),t.join(".")):null}static formatDate(e,t){if(!e)return"";let s;const r=(e.getMonth()+1).toString().padStart(2,"0"),o=e.getDate().toString().padStart(2,"0");return t==="MM/DD/YYYY"?s=`${r}/${o}/${e.getFullYear()}`:s=`${e.getFullYear()}-${r}-${o}`,s+=` ${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}:${e.getSeconds().toString().padStart(2,"0")}.${e.getMilliseconds().toString().padStart(3,"0")}`,s}static formatTime(e){if(e){e=Math.round(e);const t=Math.floor(e/(3600*24)),s=Math.floor(e%(3600*24)/3600),r=Math.floor(e%3600/60),o=e%60;return t?`${t}.${s.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`:s?`${s}:${r.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`:`0:${r.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`}return"0:00:00"}static MDtext2link(e){const t=e.match(/\d+\.\)\s/);return t&&(e=e.replace(t[0],t[0].replace(/\s/," "))),e.replace(/[^a-zA-Zа-яА-Я0-9]/g,"").trim().replace(/\s/g,"").toLowerCase()}static openLink(e,t){e=e.replace(/\/\/([0-9a-f]*:[0-9a-f]*:[0-9a-f]*:[0-9a-f]*:[0-9a-f]*:[0-9a-f]*)(:\d+)?\//i,"//[$1]$2/"),t==="this"?window.location.href=e:window.open(e,t||"_blank")}static MDgetTitle(e){var o;const t=E.MDextractHeader(e),s=t.header;let r=t.body;if(!s.title){r=r.replace(/{[^}]*}/g,""),r=r.trim();const M=r.replace(/\r/g,"").split(` `);for(let a=0;a{if(!M.trim())return;const a=M.indexOf(":");if(a!==-1){const u=M.substring(0,a).trim();let l=M.substring(a+1).trim();l=l.replace(/^['"]|['"]$/g,""),l==="true"?t[u]=!0:l==="false"?t[u]=!1:parseFloat(l).toString()===t[u]?t[u]=parseFloat(l):t[u]=l}else t[M.trim()]=!0}),e=e.substring(s+7))}return{header:t,body:e}}static MDremoveDocsify(e){const t=e.match(/{docsify-[^}]*}/g);return t&&t.forEach(s=>e=e.replace(s,"")),e}static generateFile(e,t){const s=document.createElement("a");s.setAttribute("href",`data:application/json;charset=utf-8,${encodeURIComponent(JSON.stringify(t,null,2))}`),s.setAttribute("download",e),s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s)}static quality2text(e){const t=e&4294901760,s=Er[e];let r;return s?r=[s]:e&1?r=[Er[1],`0x${(e&65534).toString(16)}`]:e&2?r=[Er[2],`0x${(e&65533).toString(16)}`]:r=[`0x${e.toString(16)}`],t&&r.push(`0x${(t>>16).toString(16).toUpperCase()}`),r}static clone(e){return JSON.parse(JSON.stringify(e))}static getStates(e){var r;const t=(r=e==null?void 0:e.common)==null?void 0:r.states;let s;if(t)if(typeof t=="string"&&t[0]==="{")try{s=JSON.parse(t)}catch{console.error(`Cannot parse states: ${t}`),s=null}else if(typeof t=="string"){const o=t.split(";");s={};for(let M=0;Ms[M]=o):(e==null?void 0:e.common.type)==="string"?t.forEach(o=>s[o]=o):(e==null?void 0:e.common.type)==="boolean"&&(s.false=t[0],s.true=t[1])):typeof t=="object"&&(s=t);return s||null}static async getSvg(e){const s=await(await fetch(e)).blob();return new Promise(r=>{const o=new FileReader;o.onload=()=>{var M;return r(((M=o.result)==null?void 0:M.toString())||"")},o.readAsDataURL(s)})}static detectMimeType(e){const t=Object.keys(_n).find(s=>e.startsWith(s));return t?_n[t]:null}static isStableRepository(e){return!!(typeof e=="string"&&e.toLowerCase().startsWith("stable")||e&&typeof e!="string"&&e.find(t=>t.toLowerCase().startsWith("stable")))}static isStringInteger(e){return typeof e=="number"?Math.round(e)===e:parseInt(e,10).toString()===e}static isValidDate(e){return e instanceof Date&&!isNaN(e)}static getStyle(e,...t){const s={};for(let r=0;r{if(typeof t[r][o]=="function")s[o]=t[r][o](e);else if(typeof t[r][o]=="object"){const M=t[r][o];s[o]={},Object.keys(M).forEach(a=>{typeof M[a]=="function"?s[o][a]=M(e):(M[a]||M[a]===0)&&(s[o][a]=M[a])})}else(t[r][o]||t[r][o]===0)&&(s[o]=t[r][o])});return s}}const _r={buttonIcon:{marginRight:8}};class Yg extends n.Component{isIFrame;constructor(e){super(e);const t=e.newReact===void 0?!0:e.newReact;if(e.isIFrame!==void 0)this.isIFrame=e.isIFrame;else try{this.isIFrame=!t&&window.self!==window.top}catch{this.isIFrame=!t}}render(){const e=this.props.noTextOnButtons,t={borderRadius:this.props.theme.saveToolbar.button.borderRadius||3,height:this.props.theme.saveToolbar.button.height||32},s={bottom:this.isIFrame?38:0,left:this.props.paddingLeft||0,right:0,position:"absolute",background:this.props.theme.saveToolbar.background};return this.props.dense&&(s.minHeight=48),this.props.error&&(t.border="1px solid red"),n.createElement(Wa,{style:s},n.createElement(Ct,{variant:"extended","aria-label":"Save",disabled:!this.props.changed||this.props.error,onClick:()=>this.props.onSave(!1),style:t},n.createElement(Gr,{style:e?void 0:_r.buttonIcon}),!e&&D.t("ra_Save")),n.createElement(Ct,{variant:"extended","aria-label":"Save and close",disabled:!this.props.changed||this.props.error,onClick:()=>this.props.onSave(!0),style:{...t,marginLeft:10}},n.createElement(Gr,{style:e?void 0:_r.buttonIcon}),e?"+":D.t("ra_Save and close"),e&&n.createElement(ge,null)),n.createElement("div",{style:{flexGrow:1}}),n.createElement(Ct,{variant:"extended","aria-label":"Close",onClick:()=>this.props.onClose(),style:t},n.createElement(ge,{style:e?void 0:_r.buttonIcon}),!e&&D.t("ra_Close")))}}const fn={suppress:{fontSize:12},suppressRoot:{marginTop:"16px"}};class Vc extends ze{constructor(e){if(super(e),!this.props.dialogName&&this.props.suppressQuestionMinutes)throw new Error("dialogName required if suppressQuestionMinutes used");let t=!1;this.props.suppressQuestionMinutes&&(t=parseInt((window._localStorage||window.localStorage).getItem(this.props.dialogName),10)||0,t?Date.now()>t&&((window._localStorage||window.localStorage).removeItem(this.props.dialogName),t=!1):t=!1),this.state={suppress:t}}handleOk(){this.state.suppress&&(window._localStorage||window.localStorage).setItem(this.props.dialogName,Date.now()+(this.props.suppressQuestionMinutes||2)*6e4),this.props.onClose&&this.props.onClose(!0)}handleCancel(){this.props.onClose&&this.props.onClose(!1)}render(){return typeof this.state.suppress=="number"?(setTimeout(()=>this.props.onClose&&this.props.onClose(!0),100),null):n.createElement(de,{open:!0,maxWidth:"md",fullWidth:this.props.fullWidth!==void 0?this.props.fullWidth:!0,onClose:(e,t)=>{t!=="backdropClick"&&t!=="escapeKeyDown"&&this.handleCancel()},"aria-labelledby":"ar_confirmation_dialog_title","aria-describedby":"ar_confirmation_dialog_description"},n.createElement(Ie,{id:"ar_confirmation_dialog_title"},this.props.title||D.t("ra_Are you sure?")),n.createElement(Ae,null,n.createElement(Jt,{id:"ar_confirmation_dialog_description"},this.props.icon||null,this.props.text,this.props.suppressQuestionMinutes?n.createElement("br",null):null,this.props.suppressQuestionMinutes?n.createElement(H,{sx:{"& .FormControlLabel-label":fn.suppress,"&.FormControlLabel-root":fn.suppressRoot},control:n.createElement(ne,{id:`ar_dialog_confirm_suppress_${this.props.dialogName||""}`,checked:!!this.state.suppress,onChange:()=>this.setState({suppress:!this.state.suppress})}),label:this.props.suppressText||D.t("ra_Suppress question for next %s minutes",(this.props.suppressQuestionMinutes||2).toString())}):null)),n.createElement(me,null,n.createElement(X,{id:`ar_dialog_confirm_ok_${this.props.dialogName||""}`,variant:"contained",onClick:()=>this.handleOk(),color:"primary",autoFocus:!0,startIcon:n.createElement(ve,null)},this.props.ok||D.t("ra_Ok")),n.createElement(X,{id:`ar_dialog_confirm_cancel_${this.props.dialogName||""}`,variant:"contained",onClick:()=>this.handleCancel(),color:"grey",startIcon:n.createElement(ge,null)},this.props.cancel||D.t("ra_Cancel"))))}}class Zc extends ze{handleOk(){this.props.onClose&&this.props.onClose()}render(){return n.createElement(de,{open:!0,maxWidth:"sm",fullWidth:this.props.fullWidth!==void 0?this.props.fullWidth:!0,onClose:()=>this.handleOk(),"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description"},n.createElement(Ie,{id:"ar_alert_dialog_title"},this.props.title||D.t("ra_Error")),n.createElement(Ae,null,n.createElement(Jt,{id:"ar_alert_dialog_description"},this.props.text||D.t("ra_Unknown error!"))),n.createElement(me,null,n.createElement(X,{id:"ar_dialog_error_ok",variant:"contained",onClick:()=>this.handleOk(),color:"primary",autoFocus:!0,startIcon:n.createElement(ve,null)},D.t("ra_Ok"))))}}const Qg="Actions",vg="Append",Ug="Cancel",bg="Categories",$g="Checked",Pg="Delete",Wg="Close",Rg="Commercial",Jg="Configure",Bg="Connected",Gg="Continue",Fg="Copied",Hg="Create",Vg="Crop",Zg="Delete",Xg="Delete",Kg="Discard",qg="Disconnected",eT="Error",tT="Filter",sT="Friday",iT="Latitude",rT="Logout",oT="Longitude",MT="Message",nT="Monday",aT="Name",cT="Objects",uT="Ok",lT="Product",NT="Rename/Move/Copy",LT="Repeat",jT="Replace",gT="Root",TT="Saturday",yT="Save",DT="Selected",dT="States",zT="Sunday",hT="Thursday",IT="Timestamp",wT="Tuesday",CT="Update",AT="Valid till",mT="Value",pT="Version",OT="Wednesday",ET="Width",_T="Yes",fT="different",ST="Everyone can read object",xT="Everyone can read state",kT="Everyone can write object",YT="Everyone can write state",QT="Group can read object",vT="Group can read state",UT="Group can write object",bT="Group can write state",$T="Owner can read object",PT="Owner can read state",WT="Owner can write object",RT="Owner can write state",JT="Buttons",BT="Changed from",GT="close",FT="Create boolean state",HT="Create channel",VT="Create device",ZT="Create number state",XT="Create state",KT="Create string state",qT="days",ey="Fr",ty="Mo",sy="Sa",iy="Su",ry="Th",oy="Tu",My="We",ny="Expert mode",ay="FALSE",cy="All files",uy="Audio",ly="Code/JSON",Ny="Images",Ly="Text",jy="Video",gy="Settings",Ty="without",yy="Function",Dy="ID",dy="Name",zy="Role",hy="Room",Iy="Type",wy="Invalid settings",Cy="Last change",Ay="locally",my="Apr",py="Aug",Oy="Dec",Ey="Feb",_y="Jan",fy="Jul",Sy="Jun",xy="Mai",ky="Mar",Yy="Nov",Qy="Oct",vy="Sep",Uy="Apr",by="Aug",$y="Dec",Py="Feb",Wy="Jan",Ry="Jul",Jy="Jun",By="Mai",Gy="Mar",Fy="Nov",Hy="Oct",Vy="Sep",Zy="none",Xy="Object changed by",Ky="Object last changed at",qy="Settings from other adapter %s",eD="Quality code",tD="repeat",sD='To select folder, just hold the key "shift" by clicking the folder.',iD="Show all",rD="State changed by",oD="Object changed from",MD="Timestamp",nD="Acknowledged",aD="Comment",cD="Copy the state value",uD="Hold Cltr/⌘ key to open the link",lD="Custom settings",ND="Delete object",LD="Edit object",jD="Edit the state value",gD="Expires in",TD="From",yD="Last changed",DD="Quality",dD="Time stamp",zD="User",hD="Value",ID="TRUE",wD="Value",CD="Warning: The CRON job will run every minute during the specified period!",AD="Warning: The CRON job will run every second during the specified period!",mD="CRON",pD="Date",OD="Dates",ED="Day",_D="Day of week",fD="Every",SD="every N days",xD="every Nth day of the week",kD="every N day of week",YD="every N hours",QD="every N minutes",vD="every N months",UD="every N seconds",bD="every day",$D="every day of the week",PD="every day of the week",WD="every hour",RD="every minute",JD="every month",BD="every second",GD="From",FD="Hours",HD="Interval",VD="Interval between",ZD="Invalid CRON",XD="Minutes",KD="months",qD="Once",ed="Period",td="Seconds",sd="Simple",id="Specific time",rd="specific dates",od="specific day(s) of the week",Md="specific day of weeks",nd="specific hours",ad="specific minutes",cd="specific months",ud="specific seconds",ld="Time",Nd="To",Ld="Wizard",jd="all",gd="Astro day",Td="Astro night",yd="Dawn",Dd="Dusk",dd="Golden hour",zd="Golden hour end",hd="Nadir",Id="Nautical dawn",wd="Nautical dusk",Cd="Night",Ad="Night end",md="Solar noon",pd="Sunrise",Od="Sunrise end",Ed="Sunset",_d="Sunset start",fd="at",Sd="at %s",xd="every day",kd="every hour",Yd="every minute",Qd="every month",vd="every %s day",Ud="every %s hours",bd="every %s minutes",$d="every %s months",Pd="every %s weeks",Wd="every %s years",Rd="every week",Jd="every year",Bd="from %s to %s",Gd="never",Fd="on %s of %s",Hd="on %s and %s of",Vd="on every date of",Zd="%s",Xd="%s and %s",Kd="on %s",qd="on %s and %s",e1="on weekends",t1="on working days",s1="will ne be not executed any more, because start is in the past",i1="on %s",r1="from %s",o1="Execute from to",M1="to %s",n1="every",a1="Specific time",c1="from",u1="From-to",l1="Interval time",N1="invert",L1="none",j1="on",g1="Period",T1="Daily",y1="Dates",D1="Day",d1="Every",z1="Every day",h1="Every month",I1="Every week",w1="Every year",C1="Hours",A1="Minutes",m1="month",p1="Monthly",O1="Once",E1="Specific months",_1="Week",f1="Weekdays",S1="Weekend",x1="Weekly",k1="Workdays",Y1="Year",Q1="Yearly",v1="Specific time",U1="Time",b1="to",$1="Valid",P1="from",W1="to",R1="Whole day",J1="every month",B1={"ra_%s links from aliases":"%s links from aliases","ra_%s object(s) processed":"%s object(s) processed","ra_%s was imported":"%s was imported","ra_Accept license":"Accept license",ra_Actions:Qg,"ra_Add new child object to selected parent":"Add new child object to selected parent","ra_Add objects tree from JSON file":"Add objects tree from JSON file","ra_Add row":"Add row","ra_Advanced options":"Advanced options","ra_All items are filtered out":"All items are filtered out","ra_All objects":"All objects",ra_Append:vg,"ra_Append %s entries or replace existing?":"Append %s entries or replace existing?","ra_Append or replace?":"Append or replace?","ra_Are you sure?":"Are you sure?","ra_Auto (no custom columns)":"Auto (no custom columns)","ra_Back to %s":"Back to %s","ra_Background image":"Background image",ra_Cancel:Ug,"ra_Cannot add items with set filter":"Cannot add items with set filter","ra_Cannot decode license":"Cannot decode license","ra_Cannot determine position: System settings are empty and GPS detection is disabled in browser":"Cannot determine position: System settings are empty and GPS detection is disabled in browser",'ra_Cannot find "%s"':'Cannot find "%s"','ra_Cannot read "%s"':'Cannot read "%s"',"ra_Cannot read licenses: %s":"Cannot read licenses: %s","ra_Cannot retrieve options, as instance is offline":"Cannot retrieve options, as instance is offline","ra_Cannot update attribute, because not found in the object":"Cannot update attribute, because not found in the object","ra_Cannot upload":"Cannot upload",ra_Categories:bg,"ra_Chained certificate":"Chained certificate","ra_Change color theme":"Change color theme","ra_Changed from":"Changed from","ra_Channel → State":"Channel → State","ra_Check license":"Check license",ra_Checked:$g,ra_Clear:Pg,"ra_Clear filter":"Clear filter","ra_Clear icon":"Clear icon","ra_Click to see in full size":"Click to see in full size","ra_Click to show":"Click to show","ra_Clone current row":"Clone current row",ra_Close:Wg,"ra_Collapse all nodes":"Collapse all nodes","ra_Collapse one step node":"Collapse one level",ra_Commercial:Rg,ra_Configure:Jg,"ra_Configure visible columns":"Configure visible columns","ra_Confirm deletion of %s":"Confirm deletion of %s",ra_Connected:Bg,ra_Continue:Gg,ra_Copied:Fg,"ra_Copied %s":'Copied "%s"',"ra_Copy content":"Copy content",ra_Create:Hg,"ra_Create alias":"Create alias","ra_Create folder":"Create folder","ra_Create new folder in %s":"Create new folder in %s",ra_Crop:Vg,"ra_Define CRON...":"Define CRON...","ra_Define functions":"Define functions","ra_Define rooms":"Define rooms","ra_Define schedule":"Define schedule","ra_Define schedule...":"Define schedule...",ra_Del:Zg,ra_Delete:Xg,"ra_Delete current row":"Delete current row","ra_Deselect all":"Unselect all","ra_Device → Channel → State":"Device → Channel → State","ra_Disable/Enable translation":"Disable/Enable translation",ra_Discard:Kg,ra_Disconnected:qg,"ra_Do not ask for next 2 hours in this session":"Do not ask for next 2 hours in this session","ra_Do not export values of states":"Do not export values of states","ra_Do not use let's encrypt":"Do not use let's encrypt","ra_Docker is not available":"Docker is not available","ra_Docker is not installed or not running":"Docker is not installed or not running","ra_Double click to reset table layout":"Double click to reset table layout","ra_Drag 'n' drop some files here, or click to select files":"Drag 'n' drop some files here, or click to select files","ra_Drop file here":"Drop file here","ra_Drop the files here...":"Drop the file here...","ra_Duplicate name":"Duplicate name","ra_Edit ACL":"Edit ACL","ra_Edit alias":"Edit alias","ra_Edit custom config":"Edit custom config","ra_Edit full path":"Edit full path","ra_Edit function":"Edit function","ra_Edit object field":"Edit object field","ra_Edit role":"Edit role","ra_Edit room":"Edit room","ra_Edit value":"Edit value","ra_Enter the code from that page here":"Enter the code from that page here",ra_Error:eT,"ra_Expand all nodes":"Expand all nodes","ra_Expand one step node":"Expand one level","ra_Expand/Collapse card":"Expand/Collapse card","ra_Export configuration section":"Export configuration section","ra_Export data to %s file":"Export data to %s file","ra_Failed to open JSON File":"Failed to open JSON File","ra_Fallback custom certificates":"Fallback custom certificates","ra_File is too big. Max %sk allowed. Try use SVG.":"File is too big. Max %sk allowed. Try use SVG.",ra_Filter:tT,"ra_Filter and Data Actions":"Filter and Data Actions","ra_Filter files":"Filter files","ra_Folder name":"Folder name","ra_Folder → Channel → State":"Folder → Channel → State","ra_Folder → Device → Channel → State":"Folder → Device → Channel → State","ra_Folder → State":"Folder → State","ra_Folders always first":"Folders always first",ra_Friday:sT,"ra_From file":"From file","ra_From text":"From text","ra_Get %s access":"Get %s access","ra_Good luck":"Good luck","ra_Hide empty folders":"Hide empty folders","ra_If no file will be created in the folder, it will disappear after the browser closed":"If no file will be created in the folder, it will disappear after the browser closed","ra_If the button above does not work, you can authorize manually this app by visiting this url":"If the button above does not work, you can authorize manually this app by visiting this url","ra_Import and add configuration section":"Import and add configuration section","ra_Import and replace configuration section":"Import and replace configuration section","ra_Import data from %s file":"Import data from %s file","ra_Import from %s":"Import from %s","ra_Instance %s is alive":"Instance %s is alive","ra_Instance %s is not alive":"Instance %s is not alive","ra_Instance is not alive":"Instance is not alive","ra_Invalid CRON":"Invalid CRON","ra_Invalid JSON":"Invalid JSON","ra_Invalid JSON file.":"Invalid JSON file.","ra_Invalid JSON format. Expected an array.":"Invalid JSON format. Expected an array.","ra_Invalid answer from server":"Invalid answer from server","ra_Invalid parent folder!":"Invalid parent folder!","ra_Invalid structure":"Invalid structure","ra_JSON editor":"JSON editor","ra_Last change":"Last change",ra_Latitude:iT,"ra_License %s":"License %s","ra_License agreement":"License agreement","ra_License does not exist":"License does not exist","ra_License expired on %s":"License expired on %s",'ra_License for other product "%s"':'License for other product "%s"',"ra_License is for version %s, but required version is %s.":"License is for version %s, but required version is %s.","ra_License must be converted":"License must be converted to newer version. You can do it in your iobroker.net profile.","ra_License not found in license manager. Do you want to read licenses from iobroker.net?":"License not found in the license manager. Do you want to update licenses from iobroker.net?","ra_Listen on all IPs":"Listen on all IPs","ra_Load configuration from file":"Load configuration from file",ra_Logout:rT,ra_Longitude:oT,'ra_May not trigger "updateLicenses"':'May not trigger "updateLicenses"',ra_Message:MT,ra_Monday:nT,"ra_Move down":"Move down","ra_Move up":"Move up",ra_Name:aT,"ra_No data found in file":"No data found in file","ra_No one license found in license manager":"No one license found in license manager","ra_No response from admin":"No response from admin","ra_No response from the backend":"No response from the backend",'ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".':'Non-experts may create new objects only in "0_userdata.0" or "alias.0".',"ra_Not a number":"Not a number","ra_OAuth Client ID":"OAuth Client ID","ra_OAuth Client secret":"OAuth Client secret",ra_Objects:cT,ra_Ok:uT,"ra_On weekdays":"On weekdays","ra_Only following structures of objects are available:":"Only following structures of objects are available:","ra_Only selected":"Only selected","ra_Owner group":"Owner group","ra_Owner user":"Owner user","ra_Passwords are not equal!":"Passwords are not equal!","ra_Place your files here or click here to open the browse dialog":"Place your files here or click here to open the browse dialog","ra_Please allow popups in your browser for this page!":"Please allow popups in your browser for this page!","ra_Please confirm":"Please confirm","ra_Please create license":"Please create license","ra_Please enter the license":"Please enter the license","ra_Please select file...":"Please select file...","ra_Please select object ID...":"Please select object ID...","ra_Port could be used by %s":"Port could be used by %s","ra_Port is already used by %s":"Port is already used by %s","ra_Press ENTER Key to add new item":"Press ENTER Key to add new item","ra_Private certificate":"Private certificate",ra_Product:lT,"ra_Public certificate":"Public certificate","ra_Quality code":"Quality","ra_Refresh tree":"Refresh tree","ra_Reload files":"Reload files",ra_Rename_Move_Copy:NT,"ra_Renew %s access":"Renew %s access",ra_Repeat:LT,ra_Replace:jT,"ra_Request timed out":"Request timed out","ra_Restrict to folder":"Restrict to folder",ra_Root:gT,ra_Saturday:TT,ra_Save:yT,"ra_Save and close":"Save and close","ra_Save configuration to file":"Save configuration to file","ra_Save objects tree as JSON file":"Save objects tree as JSON file","ra_Select all":"Select all","ra_Select color":"Select color","ra_Select predefined icon":"Select predefined icon","ra_Select type of export":"Select type of export",ra_Selected:DT,"ra_Selected %s object(s)":"Selected %s object(s)","ra_Serial number (UUID)":"Serial number (UUID)",'ra_Serial number (UUID) "%s" in license is for other device.':'Serial number (UUID) "%s" in license is for other device.',"ra_Session will expire in %s seconds. Continue?":"Session will expire in %s seconds. Continue?","ra_Show all folders":"Show all folders","ra_Show lines between rows":"Show lines between rows","ra_Show/Hide object descriptions":"Show/Hide object descriptions","ra_Show/hide filter input":"Show/hide filter input","ra_Some data are not stored. Discard?":"Some data are not stored. Discard?",ra_States:dT,"ra_Successfully authorized. Token valid till %s and will be automatically renewed.":"Successfully authorized. Token valid till %s and will be automatically renewed.","ra_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":"Successfully authorized. Token valid till %s but it can expire as the instance is not running.","ra_Suitable license not found in license manager":"Suitable license not found in license manager",ra_Sunday:zT,"ra_Suppress question for next %s minutes":"Suppress question for next %s minutes","ra_System language":"System language","ra_Take browser position":"Take position from browser","ra_Take position from system settings":"Take position from system settings",'ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").':'The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").',"ra_The page you are looking for was not found":"The page you are looking for was not found","ra_The schedule will be executed every minute. Are you sure?":"The schedule will be executed every minute. Are you sure?","ra_The schedule will be executed every second. Are you sure?":"The schedule will be executed every second. Are you sure?",ra_Thursday:hT,ra_Timestamp:IT,"ra_Toggle expert mode":"Toggle expert mode","ra_Toggle the states view":"Toggle the states view","ra_Toggle view mode":"Toggle view mode","ra_Too big":"Too big","ra_Too small":"Too small","ra_Transparent dialog":"Transparent dialog",ra_Tuesday:wT,"ra_Unknown error":"Unknown error","ra_Unknown error!":"Unknown error!",ra_Update:CT,"ra_Upload file":"Upload file","ra_Use all available let's encrypt certificates":"Use all available let's encrypt certificates","ra_Use iobroker.acme adapter for letsencrypt certificates":"Use iobroker.acme adapter for letsencrypt certificates","ra_Use system settings for position":"Use system settings for position","ra_Used system settings":"Used system settings","ra_User files":"User files",ra_ValidTill:AT,ra_Value:mT,ra_Version:pT,"ra_View file":"View file","ra_View: %s":"View: %s",ra_Wednesday:OT,ra_Width:ET,"ra_YAML editor":"YAML editor",ra_Yes:_T,"ra_You can export all objects or just the selected branch.":"You can export all objects or just the selected branch.","ra_You can filter entries by entering here some text":"You can filter entries by entering here some text","ra_You can use * as wildcard":"You can use * as wildcard",ra___different__:fT,ra_aclEveryone_read_object:ST,ra_aclEveryone_read_state:xT,ra_aclEveryone_write_object:kT,ra_aclEveryone_write_state:YT,ra_aclGroup_read_object:QT,ra_aclGroup_read_state:vT,ra_aclGroup_write_object:UT,ra_aclGroup_write_state:bT,ra_aclOwner_read_object:$T,ra_aclOwner_read_state:PT,ra_aclOwner_write_object:WT,ra_aclOwner_write_state:RT,ra_buttons:JT,ra_changedFrom:BT,ra_close:GT,ra_create_boolean_state:FT,ra_create_channel:HT,ra_create_device:VT,ra_create_number_state:ZT,ra_create_state:XT,ra_create_string_state:KT,ra_daysShortText:qT,ra_dow_Fr:ey,ra_dow_Mo:ty,ra_dow_Sa:sy,ra_dow_Su:iy,ra_dow_Th:ry,ra_dow_Tu:oy,ra_dow_We:My,ra_expertMode:ny,ra_false:ay,ra_fileType_all:cy,ra_fileType_audio:uy,ra_fileType_code:ly,ra_fileType_images:Ny,ra_fileType_txt:Ly,ra_fileType_video:jy,"ra_fileType_video,":"Video",ra_filter_customs:gy,ra_filter_customs_without:Ty,ra_filter_func:yy,ra_filter_id:Dy,ra_filter_name:dy,ra_filter_role:zy,ra_filter_room:hy,ra_filter_type:Iy,"ra_import data from %s file":"Import data from %s file",ra_invalidConfig:wy,ra_lastChange:Cy,ra_locally:Ay,ra_month_Apr:my,ra_month_Aug:py,ra_month_Dec:Oy,ra_month_Feb:Ey,ra_month_Jan:_y,ra_month_Jul:fy,ra_month_Jun:Sy,ra_month_Mai:xy,ra_month_Mar:ky,ra_month_Nov:Yy,ra_month_Oct:Qy,ra_month_Sep:vy,ra_months_Apr:Uy,ra_months_Aug:by,ra_months_Dec:$y,ra_months_Feb:Py,ra_months_Jan:Wy,ra_months_Jul:Ry,ra_months_Jun:Jy,ra_months_Mai:By,ra_months_Mar:Gy,ra_months_Nov:Fy,ra_months_Oct:Hy,ra_months_Sep:Vy,"ra_no confirm for 5 mins":"no confirm for 5 mins",ra_none:Zy,ra_object_changed_by:Xy,ra_object_changed_by_user:Ky,ra_otherConfig:qy,ra_qualityCode:eD,ra_repeat:tD,ra_select_folder_hint:sD,ra_show_all:iD,ra_state_changed_by:rD,ra_state_changed_from:oD,ra_timestamp:MD,ra_tooltip_ack:nD,ra_tooltip_comment:aD,ra_tooltip_copyState:cD,ra_tooltip_ctrlForLink:uD,ra_tooltip_customConfig:lD,ra_tooltip_deleteObject:ND,ra_tooltip_editObject:LD,ra_tooltip_editState:jD,ra_tooltip_expire:gD,ra_tooltip_from:TD,ra_tooltip_lc:yD,ra_tooltip_quality:DD,ra_tooltip_ts:dD,ra_tooltip_user:zD,ra_tooltip_value:hD,ra_true:ID,"ra_use seconds":"use seconds",ra_val:wD,"ra_via internet":"via internet",ra_warning_every_minute:CD,ra_warning_every_second:AD,sc_cron:mD,sc_date:pD,sc_dates:OD,sc_dow:ED,sc_dows:_D,sc_every:fD,sc_everyN_dates:SD,sc_everyN_dow:xD,sc_everyN_dows:kD,sc_everyN_hours:YD,sc_everyN_minutes:QD,sc_everyN_months:vD,sc_everyN_seconds:UD,sc_every_dates:bD,sc_every_dow:$D,sc_every_dows:PD,sc_every_hours:WD,sc_every_minutes:RD,sc_every_months:JD,sc_every_seconds:BD,sc_from:GD,sc_hours:FD,sc_interval:HD,sc_intervalBetween:VD,sc_invalid_cron:ZD,sc_minutes:XD,sc_months:KD,sc_once:qD,sc_period:ed,sc_seconds:td,sc_simple:sd,sc_specific:id,sc_specific_dates:rd,sc_specific_dow:od,sc_specific_dows:Md,sc_specific_hours:nd,sc_specific_minutes:ad,sc_specific_months:cd,sc_specific_seconds:ud,sc_time:ld,sc_to:Nd,sc_wizard:Ld,sch_all:jd,sch_astroDay:gd,sch_astroNight:Td,sch_astro_dawn:yd,sch_astro_dusk:Dd,sch_astro_goldenHour:dd,sch_astro_goldenHourEnd:zd,sch_astro_nadir:hd,sch_astro_nauticalDawn:Id,sch_astro_nauticalDusk:wd,sch_astro_night:Cd,sch_astro_nightEnd:Ad,sch_astro_solarNoon:md,sch_astro_sunrise:pd,sch_astro_sunriseEnd:Od,sch_astro_sunset:Ed,sch_astro_sunsetStart:_d,sch_at:fd,sch_desc_atTime:Sd,sch_desc_everyDay:xd,sch_desc_everyHour:kd,sch_desc_everyMinute:Yd,sch_desc_everyMonth:Qd,sch_desc_everyNDay:vd,sch_desc_everyNHours:Ud,sch_desc_everyNMinutes:bd,sch_desc_everyNMonths:$d,sch_desc_everyNWeeks:Pd,sch_desc_everyNYears:Wd,sch_desc_everyWeek:Rd,sch_desc_everyYear:Jd,sch_desc_intervalFromTo:Bd,sch_desc_never:Gd,sch_desc_onDate:Fd,sch_desc_onDates:Hd,sch_desc_onEveryDate:Vd,sch_desc_onMonth:Zd,sch_desc_onMonths:Xd,sch_desc_onWeekday:Kd,sch_desc_onWeekdays:qd,sch_desc_onWeekends:e1,sch_desc_onWorkdays:t1,sch_desc_onceInPast:s1,sch_desc_once_on:i1,sch_desc_validFrom:r1,sch_desc_validFromTo:o1,sch_desc_validTo:M1,sch_every:n1,sch_exactTime:a1,sch_from:c1,sch_fromTo:u1,sch_intervalTime:l1,sch_invert:N1,sch_no_one:L1,sch_on:j1,sch_period:g1,sch_periodDaily:T1,sch_periodDates:y1,sch_periodDay:D1,sch_periodEvery:d1,sch_periodEveryDay:z1,sch_periodEveryMonth:h1,sch_periodEveryWeek:I1,sch_periodEveryYear:w1,sch_periodHours:C1,sch_periodMinutes:A1,sch_periodMonth:m1,sch_periodMonthly:p1,sch_periodOnce:O1,sch_periodSpecificMonths:E1,sch_periodWeek:_1,sch_periodWeekdays:f1,sch_periodWeekend:S1,sch_periodWeekly:x1,sch_periodWorkdays:k1,sch_periodYear:Y1,sch_periodYearly:Q1,sch_specificTime:v1,sch_time:U1,sch_to:b1,sch_valid:$1,sch_validFrom:P1,sch_validTo:W1,sch_wholeDay:R1,sch_yearEveryMonth:J1},G1="Aktionen",F1="Anhängen",H1="Abbrechen",V1="Kategorien",Z1="Geprüft",X1="Löschen",K1="Schließen",q1="Kommerziell",ez="Konfigurieren",tz="Verbunden",sz="Weitermachen",iz="Kopiert",rz="Erstellen",oz="Ernte",Mz="Entf",nz="Löschen",az="Verwerfen",cz="Getrennt",uz="Fehler",lz="Filter",Nz="Freitag",Lz="Breite",jz="Ausloggen",gz="Längengrad",Tz="Meldung",yz="Montag",Dz="Name",dz="Objekte",zz="OK",hz="Produkt",Iz="Umbenennen/Verschieben/Kopieren",wz="Wiederholen",Cz="Ersetzen",Az="Anfang",mz="Samstag",pz="Speichern",Oz="Ausgewählt",Ez="Zustände",_z="Sonntag",fz="Donnerstag",Sz="Zeitstempel",xz="Dienstag",kz="Aktualisieren",Yz="Gültig bis",Qz="Wert",vz="Ausführung",Uz="Mittwoch",bz="Breite",$z="Ja",Pz="unterschiedlich",Wz="Jeder kann Objekt lesen",Rz="Jeder kann Zustand lesen",Jz="Jeder kann ein Objekt schreiben",Bz="Jeder kann Zustand schreiben",Gz="Gruppe kann Objekt lesen",Fz="Gruppe kann Status lesen",Hz="Gruppe kann Objekt schreiben",Vz="Gruppe kann Status schreiben",Zz="Besitzer kann Objekt lesen",Xz="Besitzer kann Zustand lesen",Kz="Besitzer kann Objekt schreiben",qz="Besitzer kann Zustand schreiben",eh="Tasten",th="Geändert von",sh="Schließen",ih="Booleschen Zustand erstellen",rh="Kanal erstellen",oh="Gerät erstellen",Mh="Nummern-Zustand erstellen",nh="Zustand erstellen",ah="String-Zustand erstellen",ch="T.",uh="Fr",lh="Mo",Nh="Sa",Lh="So",jh="Do",gh="Di",Th="Mi",yh="Expertenmodus",Dh="FALSCH",dh="Alle Dateien",zh="Audio",hh="Code/JSON",Ih="Bilder",wh="Text",Ch="Video",Ah="Einstellungen",mh="ohne",ph="Funktion",Oh="ID",Eh="Name",_h="Rolle",fh="Raum",Sh="Typ",xh="Ungültige Einstellungen",kh="Letzte Änderung",Yh="örtlich",Qh="Apr",vh="Aug",Uh="Dez",bh="Feb",$h="Jan",Ph="Jul",Wh="Jun",Rh="Mai",Jh="Mär",Bh="Nov",Gh="Okt",Fh="Sep",Hh="Apr",Vh="Aug",Zh="Dez",Xh="Feb",Kh="Jan",qh="Jul",eI="Jun",tI="Mai",sI="Mär",iI="Nov",rI="Okt",oI="Sep",MI="kein",nI="Objekt geändert von",aI="Objekt zuletzt geändert um",cI="Einstellungen von anderen Adaptern %s",uI="Qualitätscode",lI="wiederholen",NI='Um einen Ordner auszuwählen, halten Sie einfach die Taste "Shift" gedrückt, indem Sie auf den Ordner klicken.',LI="Alle anzeigen",jI="Zustand geändert durch",gI="Objekt geändert von",TI="Zeitstempel",yI="Bestätigt",DI="Kommentar",dI="Statuswert kopieren",zI="Strg/⌘-Taste gedrückt halten, um den Link zu öffnen",hI="Benutzerdefinierte Einstellungen",II="Objekt löschen",wI="Objekt bearbeiten",CI="Statuswert bearbeiten",AI="Läuft ab in",mI="Von",pI="Zuletzt geändert",OI="Qualität",EI="Zeitstempel",_I="Benutzer",fI="Wert",SI="WAHR",xI="Wert",kI="Achtung: Der CRON-Job wird im angegebenen Zeitraum jede Minute ausgeführt!",YI="Achtung: Der CRON-Job wird im angegebenen Zeitraum jede Sekunde ausgeführt!",QI="CRON",vI="Datum",UI="Tage",bI="Tag",$I="Wochentage",PI="Jeden",WI="alle N Tage",RI="jeden x-ten Tag der Woche",JI="alle N Wochentage",BI="alle N Stunden",GI="alle N Minuten",FI="alle N Monate",HI="alle N Sekunden",VI="jeden Tag",ZI="jeden Tag der Woche",XI="jeden Tag der Woche",KI="jede Stunde",qI="jede Minute",ew="jeden Monat",tw="jede Sekunde",sw="Von",iw="Stunden",rw="Intervall",ow="Intervall zwischen",Mw="Ungültiger CRON",nw="Minuten",aw="Monate",cw="Einmal",uw="Zeitraum",lw="Sekunden",Nw="Einfach",Lw="Bestimmte Zeit",jw="bestimmte Tage",gw="bestimmte(r) Tag(e) der Woche",Tw="bestimmten Wochentag",yw="bestimmte Stunden",Dw="bestimmte Minuten",dw="bestimmte Monate",zw="bestimmte Sekunden",hw="Zeit",Iw="Bis",ww="Wizard",Cw="alle",Aw="Astronomischer Tag",mw="Astronomische Nacht",pw="Morgendämmerung",Ow="Abenddämmerung",Ew="Goldene Stunde",_w="Goldene Stundenende",fw="Nadir",Sw="Nautische Morgendämmerung",xw="Nautische Abenddämmerung",kw="Nacht",Yw="Nachtende",Qw="Sonnenmittag",vw="Sonnenaufgang",Uw="Sonnenaufgangende",bw="Sonnenuntergang",$w="Sonnenuntergangstart",Pw="am",Ww="um %s",Rw="jeden Tag",Jw="jede Stunde",Bw="jede Minute",Gw="jeden Monat",Fw="jeden %s Tag",Hw="alle %s Stunden",Vw="alle %s Minuten",Zw="alle %s Monate",Xw="alle %s Wochen",Kw="alle %s Jahre",qw="jede Woche",e2="jedes Jahr",t2="von %s bis %s",s2="noch nie",i2="am %s von %s",r2="am %s und %s von",o2="an jedem Datum von",M2="%s",n2="%s und %s",a2="auf %s",c2="auf %s und %s",u2="an Wochenenden",l2="an Werktagen",N2="wird nicht mehr ausgeführt, weil der Start in der Vergangenheit ist",L2="auf %s",j2="von %s",g2="Ausführen von bis",T2="bis %s",y2="jeden",D2="Bestimmte Zeit",d2="von",z2="Von bis",h2="Zeitintervall",I2="umkehren",w2="keiner",C2="am",A2="Zeitraum",m2="Täglich",p2="Daten",O2="Tag",E2="Jeden",_2="Jeden Tag",f2="Jeden Monat",S2="Jede Woche",x2="Jedes Jahr",k2="Stunden",Y2="Minuten",Q2="Monat",v2="Monatlich",U2="Einmal",b2="Bestimmte Monate",$2="Woche",P2="Wochentage",W2="Wochenende",R2="Wöchentlich",J2="Arbeitstage",B2="Jahr",G2="Jährlich",F2="Bestimmte Zeit",H2="Zeit",V2="zu",Z2="Gültigkeit",X2="von",K2="bis",q2="Ganzer Tag",eC="jeden Monat",tC={"ra_%s links from aliases":"%s Links von Aliasen","ra_%s object(s) processed":"%s Objekt(e) verarbeitet","ra_%s was imported":"%s wurde importiert","ra_Accept license":"Lizenz akzeptieren",ra_Actions:G1,"ra_Add new child object to selected parent":"Dem ausgewählten übergeordneten Objekt ein neues untergeordnetes Objekt hinzufügen","ra_Add objects tree from JSON file":"Objektbaum aus JSON-Datei hinzufügen","ra_Add row":"Zeile hinzufügen","ra_Advanced options":"Erweiterte Optionen","ra_All items are filtered out":"Alle Elemente sind herausgefiltert","ra_All objects":"Alle Objekte",ra_Append:F1,"ra_Append %s entries or replace existing?":"%s Einträge anhängen oder vorhandene ersetzen?","ra_Append or replace?":"Anhängen oder ersetzen?","ra_Are you sure?":"Bist du sicher?","ra_Auto (no custom columns)":"Auto (keine benutzerdefinierten Spalten)","ra_Back to %s":"Zurück zu %s","ra_Background image":"Hintergrundbild",ra_Cancel:H1,"ra_Cannot add items with set filter":"Elemente mit festgelegtem Filter können nicht hinzugefügt werden","ra_Cannot decode license":"Lizenz kann nicht entschlüsselt werden","ra_Cannot determine position: System settings are empty and GPS detection is disabled in browser":"Position kann nicht bestimmt werden: Die Systemeinstellungen sind leer und die GPS-Erkennung ist im Browser deaktiviert",'ra_Cannot find "%s"':'Kann "%s" nicht finden','ra_Cannot read "%s"':'"%s" kann nicht gelesen werden',"ra_Cannot read licenses: %s":"Lizenzen können nicht gelesen werden: %s","ra_Cannot retrieve options, as instance is offline":"Optionen können nicht abgerufen werden, da die Instanz offline ist","ra_Cannot update attribute, because not found in the object":"Attribut kann nicht aktualisiert werden, da es nicht im Objekt gefunden wurde","ra_Cannot upload":"Kann nicht hochladen",ra_Categories:V1,"ra_Chained certificate":"Chained Zertifikat","ra_Change color theme":"Farbthema ändern","ra_Changed from":"Geändert von","ra_Channel → State":"Kanal → Zustand","ra_Check license":"Lizenz prüfen",ra_Checked:Z1,ra_Clear:X1,"ra_Clear filter":"Filter löschen","ra_Clear icon":"Symbol löschen","ra_Click to see in full size":"Klicken Sie hier, um die Vollbildansicht zu öffnen.","ra_Click to show":"Zum Anzeigen klicken","ra_Clone current row":"Aktuelle Zeile klonen",ra_Close:K1,"ra_Collapse all nodes":"Alle Knoten zuklappen","ra_Collapse one step node":"Eine Ebene zuklappen",ra_Commercial:q1,ra_Configure:ez,"ra_Configure visible columns":"Spalten Konfigurieren","ra_Confirm deletion of %s":"Das Löschen von %s bestätigen",ra_Connected:tz,ra_Continue:sz,ra_Copied:iz,"ra_Copied %s":'"%s" kopiert',"ra_Copy content":"Inhalte kopieren",ra_Create:rz,"ra_Create alias":"Alias erstellen","ra_Create folder":"Ordner erstellen","ra_Create new folder in %s":'Neuen Ordner in "%s" erstellen',ra_Crop:oz,"ra_Define CRON...":"Definieren Sie CRON ...","ra_Define functions":"Funktionen definieren","ra_Define rooms":"Räume definieren","ra_Define schedule":"Zeitplan definieren","ra_Define schedule...":"Zeitplan definieren ...",ra_Del:Mz,ra_Delete:nz,"ra_Delete current row":"Aktuelle Zeile löschen","ra_Deselect all":"Alles abwählen","ra_Device → Channel → State":"Gerät → Kanal → Zustand","ra_Disable/Enable translation":"Übersetzung deaktivieren/aktivieren",ra_Discard:az,ra_Disconnected:cz,"ra_Do not ask for next 2 hours in this session":"Fragen Sie nicht nach den nächsten 2 Stunden in dieser Sitzung","ra_Do not export values of states":"Keine Zustandswerte exportieren","ra_Do not use let's encrypt":"Let's encrypt nicht verwenden","ra_Docker is not available":"Docker ist nicht verfügbar","ra_Docker is not installed or not running":"Docker ist nicht installiert oder läuft nicht","ra_Double click to reset table layout":"Doppelklicken, um das Tabellenlayout zurückzusetzen","ra_Drag 'n' drop some files here, or click to select files":"Die Datei hierher ziehen und ablegen, oder klicken, um die Datei auszuwählen","ra_Drop file here":"Datei hier ablegen","ra_Drop the files here...":"Datei hier ablegen...","ra_Duplicate name":"Doppelter Name","ra_Edit ACL":"ACL bearbeiten","ra_Edit alias":"Alias bearbeiten","ra_Edit custom config":"Bearbeite Benutzerdefinierte Konfiguration","ra_Edit full path":"Vollständigen Pfad bearbeiten","ra_Edit function":"Funktion bearbeiten","ra_Edit object field":"Objektfeld bearbeiten","ra_Edit role":"Rolle bearbeiten","ra_Edit room":"Raum bearbeiten","ra_Edit value":"Wert bearbeiten","ra_Enter the code from that page here":"Geben Sie den Code von dieser Seite hier ein",ra_Error:uz,"ra_Expand all nodes":"Alle Knoten aufklappen","ra_Expand one step node":"Eine Ebene aufklappen","ra_Expand/Collapse card":"Karte ein-/ausklappen","ra_Export configuration section":"Konfigurationsabschnitt exportieren","ra_Export data to %s file":"Daten in %s-Datei exportieren","ra_Failed to open JSON File":"Fehler beim Öffnen der JSON-Datei","ra_Fallback custom certificates":"Benutzerdefinierte Fallback-Zertifikate","ra_File is too big. Max %sk allowed. Try use SVG.":"Datei ist zu groß. Max %sk erlaubt. Versuchen Sie, SVG zu verwenden.",ra_Filter:lz,"ra_Filter and Data Actions":"Filter- und Datenaktionen","ra_Filter files":"Dateien filtern","ra_Folder name":"Ordnernamen","ra_Folder → Channel → State":"Ordner → Kanal → Zustand","ra_Folder → Device → Channel → State":"Ordner → Gerät → Kanal → Zustand","ra_Folder → State":"Ordner → Zustand","ra_Folders always first":"Ordner immer zuerst",ra_Friday:Nz,"ra_From file":"Aus der Datei","ra_From text":"Aus dem Text","ra_Get %s access":"%s Zugriff erhalten","ra_Good luck":"Viel Glück","ra_Hide empty folders":"Leere Ordner ausblenden","ra_If no file will be created in the folder, it will disappear after the browser closed":"Wenn im Ordner keine Datei erstellt wird, verschwindet dieser nach dem Schließen des Browsers","ra_If the button above does not work, you can authorize manually this app by visiting this url":"Wenn die Schaltfläche oben nicht funktioniert, können Sie diese App manuell autorisieren, indem Sie diese URL besuchen","ra_Import and add configuration section":"Konfigurationsabschnitt importieren und hinzufügen","ra_Import and replace configuration section":"Konfigurationsabschnitt importieren und ersetzen","ra_Import data from %s file":"Daten aus %s-Datei importieren","ra_Import from %s":"Von %s importieren","ra_Instance %s is alive":"Instanz %s ist aktiv","ra_Instance %s is not alive":"Instanz %s ist nicht aktiv","ra_Instance is not alive":"Instanz ist nicht am Leben","ra_Invalid CRON":"Ungültiger CRON","ra_Invalid JSON":"Ungültiges JSON","ra_Invalid JSON file.":"Ungültige JSON-Datei.","ra_Invalid JSON format. Expected an array.":"Ungültiges JSON-Format. Array erwartet.","ra_Invalid answer from server":"Ungültige Antwort vom Server","ra_Invalid parent folder!":"Ungültiger übergeordneter Ordner!","ra_Invalid structure":"Ungültige Struktur","ra_JSON editor":"JSON-Editor","ra_Last change":"Letzte Änderung",ra_Latitude:Lz,"ra_License %s":"Lizenz %s","ra_License agreement":"Lizenzvereinbarung","ra_License does not exist":"Lizenz existiert nicht","ra_License expired on %s":"Lizenz am %s abgelaufen",'ra_License for other product "%s"':"Lizenz für anderes Produkt „%s“","ra_License is for version %s, but required version is %s.":"Lizenz ist für Version %s, aber erforderliche Version ist %s.","ra_License must be converted":"Die Lizenz muss auf eine neuere Version konvertiert werden. Sie können dies in Ihrem iobroker.net-Profil tun.","ra_License not found in license manager. Do you want to read licenses from iobroker.net?":"Lizenz im Lizenzmanager nicht gefunden. Möchten Sie Lizenzen von iobroker.net aktualisieren?","ra_Listen on all IPs":"Zugriff von allen IPs zulassen","ra_Load configuration from file":"Konfiguration aus Datei laden",ra_Logout:jz,ra_Longitude:gz,'ra_May not trigger "updateLicenses"':"Löst möglicherweise nicht „updateLicenses“ aus",ra_Message:Tz,ra_Monday:yz,"ra_Move down":"Nach unten","ra_Move up":"Nach oben",ra_Name:Dz,"ra_No data found in file":"Keine Daten in der Datei gefunden","ra_No one license found in license manager":"Im Lizenzmanager wurde keine Lizenz gefunden","ra_No response from admin":"Keine Antwort vom Administrator","ra_No response from the backend":"Keine Antwort vom Backend",'ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".':'Nicht-Experten dürfen neue Objekte nur in "0_userdata.0" oder "alias.0" erstellen.',"ra_Not a number":"Keine Nummer","ra_OAuth Client ID":"OAuth-Client-ID","ra_OAuth Client secret":"OAuth-Client-Secret",ra_Objects:dz,ra_Ok:zz,"ra_On weekdays":"An Wochentagen","ra_Only following structures of objects are available:":"Es stehen nur folgende Objektstrukturen zur Verfügung:","ra_Only selected":"Nur ausgewählt","ra_Owner group":"Besitzergruppe","ra_Owner user":"Besitzer Benutzer","ra_Passwords are not equal!":"Passwörter sind nicht gleich!","ra_Place your files here or click here to open the browse dialog":"Die Dateien hier platzieren oder hier klicken, um den Suchdialog zu öffnen","ra_Please allow popups in your browser for this page!":"Bitte lassen Sie Popups für diese Seite in Ihrem Browser zu!","ra_Please confirm":"Bitte bestätigen","ra_Please create license":"Bitte erstellen Sie eine Lizenz","ra_Please enter the license":"Bitte die Lizenz eingeben","ra_Please select file...":"Bitte Datei auswählen...","ra_Please select object ID...":"Bitte Objekt-ID auswählen...","ra_Port could be used by %s":"Port könnte von %s verwendet werden","ra_Port is already used by %s":"Port wird bereits von %s verwendet","ra_Press ENTER Key to add new item":"Die Eingabetaste drücken, um ein neues Element hinzuzufügen","ra_Private certificate":"Privates Zertifikat",ra_Product:hz,"ra_Public certificate":"Öffentliches Zertifikat","ra_Quality code":"Qualität","ra_Refresh tree":"Baum aktualisieren","ra_Reload files":"Dateien neu laden",ra_Rename_Move_Copy:Iz,"ra_Renew %s access":"%s Zugriff erneuern",ra_Repeat:wz,ra_Replace:Cz,"ra_Request timed out":"Zeitüberschreitung der Anforderung","ra_Restrict to folder":"Auf Ordner beschränken",ra_Root:Az,ra_Saturday:mz,ra_Save:pz,"ra_Save and close":"Speichern und schließen","ra_Save configuration to file":"Konfiguration in Datei speichern","ra_Save objects tree as JSON file":"Objektbaum als JSON-Datei speichern","ra_Select all":"Alle auswählen","ra_Select color":"Wähle Farbe","ra_Select predefined icon":"Vordefiniertes Symbol auswählen","ra_Select type of export":"Die Art des Exports auswählen ",ra_Selected:Oz,"ra_Selected %s object(s)":"Ausgewählt %s Objekt(en)","ra_Serial number (UUID)":"Seriennummer (UUID)",'ra_Serial number (UUID) "%s" in license is for other device.':"Seriennummer (UUID) „%s“ in der Lizenz gilt für ein anderes Gerät.","ra_Session will expire in %s seconds. Continue?":"Die Sitzung läuft in %s Sekunden ab. Fortfahren?","ra_Show all folders":"Alle Ordner anzeigen","ra_Show lines between rows":"Linien zwischen Zeilen anzeigen","ra_Show/Hide object descriptions":"Objektbeschreibungen ein-/ausblenden","ra_Show/hide filter input":"Filtereingabe ein-/ausblenden","ra_Some data are not stored. Discard?":"Einige Daten werden nicht gespeichert. Verwerfen?",ra_States:Ez,"ra_Successfully authorized. Token valid till %s and will be automatically renewed.":"Erfolgreich autorisiert. Token gültig bis %s und wird automatisch erneuert.","ra_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":"Erfolgreich autorisiert. Token gültig bis %s, kann aber ablaufen, da die Instanz nicht ausgeführt wird.","ra_Suitable license not found in license manager":"Passende Lizenz im Lizenzmanager nicht gefunden",ra_Sunday:_z,"ra_Suppress question for next %s minutes":"Frage für die nächsten %s Minuten unterdrücken","ra_System language":"Systemsprache","ra_Take browser position":"Position vom Browser einnehmen","ra_Take position from system settings":"Position aus den Systemeinstellungen übernehmen",'ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").':'Die Experten können Objekte überall erstellen, außer auf der zweiten Ebene (z. B. "vis.0" oder "javascript.0").',"ra_The page you are looking for was not found":"Die gesuchte Seite wurde nicht gefunden","ra_The schedule will be executed every minute. Are you sure?":"Der Zeitplan wird jede Minute ausgeführt. Sind Sie sicher?","ra_The schedule will be executed every second. Are you sure?":"Der Zeitplan wird jede Sekunde ausgeführt. Sind Sie sicher?",ra_Thursday:fz,ra_Timestamp:Sz,"ra_Toggle expert mode":"Expertenmodus umschalten","ra_Toggle the states view":"Statusansicht umschalten","ra_Toggle view mode":"Ansichtsmodus umschalten","ra_Too big":"Zu groß","ra_Too small":"Zu klein","ra_Transparent dialog":"Transparenter Dialog",ra_Tuesday:xz,"ra_Unknown error":"Unbekannter Fehler","ra_Unknown error!":"Unbekannter Fehler!",ra_Update:kz,"ra_Upload file":"Datei hochladen","ra_Use all available let's encrypt certificates":"Alle verfügbaren Zertifikate von Let's encrypt benutzen","ra_Use iobroker.acme adapter for letsencrypt certificates":"ioBroker.acme-Adapter für letsencrypt-Zertifikate verwenden","ra_Use system settings for position":"Systemeinstellungen für die Position verwenden","ra_Used system settings":"Systemeinstellungen","ra_User files":"Benutzerdaten",ra_ValidTill:Yz,ra_Value:Qz,ra_Version:vz,"ra_View file":"Datei ansehen","ra_View: %s":"Anschauen: %s",ra_Wednesday:Uz,ra_Width:bz,"ra_YAML editor":"YAML-Editor",ra_Yes:$z,"ra_You can export all objects or just the selected branch.":"Sie können alle Objekte oder nur den ausgewählten Zweig exportieren.","ra_You can filter entries by entering here some text":"Sie können Einträge filtern, indem Sie hier Text eingeben","ra_You can use * as wildcard":"Sie können * als Platzhalter verwenden",ra___different__:Pz,ra_aclEveryone_read_object:Wz,ra_aclEveryone_read_state:Rz,ra_aclEveryone_write_object:Jz,ra_aclEveryone_write_state:Bz,ra_aclGroup_read_object:Gz,ra_aclGroup_read_state:Fz,ra_aclGroup_write_object:Hz,ra_aclGroup_write_state:Vz,ra_aclOwner_read_object:Zz,ra_aclOwner_read_state:Xz,ra_aclOwner_write_object:Kz,ra_aclOwner_write_state:qz,ra_buttons:eh,ra_changedFrom:th,ra_close:sh,ra_create_boolean_state:ih,ra_create_channel:rh,ra_create_device:oh,ra_create_number_state:Mh,ra_create_state:nh,ra_create_string_state:ah,ra_daysShortText:ch,ra_dow_Fr:uh,ra_dow_Mo:lh,ra_dow_Sa:Nh,ra_dow_Su:Lh,ra_dow_Th:jh,ra_dow_Tu:gh,ra_dow_We:Th,ra_expertMode:yh,ra_false:Dh,ra_fileType_all:dh,ra_fileType_audio:zh,ra_fileType_code:hh,ra_fileType_images:Ih,ra_fileType_txt:wh,ra_fileType_video:Ch,"ra_fileType_video,":"Video",ra_filter_customs:Ah,ra_filter_customs_without:mh,ra_filter_func:ph,ra_filter_id:Oh,ra_filter_name:Eh,ra_filter_role:_h,ra_filter_room:fh,ra_filter_type:Sh,"ra_import data from %s file":"Daten aus %s-Datei importieren",ra_invalidConfig:xh,ra_lastChange:kh,ra_locally:Yh,ra_month_Apr:Qh,ra_month_Aug:vh,ra_month_Dec:Uh,ra_month_Feb:bh,ra_month_Jan:$h,ra_month_Jul:Ph,ra_month_Jun:Wh,ra_month_Mai:Rh,ra_month_Mar:Jh,ra_month_Nov:Bh,ra_month_Oct:Gh,ra_month_Sep:Fh,ra_months_Apr:Hh,ra_months_Aug:Vh,ra_months_Dec:Zh,ra_months_Feb:Xh,ra_months_Jan:Kh,ra_months_Jul:qh,ra_months_Jun:eI,ra_months_Mai:tI,ra_months_Mar:sI,ra_months_Nov:iI,ra_months_Oct:rI,ra_months_Sep:oI,"ra_no confirm for 5 mins":"5 Minuten lang keine Bestätigung",ra_none:MI,ra_object_changed_by:nI,ra_object_changed_by_user:aI,ra_otherConfig:cI,ra_qualityCode:uI,ra_repeat:lI,ra_select_folder_hint:NI,ra_show_all:LI,ra_state_changed_by:jI,ra_state_changed_from:gI,ra_timestamp:TI,ra_tooltip_ack:yI,ra_tooltip_comment:DI,ra_tooltip_copyState:dI,ra_tooltip_ctrlForLink:zI,ra_tooltip_customConfig:hI,ra_tooltip_deleteObject:II,ra_tooltip_editObject:wI,ra_tooltip_editState:CI,ra_tooltip_expire:AI,ra_tooltip_from:mI,ra_tooltip_lc:pI,ra_tooltip_quality:OI,ra_tooltip_ts:EI,ra_tooltip_user:_I,ra_tooltip_value:fI,ra_true:SI,"ra_use seconds":"Sekunden benutzen",ra_val:xI,"ra_via internet":"übers Internet",ra_warning_every_minute:kI,ra_warning_every_second:YI,sc_cron:QI,sc_date:vI,sc_dates:UI,sc_dow:bI,sc_dows:$I,sc_every:PI,sc_everyN_dates:WI,sc_everyN_dow:RI,sc_everyN_dows:JI,sc_everyN_hours:BI,sc_everyN_minutes:GI,sc_everyN_months:FI,sc_everyN_seconds:HI,sc_every_dates:VI,sc_every_dow:ZI,sc_every_dows:XI,sc_every_hours:KI,sc_every_minutes:qI,sc_every_months:ew,sc_every_seconds:tw,sc_from:sw,sc_hours:iw,sc_interval:rw,sc_intervalBetween:ow,sc_invalid_cron:Mw,sc_minutes:nw,sc_months:aw,sc_once:cw,sc_period:uw,sc_seconds:lw,sc_simple:Nw,sc_specific:Lw,sc_specific_dates:jw,sc_specific_dow:gw,sc_specific_dows:Tw,sc_specific_hours:yw,sc_specific_minutes:Dw,sc_specific_months:dw,sc_specific_seconds:zw,sc_time:hw,sc_to:Iw,sc_wizard:ww,sch_all:Cw,sch_astroDay:Aw,sch_astroNight:mw,sch_astro_dawn:pw,sch_astro_dusk:Ow,sch_astro_goldenHour:Ew,sch_astro_goldenHourEnd:_w,sch_astro_nadir:fw,sch_astro_nauticalDawn:Sw,sch_astro_nauticalDusk:xw,sch_astro_night:kw,sch_astro_nightEnd:Yw,sch_astro_solarNoon:Qw,sch_astro_sunrise:vw,sch_astro_sunriseEnd:Uw,sch_astro_sunset:bw,sch_astro_sunsetStart:$w,sch_at:Pw,sch_desc_atTime:Ww,sch_desc_everyDay:Rw,sch_desc_everyHour:Jw,sch_desc_everyMinute:Bw,sch_desc_everyMonth:Gw,sch_desc_everyNDay:Fw,sch_desc_everyNHours:Hw,sch_desc_everyNMinutes:Vw,sch_desc_everyNMonths:Zw,sch_desc_everyNWeeks:Xw,sch_desc_everyNYears:Kw,sch_desc_everyWeek:qw,sch_desc_everyYear:e2,sch_desc_intervalFromTo:t2,sch_desc_never:s2,sch_desc_onDate:i2,sch_desc_onDates:r2,sch_desc_onEveryDate:o2,sch_desc_onMonth:M2,sch_desc_onMonths:n2,sch_desc_onWeekday:a2,sch_desc_onWeekdays:c2,sch_desc_onWeekends:u2,sch_desc_onWorkdays:l2,sch_desc_onceInPast:N2,sch_desc_once_on:L2,sch_desc_validFrom:j2,sch_desc_validFromTo:g2,sch_desc_validTo:T2,sch_every:y2,sch_exactTime:D2,sch_from:d2,sch_fromTo:z2,sch_intervalTime:h2,sch_invert:I2,sch_no_one:w2,sch_on:C2,sch_period:A2,sch_periodDaily:m2,sch_periodDates:p2,sch_periodDay:O2,sch_periodEvery:E2,sch_periodEveryDay:_2,sch_periodEveryMonth:f2,sch_periodEveryWeek:S2,sch_periodEveryYear:x2,sch_periodHours:k2,sch_periodMinutes:Y2,sch_periodMonth:Q2,sch_periodMonthly:v2,sch_periodOnce:U2,sch_periodSpecificMonths:b2,sch_periodWeek:$2,sch_periodWeekdays:P2,sch_periodWeekend:W2,sch_periodWeekly:R2,sch_periodWorkdays:J2,sch_periodYear:B2,sch_periodYearly:G2,sch_specificTime:F2,sch_time:H2,sch_to:V2,sch_valid:Z2,sch_validFrom:X2,sch_validTo:K2,sch_wholeDay:q2,sch_yearEveryMonth:eC},sC="Действия",iC="Добавить",rC="Отмена",oC="Категории",MC="Проверено",nC="Удалить",aC="Закрыть",cC="Коммерческая",uC="Настроить",lC="Соединение установлено",NC="Продолжать",LC="скопировано",jC="Создать",gC="Обрезать",TC="Delete",yC="Удалить",DC="Отказаться",dC="Отключено",zC="Ошибка",hC="Фильтр",IC="Пятница",wC="Широта",CC="Выйти",AC="Долгота",mC="Сообщение",pC="Понедельник",OC="Имя",EC="Объекты",_C="Ok",fC="Продукт",SC="Переименовать/Переместить/Копировать",xC="Повторение",kC="Заменять",YC="Начало",QC="Суббота",vC="Сохранить",UC="выбранный",bC="Состояния",$C="Воскресенье",PC="Четверг",WC="Времени",RC="Вторник",JC="Обновить",BC="Годен до",GC="Значение",FC="Версия",HC="Среда",VC="Ширина",ZC="Да",XC="разное",KC="Каждый может читать объект",qC="Каждый может читать состояние",eA="Каждый может написать объект",tA="Каждый может написать состояние",sA="Группа может читать объект",iA="Группа может читать состояние",rA="Группа может писать объект",oA="Группа может записывать состояние",MA="Владелец может читать объект",nA="Владелец может читать состояние",aA="Владелец может писать объект",cA="Владелец может писать состояние",uA="Кнопки",lA="Изменено с",NA="Закрыть",LA="Создать логическое состояние",jA="Создать канал",gA="Создать устройство",TA="Создать состояние номера",yA="Создать состояние",DA="Создать состояние строки",dA="д.",zA="Пт",hA="Пн",IA="Сб",wA="Вс",CA="Чт",AA="Вт",mA="Ср",pA="Экспертный режим",OA="ЛОЖЬ",EA="Все файлы",_A="Аудио",fA="Код/JSON",SA="Картинки",xA="Текст",kA="видео",YA="настройки",QA="без",vA="функция",UA="ID",bA="Имя",$A="роль",PA="комната",WA="Тип",RA="Неверные настройки",JA="Последнее изменение",BA="локально",GA="Апр",FA="Авг",HA="Дек",VA="Фев",ZA="Янв",XA="Июл",KA="Июн",qA="Май",em="Мрт",tm="Ноя",sm="Окт",im="Сен",rm="Апр",om="Авг",Mm="Дек",nm="Фев",am="Янв",cm="Июнь",um="Июль",lm="Май",Nm="Март",Lm="Ноя",jm="Окт",gm="Сен",Tm="ничего",ym="Объект изменен",Dm="Последний раз объект изменен в",dm="Настройки из другого адаптера %s",zm="Код качества",hm="повтор",Im="Чтобы выбрать папку, просто удерживайте клавишу «Shift», щелкнув папку.",wm="Показать все",Cm="Состояние изменено",Am="Объект изменен с",mm="Отметка времени",pm="Подтверждено",Om="Комментарий",Em="Скопируйте значение состояния",_m="Удерживайте клавишу Cltr/⌘, чтобы открыть ссылку",fm="Пользовательские настройки",Sm="Удалить объект",xm="Редактировать объект",km="Изменить значение состояния",Ym="Истекает через",Qm="От",vm="Последнее изменение",Um="Качество",bm="Отметка времени",$m="пользователь",Pm="Значение",Wm="истинный",Rm="Значение",Jm="Внимание: задание CRON будет запускаться каждую минуту в течение указанного периода!",Bm="Внимание: задание CRON будет выполняться каждую секунду в течение указанного периода!",Gm="CRON",Fm="Дата",Hm="Даты",Vm="День",Zm="День недели",Xm="каждый(ую/ые)",Km="каждый N день",qm="каждый N-й день недели",ep="каждый N день недели",tp="каждые N часов",sp="каждые N минут",ip="каждые N месяцев",rp="каждые N секунд",op="каждый день",Mp="Каждый день недели",np="каждый день недели",ap="каждый час",cp="каждую минуту",up="каждый месяц",lp="каждую секунду",Np="От",Lp="часы",jp="Интервал",gp="Интервал между",Tp="Неверный CRON",yp="минуты",Dp="Месяцы",dp="один раз",zp="Период",hp="секунды",Ip="Просто",wp="Конкретное время",Cp="конкретные даты",Ap="конкретный день(а) недели",mp="конкретный день недели",pp="конкретные часы",Op="конкретные минуты",Ep="конкретные месяцы",_p="конкретные секунды",fp="Время",Sp="До",xp="Форма",kp="все",Yp="днём",Qp="ночью",vp="Рассвет",Up="Сумерки",bp="Золотой час",$p="Конец золотого часа",Pp="Надир",Wp="Морской рассвет",Rp="Морские сумерки",Jp="Ночь",Bp="Конец ночи",Gp="Солнечный полдень",Fp="Восход",Hp="Восход солнца",Vp="Заход солнца",Zp="Начало заката",Xp="дата",Kp="в %s",qp="каждый день",e3="каждый час",t3="каждую минуту",s3="каждый месяц",i3="каждый %s день",r3="каждый %s часов",o3="каждые %s минут",M3="каждые %s месяцев",n3="каждые %s недель",a3="каждые %s лет",c3="каждую неделю",u3="каждый год",l3="от %s до %s",N3="никогда",L3="%s %s",j3="%s и %s",g3="в каждый день",T3="%s",y3="%s и %s",D3="%s",d3="%s и %s",z3="на выходных",h3="в рабочие дни",I3="не будет больше выполняться, потому что начало в прошлом",w3="%s",C3="%s",A3="Выполнить с",m3="%s",p3="каждый",O3="Конкретное время",E3="от",_3="От и до",f3="Интервал времени",S3="инвертировать",x3="никакой",k3="на",Y3="период",Q3="Ежедневно",v3="Даты",U3="День",b3="каждый",$3="Каждый день",P3="Каждый месяц",W3="Каждую неделю",R3="Каждый год",J3="часов",B3="минут",G3="месяц",F3="ежемесячно",H3="однажды",V3="Конкретные месяцы",Z3="Неделю",X3="Будние дни",K3="выходные",q3="еженедельно",eO="Рабочие дни",tO="Год",sO="каждый год",iO="Конкретное время",rO="Время",oO="в",MO="действительный",nO="от",aO="в",cO="Весь день",uO="каждый месяц",lO={"ra_%s links from aliases":"%s ссылок из псевдонимов","ra_%s object(s) processed":"Объектов обработано: %s","ra_%s was imported":"%s был импортирован","ra_Accept license":"Принять лицензию",ra_Actions:sC,"ra_Add new child object to selected parent":"Добавить новый дочерний объект к выбранному родительскому объекту","ra_Add objects tree from JSON file":"Добавить дерево объектов из файла JSON","ra_Add row":"Добавить ряд","ra_Advanced options":"Расширенные настройки","ra_All items are filtered out":"Все элементы отфильтрованы","ra_All objects":"Все объекты",ra_Append:iC,"ra_Append %s entries or replace existing?":"Добавить записи %s или заменить существующие?","ra_Append or replace?":"Дополнить или заменить?","ra_Are you sure?":"Вы уверены?","ra_Auto (no custom columns)":"Авто (без настраиваемых столбцов)","ra_Back to %s":"Вернуться к %s","ra_Background image":"Фоновая картинка",ra_Cancel:rC,"ra_Cannot add items with set filter":"Невозможно добавить элементы с установленным фильтром","ra_Cannot decode license":"Не могу декодировать лицензию","ra_Cannot determine position: System settings are empty and GPS detection is disabled in browser":"Невозможно определить местоположение: системные настройки пусты, а обнаружение GPS отключено в браузере.",'ra_Cannot find "%s"':'Не могу найти "%s"','ra_Cannot read "%s"':'Не могу прочитать "%s"',"ra_Cannot read licenses: %s":"Невозможно прочитать лицензии: %s","ra_Cannot retrieve options, as instance is offline":"Невозможно получить параметры, так как экземпляр находится в автономном режиме.","ra_Cannot update attribute, because not found in the object":"Невозможно обновить атрибут, потому что он не найден в объекте","ra_Cannot upload":"Невозможно загрузить",ra_Categories:oC,"ra_Chained certificate":"Chained сертификат","ra_Change color theme":"Изменить цветовую тему","ra_Changed from":"Изменено","ra_Channel → State":"Канал → Состояние","ra_Check license":"Проверить лицензию",ra_Checked:MC,ra_Clear:nC,"ra_Clear filter":"Очистить фильтр","ra_Clear icon":"Очистить значок","ra_Click to see in full size":"Нажмите, чтобы посмотреть в полном размере","ra_Click to show":"Нажмите, чтобы показать","ra_Clone current row":"Клонировать текущую строку",ra_Close:aC,"ra_Collapse all nodes":"Свернуть все узлы","ra_Collapse one step node":"Свернуть один уровень",ra_Commercial:cC,ra_Configure:uC,"ra_Configure visible columns":"Настроить видимые столбцы","ra_Confirm deletion of %s":"Подтвердите удаление %s",ra_Connected:lC,ra_Continue:NC,ra_Copied:LC,"ra_Copied %s":'Скопировано "%s"',"ra_Copy content":"Копировать содержимое",ra_Create:jC,"ra_Create alias":"Создать псевдоним","ra_Create folder":"Создать папку","ra_Create new folder in %s":"Создать новую папку в %s",ra_Crop:gC,"ra_Define CRON...":"Определите CRON...","ra_Define functions":"Задать функции","ra_Define rooms":"Задать комнаты","ra_Define schedule":"Задать расписание","ra_Define schedule...":"Определить расписание ...",ra_Del:TC,ra_Delete:yC,"ra_Delete current row":"Удалить текущую строку","ra_Deselect all":"Убрать выбор везде","ra_Device → Channel → State":"Устройство → Канал → Состояние","ra_Disable/Enable translation":"Включить/отключить перевод",ra_Discard:DC,ra_Disconnected:dC,"ra_Do not ask for next 2 hours in this session":"Не спрашивайте о следующих 2 часах в этом сеансе","ra_Do not export values of states":"Не экспортировать значения состояний","ra_Do not use let's encrypt":"Не использовать Let’s Encrypt","ra_Docker is not available":"Докер недоступен","ra_Docker is not installed or not running":"Docker не установлен или не запущен","ra_Double click to reset table layout":"Дважды щелкните, чтобы сбросить макет таблицы","ra_Drag 'n' drop some files here, or click to select files":"Перетащите сюда несколько файлов или щелкните, чтобы выбрать файлы","ra_Drop file here":"Перетащите файл сюда","ra_Drop the files here...":"Перетащите файл сюда ...","ra_Duplicate name":"Повторяющееся имя","ra_Edit ACL":"Изменить ACL-список","ra_Edit alias":"Изменить псевдоним","ra_Edit custom config":"Редактировать настраиваемую конфигурацию","ra_Edit full path":"Изменить полный путь","ra_Edit function":"Изменить функцию","ra_Edit object field":"Поле редактирования объекта","ra_Edit role":"Изменить роль","ra_Edit room":"Редактировать комнату","ra_Edit value":"Изменить значение","ra_Enter the code from that page here":"Введите код с этой страницы здесь",ra_Error:zC,"ra_Expand all nodes":"Развернуть все узлы","ra_Expand one step node":"Открыть один уровень","ra_Expand/Collapse card":"Развернуть/Свернуть карточку","ra_Export configuration section":"Раздел конфигурации экспорта","ra_Export data to %s file":"Экспорт данных в файл %s","ra_Failed to open JSON File":"Не удалось открыть файл JSON","ra_Fallback custom certificates":"Резервные пользовательские сертификаты","ra_File is too big. Max %sk allowed. Try use SVG.":"Файл слишком большой. Разрешено максимальное количество %sk. Попробуйте использовать SVG.",ra_Filter:hC,"ra_Filter and Data Actions":"Фильтрация и действия с данными","ra_Filter files":"Фильтровать файлы","ra_Folder name":"Имя папки","ra_Folder → Channel → State":"Папка → Канал → Состояние","ra_Folder → Device → Channel → State":"Папка → Устройство → Канал → Состояние","ra_Folder → State":"Папка → Состояние","ra_Folders always first":"Папки всегда на первом месте",ra_Friday:IC,"ra_From file":"Из файла","ra_From text":"Из текста","ra_Get %s access":"Получить %s доступ","ra_Good luck":"Удачи","ra_Hide empty folders":"Скрыть пустые папки","ra_If no file will be created in the folder, it will disappear after the browser closed":"Если в папке не будет создан файл, он исчезнет после закрытия браузера.","ra_If the button above does not work, you can authorize manually this app by visiting this url":"Если кнопка выше не работает, вы можете вручную авторизовать это приложение, перейдя по этой ссылке.","ra_Import and add configuration section":"Импорт и добавление раздела конфигурации","ra_Import and replace configuration section":"Импорт и замена раздела конфигурации","ra_Import data from %s file":"Импорт данных из файла %s","ra_Import from %s":"Импорт из %s","ra_Instance %s is alive":"Экземпляр %s работает","ra_Instance %s is not alive":"Экземпляр %s не работает","ra_Instance is not alive":"Экземпляр не живой","ra_Invalid CRON":"Неверный CRON","ra_Invalid JSON":"Неверный JSON","ra_Invalid JSON file.":"Неверный файл JSON.","ra_Invalid JSON format. Expected an array.":"Недопустимый формат JSON. Ожидается массив.","ra_Invalid answer from server":"Неверный ответ от сервера","ra_Invalid parent folder!":"Неверная родительская папка!","ra_Invalid structure":"Неверная структура","ra_JSON editor":"Редактор JSON","ra_Last change":"Последнее изменение",ra_Latitude:wC,"ra_License %s":"Лицензия %s","ra_License agreement":"Лицензионное соглашение","ra_License does not exist":"Лицензия не существует","ra_License expired on %s":"Срок действия лицензии истек %s",'ra_License for other product "%s"':'Лицензия на другой продукт "%s"',"ra_License is for version %s, but required version is %s.":"Лицензия предназначена для версии %s, но необходима версия %s.","ra_License must be converted":"Лицензия должна быть преобразована в более новую версию. Вы можете сделать это в своем профиле на iobroker.net.","ra_License not found in license manager. Do you want to read licenses from iobroker.net?":"Лицензия не найдена в диспетчере лицензий. Вы хотите обновить лицензии от iobroker.net?","ra_Listen on all IPs":"Слушать на всех IP","ra_Load configuration from file":"Загрузить конфигурацию из файла",ra_Logout:CC,ra_Longitude:AC,'ra_May not trigger "updateLicenses"':"Не может запускать «updateLicenses»",ra_Message:mC,ra_Monday:pC,"ra_Move down":"Вниз","ra_Move up":"Вверх",ra_Name:OC,"ra_No data found in file":"Данные в файле не найдены","ra_No one license found in license manager":"В менеджере лицензий не найдена ни одна лицензия","ra_No response from admin":"Нет ответа от администратора","ra_No response from the backend":"Нет ответа от бэкэнда",'ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".':"Не-эксперты могут создавать новые объекты только в «0_userdata.0» или «alias.0».","ra_Not a number":"Не число","ra_OAuth Client ID":"Идентификатор клиента OAuth","ra_OAuth Client secret":"Секрет клиента OAuth",ra_Objects:EC,ra_Ok:_C,"ra_On weekdays":"На выходных","ra_Only following structures of objects are available:":"Доступны только следующие структуры объектов:","ra_Only selected":"Только выбранные","ra_Owner group":"Группа владельцев","ra_Owner user":"Пользователь-владелец","ra_Passwords are not equal!":"Пароли не равны!","ra_Place your files here or click here to open the browse dialog":"Поместите свои файлы сюда или щелкните здесь, чтобы открыть диалоговое окно выбора","ra_Please allow popups in your browser for this page!":"Пожалуйста, разрешите всплывающие окна в вашем браузере для этой страницы!","ra_Please confirm":"Пожалуйста подтвердите","ra_Please create license":"Пожалуйста, создайте лицензию","ra_Please enter the license":"Пожалуйста, введите лицензию","ra_Please select file...":"Пожалуйста, выберите файл...","ra_Please select object ID...":"Пожалуйста, выберите идентификатор объекта ...","ra_Port could be used by %s":"Порт может использоваться %s","ra_Port is already used by %s":"Порт уже используется %s","ra_Press ENTER Key to add new item":"Нажмите клавишу ENTER, чтобы добавить новый элемент.","ra_Private certificate":"Частный сертификат",ra_Product:fC,"ra_Public certificate":"Публичный сертификат","ra_Quality code":"Валидность","ra_Refresh tree":"Обновить дерево","ra_Reload files":"Обновить",ra_Rename_Move_Copy:SC,"ra_Renew %s access":"Продлить доступ %s",ra_Repeat:xC,ra_Replace:kC,"ra_Request timed out":"Истекло время запроса","ra_Restrict to folder":"Ограничить папкой",ra_Root:YC,ra_Saturday:QC,ra_Save:vC,"ra_Save and close":"Сохранить и закрыть","ra_Save configuration to file":"Сохранить конфигурацию в файл","ra_Save objects tree as JSON file":"Сохранить дерево объектов как файл JSON","ra_Select all":"Выбрать все","ra_Select color":"Выберите цвет","ra_Select predefined icon":"Выберите предопределенный значок","ra_Select type of export":"Выберите тип экспорта",ra_Selected:UC,"ra_Selected %s object(s)":"Объектов: %s","ra_Serial number (UUID)":"Серийный номер (UUID)",'ra_Serial number (UUID) "%s" in license is for other device.':"Серийный номер (UUID) «%s» в лицензии предназначен для другого устройства.","ra_Session will expire in %s seconds. Continue?":"Сессия истечет через %s секунд. Продолжить?","ra_Show all folders":"Показать все папки","ra_Show lines between rows":"Показать линии между строками","ra_Show/Hide object descriptions":"Показать/скрыть описания объектов","ra_Show/hide filter input":"Показать/скрыть ввод фильтра","ra_Some data are not stored. Discard?":"Некоторые данные не сохранились. Отказаться?",ra_States:bC,"ra_Successfully authorized. Token valid till %s and will be automatically renewed.":"Авторизация выполнена успешно. Токен действителен до %s и будет автоматически продлен.","ra_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":"Авторизация выполнена успешно. Токен действителен до %s, но его срок действия может истечь, так как экземпляр не запущен.","ra_Suitable license not found in license manager":"Подходящая лицензия не найдена в менеджере лицензий",ra_Sunday:$C,"ra_Suppress question for next %s minutes":"Скрыть вопрос на следующие %s минут(ы)","ra_System language":"Язык системы","ra_Take browser position":"Взять позицию из браузера","ra_Take position from system settings":"Занять позицию из системных настроек",'ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").':"Эксперты могут создавать объекты везде, кроме второго уровня (например, «vis.0» или «javascript.0»).","ra_The page you are looking for was not found":"Страница, которую вы ищете, не найдена","ra_The schedule will be executed every minute. Are you sure?":"Расписание будет выполняться каждую минуту. Вы уверены?","ra_The schedule will be executed every second. Are you sure?":"Расписание будет выполняться каждую секунду. Вы уверены?",ra_Thursday:PC,ra_Timestamp:WC,"ra_Toggle expert mode":"Переключить экспертный режим","ra_Toggle the states view":"Переключить режим просмотра состояний","ra_Toggle view mode":"Переключить режим просмотра","ra_Too big":"Слишком большое","ra_Too small":"Слишком маленькое","ra_Transparent dialog":"Прозрачный диалог",ra_Tuesday:RC,"ra_Unknown error":"Неизвестная ошибка","ra_Unknown error!":"Неизвестная ошибка!",ra_Update:JC,"ra_Upload file":"Загрузить файл","ra_Use all available let's encrypt certificates":"Использовать все доступные сертификаты Let’s encrypt","ra_Use iobroker.acme adapter for letsencrypt certificates":"Используйте адаптер iobroker.acme для сертификатов letsencrypt","ra_Use system settings for position":"Использовать системные настройки для позиции","ra_Used system settings":"Системные настройки","ra_User files":"Файлы пользователя",ra_ValidTill:BC,ra_Value:GC,ra_Version:FC,"ra_View file":"Посмотреть файл","ra_View: %s":"Просмотр: %s",ra_Wednesday:HC,ra_Width:VC,"ra_YAML editor":"Редактор YAML",ra_Yes:ZC,"ra_You can export all objects or just the selected branch.":"Вы можете экспортировать все объекты или только выбранную ветвь.","ra_You can filter entries by entering here some text":"Вы можете отфильтровать записи, введя здесь текст","ra_You can use * as wildcard":"Вы можете использовать * в качестве подстановочного знака",ra___different__:XC,ra_aclEveryone_read_object:KC,ra_aclEveryone_read_state:qC,ra_aclEveryone_write_object:eA,ra_aclEveryone_write_state:tA,ra_aclGroup_read_object:sA,ra_aclGroup_read_state:iA,ra_aclGroup_write_object:rA,ra_aclGroup_write_state:oA,ra_aclOwner_read_object:MA,ra_aclOwner_read_state:nA,ra_aclOwner_write_object:aA,ra_aclOwner_write_state:cA,ra_buttons:uA,ra_changedFrom:lA,ra_close:NA,ra_create_boolean_state:LA,ra_create_channel:jA,ra_create_device:gA,ra_create_number_state:TA,ra_create_state:yA,ra_create_string_state:DA,ra_daysShortText:dA,ra_dow_Fr:zA,ra_dow_Mo:hA,ra_dow_Sa:IA,ra_dow_Su:wA,ra_dow_Th:CA,ra_dow_Tu:AA,ra_dow_We:mA,ra_expertMode:pA,ra_false:OA,ra_fileType_all:EA,ra_fileType_audio:_A,ra_fileType_code:fA,ra_fileType_images:SA,ra_fileType_txt:xA,ra_fileType_video:kA,"ra_fileType_video,":"видео",ra_filter_customs:YA,ra_filter_customs_without:QA,ra_filter_func:vA,ra_filter_id:UA,ra_filter_name:bA,ra_filter_role:$A,ra_filter_room:PA,ra_filter_type:WA,"ra_import data from %s file":"Импортировать данные из файла %s",ra_invalidConfig:RA,ra_lastChange:JA,ra_locally:BA,ra_month_Apr:GA,ra_month_Aug:FA,ra_month_Dec:HA,ra_month_Feb:VA,ra_month_Jan:ZA,ra_month_Jul:XA,ra_month_Jun:KA,ra_month_Mai:qA,ra_month_Mar:em,ra_month_Nov:tm,ra_month_Oct:sm,ra_month_Sep:im,ra_months_Apr:rm,ra_months_Aug:om,ra_months_Dec:Mm,ra_months_Feb:nm,ra_months_Jan:am,ra_months_Jul:cm,ra_months_Jun:um,ra_months_Mai:lm,ra_months_Mar:Nm,ra_months_Nov:Lm,ra_months_Oct:jm,ra_months_Sep:gm,"ra_no confirm for 5 mins":"не спрашивать подтверждения в течение 5 минут",ra_none:Tm,ra_object_changed_by:ym,ra_object_changed_by_user:Dm,ra_otherConfig:dm,ra_qualityCode:zm,ra_repeat:hm,ra_select_folder_hint:Im,ra_show_all:wm,ra_state_changed_by:Cm,ra_state_changed_from:Am,ra_timestamp:mm,ra_tooltip_ack:pm,ra_tooltip_comment:Om,ra_tooltip_copyState:Em,ra_tooltip_ctrlForLink:_m,ra_tooltip_customConfig:fm,ra_tooltip_deleteObject:Sm,ra_tooltip_editObject:xm,ra_tooltip_editState:km,ra_tooltip_expire:Ym,ra_tooltip_from:Qm,ra_tooltip_lc:vm,ra_tooltip_quality:Um,ra_tooltip_ts:bm,ra_tooltip_user:$m,ra_tooltip_value:Pm,ra_true:Wm,"ra_use seconds":"секунды",ra_val:Rm,"ra_via internet":"через интернет",ra_warning_every_minute:Jm,ra_warning_every_second:Bm,sc_cron:Gm,sc_date:Fm,sc_dates:Hm,sc_dow:Vm,sc_dows:Zm,sc_every:Xm,sc_everyN_dates:Km,sc_everyN_dow:qm,sc_everyN_dows:ep,sc_everyN_hours:tp,sc_everyN_minutes:sp,sc_everyN_months:ip,sc_everyN_seconds:rp,sc_every_dates:op,sc_every_dow:Mp,sc_every_dows:np,sc_every_hours:ap,sc_every_minutes:cp,sc_every_months:up,sc_every_seconds:lp,sc_from:Np,sc_hours:Lp,sc_interval:jp,sc_intervalBetween:gp,sc_invalid_cron:Tp,sc_minutes:yp,sc_months:Dp,sc_once:dp,sc_period:zp,sc_seconds:hp,sc_simple:Ip,sc_specific:wp,sc_specific_dates:Cp,sc_specific_dow:Ap,sc_specific_dows:mp,sc_specific_hours:pp,sc_specific_minutes:Op,sc_specific_months:Ep,sc_specific_seconds:_p,sc_time:fp,sc_to:Sp,sc_wizard:xp,sch_all:kp,sch_astroDay:Yp,sch_astroNight:Qp,sch_astro_dawn:vp,sch_astro_dusk:Up,sch_astro_goldenHour:bp,sch_astro_goldenHourEnd:$p,sch_astro_nadir:Pp,sch_astro_nauticalDawn:Wp,sch_astro_nauticalDusk:Rp,sch_astro_night:Jp,sch_astro_nightEnd:Bp,sch_astro_solarNoon:Gp,sch_astro_sunrise:Fp,sch_astro_sunriseEnd:Hp,sch_astro_sunset:Vp,sch_astro_sunsetStart:Zp,sch_at:Xp,sch_desc_atTime:Kp,sch_desc_everyDay:qp,sch_desc_everyHour:e3,sch_desc_everyMinute:t3,sch_desc_everyMonth:s3,sch_desc_everyNDay:i3,sch_desc_everyNHours:r3,sch_desc_everyNMinutes:o3,sch_desc_everyNMonths:M3,sch_desc_everyNWeeks:n3,sch_desc_everyNYears:a3,sch_desc_everyWeek:c3,sch_desc_everyYear:u3,sch_desc_intervalFromTo:l3,sch_desc_never:N3,sch_desc_onDate:L3,sch_desc_onDates:j3,sch_desc_onEveryDate:g3,sch_desc_onMonth:T3,sch_desc_onMonths:y3,sch_desc_onWeekday:D3,sch_desc_onWeekdays:d3,sch_desc_onWeekends:z3,sch_desc_onWorkdays:h3,sch_desc_onceInPast:I3,sch_desc_once_on:w3,sch_desc_validFrom:C3,sch_desc_validFromTo:A3,sch_desc_validTo:m3,sch_every:p3,sch_exactTime:O3,sch_from:E3,sch_fromTo:_3,sch_intervalTime:f3,sch_invert:S3,sch_no_one:x3,sch_on:k3,sch_period:Y3,sch_periodDaily:Q3,sch_periodDates:v3,sch_periodDay:U3,sch_periodEvery:b3,sch_periodEveryDay:$3,sch_periodEveryMonth:P3,sch_periodEveryWeek:W3,sch_periodEveryYear:R3,sch_periodHours:J3,sch_periodMinutes:B3,sch_periodMonth:G3,sch_periodMonthly:F3,sch_periodOnce:H3,sch_periodSpecificMonths:V3,sch_periodWeek:Z3,sch_periodWeekdays:X3,sch_periodWeekend:K3,sch_periodWeekly:q3,sch_periodWorkdays:eO,sch_periodYear:tO,sch_periodYearly:sO,sch_specificTime:iO,sch_time:rO,sch_to:oO,sch_valid:MO,sch_validFrom:nO,sch_validTo:aO,sch_wholeDay:cO,sch_yearEveryMonth:uO},NO="Ações",LO="Acrescentar",jO="Cancelar",gO="Categorias",TO="Verificado",yO="Excluir",DO="Perto",dO="Comercial",zO="Configurar",hO="Conectado",IO="Continuar",wO="Copiado",CO="Crio",AO="Colheita",mO="Delete",pO="Excluir",OO="Descartar",EO="Desconectado",_O="Erro",fO="Filtro",SO="Sexta-feira",xO="Latitude",kO="Sair",YO="Longitude",QO="mensagem",vO="Segunda-feira",UO="Nome",bO="Objetos",$O="Está bem",PO="produtos",WO="Renomear/Mover/Copiar",RO="Repita",JO="Substituir",BO="Raiz",GO="Sábado",FO="Salve ",HO="Selecionado",VO="Estados",ZO="Domingo",XO="Quinta-feira",KO="Timestamp",qO="Terça-feira",eE="Atualizar",tE="Válida até",sE="Valor",iE="Versão",rE="Quarta-feira",oE="Largura",ME="Sim",nE="diferente",aE="Todos podem ler objetos",cE="Todos podem ler o estado",uE="Todos podem escrever objetos",lE="Todos podem escrever o estado",NE="O grupo pode ler o objeto",LE="O grupo pode ler o estado",jE="O grupo pode escrever o objeto",gE="O grupo pode escrever o estado",TE="O proprietário pode ler o objeto",yE="O proprietário pode ler o estado",DE="O proprietário pode escrever o objeto",dE="O proprietário pode escrever o estado",zE="Botões",hE="Mudou de",IE="fechar",wE="Criar estado booleano",CE="Criar canal",AE="Criar dispositivo",mE="Criar estado numérico",pE="Criar estado",OE="Criar estado de string",EE="d.",_E="Fr",fE="Mo",SE="Sa",xE="Su",kE="º",YE="Tu",QE="Nós",vE="Modo especialista",UE="FALSO",bE="Todos os arquivos",$E="áudio",PE="Código/JSON",WE="Imagens",RE="Texto",JE="Vídeo",BE="Configurações",GE="sem",FE="Função",HE="ID",VE="Nome",ZE="Papel (Função)",XE="Quarto",KE="Tipo",qE="Configurações inválidas",e_="Última mudança",t_="localmente",s_="abril",i_="agosto",r_="dezembro",o_="fevereiro",M_="janeiro",n_="julho",a_="junho",c_="Mai",u_="março",l_="novembro",N_="outubro",L_="setembro",j_="abril",g_="agosto",T_="dezembro",y_="fevereiro",D_="janeiro",d_="julho",z_="junho",h_="Mai",I_="março",w_="novembro",C_="outubro",A_="setembro",m_="Nenhum",p_="Objeto alterado por",O_="Objeto alterado pela última vez em",E_="Configurações de outro adaptador %s",__="Código de qualidade",f_="repetir",S_='Para selecionar a pasta, basta segurar a tecla "shift" clicando na pasta.',x_="Mostrar tudo",k_="Estado alterado por",Y_="Objeto alterado de",Q_="Timestamp",v_="Confirmado",U_="Comente",b_="Copie o valor do estado",$_="Segure a tecla Ctrl/⌘ para abrir o link",P_="Opções customizadas",W_="Excluir objeto",R_="Editar objeto",J_="Edite o valor do estado",B_="Expira em",G_="De",F_="Última alteração",H_="Qualidade",V_="Timestamp",Z_="Usuário",X_="Valor",K_="verdadeiro",q_="Valor",ef="Aviso: O trabalho CRON será executado a cada minuto durante o período especificado!",tf="Aviso: O trabalho CRON será executado a cada segundo durante o período especificado!",sf="CRON",rf="Data",of="Dias",Mf="Dia",nf="Dia da semana",af="todos",cf="a cada N dias",uf="todo enésimo dia da semana",lf="todos os N dias da semana",Nf="a cada N horas",Lf="a cada N minutos",jf="a cada N meses",gf="a cada N segundos",Tf="todo dia",yf="todos os dias da semana",Df="todos os dias da semana",df="toda hora",zf="todo minuto",hf="todo mês",If="todo segundo",wf="de",Cf="horas",Af="intervalo",mf="intervalo entre",pf="CRON inválido",Of="minutos",Ef="meses",_f="uma vez",ff="período",Sf="segundos",xf="simples",kf="tempo específico",Yf="datas específicas",Qf="dia(s) específico(s) da semana",vf="dia específico de semanas",Uf="horas específicas",bf="minutos específicos",$f="meses específicos",Pf="segundos específicos",Wf="tempo",Rf="para",Jf="assistente",Bf="tudo",Gf="dia astral",Ff="noite astral",Hf="amanhecer",Vf="anoitecer",Zf="hora dourada",Xf="Fim da hora dourada",Kf="nadir",qf="Amanhecer náutico",eS="Anoitecer náutico",tS="noite",sS="fim da noite",iS="meio-dia solar",rS="nascer do sol",oS="fim do nascer do sol",MS="pôr do sol",nS="início do pôr do sol",aS="às",cS="em %s",uS="todo dia",lS="toda hora",NS="todo minuto",LS="todo mês",jS="a cada %s dias",gS="a cada %s horas",TS="a cada %s minutos",yS="a cada %s meses",DS="a cada %s semanas",dS="a cada %s anos",zS="toda semana",hS="todo ano",IS="de %s para %s",wS="nunca",CS="em %s de %s",AS="em %s e %s de",mS="em toda data de",pS="%s",OS="%s e %s",ES="em %s",_S="em %s e %s",fS="nos fins de semana",SS="em dias úteis",xS="não será mais executado, porque o começo está no passado",kS="em %s",YS="de %s",QS="Executar de até",vS="até %s",US="cada",bS="tempo específico",$S="de",PS="de a´t",WS="tempo de intervalo",RS="invertido",JS="nenhum",BS="em",GS="período",FS="diariamente",HS="datas",VS="dia",ZS="todos",XS="todo dia",KS="todo mês",qS="toda semana",ex="todo ano",tx="horas",sx="minutos",ix="mês",rx="por mês",ox="uma vez",Mx="meses específicos",nx="semana",ax="dias úteis",cx="final de semana",ux="semanal",lx="dias úteis",Nx="ano",Lx="anual",jx="tempo específico",gx="tempo",Tx="para",yx="válido",Dx="de",dx="para",zx="dia inteiro",hx="todo mês",Ix={"ra_%s links from aliases":"%s links de aliases","ra_%s object(s) processed":"%s objeto(s) processado(s)","ra_%s was imported":"%s foi importado","ra_Accept license":"Aceitar licença",ra_Actions:NO,"ra_Add new child object to selected parent":"Adicionar novo objeto filho ao pai selecionado","ra_Add objects tree from JSON file":"Adicionar árvore de objetos do arquivo JSON","ra_Add row":"Adicionar linha","ra_Advanced options":"Opções avançadas","ra_All items are filtered out":"Todos os itens são filtrados","ra_All objects":"Todos os objetos",ra_Append:LO,"ra_Append %s entries or replace existing?":"Acrescentar %s entradas ou substituir as existentes?","ra_Append or replace?":"Acrescentar ou substituir?","ra_Are you sure?":"Você tem certeza?","ra_Auto (no custom columns)":"Auto (sem colunas personalizadas)","ra_Back to %s":"Voltar para %s","ra_Background image":"Imagem de fundo",ra_Cancel:jO,"ra_Cannot add items with set filter":"Não é possível adicionar itens com filtro definido","ra_Cannot decode license":"Não é possível decodificar a licença","ra_Cannot determine position: System settings are empty and GPS detection is disabled in browser":"Não é possível determinar a posição: as configurações do sistema estão vazias e a detecção de GPS está desativada no navegador",'ra_Cannot find "%s"':'Não foi possível encontrar "%s"','ra_Cannot read "%s"':'Não é possível ler "%s"',"ra_Cannot read licenses: %s":"Não é possível ler licenças: %s","ra_Cannot retrieve options, as instance is offline":"Não é possível recuperar opções, pois a instância está off-line","ra_Cannot update attribute, because not found in the object":"Não é possível atualizar o atributo, porque não foi encontrado no objeto","ra_Cannot upload":"Não é possível fazer upload",ra_Categories:gO,"ra_Chained certificate":"certificado encadeado","ra_Change color theme":"Alterar tema de cores","ra_Changed from":"Mudou de","ra_Channel → State":"Canal → Estado","ra_Check license":"Verifique a licença",ra_Checked:TO,ra_Clear:yO,"ra_Clear filter":"Filtro limpo","ra_Clear icon":"Ícone de limpeza","ra_Click to see in full size":"Clique para ver em tamanho real.","ra_Click to show":"Clique para mostrar","ra_Clone current row":"Clonar linha atual",ra_Close:DO,"ra_Collapse all nodes":"Recolher todos os nós","ra_Collapse one step node":"Recolher um nível",ra_Commercial:dO,ra_Configure:zO,"ra_Configure visible columns":"Configurar colunas visíveis","ra_Confirm deletion of %s":"Confirme a exclusão de %s",ra_Connected:hO,ra_Continue:IO,ra_Copied:wO,"ra_Copied %s":'"%s" copiado',"ra_Copy content":"Copiar conteúdo",ra_Create:CO,"ra_Create alias":"Criar alias","ra_Create folder":"Criar pasta","ra_Create new folder in %s":"Crie uma nova pasta em %s",ra_Crop:AO,"ra_Define CRON...":"Defina CRON...","ra_Define functions":"Definir funções","ra_Define rooms":"Definir quartos","ra_Define schedule":"Definir cronograma","ra_Define schedule...":"Definir programação ...",ra_Del:mO,ra_Delete:pO,"ra_Delete current row":"Excluir linha atual","ra_Deselect all":"Desmarque todos","ra_Device → Channel → State":"Dispositivo → Canal → Estado","ra_Disable/Enable translation":"Desativar/Ativar tradução",ra_Discard:OO,ra_Disconnected:EO,"ra_Do not ask for next 2 hours in this session":"Não peça as próximas 2 horas nesta sessão","ra_Do not export values of states":"Não exporte valores de estados","ra_Do not use let's encrypt":"Não use vamos criptografar","ra_Docker is not available":"O Docker não está disponível","ra_Docker is not installed or not running":"O Docker não está instalado ou não está em execução","ra_Double click to reset table layout":"Clique duas vezes para redefinir o layout da tabela","ra_Drag 'n' drop some files here, or click to select files":"Arraste e solte alguns arquivos aqui ou clique para selecionar arquivos","ra_Drop file here":"Solte o arquivo aqui","ra_Drop the files here...":"Solte o arquivo aqui ...","ra_Duplicate name":"Nome duplicado","ra_Edit ACL":"Editar ACL","ra_Edit alias":"Editar alias","ra_Edit custom config":"Editar configuração personalizada","ra_Edit full path":"Editar caminho completo","ra_Edit function":"Função de edição","ra_Edit object field":"Editar campo de objeto","ra_Edit role":"Editar papel","ra_Edit room":"Sala de edição","ra_Edit value":"Editar valor","ra_Enter the code from that page here":"Digite o código dessa página aqui",ra_Error:_O,"ra_Expand all nodes":"Expanda todos os nós","ra_Expand one step node":"Expanda um nível","ra_Expand/Collapse card":"Expandir/Recolher cartão","ra_Export configuration section":"Seção de configuração de exportação","ra_Export data to %s file":"Exportar dados para o arquivo %s","ra_Failed to open JSON File":"Falha ao abrir arquivo JSON","ra_Fallback custom certificates":"Certificados personalizados alternativos","ra_File is too big. Max %sk allowed. Try use SVG.":"O arquivo é muito grande. Max %sk permitido. Tente usar SVG.",ra_Filter:fO,"ra_Filter and Data Actions":"Ações de filtro e dados","ra_Filter files":"Filtrar arquivos","ra_Folder name":"Nome da pasta","ra_Folder → Channel → State":"Pasta → Canal → Estado","ra_Folder → Device → Channel → State":"Pasta → Dispositivo → Canal → Estado","ra_Folder → State":"Pasta → Estado","ra_Folders always first":"Pastas sempre primeiro",ra_Friday:SO,"ra_From file":"Do arquivo","ra_From text":"Do texto","ra_Get %s access":"Obtenha acesso %s","ra_Good luck":"Boa sorte","ra_Hide empty folders":"Esconder pastas vazias","ra_If no file will be created in the folder, it will disappear after the browser closed":"Se nenhum arquivo for criado na pasta, ele desaparecerá depois que o navegador for fechado","ra_If the button above does not work, you can authorize manually this app by visiting this url":"Se o botão acima não funcionar, você pode autorizar manualmente este aplicativo visitando esta url","ra_Import and add configuration section":"Seção de importação e adição de configuração","ra_Import and replace configuration section":"Seção de configuração de importação e substituição","ra_Import data from %s file":"Importar dados do arquivo %s","ra_Import from %s":"Importar de %s","ra_Instance %s is alive":"O %s da instância está ativo","ra_Instance %s is not alive":"O %s da instância não está ativo","ra_Instance is not alive":"A instância não está ativa","ra_Invalid CRON":"CRON inválido","ra_Invalid JSON":"JSON inválido","ra_Invalid JSON file.":"Arquivo JSON inválido.","ra_Invalid JSON format. Expected an array.":"Formato JSON inválido. Esperava-se uma matriz.","ra_Invalid answer from server":"Resposta inválida do servidor","ra_Invalid parent folder!":"Pasta pai inválida!","ra_Invalid structure":"Estrutura inválida","ra_JSON editor":"Editor JSON","ra_Last change":"Última mudança",ra_Latitude:xO,"ra_License %s":"Licença %s","ra_License agreement":"Contrato de licença","ra_License does not exist":"A licença não existe","ra_License expired on %s":"A licença expirou em %s",'ra_License for other product "%s"':'Licença para outro produto "%s"',"ra_License is for version %s, but required version is %s.":"A licença é para a versão %s, mas a versão necessária é %s.","ra_License must be converted":"A licença deve ser convertida para uma versão mais recente. Você pode fazê-lo em seu perfil iobroker.net.","ra_License not found in license manager. Do you want to read licenses from iobroker.net?":"Licença não encontrada no gerenciador de licenças. Deseja atualizar as licenças do iobroker.net?","ra_Listen on all IPs":"Ouça em todos os IPs","ra_Load configuration from file":"Carregar configuração do arquivo",ra_Logout:kO,ra_Longitude:YO,'ra_May not trigger "updateLicenses"':'Pode não acionar "updateLicenses"',ra_Message:QO,ra_Monday:vO,"ra_Move down":"Mover para baixo","ra_Move up":"Subir",ra_Name:UO,"ra_No data found in file":"Nenhum dado encontrado no arquivo","ra_No one license found in license manager":"Nenhuma licença encontrada no gerenciador de licenças","ra_No response from admin":"Nenhuma resposta do administrador","ra_No response from the backend":"Nenhuma resposta do backend",'ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".':'Os não especialistas podem criar novos objetos apenas em "0_userdata.0" ou "alias.0".',"ra_Not a number":"Não é um número","ra_OAuth Client ID":"ID do cliente OAuth","ra_OAuth Client secret":"Segredo do cliente OAuth",ra_Objects:bO,ra_Ok:$O,"ra_On weekdays":"Nos dias úteis","ra_Only following structures of objects are available:":"Apenas as seguintes estruturas de objetos estão disponíveis:","ra_Only selected":"Apenas selecionado","ra_Owner group":"Grupo proprietário","ra_Owner user":"Usuário proprietário","ra_Passwords are not equal!":"As senhas não são iguais!","ra_Place your files here or click here to open the browse dialog":"Coloque seus arquivos aqui ou clique aqui para abrir a janela de navegação","ra_Please allow popups in your browser for this page!":"Por favor, permita pop-ups no seu navegador para esta página!","ra_Please confirm":"Por favor confirme","ra_Please create license":"Crie uma licença","ra_Please enter the license":"Por favor, insira a licença","ra_Please select file...":"Selecione o arquivo...","ra_Please select object ID...":"Selecione o ID do objeto ...","ra_Port could be used by %s":"A porta pode ser usada por %s","ra_Port is already used by %s":"A porta já está sendo usada por %s","ra_Press ENTER Key to add new item":"Pressione a tecla ENTER para adicionar um novo item","ra_Private certificate":"certificado privado",ra_Product:PO,"ra_Public certificate":"certificado público","ra_Quality code":"Qualidade","ra_Refresh tree":"Atualizar árvore","ra_Reload files":"Recarregar arquivos",ra_Rename_Move_Copy:WO,"ra_Renew %s access":"Renovar acesso %s",ra_Repeat:RO,ra_Replace:JO,"ra_Request timed out":"Solicitação expirou","ra_Restrict to folder":"Restringir à pasta",ra_Root:BO,ra_Saturday:GO,ra_Save:FO,"ra_Save and close":"Salvar e fechar","ra_Save configuration to file":"Salvar configuração em arquivo","ra_Save objects tree as JSON file":"Salvar árvore de objetos como arquivo JSON","ra_Select all":"Selecionar tudo","ra_Select color":"Selecione a cor","ra_Select predefined icon":"Selecione o ícone predefinido","ra_Select type of export":"Selecione o tipo de exportação",ra_Selected:HO,"ra_Selected %s object(s)":"%s objeto(s) selecionado(s)","ra_Serial number (UUID)":"Número de série (UUID)",'ra_Serial number (UUID) "%s" in license is for other device.':'O número de série (UUID) "%s" na licença é para outro dispositivo.',"ra_Session will expire in %s seconds. Continue?":"A sessão irá expirar em %s segundos. Continuar?","ra_Show all folders":"Mostrar todas as pastas","ra_Show lines between rows":"Mostrar linhas entre as linhas","ra_Show/Hide object descriptions":"Mostrar/ocultar descrições de objetos","ra_Show/hide filter input":"Mostrar/ocultar entrada de filtro","ra_Some data are not stored. Discard?":"Alguns dados não são armazenados. Descartar?",ra_States:VO,"ra_Successfully authorized. Token valid till %s and will be automatically renewed.":"Autorizado com sucesso. Token válido até %s e será renovado automaticamente.","ra_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":"Autorizado com sucesso. Token válido até %s, mas pode expirar, pois a instância não está em execução.","ra_Suitable license not found in license manager":"Licença adequada não encontrada no gerenciador de licenças",ra_Sunday:ZO,"ra_Suppress question for next %s minutes":"Suprimir pergunta nos próximos %s minutos","ra_System language":"Idioma do sistema","ra_Take browser position":"Tomar posição do navegador","ra_Take position from system settings":"Tomar posição a partir das configurações do sistema",'ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").':'Os especialistas podem criar objetos em qualquer lugar, exceto no segundo nível (por exemplo, "vis.0" ou "javascript.0").',"ra_The page you are looking for was not found":"A página que você está procurando não foi encontrada","ra_The schedule will be executed every minute. Are you sure?":"O agendamento será executado a cada minuto. Tem certeza?","ra_The schedule will be executed every second. Are you sure?":"O agendamento será executado a cada segundo. Tem certeza?",ra_Thursday:XO,ra_Timestamp:KO,"ra_Toggle expert mode":"Alternar modo especialista","ra_Toggle the states view":"Alternar a visualização dos estados","ra_Toggle view mode":"Alternar modo de visualização","ra_Too big":"Muito grande","ra_Too small":"Muito pequeno","ra_Transparent dialog":"Diálogo transparente",ra_Tuesday:qO,"ra_Unknown error":"Erro desconhecido","ra_Unknown error!":"Erro desconhecido!",ra_Update:eE,"ra_Upload file":"Subir arquivo","ra_Use all available let's encrypt certificates":"Use todos os certificados disponíveis vamos criptografar","ra_Use iobroker.acme adapter for letsencrypt certificates":"Use o adaptador iobroker.acme para certificados letsencrypt","ra_Use system settings for position":"Use as configurações do sistema para a posição","ra_Used system settings":"Configurações do sistema usadas","ra_User files":"Arquivos do usuário",ra_ValidTill:tE,ra_Value:sE,ra_Version:iE,"ra_View file":"Visualizar arquivo","ra_View: %s":"Visualizar: %s",ra_Wednesday:rE,ra_Width:oE,"ra_YAML editor":"Editor YAML",ra_Yes:ME,"ra_You can export all objects or just the selected branch.":"Você pode exportar todos os objetos ou apenas a ramificação selecionada.","ra_You can filter entries by entering here some text":"Você pode filtrar as entradas digitando aqui algum texto","ra_You can use * as wildcard":"Você pode usar * como curinga",ra___different__:nE,ra_aclEveryone_read_object:aE,ra_aclEveryone_read_state:cE,ra_aclEveryone_write_object:uE,ra_aclEveryone_write_state:lE,ra_aclGroup_read_object:NE,ra_aclGroup_read_state:LE,ra_aclGroup_write_object:jE,ra_aclGroup_write_state:gE,ra_aclOwner_read_object:TE,ra_aclOwner_read_state:yE,ra_aclOwner_write_object:DE,ra_aclOwner_write_state:dE,ra_buttons:zE,ra_changedFrom:hE,ra_close:IE,ra_create_boolean_state:wE,ra_create_channel:CE,ra_create_device:AE,ra_create_number_state:mE,ra_create_state:pE,ra_create_string_state:OE,ra_daysShortText:EE,ra_dow_Fr:_E,ra_dow_Mo:fE,ra_dow_Sa:SE,ra_dow_Su:xE,ra_dow_Th:kE,ra_dow_Tu:YE,ra_dow_We:QE,ra_expertMode:vE,ra_false:UE,ra_fileType_all:bE,ra_fileType_audio:$E,ra_fileType_code:PE,ra_fileType_images:WE,ra_fileType_txt:RE,ra_fileType_video:JE,"ra_fileType_video,":"Vídeo",ra_filter_customs:BE,ra_filter_customs_without:GE,ra_filter_func:FE,ra_filter_id:HE,ra_filter_name:VE,ra_filter_role:ZE,ra_filter_room:XE,ra_filter_type:KE,"ra_import data from %s file":"Importar dados do arquivo %s",ra_invalidConfig:qE,ra_lastChange:e_,ra_locally:t_,ra_month_Apr:s_,ra_month_Aug:i_,ra_month_Dec:r_,ra_month_Feb:o_,ra_month_Jan:M_,ra_month_Jul:n_,ra_month_Jun:a_,ra_month_Mai:c_,ra_month_Mar:u_,ra_month_Nov:l_,ra_month_Oct:N_,ra_month_Sep:L_,ra_months_Apr:j_,ra_months_Aug:g_,ra_months_Dec:T_,ra_months_Feb:y_,ra_months_Jan:D_,ra_months_Jul:d_,ra_months_Jun:z_,ra_months_Mai:h_,ra_months_Mar:I_,ra_months_Nov:w_,ra_months_Oct:C_,ra_months_Sep:A_,"ra_no confirm for 5 mins":"sem confirmação por 5 minutos",ra_none:m_,ra_object_changed_by:p_,ra_object_changed_by_user:O_,ra_otherConfig:E_,ra_qualityCode:__,ra_repeat:f_,ra_select_folder_hint:S_,ra_show_all:x_,ra_state_changed_by:k_,ra_state_changed_from:Y_,ra_timestamp:Q_,ra_tooltip_ack:v_,ra_tooltip_comment:U_,ra_tooltip_copyState:b_,ra_tooltip_ctrlForLink:$_,ra_tooltip_customConfig:P_,ra_tooltip_deleteObject:W_,ra_tooltip_editObject:R_,ra_tooltip_editState:J_,ra_tooltip_expire:B_,ra_tooltip_from:G_,ra_tooltip_lc:F_,ra_tooltip_quality:H_,ra_tooltip_ts:V_,ra_tooltip_user:Z_,ra_tooltip_value:X_,ra_true:K_,"ra_use seconds":"use segundos",ra_val:q_,"ra_via internet":"via internet",ra_warning_every_minute:ef,ra_warning_every_second:tf,sc_cron:sf,sc_date:rf,sc_dates:of,sc_dow:Mf,sc_dows:nf,sc_every:af,sc_everyN_dates:cf,sc_everyN_dow:uf,sc_everyN_dows:lf,sc_everyN_hours:Nf,sc_everyN_minutes:Lf,sc_everyN_months:jf,sc_everyN_seconds:gf,sc_every_dates:Tf,sc_every_dow:yf,sc_every_dows:Df,sc_every_hours:df,sc_every_minutes:zf,sc_every_months:hf,sc_every_seconds:If,sc_from:wf,sc_hours:Cf,sc_interval:Af,sc_intervalBetween:mf,sc_invalid_cron:pf,sc_minutes:Of,sc_months:Ef,sc_once:_f,sc_period:ff,sc_seconds:Sf,sc_simple:xf,sc_specific:kf,sc_specific_dates:Yf,sc_specific_dow:Qf,sc_specific_dows:vf,sc_specific_hours:Uf,sc_specific_minutes:bf,sc_specific_months:$f,sc_specific_seconds:Pf,sc_time:Wf,sc_to:Rf,sc_wizard:Jf,sch_all:Bf,sch_astroDay:Gf,sch_astroNight:Ff,sch_astro_dawn:Hf,sch_astro_dusk:Vf,sch_astro_goldenHour:Zf,sch_astro_goldenHourEnd:Xf,sch_astro_nadir:Kf,sch_astro_nauticalDawn:qf,sch_astro_nauticalDusk:eS,sch_astro_night:tS,sch_astro_nightEnd:sS,sch_astro_solarNoon:iS,sch_astro_sunrise:rS,sch_astro_sunriseEnd:oS,sch_astro_sunset:MS,sch_astro_sunsetStart:nS,sch_at:aS,sch_desc_atTime:cS,sch_desc_everyDay:uS,sch_desc_everyHour:lS,sch_desc_everyMinute:NS,sch_desc_everyMonth:LS,sch_desc_everyNDay:jS,sch_desc_everyNHours:gS,sch_desc_everyNMinutes:TS,sch_desc_everyNMonths:yS,sch_desc_everyNWeeks:DS,sch_desc_everyNYears:dS,sch_desc_everyWeek:zS,sch_desc_everyYear:hS,sch_desc_intervalFromTo:IS,sch_desc_never:wS,sch_desc_onDate:CS,sch_desc_onDates:AS,sch_desc_onEveryDate:mS,sch_desc_onMonth:pS,sch_desc_onMonths:OS,sch_desc_onWeekday:ES,sch_desc_onWeekdays:_S,sch_desc_onWeekends:fS,sch_desc_onWorkdays:SS,sch_desc_onceInPast:xS,sch_desc_once_on:kS,sch_desc_validFrom:YS,sch_desc_validFromTo:QS,sch_desc_validTo:vS,sch_every:US,sch_exactTime:bS,sch_from:$S,sch_fromTo:PS,sch_intervalTime:WS,sch_invert:RS,sch_no_one:JS,sch_on:BS,sch_period:GS,sch_periodDaily:FS,sch_periodDates:HS,sch_periodDay:VS,sch_periodEvery:ZS,sch_periodEveryDay:XS,sch_periodEveryMonth:KS,sch_periodEveryWeek:qS,sch_periodEveryYear:ex,sch_periodHours:tx,sch_periodMinutes:sx,sch_periodMonth:ix,sch_periodMonthly:rx,sch_periodOnce:ox,sch_periodSpecificMonths:Mx,sch_periodWeek:nx,sch_periodWeekdays:ax,sch_periodWeekend:cx,sch_periodWeekly:ux,sch_periodWorkdays:lx,sch_periodYear:Nx,sch_periodYearly:Lx,sch_specificTime:jx,sch_time:gx,sch_to:Tx,sch_valid:yx,sch_validFrom:Dx,sch_validTo:dx,sch_wholeDay:zx,sch_yearEveryMonth:hx},wx="Acties",Cx="toevoegen",Ax="Annuleer",mx="Categorieën",px="Gecontroleerd",Ox="Verwijderen",Ex="Dichtbij",_x="Reclame",fx="Configureren",Sx="Verbonden",xx="Doorgaan",kx="Gekopieerd",Yx="Creëer",Qx="Bijsnijden",vx="Delete",Ux="Verwijderen",bx="Weggooien",$x="Verbinding verbroken",Px="Fout",Wx="Filter",Rx="Vrijdag",Jx="Breedtegraad",Bx="Uitloggen",Gx="Lengtegraad",Fx="Bericht",Hx="Maandag",Vx="Naam",Zx="Voorwerpen",Xx="OK",Kx="Product",qx="Hernoemen/Verplaatsen/Kopiëren",e5="Herhaling",t5="Vervangen",s5="Wortel",i5="Zaterdag",r5="Sparen",o5="Geselecteerd",M5="Staten",n5="Zondag",a5="Donderdag",c5="Tijdstempel",u5="Dinsdag",l5="Bijwerken",N5="Geldig tot",L5="Waarde",j5="Versie",g5="Woensdag",T5="Breedte",y5="Ja",D5="verschillend",d5="Iedereen kan object lezen",z5="Iedereen kan staat lezen",h5="Iedereen kan object schrijven",I5="Iedereen kan staat schrijven",w5="Groep kan object lezen",C5="Groep kan status lezen",A5="Groep kan object schrijven",m5="Groep kan staat schrijven",p5="Eigenaar kan object lezen",O5="Eigenaar kan staat lezen",E5="Eigenaar kan object schrijven",_5="Eigenaar kan staat schrijven",f5="Toetsen",S5="Veranderd van",x5="dichtbij",k5="Creëer een Booleaanse status",Y5="Kanaal maken",Q5="Apparaat maken",v5="Nummerstatus maken",U5="Staat creëren",b5="Tekenreeksstatus maken",$5="d.",P5="Fr",W5="Mo",R5="Za",J5="Zo",B5="Th",G5="Tu",F5="Wij",H5="Expert modus",V5="ONWAAR",Z5="Alle bestanden",X5="Audio",K5="Code/JSON",q5="Afbeeldingen",ek="Tekst",tk="Video",sk="Instellingen",ik="zonder",rk="Functie",ok="ID",Mk="Naam",nk="Rol",ak="Kamer",ck="Type",uk="Ongeldige instellingen",lk="Laatste wijziging",Nk="plaatselijk",Lk="april",jk="aug",gk="dec",Tk="februari",yk="jan",Dk="jul",dk="juni",zk="Mei",hk="mrt",Ik="nov",wk="Okt",Ck="sept",Ak="april",mk="aug",pk="dec",Ok="februari",Ek="jan",_k="jul",fk="juni",Sk="Mei",xk="mrt",kk="nov",Yk="Okt",Qk="sept",vk="geen",Uk="Object veranderd door",bk="Object voor het laatst gewijzigd om",$k="Instellingen van andere adapter %s",Pk="Kwaliteitscode",Wk="herhalen",Rk='Om een map te selecteren, houdt u gewoon de toets "shift" ingedrukt door op de map te klikken.',Jk="Alles weergeven",Bk="Staat veranderd door",Gk="Object veranderd van",Fk="Tijdstempel",Hk="Erkende vlag",Vk="Opmerking",Zk="Kopieer de statuswaarde",Xk="Houd de Cltr/⌘-toets ingedrukt om de link te openen",Kk="Aangepaste instellingen",qk="Object verwijderen",eY="Object bewerken",tY="Bewerk de statuswaarde",sY="Verloopt over",iY="Van",rY="Laatst gewijzigd",oY="Kwaliteit",MY="Tijdstempel",nY="Gebruiker",aY="Waarde",cY="WAAR",uY="Waarde",lY="Waarschuwing: De CRON-taak wordt elke minuut uitgevoerd gedurende de opgegeven periode!",NY="Waarschuwing: De CRON-taak wordt elke seconde uitgevoerd gedurende de opgegeven periode!",LY="CRON",jY="Datum",gY="data",TY="Dag",yY="Dag van de week",DY="elk",dY="elke N dagen",zY="elke N-de dag van de week",hY="elke N dag van de week",IY="elke N uur",wY="elke N minuten",CY="elke N maanden",AY="elke N seconden",mY="elke dag",pY="elke dag van de week",OY="elke dag van de week",EY="elk uur",_Y="elke minuut",fY="elke maand",SY="elke seconde",xY="Van",kY="uren",YY="Interval",QY="Interval tussen",vY="Ongeldige CRON",UY="Notulen",bY="maanden",$Y="Een keer",PY="Periode",WY="seconden",RY="Gemakkelijk",JY="Specifieke tijd",BY="specifieke data",GY="specifieke dag(en) van de week",FY="specifieke dag van weken",HY="specifieke uren",VY="specifieke minuten",ZY="specifieke maanden",XY="specifieke seconden",KY="Tijd",qY="Naar",eQ="tovenaar",tQ="allemaal",sQ="Astro-dag",iQ="Astro-nacht",rQ="Dageraad",oQ="Schemer",MQ="gouden uur",nQ="Gouden uur einde",aQ="Nadir",cQ="Nautische dageraad",uQ="Nautische schemering",lQ="Nacht",NQ="Nacht einde",LQ="Zonne middag",jQ="zonsopkomst",gQ="Sunrise einde",TQ="Zonsondergang",yQ="Zonsondergang start",DQ="Bij",dQ="op %s",zQ="elke dag",hQ="elk uur",IQ="elke minuut",wQ="elke maand",CQ="elke %s dag",AQ="elke %s uur",mQ="elke %s minuten",pQ="elke %s maanden",OQ="elke %s weken",EQ="elke %s jaar",_Q="elke week",fQ="elk jaar",SQ="van %s tot %s",xQ="nooit",kQ="op %s van %s",YQ="op %s en %s van",QQ="op elke datum van",vQ="%s",UQ="%s en %s",bQ="op %s",$Q="op %s en %s",PQ="in het weekend",WQ="op werkdagen",RQ="zal niet meer worden uitgevoerd, omdat start verleden tijd is",JQ="op %s",BQ="van %s",GQ="Uitvoeren van tot",FQ="tot %s",HQ="elk",VQ="Specifieke tijd",ZQ="van",XQ="Van naar",KQ="Interval tijd",qQ="omkeren",ev="geen",tv="Aan",sv="Periode",iv="Dagelijks",rv="data",ov="Dag",Mv="elk",nv="Elke dag",av="Elke maand",cv="Elke week",uv="Elk jaar",lv="uren",Nv="Notulen",Lv="maand",jv="Maandelijks",gv="Een keer",Tv="Specifieke maanden",yv="Week",Dv="Doordeweekse dagen",dv="Weekend",zv="Wekelijks",hv="werkdagen",Iv="Jaar",wv="jaar-",Cv="Specifieke tijd",Av="Tijd",mv="naar",pv="Geldig",Ov="van",Ev="naar",_v="Hele dag",fv="elke maand",Sv={"ra_%s links from aliases":"%s links van aliassen","ra_%s object(s) processed":"%s object(en) verwerkt","ra_%s was imported":"%s is geïmporteerd","ra_Accept license":"Accepteer licentie",ra_Actions:wx,"ra_Add new child object to selected parent":"Voeg een nieuw kindobject toe aan het geselecteerde bovenliggende object","ra_Add objects tree from JSON file":"Objectenboom toevoegen vanuit JSON-bestand","ra_Add row":"Voeg een rij toe","ra_Advanced options":"Geavanceerde mogelijkheden","ra_All items are filtered out":"Alle items zijn uitgefilterd","ra_All objects":"Alle objecten",ra_Append:Cx,"ra_Append %s entries or replace existing?":"%s ingangen toevoegen of bestaande vervangen?","ra_Append or replace?":"Toevoegen of vervangen?","ra_Are you sure?":"Weet je het zeker?","ra_Auto (no custom columns)":"Auto (geen aangepaste kolommen)","ra_Back to %s":"Terug naar %s","ra_Background image":"Achtergrond afbeelding",ra_Cancel:Ax,"ra_Cannot add items with set filter":"Kan geen items toevoegen met ingestelde filter","ra_Cannot decode license":"Kan licentie niet decoderen","ra_Cannot determine position: System settings are empty and GPS detection is disabled in browser":"Kan positie niet bepalen: systeeminstellingen zijn leeg en GPS-detectie is uitgeschakeld in browser",'ra_Cannot find "%s"':'Kan "%s" niet vinden','ra_Cannot read "%s"':'Kan "%s" niet lezen',"ra_Cannot read licenses: %s":"Kan licenties niet lezen: %s","ra_Cannot retrieve options, as instance is offline":"Kan opties niet ophalen, omdat instantie offline is","ra_Cannot update attribute, because not found in the object":"Kan kenmerk niet bijwerken, omdat het niet in het object is gevonden","ra_Cannot upload":"Kan niet uploaden",ra_Categories:mx,"ra_Chained certificate":"Geketend certificaat","ra_Change color theme":"Kleurthema wijzigen","ra_Changed from":"Veranderd van","ra_Channel → State":"Kanaal → Staat","ra_Check license":"Licentie controleren",ra_Checked:px,ra_Clear:Ox,"ra_Clear filter":"Filter wissen","ra_Clear icon":"Pictogram wissen","ra_Click to see in full size":"Klik om de afbeelding op volledige grootte te bekijken.","ra_Click to show":"Klik om te tonen","ra_Clone current row":"Kloon de huidige rij",ra_Close:Ex,"ra_Collapse all nodes":"Vouw alle knooppunten samen","ra_Collapse one step node":"Eén niveau samenvouwen",ra_Commercial:_x,ra_Configure:fx,"ra_Configure visible columns":"Configureer zichtbare kolommen","ra_Confirm deletion of %s":"Bevestig het verwijderen van %s",ra_Connected:Sx,ra_Continue:xx,ra_Copied:kx,"ra_Copied %s":'"%s" gekopieerd',"ra_Copy content":"Inhoud kopiëren",ra_Create:Yx,"ra_Create alias":"Alias maken","ra_Create folder":"Map aanmaken","ra_Create new folder in %s":"Maak een nieuwe map in %s",ra_Crop:Qx,"ra_Define CRON...":"Definieer CRON...","ra_Define functions":"Definieer functies","ra_Define rooms":"Definieer kamers","ra_Define schedule":"Definieer schema","ra_Define schedule...":"Schema definiëren ...",ra_Del:vx,ra_Delete:Ux,"ra_Delete current row":"Huidige rij verwijderen","ra_Deselect all":"Deselecteer alles","ra_Device → Channel → State":"Apparaat → Kanaal → Staat","ra_Disable/Enable translation":"Vertaling uitschakelen/inschakelen",ra_Discard:bx,ra_Disconnected:$x,"ra_Do not ask for next 2 hours in this session":"Vraag niet om de volgende 2 uur in deze sessie","ra_Do not export values of states":"Exporteer geen waarden van staten","ra_Do not use let's encrypt":"Gebruik geen let's encrypt","ra_Docker is not available":"Docker is niet beschikbaar","ra_Docker is not installed or not running":"Docker is niet geïnstalleerd of draait niet","ra_Double click to reset table layout":"Dubbelklik om de tafelindeling te resetten","ra_Drag 'n' drop some files here, or click to select files":"Sleep enkele bestanden hierheen, of klik om bestanden te selecteren","ra_Drop file here":"Zet het bestand hier neer","ra_Drop the files here...":"Zet het bestand hier neer...","ra_Duplicate name":"Dubbele naam","ra_Edit ACL":"ACL bewerken","ra_Edit alias":"Alias bewerken","ra_Edit custom config":"Bewerk aangepaste config","ra_Edit full path":"Volledig pad bewerken","ra_Edit function":"Bewerkingsfunctie","ra_Edit object field":"Bewerk objectveld","ra_Edit role":"Rol bewerken","ra_Edit room":"Kamer bewerken","ra_Edit value":"Waarde bewerken","ra_Enter the code from that page here":"Voer hier de code van die pagina in",ra_Error:Px,"ra_Expand all nodes":"Vouw alle knooppunten uit","ra_Expand one step node":"Vouw een niveau uit","ra_Expand/Collapse card":"Kaart uit-/inklappen","ra_Export configuration section":"Sectie Exportconfiguratie","ra_Export data to %s file":"Exporteer gegevens naar %s bestand","ra_Failed to open JSON File":"JSON-bestand kan niet worden geopend","ra_Fallback custom certificates":"Fallback aangepaste certificaten","ra_File is too big. Max %sk allowed. Try use SVG.":"Bestand is te groot. Max. %sk toegestaan. Probeer SVG te gebruiken.",ra_Filter:Wx,"ra_Filter and Data Actions":"Filter- en gegevensacties","ra_Filter files":"Bestanden filteren","ra_Folder name":"Naam van de map","ra_Folder → Channel → State":"Map → Kanaal → Staat","ra_Folder → Device → Channel → State":"Map → Apparaat → Kanaal → Staat","ra_Folder → State":"Map → Staat","ra_Folders always first":"Mappen altijd eerst",ra_Friday:Rx,"ra_From file":"Van bestand","ra_From text":"Van tekst","ra_Get %s access":"Krijg %s toegang","ra_Good luck":"Veel geluk","ra_Hide empty folders":"Verberg lege mappen","ra_If no file will be created in the folder, it will disappear after the browser closed":"Als er geen bestand in de map wordt gemaakt, verdwijnt het nadat de browser is gesloten","ra_If the button above does not work, you can authorize manually this app by visiting this url":"Als de bovenstaande knop niet werkt, kunt u deze app handmatig autoriseren door deze url te bezoeken","ra_Import and add configuration section":"Configuratiesectie importeren en toevoegen","ra_Import and replace configuration section":"Configuratiesectie importeren en vervangen","ra_Import data from %s file":"Importeer gegevens uit %s bestand","ra_Import from %s":"Importeren uit %s","ra_Instance %s is alive":"Instantie %s leeft","ra_Instance %s is not alive":"Instantie %s is niet actief","ra_Instance is not alive":"Instantie leeft niet","ra_Invalid CRON":"Ongeldige CRON","ra_Invalid JSON":"Ongeldige JSON","ra_Invalid JSON file.":"Ongeldig JSON-bestand.","ra_Invalid JSON format. Expected an array.":"Ongeldige JSON-indeling. Er werd een array verwacht.","ra_Invalid answer from server":"Ongeldig antwoord van de server","ra_Invalid parent folder!":"Ongeldige bovenliggende map!","ra_Invalid structure":"Ongeldige structuur","ra_JSON editor":"JSON-editor","ra_Last change":"Laatste wijziging",ra_Latitude:Jx,"ra_License %s":"Licentie %s","ra_License agreement":"Licentieovereenkomst","ra_License does not exist":"Licentie bestaat niet","ra_License expired on %s":"Licentie verlopen op %s",'ra_License for other product "%s"':'Licentie voor ander product "%s"',"ra_License is for version %s, but required version is %s.":"Licentie is voor versie %s, maar vereiste versie is %s.","ra_License must be converted":"Licentie moet worden omgezet naar nieuwere versie. U kunt dit doen in uw iobroker.net-profiel.","ra_License not found in license manager. Do you want to read licenses from iobroker.net?":"Licentie niet gevonden in licentiebeheer. Wilt u licenties van iobroker.net bijwerken?","ra_Listen on all IPs":"Luister op alle IP's","ra_Load configuration from file":"Laad configuratie uit bestand",ra_Logout:Bx,ra_Longitude:Gx,'ra_May not trigger "updateLicenses"':'Activeert mogelijk niet "updateLicenses"',ra_Message:Fx,ra_Monday:Hx,"ra_Move down":"Naar beneden verplaatsen","ra_Move up":"Omhoog gaan",ra_Name:Vx,"ra_No data found in file":"Geen gegevens gevonden in bestand","ra_No one license found in license manager":"Geen enkele licentie gevonden in licentiebeheer","ra_No response from admin":"Geen reactie van de beheerder","ra_No response from the backend":"Geen reactie van de backend",'ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".':'Niet-experts mogen alleen nieuwe objecten maken in "0_userdata.0" of "alias.0".',"ra_Not a number":"Geen nummer","ra_OAuth Client ID":"OAuth-client-ID","ra_OAuth Client secret":"OAuth-clientgeheim",ra_Objects:Zx,ra_Ok:Xx,"ra_On weekdays":"Op weekdagen","ra_Only following structures of objects are available:":"Alleen de volgende structuren van objecten zijn beschikbaar:","ra_Only selected":"Alleen geselecteerd","ra_Owner group":"Eigenaarsgroep","ra_Owner user":"Eigenaar gebruiker","ra_Passwords are not equal!":"Wachtwoorden zijn niet gelijk!","ra_Place your files here or click here to open the browse dialog":"Plaats uw bestanden hier of klik hier om het bladervenster te openen","ra_Please allow popups in your browser for this page!":"Sta pop-ups toe in uw browser voor deze pagina!","ra_Please confirm":"Bevestig alstublieft","ra_Please create license":"Maak een licentie aan","ra_Please enter the license":"Voer de licentie in","ra_Please select file...":"Selecteer bestand...","ra_Please select object ID...":"Selecteer object-ID ...","ra_Port could be used by %s":"Poort kan worden gebruikt door %s","ra_Port is already used by %s":"Poort wordt al gebruikt door %s","ra_Press ENTER Key to add new item":"Druk op de ENTER-toets om een nieuw item toe te voegen","ra_Private certificate":"Privé certificaat",ra_Product:Kx,"ra_Public certificate":"Openbaar certificaat","ra_Quality code":"Kwaliteit","ra_Refresh tree":"Vernieuw de boom","ra_Reload files":"Laad bestanden opnieuw",ra_Rename_Move_Copy:qx,"ra_Renew %s access":"%s toegang verlengen",ra_Repeat:e5,ra_Replace:t5,"ra_Request timed out":"Verzoek verlopen","ra_Restrict to folder":"Beperken tot map",ra_Root:s5,ra_Saturday:i5,ra_Save:r5,"ra_Save and close":"Opslaan en afsluiten","ra_Save configuration to file":"Sla de configuratie op in een bestand","ra_Save objects tree as JSON file":"Sla de objectenboom op als JSON-bestand","ra_Select all":"Selecteer alles","ra_Select color":"Selecteer kleur","ra_Select predefined icon":"Selecteer voorgedefinieerd pictogram","ra_Select type of export":"Selecteer het type export",ra_Selected:o5,"ra_Selected %s object(s)":"Geselecteerde %s object(en)","ra_Serial number (UUID)":"Serienummer (UUID)",'ra_Serial number (UUID) "%s" in license is for other device.':'Serienummer (UUID) "%s" in licentie is voor ander apparaat.',"ra_Session will expire in %s seconds. Continue?":"Sessie verloopt over %s seconden. Doorgaan?","ra_Show all folders":"Toon alle mappen","ra_Show lines between rows":"Toon lijnen tussen rijen","ra_Show/Hide object descriptions":"Toon/verberg objectbeschrijvingen","ra_Show/hide filter input":"Filterinvoer weergeven/verbergen","ra_Some data are not stored. Discard?":"Sommige gegevens worden niet opgeslagen. Weggooien?",ra_States:M5,"ra_Successfully authorized. Token valid till %s and will be automatically renewed.":"Succesvol geautoriseerd. Token geldig tot %s en wordt automatisch verlengd.","ra_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":"Succesvol geautoriseerd. Token geldig tot %s, maar kan verlopen omdat de instantie niet actief is.","ra_Suitable license not found in license manager":"Geschikte licentie niet gevonden in licentiebeheer",ra_Sunday:n5,"ra_Suppress question for next %s minutes":"Vraag de volgende %s minuten onderdrukken","ra_System language":"Systeemtaal","ra_Take browser position":"Positie innemen vanuit de browser","ra_Take position from system settings":"Neem positie over van systeeminstellingen",'ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").':'De experts kunnen overal objecten maken, behalve vanaf het tweede niveau (bijv. "Vis.0" of "javascript.0").',"ra_The page you are looking for was not found":"De pagina die u zoekt is niet gevonden","ra_The schedule will be executed every minute. Are you sure?":"Het schema wordt elke minuut uitgevoerd. Weet u het zeker?","ra_The schedule will be executed every second. Are you sure?":"Het schema wordt elke seconde uitgevoerd. Weet je het zeker?",ra_Thursday:a5,ra_Timestamp:c5,"ra_Toggle expert mode":"Schakel tussen expertmodus","ra_Toggle the states view":"Schakel de statusweergave in of uit","ra_Toggle view mode":"Schakelen tussen weergavemodus","ra_Too big":"Te groot","ra_Too small":"Te klein","ra_Transparent dialog":"Transparant dialoogvenster",ra_Tuesday:u5,"ra_Unknown error":"Onbekende fout","ra_Unknown error!":"Onbekende fout!",ra_Update:l5,"ra_Upload file":"Upload bestand","ra_Use all available let's encrypt certificates":"Gebruik alle beschikbare Let's Encrypt-certificaten","ra_Use iobroker.acme adapter for letsencrypt certificates":"Gebruik de iobroker.acme-adapter voor letsencrypt-certificaten","ra_Use system settings for position":"Gebruik systeeminstellingen voor positie","ra_Used system settings":"Gebruikte systeeminstellingen","ra_User files":"Gebruikersbestanden",ra_ValidTill:N5,ra_Value:L5,ra_Version:j5,"ra_View file":"Bestand bekijken","ra_View: %s":"Bekijk: %s",ra_Wednesday:g5,ra_Width:T5,"ra_YAML editor":"YAML-editor",ra_Yes:y5,"ra_You can export all objects or just the selected branch.":"U kunt alle objecten of alleen de geselecteerde tak exporteren.","ra_You can filter entries by entering here some text":"U kunt items filteren door hier wat tekst in te voeren","ra_You can use * as wildcard":"U kunt * als joker gebruiken",ra___different__:D5,ra_aclEveryone_read_object:d5,ra_aclEveryone_read_state:z5,ra_aclEveryone_write_object:h5,ra_aclEveryone_write_state:I5,ra_aclGroup_read_object:w5,ra_aclGroup_read_state:C5,ra_aclGroup_write_object:A5,ra_aclGroup_write_state:m5,ra_aclOwner_read_object:p5,ra_aclOwner_read_state:O5,ra_aclOwner_write_object:E5,ra_aclOwner_write_state:_5,ra_buttons:f5,ra_changedFrom:S5,ra_close:x5,ra_create_boolean_state:k5,ra_create_channel:Y5,ra_create_device:Q5,ra_create_number_state:v5,ra_create_state:U5,ra_create_string_state:b5,ra_daysShortText:$5,ra_dow_Fr:P5,ra_dow_Mo:W5,ra_dow_Sa:R5,ra_dow_Su:J5,ra_dow_Th:B5,ra_dow_Tu:G5,ra_dow_We:F5,ra_expertMode:H5,ra_false:V5,ra_fileType_all:Z5,ra_fileType_audio:X5,ra_fileType_code:K5,ra_fileType_images:q5,ra_fileType_txt:ek,ra_fileType_video:tk,"ra_fileType_video,":"Video",ra_filter_customs:sk,ra_filter_customs_without:ik,ra_filter_func:rk,ra_filter_id:ok,ra_filter_name:Mk,ra_filter_role:nk,ra_filter_room:ak,ra_filter_type:ck,"ra_import data from %s file":"Importeer gegevens uit %s bestand",ra_invalidConfig:uk,ra_lastChange:lk,ra_locally:Nk,ra_month_Apr:Lk,ra_month_Aug:jk,ra_month_Dec:gk,ra_month_Feb:Tk,ra_month_Jan:yk,ra_month_Jul:Dk,ra_month_Jun:dk,ra_month_Mai:zk,ra_month_Mar:hk,ra_month_Nov:Ik,ra_month_Oct:wk,ra_month_Sep:Ck,ra_months_Apr:Ak,ra_months_Aug:mk,ra_months_Dec:pk,ra_months_Feb:Ok,ra_months_Jan:Ek,ra_months_Jul:_k,ra_months_Jun:fk,ra_months_Mai:Sk,ra_months_Mar:xk,ra_months_Nov:kk,ra_months_Oct:Yk,ra_months_Sep:Qk,"ra_no confirm for 5 mins":"geen bevestiging gedurende 5 minuten",ra_none:vk,ra_object_changed_by:Uk,ra_object_changed_by_user:bk,ra_otherConfig:$k,ra_qualityCode:Pk,ra_repeat:Wk,ra_select_folder_hint:Rk,ra_show_all:Jk,ra_state_changed_by:Bk,ra_state_changed_from:Gk,ra_timestamp:Fk,ra_tooltip_ack:Hk,ra_tooltip_comment:Vk,ra_tooltip_copyState:Zk,ra_tooltip_ctrlForLink:Xk,ra_tooltip_customConfig:Kk,ra_tooltip_deleteObject:qk,ra_tooltip_editObject:eY,ra_tooltip_editState:tY,ra_tooltip_expire:sY,ra_tooltip_from:iY,ra_tooltip_lc:rY,ra_tooltip_quality:oY,ra_tooltip_ts:MY,ra_tooltip_user:nY,ra_tooltip_value:aY,ra_true:cY,"ra_use seconds":"gebruik seconden",ra_val:uY,"ra_via internet":"via internet",ra_warning_every_minute:lY,ra_warning_every_second:NY,sc_cron:LY,sc_date:jY,sc_dates:gY,sc_dow:TY,sc_dows:yY,sc_every:DY,sc_everyN_dates:dY,sc_everyN_dow:zY,sc_everyN_dows:hY,sc_everyN_hours:IY,sc_everyN_minutes:wY,sc_everyN_months:CY,sc_everyN_seconds:AY,sc_every_dates:mY,sc_every_dow:pY,sc_every_dows:OY,sc_every_hours:EY,sc_every_minutes:_Y,sc_every_months:fY,sc_every_seconds:SY,sc_from:xY,sc_hours:kY,sc_interval:YY,sc_intervalBetween:QY,sc_invalid_cron:vY,sc_minutes:UY,sc_months:bY,sc_once:$Y,sc_period:PY,sc_seconds:WY,sc_simple:RY,sc_specific:JY,sc_specific_dates:BY,sc_specific_dow:GY,sc_specific_dows:FY,sc_specific_hours:HY,sc_specific_minutes:VY,sc_specific_months:ZY,sc_specific_seconds:XY,sc_time:KY,sc_to:qY,sc_wizard:eQ,sch_all:tQ,sch_astroDay:sQ,sch_astroNight:iQ,sch_astro_dawn:rQ,sch_astro_dusk:oQ,sch_astro_goldenHour:MQ,sch_astro_goldenHourEnd:nQ,sch_astro_nadir:aQ,sch_astro_nauticalDawn:cQ,sch_astro_nauticalDusk:uQ,sch_astro_night:lQ,sch_astro_nightEnd:NQ,sch_astro_solarNoon:LQ,sch_astro_sunrise:jQ,sch_astro_sunriseEnd:gQ,sch_astro_sunset:TQ,sch_astro_sunsetStart:yQ,sch_at:DQ,sch_desc_atTime:dQ,sch_desc_everyDay:zQ,sch_desc_everyHour:hQ,sch_desc_everyMinute:IQ,sch_desc_everyMonth:wQ,sch_desc_everyNDay:CQ,sch_desc_everyNHours:AQ,sch_desc_everyNMinutes:mQ,sch_desc_everyNMonths:pQ,sch_desc_everyNWeeks:OQ,sch_desc_everyNYears:EQ,sch_desc_everyWeek:_Q,sch_desc_everyYear:fQ,sch_desc_intervalFromTo:SQ,sch_desc_never:xQ,sch_desc_onDate:kQ,sch_desc_onDates:YQ,sch_desc_onEveryDate:QQ,sch_desc_onMonth:vQ,sch_desc_onMonths:UQ,sch_desc_onWeekday:bQ,sch_desc_onWeekdays:$Q,sch_desc_onWeekends:PQ,sch_desc_onWorkdays:WQ,sch_desc_onceInPast:RQ,sch_desc_once_on:JQ,sch_desc_validFrom:BQ,sch_desc_validFromTo:GQ,sch_desc_validTo:FQ,sch_every:HQ,sch_exactTime:VQ,sch_from:ZQ,sch_fromTo:XQ,sch_intervalTime:KQ,sch_invert:qQ,sch_no_one:ev,sch_on:tv,sch_period:sv,sch_periodDaily:iv,sch_periodDates:rv,sch_periodDay:ov,sch_periodEvery:Mv,sch_periodEveryDay:nv,sch_periodEveryMonth:av,sch_periodEveryWeek:cv,sch_periodEveryYear:uv,sch_periodHours:lv,sch_periodMinutes:Nv,sch_periodMonth:Lv,sch_periodMonthly:jv,sch_periodOnce:gv,sch_periodSpecificMonths:Tv,sch_periodWeek:yv,sch_periodWeekdays:Dv,sch_periodWeekend:dv,sch_periodWeekly:zv,sch_periodWorkdays:hv,sch_periodYear:Iv,sch_periodYearly:wv,sch_specificTime:Cv,sch_time:Av,sch_to:mv,sch_valid:pv,sch_validFrom:Ov,sch_validTo:Ev,sch_wholeDay:_v,sch_yearEveryMonth:fv},xv="Actes",kv="Ajouter",Yv="Annuler",Qv="Catégories",vv="Vérifié",Uv="Effacer",bv="Fermer",$v="Commercial",Pv="Configurer",Wv="Lié",Rv="Continuer",Jv="Copié",Bv="Créer",Gv="Recadrer",Fv="Delete",Hv="Supprimer",Vv="Jeter",Zv="Débranché",Xv="Erreur",Kv="Filtre",qv="Vendredi",eU="Latitude",tU="Déconnexion",sU="Longitude",iU="Message",rU="Lundi",oU="Nom",MU="Objets",nU="D'accord",aU="Produit",cU="Renommer/Déplacer/Copier",uU="Répéter",lU="Remplacer",NU="Racine",LU="Samedi",jU="sauver",gU="Choisi",TU="États",yU="Dimanche",DU="Jeudi",dU="Horodatage",zU="Mardi",hU="Mise à jour",IU="Valable jusqu'au",wU="Valeur",CU="Version",AU="Mercredi",mU="Largeur",pU="Oui",OU="différent",EU="Tout le monde peut lire un objet",_U="Tout le monde peut lire l'état",fU="Tout le monde peut écrire un objet",SU="Tout le monde peut écrire l'état",xU="Le groupe peut lire l'objet",kU="Le groupe peut lire l'état",YU="Le groupe peut écrire un objet",QU="Le groupe peut écrire l'état",vU="Le propriétaire peut lire l'objet",UU="Le propriétaire peut lire l'état",bU="Le propriétaire peut écrire un objet",$U="Le propriétaire peut écrire l'état",PU="Boutons",WU="Changé de",RU="Fermer",JU="Créer un état booléen",BU="Créer une chaîne",GU="Créer un appareil",FU="Créer un état de numéro",HU="Créer un état",VU="Créer un état de chaîne",ZU="j.",XU="Fr",KU="Mo",qU="Sa",e6="Su",t6="Th",s6="Tu",i6="Nous",r6="Mode expert",o6="FAUX",M6="Tous les fichiers",n6="l'audio",a6="Code/JSON",c6="Images",u6="Texte",l6="Vidéo",N6="Paramètres",L6="sans",j6="Une fonction",g6="ID",T6="Prénom",y6="Rôle",D6="Pièce",d6="Type",z6="Paramètres invalides",h6="Dernier changement",I6="localement",w6="Avr",C6="Août",A6="Déc",m6="Fév",p6="Jan",O6="Juil",E6="Juin",_6="Mai",f6="Mar",S6="Nov",x6="Oct",k6="Sep",Y6="Avr",Q6="Août",v6="Déc",U6="Fév",b6="Jan",$6="Juil",P6="Juin",W6="Mai",R6="Mar",J6="Nov",B6="Oct",G6="Sep",F6="rien",H6="Objet modifié par",V6="Objet modifié pour la dernière fois à",Z6="Paramètres d'un autre adaptateur %s",X6="Code de qualité",K6="répéter",q6='Pour sélectionner un dossier, maintenez simplement la touche "shift" enfoncée en cliquant sur le dossier.',e8="Tout afficher",t8="État modifié par",s8="Objet changé de",i8="Horodatage",r8="Drapeau reconnu",o8="Commentaire",M8="Copiez la valeur d'état",n8="Maintenez la touche Cltr/⌘ enfoncée pour ouvrir le lien",a8="Paramètres personnalisés",c8="Supprimer un objet",u8="Modifier l'objet",l8="Modifier la valeur d'état",N8="Expire dans",L8="De",j8="Dernière modification",g8="Qualité",T8="Horodatage",y8="Utilisateur",D8="Valeur",d8="VRAI",z8="Valeur",h8="Attention : la tâche CRON s’exécutera toutes les minutes pendant la période spécifiée !",I8="Attention : la tâche CRON s’exécutera toutes les secondes pendant la période spécifiée !",w8="CRON",C8="Date",A8="Rendez-vous",m8="Jour",p8="Jour de la semaine",O8="Chaque",E8="tous les N jours",_8="chaque Nième jour de la semaine",f8="tous les N jours de la semaine",S8="toutes les N heures",x8="toutes les N minutes",k8="tous les N mois",Y8="toutes les N secondes",Q8="tous les jours",v8="Chaque jour de la semaine",U8="Chaque jour de la semaine",b8="Toutes les heures",$8="chaque minute",P8="chaque mois",W8="chaque seconde",R8="De",J8="Heures",B8="Intervalle",G8="Intervalle entre",F8="CRON non valide",H8="Minutes",V8="mois",Z8="Une fois que",X8="Période",K8="Secondes",q8="Facile",eb="Temps spécifique",tb="dates spécifiques",sb="jour(s) spécifique(s) de la semaine",ib="jour spécifique de semaines",rb="heures spécifiques",ob="minutes spécifiques",Mb="mois spécifiques",nb="secondes spécifiques",ab="Temps",cb="À",ub="sorcier",lb="tout",Nb="Journée astronomique",Lb="Nuit astronomique",jb="Aube",gb="Crépuscule",Tb="Heure d'or",yb="Fin de l'heure d'or",Db="Nadir",db="Aube nautique",zb="Crépuscule nautique",hb="Nuit",Ib="Fin de nuit",wb="Midi solaire",Cb="lever du soleil",Ab="Fin du lever du soleil",mb="Le coucher du soleil",pb="Coucher du soleil",Ob="à",Eb="à %s",_b="tous les jours",fb="Toutes les heures",Sb="chaque minute",xb="chaque mois",kb="chaque %s jour",Yb="chaque %s heures",Qb="toutes les %s minutes",vb="tous les %s mois",Ub="chaque %s semaines",bb="tous les %s ans",$b="toutes les semaines",Pb="chaque année",Wb="de %s à %s",Rb="jamais",Jb="sur %s de %s",Bb="sur %s et %s de",Gb="à chaque date de",Fb="%s",Hb="%s et %s",Vb="sur %s",Zb="sur %s et %s",Xb="les weekends",Kb="les jours ouvrables",qb="ne sera plus exécuté, car start est dans le passé",e9="sur %s",t9="de %s",s9="Exécuter de à",i9="à %s",r9="chaque",o9="Temps spécifique",M9="de",n9="De à",a9="Temps d'interval",c9="inverser",u9="aucun",l9="sur",N9="Période",L9="du quotidien",j9="Rendez-vous",g9="journée",T9="Chaque",y9="Tous les jours",D9="Chaque mois",d9="Toutes les semaines",z9="Chaque année",h9="Heures",I9="Minutes",w9="mois",C9="Mensuel",A9="Une fois que",m9="Mois spécifiques",p9="La semaine",O9="Jours de la semaine",E9="Weekend",_9="Hebdomadaire",f9="Jours ouvrables",S9="Année",x9="Annuel",k9="Temps spécifique",Y9="Temps",Q9="à",v9="Valide",U9="de",b9="à",$9="Toute la journée",P9="chaque mois",W9={"ra_%s links from aliases":"%s liens provenant d'alias","ra_%s object(s) processed":"%s objet(s) traité(s)","ra_%s was imported":"%s a été importé","ra_Accept license":"Accepter la licence",ra_Actions:xv,"ra_Add new child object to selected parent":"Ajouter un nouvel objet enfant au parent sélectionné","ra_Add objects tree from JSON file":"Ajouter une arborescence d'objets à partir d'un fichier JSON","ra_Add row":"Ajouter une rangée","ra_Advanced options":"Options avancées","ra_All items are filtered out":"Tous les éléments sont filtrés","ra_All objects":"Tous les objets",ra_Append:kv,"ra_Append %s entries or replace existing?":"Ajouter %s entrées ou remplacer l'existant ?","ra_Append or replace?":"Ajouter ou remplacer ?","ra_Are you sure?":"Êtes-vous sûr?","ra_Auto (no custom columns)":"Auto (pas de colonnes personnalisées)","ra_Back to %s":"Retour à %s","ra_Background image":"Image de fond",ra_Cancel:Yv,"ra_Cannot add items with set filter":"Impossible d'ajouter des éléments avec le filtre défini","ra_Cannot decode license":"Impossible de décoder la licence","ra_Cannot determine position: System settings are empty and GPS detection is disabled in browser":"Impossible de déterminer la position : les paramètres système sont vides et la détection GPS est désactivée dans le navigateur",'ra_Cannot find "%s"':'Impossible de trouver "%s"','ra_Cannot read "%s"':'Impossible de lire "%s"',"ra_Cannot read licenses: %s":"Impossible de lire les licences : %s","ra_Cannot retrieve options, as instance is offline":"Impossible de récupérer les options, car l'instance est hors ligne","ra_Cannot update attribute, because not found in the object":"Impossible de mettre à jour l'attribut, car il est introuvable dans l'objet","ra_Cannot upload":"Impossible de télécharger",ra_Categories:Qv,"ra_Chained certificate":"Certificat chaîné","ra_Change color theme":"Changer le thème de couleur","ra_Changed from":"Changé de","ra_Channel → State":"Canal → État","ra_Check license":"Vérifier la licence",ra_Checked:vv,ra_Clear:Uv,"ra_Clear filter":"Effacer le filtre","ra_Clear icon":"Effacer l'icône","ra_Click to see in full size":"Cliquez pour afficher en taille réelle","ra_Click to show":"Cliquez pour afficher","ra_Clone current row":"Cloner la ligne actuelle",ra_Close:bv,"ra_Collapse all nodes":"Réduire tous les nœuds","ra_Collapse one step node":"Réduire d'un niveau",ra_Commercial:$v,ra_Configure:Pv,"ra_Configure visible columns":"Configurer les colonnes visibles","ra_Confirm deletion of %s":"Confirmer la suppression de %s",ra_Connected:Wv,ra_Continue:Rv,ra_Copied:Jv,"ra_Copied %s":'"%s" copié',"ra_Copy content":"Copier le contenu",ra_Create:Bv,"ra_Create alias":"Créer un alias","ra_Create folder":"Créer le dossier","ra_Create new folder in %s":"Créer un nouveau dossier dans %s",ra_Crop:Gv,"ra_Define CRON...":"Définir CRON...","ra_Define functions":"Définir des fonctions","ra_Define rooms":"Définir des pièces","ra_Define schedule":"Définir le calendrier","ra_Define schedule...":"Définir le calendrier ...",ra_Del:Fv,ra_Delete:Hv,"ra_Delete current row":"Supprimer la ligne actuelle","ra_Deselect all":"Tout déselectionner","ra_Device → Channel → State":"Appareil → Canal → État","ra_Disable/Enable translation":"Activer/Désactiver la traduction",ra_Discard:Vv,ra_Disconnected:Zv,"ra_Do not ask for next 2 hours in this session":"Ne demandez pas les 2 prochaines heures de cette session","ra_Do not export values of states":"Ne pas exporter les valeurs des états","ra_Do not use let's encrypt":"Ne pas utiliser let's encrypt","ra_Docker is not available":"Docker n'est pas disponible","ra_Docker is not installed or not running":"Docker n'est pas installé ou n'est pas en cours d'exécution","ra_Double click to reset table layout":"Double-cliquez pour réinitialiser la disposition du tableau","ra_Drag 'n' drop some files here, or click to select files":"Glissez-déposez des fichiers ici, ou cliquez pour sélectionner des fichiers","ra_Drop file here":"Déposer le fichier ici","ra_Drop the files here...":"Déposez le fichier ici...","ra_Duplicate name":"Nom en double","ra_Edit ACL":"Modifier la LCA","ra_Edit alias":"Modifier l'alias","ra_Edit custom config":"Modifier la configuration personnalisée","ra_Edit full path":"Modifier le chemin complet","ra_Edit function":"Fonction d'édition","ra_Edit object field":"Modifier le champ d'objet","ra_Edit role":"Modifier le rôle","ra_Edit room":"Modifier la salle","ra_Edit value":"Modifier la valeur","ra_Enter the code from that page here":"Entrez le code de cette page ici",ra_Error:Xv,"ra_Expand all nodes":"Développer tous les nœuds","ra_Expand one step node":"Développer un niveau","ra_Expand/Collapse card":"Carte Développer/Réduire","ra_Export configuration section":"Exporter la section de configuration","ra_Export data to %s file":"Exporter les données vers le fichier %s","ra_Failed to open JSON File":"Échec de l'ouverture du fichier JSON","ra_Fallback custom certificates":"Certificats personnalisés de secours","ra_File is too big. Max %sk allowed. Try use SVG.":"Le fichier est trop volumineux. Max %sk autorisé. Essayez d'utiliser SVG.",ra_Filter:Kv,"ra_Filter and Data Actions":"Actions sur les filtres et les données","ra_Filter files":"Filtrer les fichiers","ra_Folder name":"Nom de dossier","ra_Folder → Channel → State":"Dossier → Chaîne → État","ra_Folder → Device → Channel → State":"Dossier → Appareil → Canal → État","ra_Folder → State":"Dossier → État","ra_Folders always first":"Les dossiers toujours en premier",ra_Friday:qv,"ra_From file":"À partir du fichier","ra_From text":"À partir du texte","ra_Get %s access":"Obtenir l'accès %s","ra_Good luck":"Bonne chance","ra_Hide empty folders":"Masquer les dossiers vides","ra_If no file will be created in the folder, it will disappear after the browser closed":"Si aucun fichier ne sera créé dans le dossier, il disparaîtra après la fermeture du navigateur","ra_If the button above does not work, you can authorize manually this app by visiting this url":"Si le bouton ci-dessus ne fonctionne pas, vous pouvez autoriser manuellement cette application en visitant cette URL","ra_Import and add configuration section":"Importer et ajouter la section de configuration","ra_Import and replace configuration section":"Importer et remplacer la section de configuration","ra_Import data from %s file":"Importer des données à partir du fichier %s","ra_Import from %s":"Importer depuis %s","ra_Instance %s is alive":"L'instance %s est active","ra_Instance %s is not alive":"L'instance %s n'est pas active","ra_Instance is not alive":"L'instance n'est pas active","ra_Invalid CRON":"CRON invalide","ra_Invalid JSON":"JSON invalide","ra_Invalid JSON file.":"Fichier JSON invalide.","ra_Invalid JSON format. Expected an array.":"Format JSON invalide. Tableau attendu.","ra_Invalid answer from server":"Réponse invalide du serveur","ra_Invalid parent folder!":"Dossier parent non valide!","ra_Invalid structure":"Structure invalide","ra_JSON editor":"Éditeur JSON","ra_Last change":"Dernier changement",ra_Latitude:eU,"ra_License %s":"Licence %s","ra_License agreement":"Accord de licence","ra_License does not exist":"La licence n'existe pas","ra_License expired on %s":"Licence expirée le %s",'ra_License for other product "%s"':'Licence pour un autre produit "%s"',"ra_License is for version %s, but required version is %s.":"La licence est pour la version %s, mais la version requise est %s.","ra_License must be converted":"La licence doit être convertie en une version plus récente. Vous pouvez le faire dans votre profil iobroker.net.","ra_License not found in license manager. Do you want to read licenses from iobroker.net?":"Licence introuvable dans le gestionnaire de licences. Voulez-vous mettre à jour les licences depuis iobroker.net ?","ra_Listen on all IPs":"Écoutez sur toutes les adresses IP","ra_Load configuration from file":"Charger la configuration à partir du fichier",ra_Logout:tU,ra_Longitude:sU,'ra_May not trigger "updateLicenses"':'Peut ne pas déclencher "updateLicences"',ra_Message:iU,ra_Monday:rU,"ra_Move down":"Descendre","ra_Move up":"Déplacer vers le haut",ra_Name:oU,"ra_No data found in file":"Aucune donnée trouvée dans le fichier","ra_No one license found in license manager":"Aucune licence trouvée dans le gestionnaire de licences","ra_No response from admin":"Aucune réponse de l'administrateur","ra_No response from the backend":"Aucune réponse du backend",'ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".':'Les non-experts ne peuvent créer de nouveaux objets que dans "0_userdata.0" ou "alias.0".',"ra_Not a number":"Pas un numéro","ra_OAuth Client ID":"ID client OAuth","ra_OAuth Client secret":"Secret client OAuth",ra_Objects:MU,ra_Ok:nU,"ra_On weekdays":"En semaine","ra_Only following structures of objects are available:":"Seules les structures d'objets suivantes sont disponibles:","ra_Only selected":"Uniquement sélectionné","ra_Owner group":"Groupe propriétaire","ra_Owner user":"Utilisateur propriétaire","ra_Passwords are not equal!":"Les mots de passe ne sont pas égaux !","ra_Place your files here or click here to open the browse dialog":"Placez vos fichiers ici ou cliquez ici pour ouvrir la boîte de dialogue de navigation","ra_Please allow popups in your browser for this page!":"Veuillez autoriser les popups dans votre navigateur pour cette page !","ra_Please confirm":"Veuillez confirmer","ra_Please create license":"Veuillez créer une licence","ra_Please enter the license":"Veuillez entrer la licence","ra_Please select file...":"Veuillez sélectionner le fichier...","ra_Please select object ID...":"Veuillez sélectionner l'ID d'objet ...","ra_Port could be used by %s":"Le port pourrait être utilisé par %s","ra_Port is already used by %s":"Le port est déjà utilisé par %s","ra_Press ENTER Key to add new item":"Appuyez sur la touche ENTRÉE pour ajouter un nouvel élément","ra_Private certificate":"Certificat privé",ra_Product:aU,"ra_Public certificate":"Certificat public","ra_Quality code":"Qualité","ra_Refresh tree":"Rafraîchir l'arborescence","ra_Reload files":"Recharger les fichiers",ra_Rename_Move_Copy:cU,"ra_Renew %s access":"Renouveler l'accès %s",ra_Repeat:uU,ra_Replace:lU,"ra_Request timed out":"La demande a expiré","ra_Restrict to folder":"Restreindre au dossier",ra_Root:NU,ra_Saturday:LU,ra_Save:jU,"ra_Save and close":"Sauver et fermer","ra_Save configuration to file":"Enregistrer la configuration dans un fichier","ra_Save objects tree as JSON file":"Enregistrer l'arborescence des objets en tant que fichier JSON","ra_Select all":"Tout sélectionner","ra_Select color":"Choisissez la couleur","ra_Select predefined icon":"Sélectionnez l'icône prédéfinie","ra_Select type of export":"Sélectionnez le type d'exportation",ra_Selected:gU,"ra_Selected %s object(s)":"Objet(s) %s sélectionné(s)","ra_Serial number (UUID)":"Numéro de série (UUID)",'ra_Serial number (UUID) "%s" in license is for other device.':'Le numéro de série (UUID) "%s" dans la licence est pour un autre appareil.',"ra_Session will expire in %s seconds. Continue?":"La session expirera dans %s secondes. Continuer ?","ra_Show all folders":"Afficher tous les dossiers","ra_Show lines between rows":"Afficher les lignes entre les lignes","ra_Show/Hide object descriptions":"Afficher/Masquer les descriptions d'objets","ra_Show/hide filter input":"Afficher/masquer l'entrée de filtre","ra_Some data are not stored. Discard?":"Certaines données ne sont pas stockées. Jeter?",ra_States:TU,"ra_Successfully authorized. Token valid till %s and will be automatically renewed.":"Autorisation réussie. Jeton valide jusqu'au %s et sera automatiquement renouvelé.","ra_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":"Autorisation réussie. Jeton valide jusqu'à %s, mais il peut expirer car l'instance n'est pas en cours d'exécution.","ra_Suitable license not found in license manager":"Licence appropriée introuvable dans le gestionnaire de licences",ra_Sunday:yU,"ra_Suppress question for next %s minutes":"Supprimer la question pour les %s prochaines minutes","ra_System language":"Langue du système","ra_Take browser position":"Prendre position depuis le navigateur","ra_Take position from system settings":"Prendre position à partir des paramètres système",'ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").':'Les experts peuvent créer des objets partout mais à partir du deuxième niveau (par exemple "vis.0" ou "javascript.0").',"ra_The page you are looking for was not found":"La page que vous recherchez n'a pas été trouvée","ra_The schedule will be executed every minute. Are you sure?":"Le planning sera exécuté toutes les minutes. Êtes-vous sûr ?","ra_The schedule will be executed every second. Are you sure?":"Le planning sera exécuté toutes les secondes. Êtes-vous sûr ?",ra_Thursday:DU,ra_Timestamp:dU,"ra_Toggle expert mode":"Basculer en mode expert","ra_Toggle the states view":"Basculer la vue des états","ra_Toggle view mode":"Basculer le mode d'affichage","ra_Too big":"Trop grand","ra_Too small":"Trop petit","ra_Transparent dialog":"Dialogue transparent",ra_Tuesday:zU,"ra_Unknown error":"Erreur inconnue","ra_Unknown error!":"Erreur inconnue!",ra_Update:hU,"ra_Upload file":"Téléverser un fichier","ra_Use all available let's encrypt certificates":"Utilisez tous les certificats let's encrypt disponibles","ra_Use iobroker.acme adapter for letsencrypt certificates":"Utiliser l'adaptateur iobroker.acme pour les certificats Letsencrypt","ra_Use system settings for position":"Utiliser les paramètres système pour la position","ra_Used system settings":"Paramètres système utilisés","ra_User files":"Fichiers utilisateurs",ra_ValidTill:IU,ra_Value:wU,ra_Version:CU,"ra_View file":"Voir la fiche","ra_View: %s":"Affichage : %s",ra_Wednesday:AU,ra_Width:mU,"ra_YAML editor":"Éditeur YAML",ra_Yes:pU,"ra_You can export all objects or just the selected branch.":"Vous pouvez exporter tous les objets ou uniquement la branche sélectionnée.","ra_You can filter entries by entering here some text":"Vous pouvez filtrer les entrées en saisissant ici du texte","ra_You can use * as wildcard":"Vous pouvez utiliser * comme caractère générique",ra___different__:OU,ra_aclEveryone_read_object:EU,ra_aclEveryone_read_state:_U,ra_aclEveryone_write_object:fU,ra_aclEveryone_write_state:SU,ra_aclGroup_read_object:xU,ra_aclGroup_read_state:kU,ra_aclGroup_write_object:YU,ra_aclGroup_write_state:QU,ra_aclOwner_read_object:vU,ra_aclOwner_read_state:UU,ra_aclOwner_write_object:bU,ra_aclOwner_write_state:$U,ra_buttons:PU,ra_changedFrom:WU,ra_close:RU,ra_create_boolean_state:JU,ra_create_channel:BU,ra_create_device:GU,ra_create_number_state:FU,ra_create_state:HU,ra_create_string_state:VU,ra_daysShortText:ZU,ra_dow_Fr:XU,ra_dow_Mo:KU,ra_dow_Sa:qU,ra_dow_Su:e6,ra_dow_Th:t6,ra_dow_Tu:s6,ra_dow_We:i6,ra_expertMode:r6,ra_false:o6,ra_fileType_all:M6,ra_fileType_audio:n6,ra_fileType_code:a6,ra_fileType_images:c6,ra_fileType_txt:u6,ra_fileType_video:l6,"ra_fileType_video,":"Vidéo",ra_filter_customs:N6,ra_filter_customs_without:L6,ra_filter_func:j6,ra_filter_id:g6,ra_filter_name:T6,ra_filter_role:y6,ra_filter_room:D6,ra_filter_type:d6,"ra_import data from %s file":"Importer des données à partir du fichier %s",ra_invalidConfig:z6,ra_lastChange:h6,ra_locally:I6,ra_month_Apr:w6,ra_month_Aug:C6,ra_month_Dec:A6,ra_month_Feb:m6,ra_month_Jan:p6,ra_month_Jul:O6,ra_month_Jun:E6,ra_month_Mai:_6,ra_month_Mar:f6,ra_month_Nov:S6,ra_month_Oct:x6,ra_month_Sep:k6,ra_months_Apr:Y6,ra_months_Aug:Q6,ra_months_Dec:v6,ra_months_Feb:U6,ra_months_Jan:b6,ra_months_Jul:$6,ra_months_Jun:P6,ra_months_Mai:W6,ra_months_Mar:R6,ra_months_Nov:J6,ra_months_Oct:B6,ra_months_Sep:G6,"ra_no confirm for 5 mins":"pas de confirmation pendant 5 minutes",ra_none:F6,ra_object_changed_by:H6,ra_object_changed_by_user:V6,ra_otherConfig:Z6,ra_qualityCode:X6,ra_repeat:K6,ra_select_folder_hint:q6,ra_show_all:e8,ra_state_changed_by:t8,ra_state_changed_from:s8,ra_timestamp:i8,ra_tooltip_ack:r8,ra_tooltip_comment:o8,ra_tooltip_copyState:M8,ra_tooltip_ctrlForLink:n8,ra_tooltip_customConfig:a8,ra_tooltip_deleteObject:c8,ra_tooltip_editObject:u8,ra_tooltip_editState:l8,ra_tooltip_expire:N8,ra_tooltip_from:L8,ra_tooltip_lc:j8,ra_tooltip_quality:g8,ra_tooltip_ts:T8,ra_tooltip_user:y8,ra_tooltip_value:D8,ra_true:d8,"ra_use seconds":"utiliser les secondes",ra_val:z8,"ra_via internet":"par Internet",ra_warning_every_minute:h8,ra_warning_every_second:I8,sc_cron:w8,sc_date:C8,sc_dates:A8,sc_dow:m8,sc_dows:p8,sc_every:O8,sc_everyN_dates:E8,sc_everyN_dow:_8,sc_everyN_dows:f8,sc_everyN_hours:S8,sc_everyN_minutes:x8,sc_everyN_months:k8,sc_everyN_seconds:Y8,sc_every_dates:Q8,sc_every_dow:v8,sc_every_dows:U8,sc_every_hours:b8,sc_every_minutes:$8,sc_every_months:P8,sc_every_seconds:W8,sc_from:R8,sc_hours:J8,sc_interval:B8,sc_intervalBetween:G8,sc_invalid_cron:F8,sc_minutes:H8,sc_months:V8,sc_once:Z8,sc_period:X8,sc_seconds:K8,sc_simple:q8,sc_specific:eb,sc_specific_dates:tb,sc_specific_dow:sb,sc_specific_dows:ib,sc_specific_hours:rb,sc_specific_minutes:ob,sc_specific_months:Mb,sc_specific_seconds:nb,sc_time:ab,sc_to:cb,sc_wizard:ub,sch_all:lb,sch_astroDay:Nb,sch_astroNight:Lb,sch_astro_dawn:jb,sch_astro_dusk:gb,sch_astro_goldenHour:Tb,sch_astro_goldenHourEnd:yb,sch_astro_nadir:Db,sch_astro_nauticalDawn:db,sch_astro_nauticalDusk:zb,sch_astro_night:hb,sch_astro_nightEnd:Ib,sch_astro_solarNoon:wb,sch_astro_sunrise:Cb,sch_astro_sunriseEnd:Ab,sch_astro_sunset:mb,sch_astro_sunsetStart:pb,sch_at:Ob,sch_desc_atTime:Eb,sch_desc_everyDay:_b,sch_desc_everyHour:fb,sch_desc_everyMinute:Sb,sch_desc_everyMonth:xb,sch_desc_everyNDay:kb,sch_desc_everyNHours:Yb,sch_desc_everyNMinutes:Qb,sch_desc_everyNMonths:vb,sch_desc_everyNWeeks:Ub,sch_desc_everyNYears:bb,sch_desc_everyWeek:$b,sch_desc_everyYear:Pb,sch_desc_intervalFromTo:Wb,sch_desc_never:Rb,sch_desc_onDate:Jb,sch_desc_onDates:Bb,sch_desc_onEveryDate:Gb,sch_desc_onMonth:Fb,sch_desc_onMonths:Hb,sch_desc_onWeekday:Vb,sch_desc_onWeekdays:Zb,sch_desc_onWeekends:Xb,sch_desc_onWorkdays:Kb,sch_desc_onceInPast:qb,sch_desc_once_on:e9,sch_desc_validFrom:t9,sch_desc_validFromTo:s9,sch_desc_validTo:i9,sch_every:r9,sch_exactTime:o9,sch_from:M9,sch_fromTo:n9,sch_intervalTime:a9,sch_invert:c9,sch_no_one:u9,sch_on:l9,sch_period:N9,sch_periodDaily:L9,sch_periodDates:j9,sch_periodDay:g9,sch_periodEvery:T9,sch_periodEveryDay:y9,sch_periodEveryMonth:D9,sch_periodEveryWeek:d9,sch_periodEveryYear:z9,sch_periodHours:h9,sch_periodMinutes:I9,sch_periodMonth:w9,sch_periodMonthly:C9,sch_periodOnce:A9,sch_periodSpecificMonths:m9,sch_periodWeek:p9,sch_periodWeekdays:O9,sch_periodWeekend:E9,sch_periodWeekly:_9,sch_periodWorkdays:f9,sch_periodYear:S9,sch_periodYearly:x9,sch_specificTime:k9,sch_time:Y9,sch_to:Q9,sch_valid:v9,sch_validFrom:U9,sch_validTo:b9,sch_wholeDay:$9,sch_yearEveryMonth:P9},R9="Azioni",J9="Aggiungere",B9="Annulla",G9="Categorie",F9="Controllato",H9="Elimina",V9="Vicino",Z9="Commerciale",X9="Configura",K9="Collegato",q9="Continuare",e7="Copiato",t7="Creare",s7="Raccolto",i7="Delete",r7="Elimina",o7="Scartare",M7="Disconnesso",n7="Errore",a7="Filtro",c7="Venerdì",u7="Latitudine",l7="Esci",N7="Longitudine",L7="Messaggio",j7="Lunedi",g7="Nome",T7="Oggetti",y7="Ok",D7="Prodotto",d7="Rinomina/Sposta/Copia",z7="Ripetere",h7="Sostituire",I7="Radice",w7="Sabato",C7="Salva",A7="Selezionato",m7="stati",p7="Domenica",O7="Giovedì",E7="Timestamp",_7="Martedì",f7="Aggiornare",S7="Valido fino a",x7="Valore",k7="Versione",Y7="Mercoledì",Q7="Larghezza",v7="SÌ",U7="diverso",b7="Tutti possono leggere gli oggetti",$7="Tutti possono leggere lo stato",P7="Tutti possono scrivere oggetti",W7="Tutti possono scrivere stato",R7="Il gruppo può leggere l'oggetto",J7="Il gruppo può leggere lo stato",B7="Il gruppo può scrivere l'oggetto",G7="Il gruppo può scrivere lo stato",F7="Il proprietario può leggere l'oggetto",H7="Il proprietario può leggere lo stato",V7="Il proprietario può scrivere l'oggetto",Z7="Il proprietario può scrivere lo stato",X7="Bottoni",K7="Cambiato da",q7="vicino",e$="Crea uno stato booleano",t$="Crea canale",s$="Crea dispositivo",i$="Crea lo stato del numero",r$="Crea stato",o$="Crea lo stato della stringa",M$="g.",n$="fr",a$="momento",c$="Sa",u$="su",l$="th",N$="Tu",L$="Noi",j$="Modalità esperto",g$="FALSO",T$="Tutti i files",y$="Audio",D$="Codice/JSON",d$="immagini",z$="Testo",h$="video",I$="impostazioni",w$="senza",C$="Funzione",A$="ID",m$="Nome",p$="Ruolo",O$="Camera",E$="genere",_$="Impostazioni non valide",f$="Ultima modifica",S$="localmente",x$="apr",k$="agosto",Y$="Dic",Q$="febbraio",v$="gen",U$="lug",b$="giu",$$="Mai",P$="marzo",W$="nov",R$="ottobre",J$="Sett",B$="apr",G$="agosto",F$="Dic",H$="febbraio",V$="gen",Z$="lug",X$="giu",K$="Mai",q$="marzo",eP="nov",tP="ottobre",sP="Sett",iP="nessuna",rP="Oggetto modificato da",oP="L'oggetto è stato modificato l'ultima volta alle",MP="Impostazioni dall'altro adattatore %s",nP="Codice di qualità",aP="ripetere",cP='Per selezionare la cartella, basta tenere premuto il tasto "shift" facendo clic sulla cartella.',uP="Mostra tutto",lP="Stato cambiato da",NP="Oggetto cambiato da",LP="Timestamp",jP="Bandiera riconosciuta",gP="Commento",TP="Copia il valore dello stato",yP="Tieni premuto il tasto Cltr/⌘ per aprire il collegamento",DP="Impostazioni personalizzate",dP="Elimina oggetto",zP="Modifica oggetto",hP="Modifica il valore dello stato",IP="Scade tra",wP="A partire dal",CP="Ultima modifica",AP="Qualità",mP="Data e ora",pP="Utente",OP="Valore",EP="VERO",_P="Valore",fP="Attenzione: il processo CRON verrà eseguito ogni minuto durante il periodo specificato!",SP="Attenzione: il processo CRON verrà eseguito ogni secondo durante il periodo specificato!",xP="CRON",kP="Data",YP="Date",QP="Giorno",vP="Giorno della settimana",UP="Ogni",bP="ogni N giorni",$P="ogni Nesimo giorno della settimana",PP="ogni N giorno della settimana",WP="ogni N ore",RP="ogni N minuti",JP="ogni N mesi",BP="ogni N secondi",GP="ogni giorno",FP="Tutti i giorni della settimana",HP="Tutti i giorni della settimana",VP="ogni ora",ZP="ogni minuto",XP="ogni mese",KP="ogni secondo",qP="A partire dal",eW="Ore",tW="Intervallo",sW="Intervallo tra",iW="CRON non valido",rW="Minuti",oW="mesi",MW="Una volta",nW="Periodo",aW="secondi",cW="Semplice",uW="Orario preciso",lW="date specifiche",NW="giorno/i specifico/i della settimana",LW="giorno specifico delle settimane",jW="orari specifici",gW="minuti specifici",TW="mesi specifici",yW="secondi specifici",DW="Tempo",dW="Per",zW="procedura guidata",hW="tutti",IW="Astro day",wW="Astro night",CW="Alba",AW="Crepuscolo",mW="Ora d'oro",pW="Fine dell'ora d'oro",OW="Nadir",EW="Alba nautica",_W="Crepuscolo nautico",fW="Notte",SW="Fine della notte",xW="Mezzogiorno solare",kW="Alba",YW="Fine dell'alba",QW="Tramonto",vW="Inizio del tramonto",UW="a",bW="a %s",$W="ogni giorno",PW="ogni ora",WW="ogni minuto",RW="ogni mese",JW="ogni %s giorno",BW="ogni %s ore",GW="ogni %s minuti",FW="ogni %s mesi",HW="ogni %s settimane",VW="ogni %s anni",ZW="ogni settimana",XW="ogni anno",KW="da %s a %s",qW="mai",eR="su %s di %s",tR="su %s e %s di",sR="in ogni data di",iR="%s",rR="%s e %s",oR="su %s",MR="su %s e %s",nR="nei finesettimana",aR="nei giorni lavorativi",cR="non verrà più eseguito, perché start è nel passato",uR="su %s",lR="da %s",NR="Eseguire da a",LR="a %s",jR="ogni",gR="Orario preciso",TR="a partire dal",yR="Da A",DR="Intervallo di tempo",dR="invertire",zR="nessuna",hR="sopra",IR="Periodo",wR="Quotidiano",CR="Date",AR="Giorno",mR="Ogni",pR="Ogni giorno",OR="Ogni mese",ER="Ogni settimana",_R="Ogni anno",fR="Ore",SR="Minuti",xR="mese",kR="Mensile",YR="Una volta",QR="Mesi specifici",vR="Settimana",UR="Giorni della settimana",bR="Fine settimana",$R="settimanalmente",PR="giorni feriali",WR="Anno",RR="Annuale",JR="Orario preciso",BR="Tempo",GR="per",FR="Valido",HR="a partire dal",VR="per",ZR="Giorno intero",XR="ogni mese",KR={"ra_%s links from aliases":"%s link da alias","ra_%s object(s) processed":"%s oggetti elaborati","ra_%s was imported":"%s è stato importato","ra_Accept license":"Accetta licenza",ra_Actions:R9,"ra_Add new child object to selected parent":"Aggiungi un nuovo oggetto figlio al genitore selezionato","ra_Add objects tree from JSON file":"Aggiungi l'albero degli oggetti dal file JSON","ra_Add row":"Aggiungi riga","ra_Advanced options":"Opzioni avanzate","ra_All items are filtered out":"Tutti gli elementi vengono filtrati","ra_All objects":"Tutti gli oggetti",ra_Append:J9,"ra_Append %s entries or replace existing?":"Aggiungi %s voci o sostituisci quelle esistenti?","ra_Append or replace?":"Aggiungere o sostituire?","ra_Are you sure?":"Sei sicuro?","ra_Auto (no custom columns)":"Auto (nessuna colonna personalizzata)","ra_Back to %s":"Torna a %s","ra_Background image":"Immagine di sfondo",ra_Cancel:B9,"ra_Cannot add items with set filter":"Impossibile aggiungere elementi con il filtro impostato","ra_Cannot decode license":"Impossibile decodificare la licenza","ra_Cannot determine position: System settings are empty and GPS detection is disabled in browser":"Impossibile determinare la posizione: le impostazioni di sistema sono vuote e il rilevamento GPS è disabilitato nel browser",'ra_Cannot find "%s"':'Impossibile trovare "%s"','ra_Cannot read "%s"':'Impossibile leggere "%s"',"ra_Cannot read licenses: %s":"Impossibile leggere le licenze: %s","ra_Cannot retrieve options, as instance is offline":"Impossibile recuperare le opzioni, poiché l'istanza è offline","ra_Cannot update attribute, because not found in the object":"Impossibile aggiornare l'attributo, perché non trovato nell'oggetto","ra_Cannot upload":"Impossibile caricare",ra_Categories:G9,"ra_Chained certificate":"Certificato incatenato","ra_Change color theme":"Cambia tema colore","ra_Changed from":"Cambiato da","ra_Channel → State":"Canale → Stato","ra_Check license":"Controlla la licenza",ra_Checked:F9,ra_Clear:H9,"ra_Clear filter":"Filtro pulito","ra_Clear icon":"Cancella icona","ra_Click to see in full size":"Clicca per visualizzare l'immagine a dimensioni intere","ra_Click to show":"Clicca per mostrare","ra_Clone current row":"Clona riga corrente",ra_Close:V9,"ra_Collapse all nodes":"Comprimi tutti i nodi","ra_Collapse one step node":"Comprimi un livello",ra_Commercial:Z9,ra_Configure:X9,"ra_Configure visible columns":"Configura colonne visibili","ra_Confirm deletion of %s":"Conferma l'eliminazione di %s",ra_Connected:K9,ra_Continue:q9,ra_Copied:e7,"ra_Copied %s":'"%s" copiato',"ra_Copy content":"Copia contenuto",ra_Create:t7,"ra_Create alias":"Crea alias","ra_Create folder":"Creare una cartella","ra_Create new folder in %s":"Crea nuova cartella in %s",ra_Crop:s7,"ra_Define CRON...":"Definisci CRON...","ra_Define functions":"Definire le funzioni","ra_Define rooms":"Definisci le stanze","ra_Define schedule":"Definisci programma","ra_Define schedule...":"Definisci pianificazione ...",ra_Del:i7,ra_Delete:r7,"ra_Delete current row":"Elimina la riga corrente","ra_Deselect all":"Deseleziona tutto","ra_Device → Channel → State":"Dispositivo → Canale → Stato","ra_Disable/Enable translation":"Disabilita/Abilita la traduzione",ra_Discard:o7,ra_Disconnected:M7,"ra_Do not ask for next 2 hours in this session":"Non chiedere per le prossime 2 ore in questa sessione","ra_Do not export values of states":"Non esportare i valori degli stati","ra_Do not use let's encrypt":"Non utilizzare crittografiamo","ra_Docker is not available":"Docker non è disponibile","ra_Docker is not installed or not running":"Docker non è installato o non è in esecuzione","ra_Double click to reset table layout":"Fare doppio clic per ripristinare il layout della tabella","ra_Drag 'n' drop some files here, or click to select files":"Trascina e rilascia alcuni file qui o fai clic per selezionare i file","ra_Drop file here":"Trascina il file qui","ra_Drop the files here...":"Trascina qui il file...","ra_Duplicate name":"Nome duplicato","ra_Edit ACL":"Modifica ACL","ra_Edit alias":"Modifica alias","ra_Edit custom config":"Modifica configurazione personalizzata","ra_Edit full path":"Modifica percorso completo","ra_Edit function":"Funzione di modifica","ra_Edit object field":"Modifica campo oggetto","ra_Edit role":"Modifica ruolo","ra_Edit room":"Modifica stanza","ra_Edit value":"Modifica valore","ra_Enter the code from that page here":"Inserisci qui il codice da quella pagina",ra_Error:n7,"ra_Expand all nodes":"Espandi tutti i nodi","ra_Expand one step node":"Espandi un livello","ra_Expand/Collapse card":"Espandi/Comprimi scheda","ra_Export configuration section":"Sezione di configurazione dell'esportazione","ra_Export data to %s file":"Esporta i dati nel file %s","ra_Failed to open JSON File":"Impossibile aprire il file JSON","ra_Fallback custom certificates":"Certificati personalizzati di fallback","ra_File is too big. Max %sk allowed. Try use SVG.":"Il file è troppo grande. Max %sk consentito. Prova a usare SVG.",ra_Filter:a7,"ra_Filter and Data Actions":"Azioni sui filtri e sui dati","ra_Filter files":"Filtra i file","ra_Folder name":"Nome della cartella","ra_Folder → Channel → State":"Cartella → Canale → Stato","ra_Folder → Device → Channel → State":"Cartella → Dispositivo → Canale → Stato","ra_Folder → State":"Cartella → Stato","ra_Folders always first":"Le cartelle sono sempre al primo posto",ra_Friday:c7,"ra_From file":"Dal file","ra_From text":"Dal testo","ra_Get %s access":"Ottieni l'accesso %s","ra_Good luck":"Buona fortuna","ra_Hide empty folders":"Nascondi cartelle vuote","ra_If no file will be created in the folder, it will disappear after the browser closed":"Se nessun file verrà creato nella cartella, scomparirà dopo la chiusura del browser","ra_If the button above does not work, you can authorize manually this app by visiting this url":"Se il pulsante sopra non funziona, puoi autorizzare manualmente questa app visitando questo URL","ra_Import and add configuration section":"Importa e aggiungi la sezione di configurazione","ra_Import and replace configuration section":"Importa e sostituisci la sezione di configurazione","ra_Import data from %s file":"Importa i dati dal file %s","ra_Import from %s":"Importa da %s","ra_Instance %s is alive":"Il %s dell'istanza è vivo","ra_Instance %s is not alive":"Il TESTO dell'istanza non è vivo","ra_Instance is not alive":"L'istanza non è viva","ra_Invalid CRON":"CRON non valido","ra_Invalid JSON":"JSON non valido","ra_Invalid JSON file.":"File JSON non valido.","ra_Invalid JSON format. Expected an array.":"Formato JSON non valido. È previsto un array.","ra_Invalid answer from server":"Risposta non valida dal server","ra_Invalid parent folder!":"Cartella principale non valida!","ra_Invalid structure":"Struttura non valida","ra_JSON editor":"Editor JSON","ra_Last change":"Ultima modifica",ra_Latitude:u7,"ra_License %s":"Licenza %s","ra_License agreement":"Contratto di licenza","ra_License does not exist":"La licenza non esiste","ra_License expired on %s":"Licenza scaduta il %s",'ra_License for other product "%s"':'Licenza per altro prodotto "%s"',"ra_License is for version %s, but required version is %s.":"La licenza è per la versione %s, ma la versione richiesta è %s.","ra_License must be converted":"La licenza deve essere convertita in una versione più recente. Puoi farlo nel tuo profilo iobroker.net.","ra_License not found in license manager. Do you want to read licenses from iobroker.net?":"Licenza non trovata nel gestore delle licenze. Vuoi aggiornare le licenze da iobroker.net?","ra_Listen on all IPs":"Ascolta su tutti gli IP","ra_Load configuration from file":"Carica la configurazione dal file",ra_Logout:l7,ra_Longitude:N7,'ra_May not trigger "updateLicenses"':'Potrebbe non attivare "updateLicenses"',ra_Message:L7,ra_Monday:j7,"ra_Move down":"Abbassati","ra_Move up":"Andare avanti",ra_Name:g7,"ra_No data found in file":"Nessun dato trovato nel file","ra_No one license found in license manager":"Nessuna licenza trovata nel gestore delle licenze","ra_No response from admin":"Nessuna risposta dall'amministratore","ra_No response from the backend":"Nessuna risposta dal backend",'ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".':'I non esperti possono creare nuovi oggetti solo in "0_userdata.0" o "alias.0".',"ra_Not a number":"Non un numero","ra_OAuth Client ID":"ID client OAuth","ra_OAuth Client secret":"Segreto del client OAuth",ra_Objects:T7,ra_Ok:y7,"ra_On weekdays":"Nei giorni della settimana","ra_Only following structures of objects are available:":"Sono disponibili solo le seguenti strutture di oggetti:","ra_Only selected":"Solo selezionato","ra_Owner group":"Gruppo di proprietari","ra_Owner user":"Utente proprietario","ra_Passwords are not equal!":"Le password non sono uguali!","ra_Place your files here or click here to open the browse dialog":"Posiziona i file qui o fai clic qui per aprire la finestra di dialogo Sfoglia","ra_Please allow popups in your browser for this page!":"Si prega di abilitare i popup nel browser per questa pagina!","ra_Please confirm":"Si prega di confermare","ra_Please create license":"Si prega di creare la licenza","ra_Please enter the license":"Inserisci la licenza","ra_Please select file...":"Si prega di selezionare il file...","ra_Please select object ID...":"Seleziona l'ID oggetto ...","ra_Port could be used by %s":"La porta potrebbe essere utilizzata da %s","ra_Port is already used by %s":"La porta è già utilizzata da %s","ra_Press ENTER Key to add new item":"Premere il tasto INVIO per aggiungere un nuovo elemento","ra_Private certificate":"Certificato privato",ra_Product:D7,"ra_Public certificate":"Certificato pubblico","ra_Quality code":"Qualità","ra_Refresh tree":"Aggiorna l'albero","ra_Reload files":"Ricarica i file",ra_Rename_Move_Copy:d7,"ra_Renew %s access":"Rinnova l'accesso %s",ra_Repeat:z7,ra_Replace:h7,"ra_Request timed out":"Tempo scaduto per la richiesta","ra_Restrict to folder":"Limita alla cartella",ra_Root:I7,ra_Saturday:w7,ra_Save:C7,"ra_Save and close":"Salva e chiudi","ra_Save configuration to file":"Salva la configurazione su file","ra_Save objects tree as JSON file":"Salva l'albero degli oggetti come file JSON","ra_Select all":"Seleziona tutto","ra_Select color":"Seleziona il colore","ra_Select predefined icon":"Seleziona l'icona predefinita","ra_Select type of export":"Seleziona il tipo di esportazione",ra_Selected:A7,"ra_Selected %s object(s)":"%s oggetto/i selezionato/i","ra_Serial number (UUID)":"Numero di serie (UUID)",'ra_Serial number (UUID) "%s" in license is for other device.':'Il numero di serie (UUID) "%s" nella licenza è per un altro dispositivo.',"ra_Session will expire in %s seconds. Continue?":"La sessione scadrà tra %s secondi. Continuare?","ra_Show all folders":"Mostra tutte le cartelle","ra_Show lines between rows":"Mostra linee tra le righe","ra_Show/Hide object descriptions":"Mostra/Nascondi le descrizioni degli oggetti","ra_Show/hide filter input":"Mostra/nascondi input filtro","ra_Some data are not stored. Discard?":"Alcuni dati non vengono memorizzati. Scartare?",ra_States:m7,"ra_Successfully authorized. Token valid till %s and will be automatically renewed.":"Autorizzazione completata. Il token è valido fino al %s e verrà rinnovato automaticamente.","ra_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":"Autorizzazione completata. Il token è valido fino al %s, ma potrebbe scadere perché l'istanza non è in esecuzione.","ra_Suitable license not found in license manager":"Licenza adatta non trovata nel gestore delle licenze",ra_Sunday:p7,"ra_Suppress question for next %s minutes":"Sopprimi la domanda per i prossimi %s minuti","ra_System language":"Linguaggio di sistema","ra_Take browser position":"Prendi posizione dal browser","ra_Take position from system settings":"Prendi posizione dalle impostazioni di sistema",'ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").':'Gli esperti possono creare oggetti ovunque ma dal secondo livello (es. "Vis.0" o "javascript.0").',"ra_The page you are looking for was not found":"La pagina che stai cercando non è stata trovata","ra_The schedule will be executed every minute. Are you sure?":"La pianificazione verrà eseguita ogni minuto. Sei sicuro?","ra_The schedule will be executed every second. Are you sure?":"La pianificazione verrà eseguita ogni secondo. Sei sicuro?",ra_Thursday:O7,ra_Timestamp:E7,"ra_Toggle expert mode":"Attiva / disattiva la modalità esperto","ra_Toggle the states view":"Attiva o disattiva la visualizzazione degli stati","ra_Toggle view mode":"Attiva / disattiva la modalità di visualizzazione","ra_Too big":"Troppo grande","ra_Too small":"Troppo piccolo","ra_Transparent dialog":"Finestra di dialogo trasparente",ra_Tuesday:_7,"ra_Unknown error":"Errore sconosciuto","ra_Unknown error!":"Errore sconosciuto!",ra_Update:f7,"ra_Upload file":"Caricare un file","ra_Use all available let's encrypt certificates":"Usa tutti i certificati Let's Encrypt disponibili","ra_Use iobroker.acme adapter for letsencrypt certificates":"Utilizzare l'adattatore iobroker.acme per i certificati letsencrypt","ra_Use system settings for position":"Usa le impostazioni di sistema per la posizione","ra_Used system settings":"Impostazioni di sistema utilizzate","ra_User files":"File utente",ra_ValidTill:S7,ra_Value:x7,ra_Version:k7,"ra_View file":"Vedi il file","ra_View: %s":"Visualizza: %s",ra_Wednesday:Y7,ra_Width:Q7,"ra_YAML editor":"Editor YAML",ra_Yes:v7,"ra_You can export all objects or just the selected branch.":"Puoi esportare tutti gli oggetti o solo il ramo selezionato.","ra_You can filter entries by entering here some text":"Puoi filtrare le voci inserendo qui del testo","ra_You can use * as wildcard":"Puoi usare * come carattere jolly",ra___different__:U7,ra_aclEveryone_read_object:b7,ra_aclEveryone_read_state:$7,ra_aclEveryone_write_object:P7,ra_aclEveryone_write_state:W7,ra_aclGroup_read_object:R7,ra_aclGroup_read_state:J7,ra_aclGroup_write_object:B7,ra_aclGroup_write_state:G7,ra_aclOwner_read_object:F7,ra_aclOwner_read_state:H7,ra_aclOwner_write_object:V7,ra_aclOwner_write_state:Z7,ra_buttons:X7,ra_changedFrom:K7,ra_close:q7,ra_create_boolean_state:e$,ra_create_channel:t$,ra_create_device:s$,ra_create_number_state:i$,ra_create_state:r$,ra_create_string_state:o$,ra_daysShortText:M$,ra_dow_Fr:n$,ra_dow_Mo:a$,ra_dow_Sa:c$,ra_dow_Su:u$,ra_dow_Th:l$,ra_dow_Tu:N$,ra_dow_We:L$,ra_expertMode:j$,ra_false:g$,ra_fileType_all:T$,ra_fileType_audio:y$,ra_fileType_code:D$,ra_fileType_images:d$,ra_fileType_txt:z$,ra_fileType_video:h$,"ra_fileType_video,":"video",ra_filter_customs:I$,ra_filter_customs_without:w$,ra_filter_func:C$,ra_filter_id:A$,ra_filter_name:m$,ra_filter_role:p$,ra_filter_room:O$,ra_filter_type:E$,"ra_import data from %s file":"Importa dati dal file %s",ra_invalidConfig:_$,ra_lastChange:f$,ra_locally:S$,ra_month_Apr:x$,ra_month_Aug:k$,ra_month_Dec:Y$,ra_month_Feb:Q$,ra_month_Jan:v$,ra_month_Jul:U$,ra_month_Jun:b$,ra_month_Mai:$$,ra_month_Mar:P$,ra_month_Nov:W$,ra_month_Oct:R$,ra_month_Sep:J$,ra_months_Apr:B$,ra_months_Aug:G$,ra_months_Dec:F$,ra_months_Feb:H$,ra_months_Jan:V$,ra_months_Jul:Z$,ra_months_Jun:X$,ra_months_Mai:K$,ra_months_Mar:q$,ra_months_Nov:eP,ra_months_Oct:tP,ra_months_Sep:sP,"ra_no confirm for 5 mins":"nessuna conferma per 5 minuti",ra_none:iP,ra_object_changed_by:rP,ra_object_changed_by_user:oP,ra_otherConfig:MP,ra_qualityCode:nP,ra_repeat:aP,ra_select_folder_hint:cP,ra_show_all:uP,ra_state_changed_by:lP,ra_state_changed_from:NP,ra_timestamp:LP,ra_tooltip_ack:jP,ra_tooltip_comment:gP,ra_tooltip_copyState:TP,ra_tooltip_ctrlForLink:yP,ra_tooltip_customConfig:DP,ra_tooltip_deleteObject:dP,ra_tooltip_editObject:zP,ra_tooltip_editState:hP,ra_tooltip_expire:IP,ra_tooltip_from:wP,ra_tooltip_lc:CP,ra_tooltip_quality:AP,ra_tooltip_ts:mP,ra_tooltip_user:pP,ra_tooltip_value:OP,ra_true:EP,"ra_use seconds":"usa i secondi",ra_val:_P,"ra_via internet":"attraverso internet",ra_warning_every_minute:fP,ra_warning_every_second:SP,sc_cron:xP,sc_date:kP,sc_dates:YP,sc_dow:QP,sc_dows:vP,sc_every:UP,sc_everyN_dates:bP,sc_everyN_dow:$P,sc_everyN_dows:PP,sc_everyN_hours:WP,sc_everyN_minutes:RP,sc_everyN_months:JP,sc_everyN_seconds:BP,sc_every_dates:GP,sc_every_dow:FP,sc_every_dows:HP,sc_every_hours:VP,sc_every_minutes:ZP,sc_every_months:XP,sc_every_seconds:KP,sc_from:qP,sc_hours:eW,sc_interval:tW,sc_intervalBetween:sW,sc_invalid_cron:iW,sc_minutes:rW,sc_months:oW,sc_once:MW,sc_period:nW,sc_seconds:aW,sc_simple:cW,sc_specific:uW,sc_specific_dates:lW,sc_specific_dow:NW,sc_specific_dows:LW,sc_specific_hours:jW,sc_specific_minutes:gW,sc_specific_months:TW,sc_specific_seconds:yW,sc_time:DW,sc_to:dW,sc_wizard:zW,sch_all:hW,sch_astroDay:IW,sch_astroNight:wW,sch_astro_dawn:CW,sch_astro_dusk:AW,sch_astro_goldenHour:mW,sch_astro_goldenHourEnd:pW,sch_astro_nadir:OW,sch_astro_nauticalDawn:EW,sch_astro_nauticalDusk:_W,sch_astro_night:fW,sch_astro_nightEnd:SW,sch_astro_solarNoon:xW,sch_astro_sunrise:kW,sch_astro_sunriseEnd:YW,sch_astro_sunset:QW,sch_astro_sunsetStart:vW,sch_at:UW,sch_desc_atTime:bW,sch_desc_everyDay:$W,sch_desc_everyHour:PW,sch_desc_everyMinute:WW,sch_desc_everyMonth:RW,sch_desc_everyNDay:JW,sch_desc_everyNHours:BW,sch_desc_everyNMinutes:GW,sch_desc_everyNMonths:FW,sch_desc_everyNWeeks:HW,sch_desc_everyNYears:VW,sch_desc_everyWeek:ZW,sch_desc_everyYear:XW,sch_desc_intervalFromTo:KW,sch_desc_never:qW,sch_desc_onDate:eR,sch_desc_onDates:tR,sch_desc_onEveryDate:sR,sch_desc_onMonth:iR,sch_desc_onMonths:rR,sch_desc_onWeekday:oR,sch_desc_onWeekdays:MR,sch_desc_onWeekends:nR,sch_desc_onWorkdays:aR,sch_desc_onceInPast:cR,sch_desc_once_on:uR,sch_desc_validFrom:lR,sch_desc_validFromTo:NR,sch_desc_validTo:LR,sch_every:jR,sch_exactTime:gR,sch_from:TR,sch_fromTo:yR,sch_intervalTime:DR,sch_invert:dR,sch_no_one:zR,sch_on:hR,sch_period:IR,sch_periodDaily:wR,sch_periodDates:CR,sch_periodDay:AR,sch_periodEvery:mR,sch_periodEveryDay:pR,sch_periodEveryMonth:OR,sch_periodEveryWeek:ER,sch_periodEveryYear:_R,sch_periodHours:fR,sch_periodMinutes:SR,sch_periodMonth:xR,sch_periodMonthly:kR,sch_periodOnce:YR,sch_periodSpecificMonths:QR,sch_periodWeek:vR,sch_periodWeekdays:UR,sch_periodWeekend:bR,sch_periodWeekly:$R,sch_periodWorkdays:PR,sch_periodYear:WR,sch_periodYearly:RR,sch_specificTime:JR,sch_time:BR,sch_to:GR,sch_valid:FR,sch_validFrom:HR,sch_validTo:VR,sch_wholeDay:ZR,sch_yearEveryMonth:XR},qR="Comportamiento",eJ="Adjuntar",tJ="Cancelar",sJ="Categorías",iJ="Comprobado",rJ="Borrar",oJ="Cerca",MJ="Comercial",nJ="Configurar",aJ="Conectado",cJ="Continuar",uJ="Copiado",lJ="Crear",NJ="Cultivo",LJ="Delete",jJ="Eliminar",gJ="Desechar",TJ="Desconectado",yJ="Error",DJ="Filtrar",dJ="Viernes",zJ="Latitud",hJ="Cerrar sesión",IJ="Longitud",wJ="Mensaje",CJ="Lunes",AJ="Nombre",mJ="Objetos",pJ="Okay",OJ="Producto",EJ="Cambiar nombre/Mover/Copiar",_J="Repetir",fJ="Reemplazar",SJ="Raíz",xJ="Sábado",kJ="Salvar",YJ="Seleccionado",QJ="Estados",vJ="Domingo",UJ="Jueves",bJ="Marca de tiempo",$J="Martes",PJ="Actualizar",WJ="Válida hasta",RJ="Valor",JJ="Versión",BJ="Miércoles",GJ="Anchura",FJ="Sí",HJ="diferente",VJ="Todo el mundo puede leer el objeto",ZJ="Todos pueden leer el estado",XJ="Todos pueden escribir objetos",KJ="Todos pueden escribir el estado",qJ="El grupo puede leer el objeto",eB="El grupo puede leer el estado",tB="El grupo puede escribir un objeto",sB="El grupo puede escribir el estado",iB="El propietario puede leer el objeto",rB="El propietario puede leer el estado",oB="El propietario puede escribir el objeto",MB="El propietario puede escribir el estado",nB="Botones",aB="Cambiaron desde",cB="cerrar",uB="Crear estado booleano",lB="Crear canal",NB="Crear dispositivo",LB="Crear estado numérico",jB="Crear estado",gB="Crear estado de cadena",TB="d.",yB="Fr",DB="Mes",dB="Sa",zB="Su",hB="Th",IB="Tu",wB="Nosotros",CB="Modo experto",AB="FALSO",mB="Todos los archivos",pB="Audio",OB="Código/JSON",EB="Imágenes",_B="Texto",fB="Video",SB="Configuraciones",xB="sin",kB="Función",YB="ID",QB="Nombre",vB="Papel",UB="Habitación",bB="Tipo",$B="Configuraciones inválidas",PB="Ultimo cambio",WB="en la zona",RB="Abr",JB="Ago",BB="Dic",GB="Feb",FB="Ene",HB="Jul",VB="Jun",ZB="Mai",XB="Mar",KB="Nov",qB="Oct",eG="Sep",tG="Abr",sG="Ago",iG="Dic",rG="Feb",oG="Ene",MG="Jul",nG="Jun",aG="Mai",cG="Mar",uG="Nov",lG="Oct",NG="Sep",LG="ninguno",jG="Objeto cambiado por",gG="Objeto cambiado por última vez a las",TG="Configuraciones de otro adaptador %s",yG="Código de calidad",DG="repetir",dG='Para seleccionar la carpeta, simplemente mantenga presionada la tecla "shift" haciendo clic en la carpeta.',zG="Mostrar todo",hG="Estado cambiado por",IG="Objeto cambiado de",wG="Marca de tiempo",CG="Bandera reconocida",AG="Comentario",mG="Copie el valor del estado",pG="Mantenga presionada la tecla Cltr/⌘ para abrir el enlace",OG="Ajustes personalizados",EG="Eliminar objeto",_G="Editar objeto",fG="Edite el valor del estado",SG="Caduca en",xG="Desde",kG="Último cambio",YG="Calidad",QG="Sello de tiempo",vG="Usuario",UG="Valor",bG="VERDADERO",$G="Valor",PG="Advertencia: ¡El trabajo CRON se ejecutará cada minuto durante el período especificado!",WG="Advertencia: ¡El trabajo CRON se ejecutará cada segundo durante el período especificado!",RG="CRON",JG="Fecha",BG="fechas",GG="Día",FG="Día de la semana",HG="Cada",VG="cada N días",ZG="cada enésimo día de la semana",XG="cada N día de la semana",KG="cada N horas",qG="cada N minutos",eF="cada N meses",tF="cada N segundos",sF="cada día",iF="Cada día de la semana",rF="Cada día de la semana",oF="cada hora",MF="cada minuto",nF="cada mes",aF="cada segundo",cF="De",uF="Horas",lF="Intervalo",NF="Intervalo entre",LF="CRON no válido",jF="Minutos",gF="meses",TF="Una vez",yF="Período",DF="Segundos",dF="Sencillo",zF="Tiempo específico",hF="fechas especificas",IF="día(s) específico(s) de la semana",wF="día específico de semanas",CF="horas específicas",AF="minutos específicos",mF="meses específicos",pF="segundos específicos",OF="Hora",EF="A",_F="Mago",fF="todas",SF="Día astro",xF="Noche astro",kF="Amanecer",YF="Oscuridad",QF="hora dorada",vF="Fin de la hora dorada",UF="Nadir",bF="Amanecer náutico",$F="Anochecer náutico",PF="Noche",WF="Fin de la noche",RF="Mediodía solar",JF="amanecer",BF="Fin del amanecer",GF="Puesta de sol",FF="Puesta de sol",HF="a",VF="en %s",ZF="cada día",XF="cada hora",KF="cada minuto",qF="cada mes",eH="cada %s días",tH="cada %s horas",sH="cada %s minutos",iH="cada %s meses",rH="cada %s semanas",oH="cada %s años",MH="cada semana",nH="todos los años",aH="de %s a %s",cH="Nunca",uH="en %s de %s",lH="en %s y %s de",NH="en cada fecha de",LH="%s",jH="%s y %s",gH="en %s",TH="en %s y %s",yH="en los fines de semana",DH="en días laborables",dH="ya no se ejecutará más, porque el inicio está en el pasado",zH="en %s",hH="de %s",IH="Ejecutar desde hasta",wH="a %s",CH="cada",AH="Tiempo específico",mH="de",pH="De-a",OH="Tiempo de intervalo",EH="invertir; poner boca abajo o en la posición opuesta, orden o arreglo; Boca abajo",_H="ninguna",fH="en",SH="Período",xH="Diario",kH="fechas",YH="Día",QH="Cada",vH="Cada día",UH="Cada mes",bH="Cada semana",$H="Todos los años",PH="Horas",WH="Minutos",RH="mes",JH="Mensual",BH="Una vez",GH="Meses específicos",FH="Semana",HH="Días laborables",VH="Fin de semana",ZH="Semanal",XH="Días laborables",KH="Año",qH="Anual",eV="Tiempo específico",tV="Hora",sV="a",iV="Válido",rV="de",oV="a",MV="Todo el dia",nV="cada mes",aV={"ra_%s links from aliases":"%s enlaces de alias","ra_%s object(s) processed":"%s objeto(s) procesados","ra_%s was imported":"%s fue importado","ra_Accept license":"Aceptar licencia",ra_Actions:qR,"ra_Add new child object to selected parent":"Agregar nuevo objeto hijo al padre seleccionado","ra_Add objects tree from JSON file":"Agregar árbol de objetos desde el archivo JSON","ra_Add row":"Añadir fila","ra_Advanced options":"Opciones avanzadas","ra_All items are filtered out":"Todos los elementos se filtran","ra_All objects":"Todos los objetos",ra_Append:eJ,"ra_Append %s entries or replace existing?":"¿Agregar %s entradas o reemplazar las existentes?","ra_Append or replace?":"¿Agregar o reemplazar?","ra_Are you sure?":"¿Estás seguro?","ra_Auto (no custom columns)":"Automático (sin columnas personalizadas)","ra_Back to %s":"Volver a %s","ra_Background image":"Imagen de fondo",ra_Cancel:tJ,"ra_Cannot add items with set filter":"No se pueden agregar elementos con el filtro establecido","ra_Cannot decode license":"No se puede decodificar la licencia","ra_Cannot determine position: System settings are empty and GPS detection is disabled in browser":"No se puede determinar la posición: la configuración del sistema está vacía y la detección de GPS está deshabilitada en el navegador",'ra_Cannot find "%s"':'No se puede encontrar "%s"','ra_Cannot read "%s"':'No se puede leer "%s"',"ra_Cannot read licenses: %s":"No se pueden leer licencias: %s","ra_Cannot retrieve options, as instance is offline":"No se pueden recuperar las opciones, ya que la instancia está fuera de línea","ra_Cannot update attribute, because not found in the object":"No se puede actualizar el atributo porque no se encuentra en el objeto","ra_Cannot upload":"no se puede cargar",ra_Categories:sJ,"ra_Chained certificate":"certificado encadenado","ra_Change color theme":"Cambiar tema de color","ra_Changed from":"Cambiaron desde","ra_Channel → State":"Canal → Estado","ra_Check license":"Verificar licencia",ra_Checked:iJ,ra_Clear:rJ,"ra_Clear filter":"Filtro claro","ra_Clear icon":"Icono claro","ra_Click to see in full size":"Haz clic para ver en tamaño completo.","ra_Click to show":"Haga clic para mostrar","ra_Clone current row":"Clonar fila actual",ra_Close:oJ,"ra_Collapse all nodes":"Contraer todos los nodos","ra_Collapse one step node":"Contraer un nivel",ra_Commercial:MJ,ra_Configure:nJ,"ra_Configure visible columns":"Configurar columnas visibles","ra_Confirm deletion of %s":"Confirmar la eliminación de %s",ra_Connected:aJ,ra_Continue:cJ,ra_Copied:uJ,"ra_Copied %s":'Copiado "%s"',"ra_Copy content":"Copiar contenido",ra_Create:lJ,"ra_Create alias":"Crear alias","ra_Create folder":"Crear carpeta","ra_Create new folder in %s":"Crear nueva carpeta en %s",ra_Crop:NJ,"ra_Define CRON...":"Definir CRON...","ra_Define functions":"Definir funciones","ra_Define rooms":"Definir habitaciones","ra_Define schedule":"Definir horario","ra_Define schedule...":"Definir horario ...",ra_Del:LJ,ra_Delete:jJ,"ra_Delete current row":"Eliminar fila actual","ra_Deselect all":"Deselecciona todo","ra_Device → Channel → State":"Dispositivo → Canal → Estado","ra_Disable/Enable translation":"Deshabilitar/Habilitar traducción",ra_Discard:gJ,ra_Disconnected:TJ,"ra_Do not ask for next 2 hours in this session":"No preguntes por las siguientes 2 horas en esta sesión.","ra_Do not export values of states":"No exportar valores de estados.","ra_Do not use let's encrypt":"No use vamos a cifrar","ra_Docker is not available":"Docker no está disponible","ra_Docker is not installed or not running":"Docker no está instalado o no se está ejecutando","ra_Double click to reset table layout":"Haga doble clic para restablecer el diseño de la tabla","ra_Drag 'n' drop some files here, or click to select files":"Arrastre y suelte algunos archivos aquí, o haga clic para seleccionar archivos","ra_Drop file here":"Suelta el archivo aquí","ra_Drop the files here...":"Suelta el archivo aquí ...","ra_Duplicate name":"Nombre duplicado","ra_Edit ACL":"Editar LCA","ra_Edit alias":"Editar alias","ra_Edit custom config":"Editar configuración personalizada","ra_Edit full path":"Editar ruta completa","ra_Edit function":"Función de edición","ra_Edit object field":"Editar campo de objeto","ra_Edit role":"Editar rol","ra_Edit room":"Cuarto de edición","ra_Edit value":"Editar valor","ra_Enter the code from that page here":"Introduzca el código de esa página aquí",ra_Error:yJ,"ra_Expand all nodes":"Expandir todos los nodos","ra_Expand one step node":"Expandir un nivel","ra_Expand/Collapse card":"Expandir/Contraer tarjeta","ra_Export configuration section":"Exportar sección de configuración","ra_Export data to %s file":"Exportar datos al archivo %s","ra_Failed to open JSON File":"No se pudo abrir el archivo JSON","ra_Fallback custom certificates":"Certificados personalizados alternativos","ra_File is too big. Max %sk allowed. Try use SVG.":"El archivo es demasiado grande. Máximo de %sk permitido. Intenta usar SVG.",ra_Filter:DJ,"ra_Filter and Data Actions":"Acciones de filtrado y datos","ra_Filter files":"Filtrar archivos","ra_Folder name":"Nombre de la carpeta","ra_Folder → Channel → State":"Carpeta → Canal → Estado","ra_Folder → Device → Channel → State":"Carpeta → Dispositivo → Canal → Estado","ra_Folder → State":"Carpeta → Estado","ra_Folders always first":"Carpetas siempre primero",ra_Friday:dJ,"ra_From file":"Desde archivo","ra_From text":"Del texto","ra_Get %s access":"Obtener %s acceso","ra_Good luck":"Buena suerte","ra_Hide empty folders":"Ocultar carpetas vacías","ra_If no file will be created in the folder, it will disappear after the browser closed":"Si no se creará ningún archivo en la carpeta, desaparecerá después de que se cierre el navegador.","ra_If the button above does not work, you can authorize manually this app by visiting this url":"Si el botón de arriba no funciona, puedes autorizar manualmente esta aplicación visitando esta URL","ra_Import and add configuration section":"Importar y agregar sección de configuración","ra_Import and replace configuration section":"Importar y reemplazar sección de configuración","ra_Import data from %s file":"Importar datos del archivo %s","ra_Import from %s":"Importar desde %s","ra_Instance %s is alive":"Instancia %s está vivo","ra_Instance %s is not alive":"Instancia %s no está vivo","ra_Instance is not alive":"La instancia no está viva","ra_Invalid CRON":"CRON no válido","ra_Invalid JSON":"JSON no válido","ra_Invalid JSON file.":"Archivo JSON inválido.","ra_Invalid JSON format. Expected an array.":"Formato JSON inválido. Se esperaba un array.","ra_Invalid answer from server":"Respuesta inválida del servidor","ra_Invalid parent folder!":"Carpeta principal no válida.","ra_Invalid structure":"Estructura inválida","ra_JSON editor":"editor JSON","ra_Last change":"Ultimo cambio",ra_Latitude:zJ,"ra_License %s":"Licencia %s","ra_License agreement":"Acuerdo de licencia","ra_License does not exist":"La licencia no existe","ra_License expired on %s":"La licencia venció el %s",'ra_License for other product "%s"':'Licencia para otro producto "%s"',"ra_License is for version %s, but required version is %s.":"La licencia es para la versión %s, pero la versión requerida es %s.","ra_License must be converted":"La licencia debe convertirse a una versión más reciente. Puedes hacerlo en tu perfil de iobroker.net.","ra_License not found in license manager. Do you want to read licenses from iobroker.net?":"Licencia no encontrada en el administrador de licencias. ¿Quieres actualizar las licencias de iobroker.net?","ra_Listen on all IPs":"Escuche en todas las IP","ra_Load configuration from file":"Cargar configuración desde archivo",ra_Logout:hJ,ra_Longitude:IJ,'ra_May not trigger "updateLicenses"':'No puede activar "updateLicenses"',ra_Message:wJ,ra_Monday:CJ,"ra_Move down":"Mover hacia abajo","ra_Move up":"Ascender",ra_Name:AJ,"ra_No data found in file":"No se encontraron datos en el archivo","ra_No one license found in license manager":"No se encontró ninguna licencia en el administrador de licencias","ra_No response from admin":"No hay respuesta del administrador","ra_No response from the backend":"No hay respuesta del backend",'ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".':'Los no expertos pueden crear nuevos objetos solo en "0_userdata.0" o "alias.0".',"ra_Not a number":"No un número","ra_OAuth Client ID":"ID de cliente OAuth","ra_OAuth Client secret":"Secreto de cliente OAuth",ra_Objects:mJ,ra_Ok:pJ,"ra_On weekdays":"De lunes a viernes","ra_Only following structures of objects are available:":"Solo están disponibles las siguientes estructuras de objetos:","ra_Only selected":"Solo seleccionados","ra_Owner group":"Grupo propietario","ra_Owner user":"Usuario propietario","ra_Passwords are not equal!":"¡Las contraseñas no son iguales!","ra_Place your files here or click here to open the browse dialog":"Coloque sus archivos aquí o haga clic aquí para abrir el cuadro de diálogo de exploración","ra_Please allow popups in your browser for this page!":"¡Permita ventanas emergentes en su navegador para esta página!","ra_Please confirm":"Por favor confirmar","ra_Please create license":"Por favor cree una licencia","ra_Please enter the license":"Por favor ingrese la licencia","ra_Please select file...":"Seleccione el archivo...","ra_Please select object ID...":"Por favor seleccione ID de objeto ...","ra_Port could be used by %s":"El puerto podría ser utilizado por %s","ra_Port is already used by %s":"El puerto ya está en uso por %s","ra_Press ENTER Key to add new item":"Presione la tecla ENTER para agregar un nuevo elemento","ra_Private certificate":"certificado privado",ra_Product:OJ,"ra_Public certificate":"Certificado público","ra_Quality code":"Calidad","ra_Refresh tree":"Actualizar árbol","ra_Reload files":"Recargar archivos",ra_Rename_Move_Copy:EJ,"ra_Renew %s access":"Renovar el acceso a %s",ra_Repeat:_J,ra_Replace:fJ,"ra_Request timed out":"Tiempo de espera agotado","ra_Restrict to folder":"Restringir a carpeta",ra_Root:SJ,ra_Saturday:xJ,ra_Save:kJ,"ra_Save and close":"Guardar y cerrar","ra_Save configuration to file":"Guardar configuración en archivo","ra_Save objects tree as JSON file":"Guardar el árbol de objetos como archivo JSON","ra_Select all":"Seleccionar todo","ra_Select color":"Seleccionar el color","ra_Select predefined icon":"Seleccionar icono predefinido","ra_Select type of export":"Seleccione tipo de exportación",ra_Selected:YJ,"ra_Selected %s object(s)":"%s objetos seleccionados","ra_Serial number (UUID)":"Número de serie (UUID)",'ra_Serial number (UUID) "%s" in license is for other device.':'El número de serie (UUID) "%s" en la licencia es para otro dispositivo.',"ra_Session will expire in %s seconds. Continue?":"La sesión expirará en %s segundos. ¿Continuar?","ra_Show all folders":"Mostrar todas las carpetas","ra_Show lines between rows":"Mostrar líneas entre filas","ra_Show/Hide object descriptions":"Mostrar/ocultar descripciones de objetos","ra_Show/hide filter input":"Mostrar/ocultar entrada de filtro","ra_Some data are not stored. Discard?":"Algunos datos no se almacenan. ¿Desechar?",ra_States:QJ,"ra_Successfully authorized. Token valid till %s and will be automatically renewed.":"Autorizado correctamente. El token es válido hasta el %s y se renovará automáticamente.","ra_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":"Autorizado correctamente. El token es válido hasta %s, pero puede caducar porque la instancia no está en ejecución.","ra_Suitable license not found in license manager":"Licencia adecuada no encontrada en el administrador de licencias",ra_Sunday:vJ,"ra_Suppress question for next %s minutes":"Suprimir pregunta durante los próximos %s minutos","ra_System language":"Lenguaje del sistema","ra_Take browser position":"Tomar posición desde el navegador","ra_Take position from system settings":"Tomar posición desde la configuración del sistema",'ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").':'Los expertos pueden crear objetos en todas partes excepto desde el segundo nivel (por ejemplo, "vis.0" o "javascript.0").',"ra_The page you are looking for was not found":"No se encontró la página que busca","ra_The schedule will be executed every minute. Are you sure?":"El cronograma se ejecutará cada minuto. ¿Estás seguro?","ra_The schedule will be executed every second. Are you sure?":"El cronograma se ejecutará cada segundo. ¿Estás seguro?",ra_Thursday:UJ,ra_Timestamp:bJ,"ra_Toggle expert mode":"Alternar modo experto","ra_Toggle the states view":"Alternar la vista de estados","ra_Toggle view mode":"Alternar modo de vista","ra_Too big":"Demasiado grande","ra_Too small":"Demasiado pequeña","ra_Transparent dialog":"Diálogo transparente",ra_Tuesday:$J,"ra_Unknown error":"Error desconocido","ra_Unknown error!":"¡Error desconocido!",ra_Update:PJ,"ra_Upload file":"Subir archivo","ra_Use all available let's encrypt certificates":"Utilice todos los certificados let's encrypt disponibles","ra_Use iobroker.acme adapter for letsencrypt certificates":"Use el adaptador iobroker.acme para los certificados de letsencrypt","ra_Use system settings for position":"Usar la configuración del sistema para la posición","ra_Used system settings":"Configuraciones del sistema usadas","ra_User files":"Archivos de usuario",ra_ValidTill:WJ,ra_Value:RJ,ra_Version:JJ,"ra_View file":"Ver archivo","ra_View: %s":"Ver: %s",ra_Wednesday:BJ,ra_Width:GJ,"ra_YAML editor":"Editor YAML",ra_Yes:FJ,"ra_You can export all objects or just the selected branch.":"Puede exportar todos los objetos o solo la rama seleccionada.","ra_You can filter entries by entering here some text":"Puede filtrar las entradas ingresando aquí algún texto","ra_You can use * as wildcard":"Puedes utilizar * como comodín",ra___different__:HJ,ra_aclEveryone_read_object:VJ,ra_aclEveryone_read_state:ZJ,ra_aclEveryone_write_object:XJ,ra_aclEveryone_write_state:KJ,ra_aclGroup_read_object:qJ,ra_aclGroup_read_state:eB,ra_aclGroup_write_object:tB,ra_aclGroup_write_state:sB,ra_aclOwner_read_object:iB,ra_aclOwner_read_state:rB,ra_aclOwner_write_object:oB,ra_aclOwner_write_state:MB,ra_buttons:nB,ra_changedFrom:aB,ra_close:cB,ra_create_boolean_state:uB,ra_create_channel:lB,ra_create_device:NB,ra_create_number_state:LB,ra_create_state:jB,ra_create_string_state:gB,ra_daysShortText:TB,ra_dow_Fr:yB,ra_dow_Mo:DB,ra_dow_Sa:dB,ra_dow_Su:zB,ra_dow_Th:hB,ra_dow_Tu:IB,ra_dow_We:wB,ra_expertMode:CB,ra_false:AB,ra_fileType_all:mB,ra_fileType_audio:pB,ra_fileType_code:OB,ra_fileType_images:EB,ra_fileType_txt:_B,ra_fileType_video:fB,"ra_fileType_video,":"Video",ra_filter_customs:SB,ra_filter_customs_without:xB,ra_filter_func:kB,ra_filter_id:YB,ra_filter_name:QB,ra_filter_role:vB,ra_filter_room:UB,ra_filter_type:bB,"ra_import data from %s file":"Importar datos del archivo %s",ra_invalidConfig:$B,ra_lastChange:PB,ra_locally:WB,ra_month_Apr:RB,ra_month_Aug:JB,ra_month_Dec:BB,ra_month_Feb:GB,ra_month_Jan:FB,ra_month_Jul:HB,ra_month_Jun:VB,ra_month_Mai:ZB,ra_month_Mar:XB,ra_month_Nov:KB,ra_month_Oct:qB,ra_month_Sep:eG,ra_months_Apr:tG,ra_months_Aug:sG,ra_months_Dec:iG,ra_months_Feb:rG,ra_months_Jan:oG,ra_months_Jul:MG,ra_months_Jun:nG,ra_months_Mai:aG,ra_months_Mar:cG,ra_months_Nov:uG,ra_months_Oct:lG,ra_months_Sep:NG,"ra_no confirm for 5 mins":"Sin confirmación durante 5 minutos",ra_none:LG,ra_object_changed_by:jG,ra_object_changed_by_user:gG,ra_otherConfig:TG,ra_qualityCode:yG,ra_repeat:DG,ra_select_folder_hint:dG,ra_show_all:zG,ra_state_changed_by:hG,ra_state_changed_from:IG,ra_timestamp:wG,ra_tooltip_ack:CG,ra_tooltip_comment:AG,ra_tooltip_copyState:mG,ra_tooltip_ctrlForLink:pG,ra_tooltip_customConfig:OG,ra_tooltip_deleteObject:EG,ra_tooltip_editObject:_G,ra_tooltip_editState:fG,ra_tooltip_expire:SG,ra_tooltip_from:xG,ra_tooltip_lc:kG,ra_tooltip_quality:YG,ra_tooltip_ts:QG,ra_tooltip_user:vG,ra_tooltip_value:UG,ra_true:bG,"ra_use seconds":"usar segundos",ra_val:$G,"ra_via internet":"vía Internet",ra_warning_every_minute:PG,ra_warning_every_second:WG,sc_cron:RG,sc_date:JG,sc_dates:BG,sc_dow:GG,sc_dows:FG,sc_every:HG,sc_everyN_dates:VG,sc_everyN_dow:ZG,sc_everyN_dows:XG,sc_everyN_hours:KG,sc_everyN_minutes:qG,sc_everyN_months:eF,sc_everyN_seconds:tF,sc_every_dates:sF,sc_every_dow:iF,sc_every_dows:rF,sc_every_hours:oF,sc_every_minutes:MF,sc_every_months:nF,sc_every_seconds:aF,sc_from:cF,sc_hours:uF,sc_interval:lF,sc_intervalBetween:NF,sc_invalid_cron:LF,sc_minutes:jF,sc_months:gF,sc_once:TF,sc_period:yF,sc_seconds:DF,sc_simple:dF,sc_specific:zF,sc_specific_dates:hF,sc_specific_dow:IF,sc_specific_dows:wF,sc_specific_hours:CF,sc_specific_minutes:AF,sc_specific_months:mF,sc_specific_seconds:pF,sc_time:OF,sc_to:EF,sc_wizard:_F,sch_all:fF,sch_astroDay:SF,sch_astroNight:xF,sch_astro_dawn:kF,sch_astro_dusk:YF,sch_astro_goldenHour:QF,sch_astro_goldenHourEnd:vF,sch_astro_nadir:UF,sch_astro_nauticalDawn:bF,sch_astro_nauticalDusk:$F,sch_astro_night:PF,sch_astro_nightEnd:WF,sch_astro_solarNoon:RF,sch_astro_sunrise:JF,sch_astro_sunriseEnd:BF,sch_astro_sunset:GF,sch_astro_sunsetStart:FF,sch_at:HF,sch_desc_atTime:VF,sch_desc_everyDay:ZF,sch_desc_everyHour:XF,sch_desc_everyMinute:KF,sch_desc_everyMonth:qF,sch_desc_everyNDay:eH,sch_desc_everyNHours:tH,sch_desc_everyNMinutes:sH,sch_desc_everyNMonths:iH,sch_desc_everyNWeeks:rH,sch_desc_everyNYears:oH,sch_desc_everyWeek:MH,sch_desc_everyYear:nH,sch_desc_intervalFromTo:aH,sch_desc_never:cH,sch_desc_onDate:uH,sch_desc_onDates:lH,sch_desc_onEveryDate:NH,sch_desc_onMonth:LH,sch_desc_onMonths:jH,sch_desc_onWeekday:gH,sch_desc_onWeekdays:TH,sch_desc_onWeekends:yH,sch_desc_onWorkdays:DH,sch_desc_onceInPast:dH,sch_desc_once_on:zH,sch_desc_validFrom:hH,sch_desc_validFromTo:IH,sch_desc_validTo:wH,sch_every:CH,sch_exactTime:AH,sch_from:mH,sch_fromTo:pH,sch_intervalTime:OH,sch_invert:EH,sch_no_one:_H,sch_on:fH,sch_period:SH,sch_periodDaily:xH,sch_periodDates:kH,sch_periodDay:YH,sch_periodEvery:QH,sch_periodEveryDay:vH,sch_periodEveryMonth:UH,sch_periodEveryWeek:bH,sch_periodEveryYear:$H,sch_periodHours:PH,sch_periodMinutes:WH,sch_periodMonth:RH,sch_periodMonthly:JH,sch_periodOnce:BH,sch_periodSpecificMonths:GH,sch_periodWeek:FH,sch_periodWeekdays:HH,sch_periodWeekend:VH,sch_periodWeekly:ZH,sch_periodWorkdays:XH,sch_periodYear:KH,sch_periodYearly:qH,sch_specificTime:eV,sch_time:tV,sch_to:sV,sch_valid:iV,sch_validFrom:rV,sch_validTo:oV,sch_wholeDay:MV,sch_yearEveryMonth:nV},cV="Akcje",uV="Dodać",lV="Anuluj",NV="Kategorie",LV="Sprawdzony",jV="Kasować",gV="Blisko",TV="Handlowy",yV="Konfiguruj",DV="Połączony",dV="Kontynuować",zV="Skopiowano",hV="Stwórz",IV="Przyciąć",wV="Delete",CV="Usunąć",AV="Wyrzucać",mV="Niepowiązany",pV="Błąd",OV="Filtr",EV="Piątek",_V="Szerokość",fV="Wyloguj",SV="Długość geograficzna",xV="Wiadomość",kV="Poniedziałek",YV="Nazwa",QV="Obiekty",vV="Dobrze",UV="Produkt",bV="Zmień nazwę/Przenieś/Kopiuj",$V="Powtarzać",PV="Zastępować",WV="Korzeń",RV="Sobota",JV="Zapisać",BV="Wybrany",GV="Stany",FV="Niedziela",HV="Czwartek",VV="Znak czasu",ZV="Wtorek",XV="Aktualizacja",KV="Obowiązuje do",qV="Wartość",eZ="Wersja",tZ="Środa",sZ="Szerokość",iZ="Tak",rZ="różne",oZ="Każdy może czytać obiekt",MZ="Każdy może czytać stan",nZ="Każdy może pisać przedmiot",aZ="Każdy może pisać stan",cZ="Grupa może odczytać obiekt",uZ="Grupa może odczytać stan",lZ="Grupa może pisać obiekt",NZ="Grupa może pisać stan",LZ="Właściciel może czytać obiekt",jZ="Właściciel może odczytać stan",gZ="Właściciel może napisać obiekt",TZ="Właściciel może pisać stan",yZ="guziki",DZ="Zmieniony z",dZ="blisko",zZ="Utwórz stan logiczny",hZ="Utwórz kanał",IZ="Utwórz urządzenie",wZ="Utwórz stan liczbowy",CZ="Utwórz stan",AZ="Utwórz stan ciągu",mZ="d.",pZ="Ks",OZ="Mo",EZ="Sa",_Z="Su",fZ="Th",SZ="Tu",xZ="My",kZ="Tryb ekspercki",YZ="FAŁSZ",QZ="Wszystkie pliki",vZ="Audio",UZ="Kod/JSON",bZ="Obrazy",$Z="Tekst",PZ="Wideo",WZ="Ustawienia",RZ="bez",JZ="Funkcjonować",BZ="ID",GZ="Imię",FZ="Rola",HZ="Sala",VZ="Rodzaj",ZZ="Nieprawidłowe ustawienia",XZ="Ostatnia zmiana",KZ="lokalnie",qZ="kwiecień",eX="sierpień",tX="grudzień",sX="luty",iX="styczeń",rX="lipiec",oX="czerwiec",MX="Mai",nX="Zniszczyć",aX="listopad",cX="październik",uX="wrzesień",lX="kwiecień",NX="sierpień",LX="grudzień",jX="luty",gX="styczeń",TX="lipiec",yX="czerwiec",DX="Mai",dX="Zniszczyć",zX="listopad",hX="październik",IX="wrzesień",wX="Żaden",CX="Obiekt zmieniony przez",AX="Obiekt ostatnio zmieniony o godz",mX="Ustawienia z innego adaptera %s",pX="Kod jakości",OX="powtarzać",EX="Aby wybrać folder, wystarczy przytrzymać klawisz „shift”, klikając folder.",_X="Pokaż wszystko",fX="Stan zmieniony przez",SX="Obiekt zmieniony z",xX="Znak czasu",kX="Potwierdzon",YX="Komentarz",QX="Skopiuj wartość stanu",vX="Przytrzymaj klawisz CTRL/⌘, aby otworzyć link",UX="Własne ustawienia",bX="Usuń obiekt",$X="Edytuj obiekt",PX="Edytuj wartość stanu",WX="Wygasa za",RX="Z",JX="Ostatnia zmiana",BX="Jakość",GX="Znak czasu",FX="Użytkownik",HX="Wartość",VX="PRAWDA",ZX="Wartość",XX="Ostrzeżenie: Zadanie CRON będzie uruchamiane co minutę w określonym przedziale czasowym!",KX="Ostrzeżenie: Zadanie CRON będzie uruchamiane co sekundę w określonym przedziale czasowym!",qX="CRON",eK="Data",tK="Daktyle",sK="Dzień",iK="Dzień tygodnia",rK="Każdy",oK="co N dni",MK="w każdy N-ty dzień tygodnia",nK="co N dnia tygodnia",aK="co N godzin",cK="co N minut",uK="co N miesięcy",lK="co N sekund",NK="codziennie",LK="każdy dzień tygodnia",jK="każdy dzień tygodnia",gK="co godzinę",TK="każda minuta",yK="każdego miesiąca",DK="każda sekunda",dK="Od",zK="godziny",hK="Interwał",IK="Interwał między",wK="Nieprawidłowy CRON",CK="Minuty",AK="miesięcy",mK="Pewnego razu",pK="Kropka",OK="sekundy",EK="Prosty",_K="Określony czas",fK="konkretne daty",SK="określone dni tygodnia",xK="określony dzień tygodni",kK="określone godziny",YK="określone minuty",QK="określone miesiące",vK="określone sekundy",UK="Czas",bK="Do",$K="Czarodziej",PK="wszystko",WK="Dzień Astro",RK="Noc Astro",JK="Świt",BK="Zmierzch",GK="Złota godzina",FK="Koniec złotej godziny",HK="Północ",VK="Morski świt",ZK="Morski zmierzch",XK="Noc",KK="Koniec nocy",qK="Południe słoneczne",eq="Wschód słońca",tq="Koniec wschodu słońca",sq="Zachód słońca",iq="Początek zachodu słońca",rq="w",oq="na %s",Mq="codziennie",nq="co godzinę",aq="każda minuta",cq="każdego miesiąca",uq="każdego dnia %s",lq="co %s godzin",Nq="co %s minut",Lq="co %s miesięcy",jq="co %s tygodni",gq="co %s lat",Tq="co tydzień",yq="każdego roku",Dq="od %s do %s",dq="nigdy",zq="na %s z %s",hq="na %s i %s z",Iq="w każdą datę",wq="%s",Cq="%s i %s",Aq="na %s",mq="na %s i %s",pq="w weekendy",Oq="w dni robocze",Eq="nie będzie już wykonywany, ponieważ start jest w przeszłości",_q="na %s",fq="z %s",Sq="Wykonaj od do",xq="do %s",kq="każdy",Yq="Określony czas",Qq="od",vq="Od-do",Uq="Czas przerwy",bq="odwracać",$q="Żaden",Pq="na",Wq="Kropka",Rq="Codziennie",Jq="Daktyle",Bq="Dzień",Gq="Każdy",Fq="Codziennie",Hq="Każdego miesiąca",Vq="Co tydzień",Zq="Każdego roku",Xq="godziny",Kq="Minuty",qq="miesiąc",eee="Miesięczny",tee="Pewnego razu",see="Określone miesiące",iee="Tydzień",ree="Dni powszednie",oee="Weekend",Mee="Co tydzień",nee="Dni robocze",aee="Rok",cee="Rocznie",uee="Określony czas",lee="Czas",Nee="do",Lee="Ważny",jee="od",gee="do",Tee="Cały dzień",yee="każdego miesiąca",Dee={"ra_%s links from aliases":"%s linków z aliasów","ra_%s object(s) processed":"Przetworzono %s obiektów","ra_%s was imported":"%s został zaimportowany","ra_Accept license":"Zaakceptuj licencję",ra_Actions:cV,"ra_Add new child object to selected parent":"Dodaj nowy obiekt potomny do wybranego rodzica","ra_Add objects tree from JSON file":"Dodaj drzewo obiektów z pliku JSON","ra_Add row":"Dodaj wiersz","ra_Advanced options":"Zaawansowane opcje","ra_All items are filtered out":"Wszystkie pozycje są odfiltrowane","ra_All objects":"Wszystkie obiekty",ra_Append:uV,"ra_Append %s entries or replace existing?":"Dołączyć wpisy %s czy zastąpić istniejące?","ra_Append or replace?":"Dołączyć czy zastąpić?","ra_Are you sure?":"Jesteś pewny?","ra_Auto (no custom columns)":"Auto (bez kolumn niestandardowych)","ra_Back to %s":"Powrót do %s","ra_Background image":"Zdjęcie w tle",ra_Cancel:lV,"ra_Cannot add items with set filter":"Nie można dodać elementów z ustawionym filtrem","ra_Cannot decode license":"Nie można zdekodować licencji","ra_Cannot determine position: System settings are empty and GPS detection is disabled in browser":"Nie można określić pozycji: ustawienia systemu są puste, a wykrywanie GPS jest wyłączone w przeglądarce",'ra_Cannot find "%s"':"Nie można znaleźć „%s”",'ra_Cannot read "%s"':"Nie można odczytać „%s”","ra_Cannot read licenses: %s":"Nie można odczytać licencji: %s","ra_Cannot retrieve options, as instance is offline":"Nie można pobrać opcji, ponieważ instancja jest w trybie offline","ra_Cannot update attribute, because not found in the object":"Nie można zaktualizować atrybutu, ponieważ nie znaleziono go w obiekcie","ra_Cannot upload":"Nie można przesłać",ra_Categories:NV,"ra_Chained certificate":"Certyfikat łańcuchowy","ra_Change color theme":"Zmień motyw kolorystyczny","ra_Changed from":"Zmieniony z","ra_Channel → State":"Kanał → Stan","ra_Check license":"Sprawdź licencję",ra_Checked:LV,ra_Clear:jV,"ra_Clear filter":"Czysty filtr","ra_Clear icon":"Wyczyść ikonę","ra_Click to see in full size":"Kliknij, aby zobaczyć w pełnym rozmiarze","ra_Click to show":"Kliknij, aby pokazać","ra_Clone current row":"Sklonuj bieżący wiersz",ra_Close:gV,"ra_Collapse all nodes":"Zwiń wszystkie węzły","ra_Collapse one step node":"Zwiń o jeden poziom",ra_Commercial:TV,ra_Configure:yV,"ra_Configure visible columns":"Skonfiguruj widoczne kolumny","ra_Confirm deletion of %s":"Potwierdź usunięcie %s",ra_Connected:DV,ra_Continue:dV,ra_Copied:zV,"ra_Copied %s":'Skopiowano "%s"',"ra_Copy content":"Kopiuj zawartość",ra_Create:hV,"ra_Create alias":"Utwórz alias","ra_Create folder":"Utwórz folder","ra_Create new folder in %s":"Utwórz nowy folder w %s",ra_Crop:IV,"ra_Define CRON...":"Zdefiniuj CRON...","ra_Define functions":"Zdefiniuj funkcje","ra_Define rooms":"Zdefiniuj pokoje","ra_Define schedule":"Zdefiniuj harmonogram","ra_Define schedule...":"Zdefiniuj harmonogram ...",ra_Del:wV,ra_Delete:CV,"ra_Delete current row":"Usuń bieżący wiersz","ra_Deselect all":"Odznacz wszystko","ra_Device → Channel → State":"Urządzenie → Kanał → Stan","ra_Disable/Enable translation":"Wyłącz/Włącz tłumaczenie",ra_Discard:AV,ra_Disconnected:mV,"ra_Do not ask for next 2 hours in this session":"Nie proś o kolejne 2 godziny w tej sesji","ra_Do not export values of states":"Nie eksportuj wartości stanów","ra_Do not use let's encrypt":"Nie używaj zaszyfrujmy","ra_Docker is not available":"Docker nie jest dostępny","ra_Docker is not installed or not running":"Docker nie jest zainstalowany lub nie działa","ra_Double click to reset table layout":"Kliknij dwukrotnie, aby zresetować układ tabeli","ra_Drag 'n' drop some files here, or click to select files":"Przeciągnij i upuść kilka plików tutaj lub kliknij, aby wybrać pliki","ra_Drop file here":"Upuść plik tutaj","ra_Drop the files here...":"Upuść plik tutaj...","ra_Duplicate name":"Zduplikowana nazwa","ra_Edit ACL":"Edytuj listy ACL","ra_Edit alias":"Edytuj alias","ra_Edit custom config":"Edytuj konfigurację niestandardową","ra_Edit full path":"Edytuj pełną ścieżkę","ra_Edit function":"Funkcja edycji","ra_Edit object field":"Edytuj pole obiektu","ra_Edit role":"Edytuj rolę","ra_Edit room":"Edytuj pokój","ra_Edit value":"Edytuj wartość","ra_Enter the code from that page here":"Wpisz kod z tej strony tutaj",ra_Error:pV,"ra_Expand all nodes":"Rozwiń wszystkie węzły","ra_Expand one step node":"Rozwiń o jeden poziom","ra_Expand/Collapse card":"Rozwiń/Zwiń kartę","ra_Export configuration section":"Sekcja konfiguracji eksportu","ra_Export data to %s file":"Eksportuj dane do pliku %s","ra_Failed to open JSON File":"Nie udało się otworzyć pliku JSON","ra_Fallback custom certificates":"Niestandardowe certyfikaty zastępcze","ra_File is too big. Max %sk allowed. Try use SVG.":"Plik jest za duży. Maksymalna dozwolona liczba %sk. Spróbuj użyć SVG.",ra_Filter:OV,"ra_Filter and Data Actions":"Akcje filtrów i danych","ra_Filter files":"Filtruj pliki","ra_Folder name":"Nazwa folderu","ra_Folder → Channel → State":"Folder → Kanał → Stan","ra_Folder → Device → Channel → State":"Folder → Urządzenie → Kanał → Stan","ra_Folder → State":"Folder → Stan","ra_Folders always first":"Foldery zawsze na pierwszym miejscu",ra_Friday:EV,"ra_From file":"Z pliku","ra_From text":"Z tekstu","ra_Get %s access":"Uzyskaj dostęp %s","ra_Good luck":"Powodzenia","ra_Hide empty folders":"Ukryj puste foldery","ra_If no file will be created in the folder, it will disappear after the browser closed":"Jeśli w folderze nie zostanie utworzony żaden plik, zniknie on po zamknięciu przeglądarki","ra_If the button above does not work, you can authorize manually this app by visiting this url":"Jeśli przycisk powyżej nie działa, możesz autoryzować tę aplikację ręcznie, odwiedzając ten adres URL","ra_Import and add configuration section":"Importuj i dodaj sekcję konfiguracji","ra_Import and replace configuration section":"Importuj i zastąp sekcję konfiguracji","ra_Import data from %s file":"Importuj dane z pliku %s","ra_Import from %s":"Importuj z %s","ra_Instance %s is alive":"Instancja %s jest aktywna","ra_Instance %s is not alive":"Instancja TEKST nie jest aktywna","ra_Instance is not alive":"Instancja nie jest aktywna","ra_Invalid CRON":"Nieprawidłowy CRON","ra_Invalid JSON":"Nieprawidłowy JSON","ra_Invalid JSON file.":"Nieprawidłowy plik JSON.","ra_Invalid JSON format. Expected an array.":"Nieprawidłowy format JSON. Oczekiwano tablicy.","ra_Invalid answer from server":"Nieprawidłowa odpowiedź z serwera","ra_Invalid parent folder!":"Nieprawidłowy folder nadrzędny!","ra_Invalid structure":"Nieprawidłowa struktura","ra_JSON editor":"Edytor JSON","ra_Last change":"Ostatnia zmiana",ra_Latitude:_V,"ra_License %s":"Licencja %s","ra_License agreement":"Umowa licencyjna","ra_License does not exist":"Licencja nie istnieje","ra_License expired on %s":"Licencja wygasła w dniu %s",'ra_License for other product "%s"':"Licencja na inny produkt „%s”","ra_License is for version %s, but required version is %s.":"Licencja dotyczy wersji %s, ale wymagana wersja to %s.","ra_License must be converted":"Licencja musi zostać przekonwertowana na nowszą wersję. Możesz to zrobić w swoim profilu iobroker.net.","ra_License not found in license manager. Do you want to read licenses from iobroker.net?":"Nie znaleziono licencji w menedżerze licencji. Chcesz zaktualizować licencje z iobroker.net?","ra_Listen on all IPs":"Słuchaj na wszystkich adresach IP","ra_Load configuration from file":"Załaduj konfigurację z pliku",ra_Logout:fV,ra_Longitude:SV,'ra_May not trigger "updateLicenses"':"Może nie uruchamiać „updateLicenses”",ra_Message:xV,ra_Monday:kV,"ra_Move down":"Padnij","ra_Move up":"Podnieść",ra_Name:YV,"ra_No data found in file":"Nie znaleziono danych w pliku","ra_No one license found in license manager":"Nie znaleziono licencji w menedżerze licencji","ra_No response from admin":"Brak odpowiedzi od administratora","ra_No response from the backend":"Brak odpowiedzi z zaplecza",'ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".':"Osoby nie będące ekspertami mogą tworzyć nowe obiekty tylko w „0_userdata.0” lub „alias.0”.","ra_Not a number":"Nie numer","ra_OAuth Client ID":"Identyfikator klienta OAuth","ra_OAuth Client secret":"Tajny klucz klienta OAuth",ra_Objects:QV,ra_Ok:vV,"ra_On weekdays":"W dni powszednie","ra_Only following structures of objects are available:":"Dostępne są tylko następujące struktury obiektów:","ra_Only selected":"Tylko wybrane","ra_Owner group":"Grupa właścicieli","ra_Owner user":"Właściciel użytkownika","ra_Passwords are not equal!":"Hasła nie są równe!","ra_Place your files here or click here to open the browse dialog":"Umieść swoje pliki tutaj lub kliknij tutaj, aby otworzyć okno dialogowe przeglądania","ra_Please allow popups in your browser for this page!":"Proszę zezwolić na wyświetlanie wyskakujących okienek w przeglądarce dla tej strony!","ra_Please confirm":"Proszę potwierdzić","ra_Please create license":"Utwórz licencję","ra_Please enter the license":"Proszę wprowadzić licencję","ra_Please select file...":"Wybierz plik...","ra_Please select object ID...":"Wybierz identyfikator obiektu ...","ra_Port could be used by %s":"Port może być używany przez %s","ra_Port is already used by %s":"Port jest już używany przez %s","ra_Press ENTER Key to add new item":"Naciśnij klawisz ENTER, aby dodać nowy element","ra_Private certificate":"Prywatny certyfikat",ra_Product:UV,"ra_Public certificate":"Certyfikat publiczny","ra_Quality code":"Jakości","ra_Refresh tree":"Odśwież drzewo","ra_Reload files":"Załaduj ponownie pliki",ra_Rename_Move_Copy:bV,"ra_Renew %s access":"Odnów dostęp %s",ra_Repeat:$V,ra_Replace:PV,"ra_Request timed out":"Upłynął limit czasu żądania","ra_Restrict to folder":"Ogranicz do folderu",ra_Root:WV,ra_Saturday:RV,ra_Save:JV,"ra_Save and close":"Zapisz i zamknij","ra_Save configuration to file":"Zapisz konfigurację do pliku","ra_Save objects tree as JSON file":"Zapisz drzewo obiektów jako plik JSON","ra_Select all":"Zaznacz wszystko","ra_Select color":"Wybierz kolor","ra_Select predefined icon":"Wybierz predefiniowaną ikonę","ra_Select type of export":"Wybierz rodzaj eksportu",ra_Selected:BV,"ra_Selected %s object(s)":"Wybrane obiekty %s","ra_Serial number (UUID)":"Numer seryjny (UUID)",'ra_Serial number (UUID) "%s" in license is for other device.':"Numer seryjny (UUID) „%s” w licencji dotyczy innego urządzenia.","ra_Session will expire in %s seconds. Continue?":"Sesja wygaśnie za %s sekund. Kontynuować?","ra_Show all folders":"Pokaż wszystkie foldery","ra_Show lines between rows":"Pokaż linie między rzędami","ra_Show/Hide object descriptions":"Pokaż/ukryj opisy obiektów","ra_Show/hide filter input":"Pokaż/ukryj wejście filtra","ra_Some data are not stored. Discard?":"Niektóre dane nie są przechowywane. Wyrzucać?",ra_States:GV,"ra_Successfully authorized. Token valid till %s and will be automatically renewed.":"Pomyślnie autoryzowano. Token ważny do %s i zostanie automatycznie odnowiony.","ra_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":"Pomyślnie autoryzowano. Token ważny do %s, ale może wygasnąć, ponieważ instancja nie jest uruchomiona.","ra_Suitable license not found in license manager":"Nie znaleziono odpowiedniej licencji w menedżerze licencji",ra_Sunday:FV,"ra_Suppress question for next %s minutes":"Ukryj pytanie przez następne %s minut","ra_System language":"Język systemu","ra_Take browser position":"Zajmij pozycję z przeglądarki","ra_Take position from system settings":"Zajmij pozycję z ustawień systemowych",'ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").':"Eksperci mogą tworzyć obiekty wszędzie poza drugim poziomem (np. „Vis.0” lub „javascript.0”).","ra_The page you are looking for was not found":"Strona, której szukasz nie została znaleziona","ra_The schedule will be executed every minute. Are you sure?":"Harmonogram będzie wykonywany co minutę. Czy jesteś pewien?","ra_The schedule will be executed every second. Are you sure?":"Harmonogram będzie wykonywany co sekundę. Czy jesteś pewien?",ra_Thursday:HV,ra_Timestamp:VV,"ra_Toggle expert mode":"Przełącz tryb eksperta","ra_Toggle the states view":"Przełącz widok stanów","ra_Toggle view mode":"Przełącz tryb widoku","ra_Too big":"Za duży","ra_Too small":"Za mały","ra_Transparent dialog":"Przejrzyste okno dialogowe",ra_Tuesday:ZV,"ra_Unknown error":"Nieznany błąd","ra_Unknown error!":"Nieznany błąd!",ra_Update:XV,"ra_Upload file":"Przesyłanie pliku","ra_Use all available let's encrypt certificates":"Użyj wszystkich dostępnych certyfikatów Let's Encrypt","ra_Use iobroker.acme adapter for letsencrypt certificates":"Użyj adaptera iobroker.acme dla certyfikatów letsencrypt","ra_Use system settings for position":"Użyj ustawień systemowych dla pozycji","ra_Used system settings":"Używane ustawienia systemowe","ra_User files":"Pliki użytkownika",ra_ValidTill:KV,ra_Value:qV,ra_Version:eZ,"ra_View file":"Zobaczyć plik","ra_View: %s":"Widok: %s",ra_Wednesday:tZ,ra_Width:sZ,"ra_YAML editor":"Edytor YAML",ra_Yes:iZ,"ra_You can export all objects or just the selected branch.":"Możesz wyeksportować wszystkie obiekty lub tylko wybraną gałąź.","ra_You can filter entries by entering here some text":"Możesz filtrować wpisy, wpisując tutaj jakiś tekst","ra_You can use * as wildcard":"Możesz użyć * jako symbolu wieloznacznego",ra___different__:rZ,ra_aclEveryone_read_object:oZ,ra_aclEveryone_read_state:MZ,ra_aclEveryone_write_object:nZ,ra_aclEveryone_write_state:aZ,ra_aclGroup_read_object:cZ,ra_aclGroup_read_state:uZ,ra_aclGroup_write_object:lZ,ra_aclGroup_write_state:NZ,ra_aclOwner_read_object:LZ,ra_aclOwner_read_state:jZ,ra_aclOwner_write_object:gZ,ra_aclOwner_write_state:TZ,ra_buttons:yZ,ra_changedFrom:DZ,ra_close:dZ,ra_create_boolean_state:zZ,ra_create_channel:hZ,ra_create_device:IZ,ra_create_number_state:wZ,ra_create_state:CZ,ra_create_string_state:AZ,ra_daysShortText:mZ,ra_dow_Fr:pZ,ra_dow_Mo:OZ,ra_dow_Sa:EZ,ra_dow_Su:_Z,ra_dow_Th:fZ,ra_dow_Tu:SZ,ra_dow_We:xZ,ra_expertMode:kZ,ra_false:YZ,ra_fileType_all:QZ,ra_fileType_audio:vZ,ra_fileType_code:UZ,ra_fileType_images:bZ,ra_fileType_txt:$Z,ra_fileType_video:PZ,"ra_fileType_video,":"Wideo",ra_filter_customs:WZ,ra_filter_customs_without:RZ,ra_filter_func:JZ,ra_filter_id:BZ,ra_filter_name:GZ,ra_filter_role:FZ,ra_filter_room:HZ,ra_filter_type:VZ,"ra_import data from %s file":"Importuj dane z pliku %s",ra_invalidConfig:ZZ,ra_lastChange:XZ,ra_locally:KZ,ra_month_Apr:qZ,ra_month_Aug:eX,ra_month_Dec:tX,ra_month_Feb:sX,ra_month_Jan:iX,ra_month_Jul:rX,ra_month_Jun:oX,ra_month_Mai:MX,ra_month_Mar:nX,ra_month_Nov:aX,ra_month_Oct:cX,ra_month_Sep:uX,ra_months_Apr:lX,ra_months_Aug:NX,ra_months_Dec:LX,ra_months_Feb:jX,ra_months_Jan:gX,ra_months_Jul:TX,ra_months_Jun:yX,ra_months_Mai:DX,ra_months_Mar:dX,ra_months_Nov:zX,ra_months_Oct:hX,ra_months_Sep:IX,"ra_no confirm for 5 mins":"brak potwierdzenia przez 5 minut",ra_none:wX,ra_object_changed_by:CX,ra_object_changed_by_user:AX,ra_otherConfig:mX,ra_qualityCode:pX,ra_repeat:OX,ra_select_folder_hint:EX,ra_show_all:_X,ra_state_changed_by:fX,ra_state_changed_from:SX,ra_timestamp:xX,ra_tooltip_ack:kX,ra_tooltip_comment:YX,ra_tooltip_copyState:QX,ra_tooltip_ctrlForLink:vX,ra_tooltip_customConfig:UX,ra_tooltip_deleteObject:bX,ra_tooltip_editObject:$X,ra_tooltip_editState:PX,ra_tooltip_expire:WX,ra_tooltip_from:RX,ra_tooltip_lc:JX,ra_tooltip_quality:BX,ra_tooltip_ts:GX,ra_tooltip_user:FX,ra_tooltip_value:HX,ra_true:VX,"ra_use seconds":"użyj sekund",ra_val:ZX,"ra_via internet":"przez internet",ra_warning_every_minute:XX,ra_warning_every_second:KX,sc_cron:qX,sc_date:eK,sc_dates:tK,sc_dow:sK,sc_dows:iK,sc_every:rK,sc_everyN_dates:oK,sc_everyN_dow:MK,sc_everyN_dows:nK,sc_everyN_hours:aK,sc_everyN_minutes:cK,sc_everyN_months:uK,sc_everyN_seconds:lK,sc_every_dates:NK,sc_every_dow:LK,sc_every_dows:jK,sc_every_hours:gK,sc_every_minutes:TK,sc_every_months:yK,sc_every_seconds:DK,sc_from:dK,sc_hours:zK,sc_interval:hK,sc_intervalBetween:IK,sc_invalid_cron:wK,sc_minutes:CK,sc_months:AK,sc_once:mK,sc_period:pK,sc_seconds:OK,sc_simple:EK,sc_specific:_K,sc_specific_dates:fK,sc_specific_dow:SK,sc_specific_dows:xK,sc_specific_hours:kK,sc_specific_minutes:YK,sc_specific_months:QK,sc_specific_seconds:vK,sc_time:UK,sc_to:bK,sc_wizard:$K,sch_all:PK,sch_astroDay:WK,sch_astroNight:RK,sch_astro_dawn:JK,sch_astro_dusk:BK,sch_astro_goldenHour:GK,sch_astro_goldenHourEnd:FK,sch_astro_nadir:HK,sch_astro_nauticalDawn:VK,sch_astro_nauticalDusk:ZK,sch_astro_night:XK,sch_astro_nightEnd:KK,sch_astro_solarNoon:qK,sch_astro_sunrise:eq,sch_astro_sunriseEnd:tq,sch_astro_sunset:sq,sch_astro_sunsetStart:iq,sch_at:rq,sch_desc_atTime:oq,sch_desc_everyDay:Mq,sch_desc_everyHour:nq,sch_desc_everyMinute:aq,sch_desc_everyMonth:cq,sch_desc_everyNDay:uq,sch_desc_everyNHours:lq,sch_desc_everyNMinutes:Nq,sch_desc_everyNMonths:Lq,sch_desc_everyNWeeks:jq,sch_desc_everyNYears:gq,sch_desc_everyWeek:Tq,sch_desc_everyYear:yq,sch_desc_intervalFromTo:Dq,sch_desc_never:dq,sch_desc_onDate:zq,sch_desc_onDates:hq,sch_desc_onEveryDate:Iq,sch_desc_onMonth:wq,sch_desc_onMonths:Cq,sch_desc_onWeekday:Aq,sch_desc_onWeekdays:mq,sch_desc_onWeekends:pq,sch_desc_onWorkdays:Oq,sch_desc_onceInPast:Eq,sch_desc_once_on:_q,sch_desc_validFrom:fq,sch_desc_validFromTo:Sq,sch_desc_validTo:xq,sch_every:kq,sch_exactTime:Yq,sch_from:Qq,sch_fromTo:vq,sch_intervalTime:Uq,sch_invert:bq,sch_no_one:$q,sch_on:Pq,sch_period:Wq,sch_periodDaily:Rq,sch_periodDates:Jq,sch_periodDay:Bq,sch_periodEvery:Gq,sch_periodEveryDay:Fq,sch_periodEveryMonth:Hq,sch_periodEveryWeek:Vq,sch_periodEveryYear:Zq,sch_periodHours:Xq,sch_periodMinutes:Kq,sch_periodMonth:qq,sch_periodMonthly:eee,sch_periodOnce:tee,sch_periodSpecificMonths:see,sch_periodWeek:iee,sch_periodWeekdays:ree,sch_periodWeekend:oee,sch_periodWeekly:Mee,sch_periodWorkdays:nee,sch_periodYear:aee,sch_periodYearly:cee,sch_specificTime:uee,sch_time:lee,sch_to:Nee,sch_valid:Lee,sch_validFrom:jee,sch_validTo:gee,sch_wholeDay:Tee,sch_yearEveryMonth:yee},dee="Дії",zee="Додайте",hee="Скасувати",Iee="Категорії",wee="Перевірено",Cee="Видалити",Aee="Закрити",mee="Комерційний",pee="Налаштувати",Oee="Підключено",Eee="Продовжити",_ee="Скопійовано",fee="Створити",See="Урожай",xee="Delete",kee="Видалити",Yee="Відкинути",Qee="Відключено",vee="Помилка",Uee="фільтр",bee="П'ятниця",$ee="Широта",Pee="Вийти",Wee="Довгота",Ree="повідомлення",Jee="понеділок",Bee="Ім'я",Gee="Об'єкти",Fee="В порядку",Hee="Продукт",Vee="Перейменувати/Перемістити/Копіювати",Zee="Повторіть",Xee="Замінити",Kee="Корінь",qee="Субота",ete="зберегти",tte="Вибране",ste="держави",ite="неділя",rte="четвер",ote="Мітка часу",Mte="вівторок",nte="оновлення",ate="Дійсний до",cte="Значення",ute="Версія",lte="Середа",Nte="Ширина",Lte="Так",jte="інший",gte="Кожен може читати об'єкт",Tte="Кожен може читати стан",yte="Кожен може написати об'єкт",Dte="Кожен може написати стан",dte="Група може читати об'єкт",zte="Група може читати стан",hte="Група може писати об'єкт",Ite="Група може писати стан",wte="Власник може читати об'єкт",Cte="Власник може читати стан",Ate="Власник може написати об'єкт",mte="Власник може написати стан",pte="кнопки",Ote="Змінено з",Ete="закрити",_te="Створіть логічний стан",fte="Створити канал",Ste="Створити пристрій",xte="Створити номерний стан",kte="Створити состояние",Yte="Створити рядковий стан",Qte="днів",vte="О",Ute="пн",bte="Sa",$te="Нд",Pte="чт",Wte="вт",Rte="ми",Jte="Експертний режим",Bte="НЕПРАВДА",Gte="Всі файли",Fte="Аудіо",Hte="Код/JSON",Vte="Зображення",Zte="текст",Xte="відео",Kte="Налаштування",qte="без",ese="функція",tse="ID",sse="Ім'я",ise="Роль",rse="Кімната",ose="Тип",Mse="Недійсні налаштування",nse="Остання зміна",ase="локально",cse="квіт",use="серп",lse="груд",Nse="лютий",Lse="січня",jse="лип",gse="черв",Tse="травень",yse="березень",Dse="Листопад",dse="жовт",zse="вер",hse="квіт",Ise="серп",wse="груд",Cse="лютий",Ase="січня",mse="лип",pse="черв",Ose="травень",Ese="березень",_se="Листопад",fse="жовт",Sse="вер",xse="немає",kse="Об'єкт змінено",Yse="Об'єкт востаннє змінено о",Qse="Налаштування з іншого адаптера %s",vse="Код якості",Use="повторити",bse="Щоб вибрати папку, просто клацніть папку, утримуючи клавішу «Shift».",$se="Показати все",Pse="Стан змінено на",Wse="Об'єкт змінено з",Rse="Мітка часу",Jse="Визнано",Bse="коментар",Gse="Скопіюйте значення стану",Fse="Утримуйте клавішу Cltr/⌘, щоб відкрити посилання",Hse="Спеціальні налаштування",Vse="Видалити об'єкт",Zse="Редагувати об'єкт",Xse="Відредагуйте значення стану",Kse="Термін дії закінчується через",qse="Від",eie="Востаннє змінено",tie="якість",sie="Позначка часу",iie="Користувач",rie="Значення",oie="ПРАВДА",Mie="Значення",nie="Попередження: завдання CRON виконуватиметься щохвилини протягом зазначеного періоду!",aie="Попередження: завдання CRON виконуватиметься кожну секунду протягом зазначеного періоду!",cie="CRON",uie="Дата",lie="дати",Nie="День",Lie="День тижня",jie="кожен",gie="кожні N днів",Tie="кожен N-й день тижня",yie="кожні N днів тижня",Die="кожні N годин",die="кожні N хвилин",zie="кожні N місяців",hie="кожні N секунд",Iie="кожен день",wie="кожен день тижня",Cie="кожен день тижня",Aie="щогодини",mie="кожну хвилину",pie="щомісяця",Oie="кожна секунда",Eie="Від",_ie="години",fie="Інтервал",Sie="Інтервал між",xie="Недійсний CRON",kie="хвилин",Yie="місяців",Qie="Один раз",vie="Крапка",Uie="секунд",bie="просто",$ie="Конкретний час",Pie="конкретні дати",Wie="конкретний день (дні) тижня",Rie="конкретний день тижня",Jie="конкретні години",Bie="конкретні хвилини",Gie="конкретні місяці",Fie="конкретні секунди",Hie="час",Vie="до",Zie="майстер",Xie="все",Kie="Астродень",qie="Астро ніч",ere="Світанок",tre="Сутінки",sre="Золота година",ire="Кінець золотої години",rre="Надір",ore="Морський світанок",Mre="Морські сутінки",nre="ніч",are="Кінець ночі",cre="Сонячний полудень",ure="Схід сонця",lre="Кінець сходу сонця",Nre="Захід сонця",Lre="Початок заходу сонця",jre="в",gre="в %s",Tre="кожен день",yre="щогодини",Dre="кожну хвилину",dre="щомісяця",zre="кожен %s день",hre="кожні %s годин",Ire="кожні %s хвилин",wre="кожні %s місяців",Cre="кожні %s тижнів",Are="кожні %s років",mre="щотижня",pre="щороку",Ore="від %s до %s",Ere="ніколи",_re="на %s з %s",fre="на %s і %s з",Sre="на кожну дату",xre="%s",kre="%s і %s",Yre="на %s",Qre="на %s і %s",vre="на вихідних",Ure="в робочі дні",bre="більше не виконуватиметься, оскільки запуск у минулому",$re="на %s",Pre="від %s",Wre="Виконати від до",Rre="до %s",Jre="кожен",Bre="Конкретний час",Gre="від",Fre="Від до",Hre="Час інтервалу",Vre="інвертувати",Zre="немає",Xre="на",Kre="Крапка",qre="Щодня",eoe="дати",toe="День",soe="кожен",ioe="Кожен день",roe="Щомісяця",ooe="Щотижня",Moe="Щороку",noe="години",aoe="хвилин",coe="місяць",uoe="Щомісяця",loe="Один раз",Noe="Конкретні місяці",Loe="тиждень",joe="будні",goe="Вихідні",Toe="Щотижня",yoe="робочі дні",Doe="рік",doe="щорічно",zoe="Конкретний час",hoe="час",Ioe="до",woe="Дійсний",Coe="від",Aoe="до",moe="Цілий день",poe="щомісяця",Ooe={"ra_%s links from aliases":"%s посилань із псевдонімів","ra_%s object(s) processed":"Оброблено %s об’єктів","ra_%s was imported":"%s було імпортовано","ra_Accept license":"Прийняти ліцензію",ra_Actions:dee,"ra_Add new child object to selected parent":"Додати новий дочірній об’єкт до вибраного батьківського","ra_Add objects tree from JSON file":"Додайте дерево об’єктів із файлу JSON","ra_Add row":"Додати рядок","ra_Advanced options":"Розширені опції","ra_All items are filtered out":"Усі елементи відфільтровано","ra_All objects":"Всі об'єкти",ra_Append:zee,"ra_Append %s entries or replace existing?":"Додати %s записів чи замінити наявні?","ra_Append or replace?":"Додати чи замінити?","ra_Are you sure?":"Ти впевнений?","ra_Auto (no custom columns)":"Автоматично (без спеціальних стовпців)","ra_Back to %s":"Назад до %s","ra_Background image":"Фонове зображення",ra_Cancel:hee,"ra_Cannot add items with set filter":"Неможливо додати елементи зі встановленим фільтром","ra_Cannot decode license":"Неможливо розшифрувати ліцензію","ra_Cannot determine position: System settings are empty and GPS detection is disabled in browser":"Неможливо визначити положення: системні налаштування порожні, а визначення GPS вимкнено в браузері",'ra_Cannot find "%s"':'Не вдається знайти "%s"','ra_Cannot read "%s"':'Неможливо прочитати "%s"',"ra_Cannot read licenses: %s":"Неможливо прочитати ліцензії: %s","ra_Cannot retrieve options, as instance is offline":"Неможливо отримати параметри, оскільки екземпляр офлайн","ra_Cannot update attribute, because not found in the object":"Неможливо оновити атрибут, оскільки його не знайдено в об’єкті","ra_Cannot upload":"Неможливо завантажити",ra_Categories:Iee,"ra_Chained certificate":"Прикутий сертифікат","ra_Change color theme":"Змінити кольорову тему","ra_Changed from":"Змінено з","ra_Channel → State":"Канал → Стан","ra_Check license":"Перевірити ліцензію",ra_Checked:wee,ra_Clear:Cee,"ra_Clear filter":"Очистити фільтр","ra_Clear icon":"Очистити значок","ra_Click to see in full size":"Натисніть, щоб побачити в повному розмірі","ra_Click to show":"Натисніть, щоб показати","ra_Clone current row":"Клонувати поточний рядок",ra_Close:Aee,"ra_Collapse all nodes":"Згорнути всі вузли","ra_Collapse one step node":"Згорнути на один рівень",ra_Commercial:mee,ra_Configure:pee,"ra_Configure visible columns":"Налаштувати видимі стовпці","ra_Confirm deletion of %s":"Підтвердити видалення %s",ra_Connected:Oee,ra_Continue:Eee,ra_Copied:_ee,"ra_Copied %s":'Скопійовано "%s"',"ra_Copy content":"Скопіюйте вміст",ra_Create:fee,"ra_Create alias":"Створити псевдонім","ra_Create folder":"Створити папку","ra_Create new folder in %s":"Створіть нову папку в %s",ra_Crop:See,"ra_Define CRON...":"Визначити CRON...","ra_Define functions":"Визначити функції","ra_Define rooms":"Визначте кімнати","ra_Define schedule":"Визначити розклад","ra_Define schedule...":"Визначити розклад...",ra_Del:xee,ra_Delete:kee,"ra_Delete current row":"Видалити поточний рядок","ra_Deselect all":"Скасувати вибір усіх","ra_Device → Channel → State":"Пристрій → Канал → Стан","ra_Disable/Enable translation":"Вимкнути/Увімкнути переклад",ra_Discard:Yee,ra_Disconnected:Qee,"ra_Do not ask for next 2 hours in this session":"Не запитуйте про наступні 2 години цього сеансу","ra_Do not export values of states":"Не експортуйте значення станів","ra_Do not use let's encrypt":"Не використовуйте let's encrypt","ra_Docker is not available":"Докер недоступний","ra_Docker is not installed or not running":"Docker не встановлено або не працює","ra_Double click to reset table layout":"Двічі клацніть, щоб скинути макет таблиці","ra_Drag 'n' drop some files here, or click to select files":"Перетягніть деякі файли сюди або натисніть, щоб вибрати файли","ra_Drop file here":"Перетягніть файл сюди","ra_Drop the files here...":"Перетягніть файл сюди...","ra_Duplicate name":"Повторюване ім'я","ra_Edit ACL":"Редагувати ACL","ra_Edit alias":"Редагувати псевдонім","ra_Edit custom config":"Редагувати спеціальну конфігурацію","ra_Edit full path":"Редагувати повний шлях","ra_Edit function":"функція редагування","ra_Edit object field":"Поле редагування об'єкта","ra_Edit role":"Редагувати роль","ra_Edit room":"Редагувати кімнату","ra_Edit value":"Редагувати значення","ra_Enter the code from that page here":"Введіть тут код з цієї сторінки",ra_Error:vee,"ra_Expand all nodes":"Розгорнути всі вузли","ra_Expand one step node":"Розгорніть один рівень","ra_Expand/Collapse card":"Розгорнути/Згорнути картку","ra_Export configuration section":"Розділ конфігурації експорту","ra_Export data to %s file":"Експортувати дані у файл %s","ra_Failed to open JSON File":"Не вдалося відкрити файл JSON","ra_Fallback custom certificates":"Запасні спеціальні сертифікати","ra_File is too big. Max %sk allowed. Try use SVG.":"Файл завеликий. Максимально дозволено %sk. Спробуйте використовувати SVG.",ra_Filter:Uee,"ra_Filter and Data Actions":"Фільтр і дії з даними","ra_Filter files":"Фільтр файлів","ra_Folder name":"Назва папки","ra_Folder → Channel → State":"Папка → Канал → Стан","ra_Folder → Device → Channel → State":"Папка → Пристрій → Канал → Стан","ra_Folder → State":"Папка → Стан","ra_Folders always first":"Папки завжди першими",ra_Friday:bee,"ra_From file":"З файлу","ra_From text":"З тексту","ra_Get %s access":"Отримайте доступ %s","ra_Good luck":"Удачі","ra_Hide empty folders":"Приховати порожні папки","ra_If no file will be created in the folder, it will disappear after the browser closed":"Якщо в папці не буде створено файл, він зникне після закриття браузера","ra_If the button above does not work, you can authorize manually this app by visiting this url":"Якщо кнопка вище не працює, ви можете авторизувати цю програму вручну, перейшовши за цим посиланням","ra_Import and add configuration section":"Розділ імпорту та додавання конфігурації","ra_Import and replace configuration section":"Розділ імпорту та заміни конфігурації","ra_Import data from %s file":"Імпортувати дані з файлу %s","ra_Import from %s":"Імпортувати з %s","ra_Instance %s is alive":"Примірник %s живий","ra_Instance %s is not alive":"Примірник %s не живий","ra_Instance is not alive":"Примірник не живий","ra_Invalid CRON":"Недійсний CRON","ra_Invalid JSON":"Недійсний JSON","ra_Invalid JSON file.":"Недійсний JSON-файл.","ra_Invalid JSON format. Expected an array.":"Недійсний формат JSON. Очікується масив.","ra_Invalid answer from server":"Недійсна відповідь від сервера","ra_Invalid parent folder!":"Недійсна батьківська папка!","ra_Invalid structure":"Недійсна структура","ra_JSON editor":"Редактор JSON","ra_Last change":"Остання зміна",ra_Latitude:$ee,"ra_License %s":"Ліцензія %s","ra_License agreement":"Ліцензійна угода","ra_License does not exist":"Ліцензії не існує","ra_License expired on %s":"Термін дії ліцензії закінчився %s",'ra_License for other product "%s"':'Ліцензія на інший продукт "%s"',"ra_License is for version %s, but required version is %s.":"Ліцензія для версії %s, але потрібна версія %s.","ra_License must be converted":"Ліцензію необхідно конвертувати до новішої версії. Ви можете зробити це у своєму профілі на iobroker.net.","ra_License not found in license manager. Do you want to read licenses from iobroker.net?":"Ліцензія не знайдена в менеджері ліцензій. Хочете оновити ліцензії з iobroker.net?","ra_Listen on all IPs":"Прослуховування на всіх IP","ra_Load configuration from file":"Завантажити конфігурацію з файлу",ra_Logout:Pee,ra_Longitude:Wee,'ra_May not trigger "updateLicenses"':'Може не запускати "updateLicenses"',ra_Message:Ree,ra_Monday:Jee,"ra_Move down":"Рухатися вниз","ra_Move up":"Рухатися вгору",ra_Name:Bee,"ra_No data found in file":"Немає даних у файлі","ra_No one license found in license manager":"У менеджері ліцензій не знайдено жодної ліцензії","ra_No response from admin":"Немає відповіді від адміністратора","ra_No response from the backend":"Немає відповіді від сервера",'ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".':"Неексперти можуть створювати нові об’єкти лише в «0_userdata.0» або «alias.0».","ra_Not a number":"Не номер","ra_OAuth Client ID":"Ідентифікатор клієнта OAuth","ra_OAuth Client secret":"Секрет клієнта OAuth",ra_Objects:Gee,ra_Ok:Fee,"ra_On weekdays":"В будні дні","ra_Only following structures of objects are available:":"Доступні тільки такі структури об'єктів:","ra_Only selected":"Тільки обрані","ra_Owner group":"Група власників","ra_Owner user":"Користувач-власник","ra_Passwords are not equal!":"Паролі не бувають рівними!","ra_Place your files here or click here to open the browse dialog":"Розмістіть свої файли тут або натисніть тут, щоб відкрити діалогове вікно перегляду","ra_Please allow popups in your browser for this page!":"Будь ласка, дозвольте спливаючі вікна у вашому браузері для цієї сторінки!","ra_Please confirm":"Будь-ласка підтвердіть","ra_Please create license":"Будь ласка, створіть ліцензію","ra_Please enter the license":"Будь ласка, введіть ліцензію","ra_Please select file...":"Виберіть файл...","ra_Please select object ID...":"Виберіть ідентифікатор об'єкта...","ra_Port could be used by %s":"Порт може використовуватися %s","ra_Port is already used by %s":"Порт уже використовується %s","ra_Press ENTER Key to add new item":"Натисніть клавішу ENTER, щоб додати новий елемент","ra_Private certificate":"Приватний сертифікат",ra_Product:Hee,"ra_Public certificate":"Публічний сертифікат","ra_Quality code":"якість","ra_Refresh tree":"Оновити дерево","ra_Reload files":"Перезавантажте файли",ra_Rename_Move_Copy:Vee,"ra_Renew %s access":"Поновити доступ %s",ra_Repeat:Zee,ra_Replace:Xee,"ra_Request timed out":"Час запиту вичерпано","ra_Restrict to folder":"Обмежити папкою",ra_Root:Kee,ra_Saturday:qee,ra_Save:ete,"ra_Save and close":"Зберегти та закрити","ra_Save configuration to file":"Зберегти конфігурацію у файл","ra_Save objects tree as JSON file":"Зберегти дерево об’єктів як файл JSON","ra_Select all":"Вибрати все","ra_Select color":"Виберіть колір","ra_Select predefined icon":"Виберіть попередньо визначений значок","ra_Select type of export":"Виберіть тип експорту",ra_Selected:tte,"ra_Selected %s object(s)":"Вибрані об’єкти %s","ra_Serial number (UUID)":"Серійний номер (UUID)",'ra_Serial number (UUID) "%s" in license is for other device.':'Серійний номер (UUID) "%s" у ліцензії призначений для іншого пристрою.',"ra_Session will expire in %s seconds. Continue?":"Сеанс закінчиться через %s секунд. Продовжити?","ra_Show all folders":"Показати всі папки","ra_Show lines between rows":"Показувати лінії між рядками","ra_Show/Hide object descriptions":"Показати/Сховати описи об’єктів","ra_Show/hide filter input":"Показати/сховати введення фільтра","ra_Some data are not stored. Discard?":"Деякі дані не зберігаються. Відкинути?",ra_States:ste,"ra_Successfully authorized. Token valid till %s and will be automatically renewed.":"Авторизацію успішно пройшло. Токен дійсний до %s та буде автоматично поновлено.","ra_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":"Авторизацію успішно виконано. Токен дійсний до %s, але його термін дії може закінчитися, оскільки екземпляр не запущено.","ra_Suitable license not found in license manager":"Відповідна ліцензія не знайдена в менеджері ліцензій",ra_Sunday:ite,"ra_Suppress question for next %s minutes":"Приховати запитання на наступні %s хвилин","ra_System language":"Системна мова","ra_Take browser position":"Займіть позицію з браузера","ra_Take position from system settings":"Займіть позицію в налаштуваннях системи",'ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").':"Експерти можуть створювати об’єкти всюди, крім другого рівня (наприклад, «vis.0» або «javascript.0»).","ra_The page you are looking for was not found":"Сторінка, яку ви шукаєте, не знайдена","ra_The schedule will be executed every minute. Are you sure?":"Розклад буде виконуватися щохвилини. Ви впевнені?","ra_The schedule will be executed every second. Are you sure?":"Розклад буде виконуватися щосекунди. Ви впевнені?",ra_Thursday:rte,ra_Timestamp:ote,"ra_Toggle expert mode":"Перемкнути експертний режим","ra_Toggle the states view":"Перемкнути перегляд штатів","ra_Toggle view mode":"Перемкнути режим перегляду","ra_Too big":"Занадто великий","ra_Too small":"Занадто малий","ra_Transparent dialog":"Прозорий діалог",ra_Tuesday:Mte,"ra_Unknown error":"Невідома помилка","ra_Unknown error!":"Невідома помилка!",ra_Update:nte,"ra_Upload file":"Завантажити файл","ra_Use all available let's encrypt certificates":"Використовуйте всі доступні сертифікати let's encrypt","ra_Use iobroker.acme adapter for letsencrypt certificates":"Використовуйте адаптер iobroker.acme для сертифікатів letsencrypt","ra_Use system settings for position":"Використовуйте системні налаштування для позиції","ra_Used system settings":"Використані системні налаштування","ra_User files":"Файли користувача",ra_ValidTill:ate,ra_Value:cte,ra_Version:ute,"ra_View file":"Переглянути файл","ra_View: %s":"Перегляд: %s",ra_Wednesday:lte,ra_Width:Nte,"ra_YAML editor":"Редактор YAML",ra_Yes:Lte,"ra_You can export all objects or just the selected branch.":"Ви можете експортувати всі об’єкти або лише вибрану гілку.","ra_You can filter entries by entering here some text":"Ви можете фільтрувати записи, ввівши тут певний текст","ra_You can use * as wildcard":"Ви можете використовувати * як символ підстановки",ra___different__:jte,ra_aclEveryone_read_object:gte,ra_aclEveryone_read_state:Tte,ra_aclEveryone_write_object:yte,ra_aclEveryone_write_state:Dte,ra_aclGroup_read_object:dte,ra_aclGroup_read_state:zte,ra_aclGroup_write_object:hte,ra_aclGroup_write_state:Ite,ra_aclOwner_read_object:wte,ra_aclOwner_read_state:Cte,ra_aclOwner_write_object:Ate,ra_aclOwner_write_state:mte,ra_buttons:pte,ra_changedFrom:Ote,ra_close:Ete,ra_create_boolean_state:_te,ra_create_channel:fte,ra_create_device:Ste,ra_create_number_state:xte,ra_create_state:kte,ra_create_string_state:Yte,ra_daysShortText:Qte,ra_dow_Fr:vte,ra_dow_Mo:Ute,ra_dow_Sa:bte,ra_dow_Su:$te,ra_dow_Th:Pte,ra_dow_Tu:Wte,ra_dow_We:Rte,ra_expertMode:Jte,ra_false:Bte,ra_fileType_all:Gte,ra_fileType_audio:Fte,ra_fileType_code:Hte,ra_fileType_images:Vte,ra_fileType_txt:Zte,ra_fileType_video:Xte,"ra_fileType_video,":"відео",ra_filter_customs:Kte,ra_filter_customs_without:qte,ra_filter_func:ese,ra_filter_id:tse,ra_filter_name:sse,ra_filter_role:ise,ra_filter_room:rse,ra_filter_type:ose,"ra_import data from %s file":"Імпортувати дані з файлу %s",ra_invalidConfig:Mse,ra_lastChange:nse,ra_locally:ase,ra_month_Apr:cse,ra_month_Aug:use,ra_month_Dec:lse,ra_month_Feb:Nse,ra_month_Jan:Lse,ra_month_Jul:jse,ra_month_Jun:gse,ra_month_Mai:Tse,ra_month_Mar:yse,ra_month_Nov:Dse,ra_month_Oct:dse,ra_month_Sep:zse,ra_months_Apr:hse,ra_months_Aug:Ise,ra_months_Dec:wse,ra_months_Feb:Cse,ra_months_Jan:Ase,ra_months_Jul:mse,ra_months_Jun:pse,ra_months_Mai:Ose,ra_months_Mar:Ese,ra_months_Nov:_se,ra_months_Oct:fse,ra_months_Sep:Sse,"ra_no confirm for 5 mins":"без підтвердження протягом 5 хв",ra_none:xse,ra_object_changed_by:kse,ra_object_changed_by_user:Yse,ra_otherConfig:Qse,ra_qualityCode:vse,ra_repeat:Use,ra_select_folder_hint:bse,ra_show_all:$se,ra_state_changed_by:Pse,ra_state_changed_from:Wse,ra_timestamp:Rse,ra_tooltip_ack:Jse,ra_tooltip_comment:Bse,ra_tooltip_copyState:Gse,ra_tooltip_ctrlForLink:Fse,ra_tooltip_customConfig:Hse,ra_tooltip_deleteObject:Vse,ra_tooltip_editObject:Zse,ra_tooltip_editState:Xse,ra_tooltip_expire:Kse,ra_tooltip_from:qse,ra_tooltip_lc:eie,ra_tooltip_quality:tie,ra_tooltip_ts:sie,ra_tooltip_user:iie,ra_tooltip_value:rie,ra_true:oie,"ra_use seconds":"використовуйте секунди",ra_val:Mie,"ra_via internet":"через інтернет",ra_warning_every_minute:nie,ra_warning_every_second:aie,sc_cron:cie,sc_date:uie,sc_dates:lie,sc_dow:Nie,sc_dows:Lie,sc_every:jie,sc_everyN_dates:gie,sc_everyN_dow:Tie,sc_everyN_dows:yie,sc_everyN_hours:Die,sc_everyN_minutes:die,sc_everyN_months:zie,sc_everyN_seconds:hie,sc_every_dates:Iie,sc_every_dow:wie,sc_every_dows:Cie,sc_every_hours:Aie,sc_every_minutes:mie,sc_every_months:pie,sc_every_seconds:Oie,sc_from:Eie,sc_hours:_ie,sc_interval:fie,sc_intervalBetween:Sie,sc_invalid_cron:xie,sc_minutes:kie,sc_months:Yie,sc_once:Qie,sc_period:vie,sc_seconds:Uie,sc_simple:bie,sc_specific:$ie,sc_specific_dates:Pie,sc_specific_dow:Wie,sc_specific_dows:Rie,sc_specific_hours:Jie,sc_specific_minutes:Bie,sc_specific_months:Gie,sc_specific_seconds:Fie,sc_time:Hie,sc_to:Vie,sc_wizard:Zie,sch_all:Xie,sch_astroDay:Kie,sch_astroNight:qie,sch_astro_dawn:ere,sch_astro_dusk:tre,sch_astro_goldenHour:sre,sch_astro_goldenHourEnd:ire,sch_astro_nadir:rre,sch_astro_nauticalDawn:ore,sch_astro_nauticalDusk:Mre,sch_astro_night:nre,sch_astro_nightEnd:are,sch_astro_solarNoon:cre,sch_astro_sunrise:ure,sch_astro_sunriseEnd:lre,sch_astro_sunset:Nre,sch_astro_sunsetStart:Lre,sch_at:jre,sch_desc_atTime:gre,sch_desc_everyDay:Tre,sch_desc_everyHour:yre,sch_desc_everyMinute:Dre,sch_desc_everyMonth:dre,sch_desc_everyNDay:zre,sch_desc_everyNHours:hre,sch_desc_everyNMinutes:Ire,sch_desc_everyNMonths:wre,sch_desc_everyNWeeks:Cre,sch_desc_everyNYears:Are,sch_desc_everyWeek:mre,sch_desc_everyYear:pre,sch_desc_intervalFromTo:Ore,sch_desc_never:Ere,sch_desc_onDate:_re,sch_desc_onDates:fre,sch_desc_onEveryDate:Sre,sch_desc_onMonth:xre,sch_desc_onMonths:kre,sch_desc_onWeekday:Yre,sch_desc_onWeekdays:Qre,sch_desc_onWeekends:vre,sch_desc_onWorkdays:Ure,sch_desc_onceInPast:bre,sch_desc_once_on:$re,sch_desc_validFrom:Pre,sch_desc_validFromTo:Wre,sch_desc_validTo:Rre,sch_every:Jre,sch_exactTime:Bre,sch_from:Gre,sch_fromTo:Fre,sch_intervalTime:Hre,sch_invert:Vre,sch_no_one:Zre,sch_on:Xre,sch_period:Kre,sch_periodDaily:qre,sch_periodDates:eoe,sch_periodDay:toe,sch_periodEvery:soe,sch_periodEveryDay:ioe,sch_periodEveryMonth:roe,sch_periodEveryWeek:ooe,sch_periodEveryYear:Moe,sch_periodHours:noe,sch_periodMinutes:aoe,sch_periodMonth:coe,sch_periodMonthly:uoe,sch_periodOnce:loe,sch_periodSpecificMonths:Noe,sch_periodWeek:Loe,sch_periodWeekdays:joe,sch_periodWeekend:goe,sch_periodWeekly:Toe,sch_periodWorkdays:yoe,sch_periodYear:Doe,sch_periodYearly:doe,sch_specificTime:zoe,sch_time:hoe,sch_to:Ioe,sch_valid:woe,sch_validFrom:Coe,sch_validTo:Aoe,sch_wholeDay:moe,sch_yearEveryMonth:poe},Eoe="操作",_oe="附加",foe="取消",Soe="类别",xoe="勾选",koe="删除",Yoe="关",Qoe="商业的",voe="配置",Uoe="连接的",boe="继续",$oe="复制的",Poe="创建",Woe="庄稼",Roe="Delete",Joe="删除",Boe="丢弃",Goe="断开连接",Foe="错误",Hoe="筛选",Voe="星期五",Zoe="纬度",Xoe="登出",Koe="经度",qoe="信息",eMe="周一",tMe="姓名",sMe="对象",iMe="好",rMe="产品",oMe="重命名/移动/复制",MMe="重复",nMe="代替",aMe="根",cMe="周六",uMe="保存",lMe="已选",NMe="状态",LMe="星期日",jMe="周四",gMe="时间戳记",TMe="周二",yMe="更新资料",DMe="有效期至",dMe="值",zMe="版本",hMe="周三",IMe="宽度",wMe="是的",CMe="不同的",AMe="每个人都可以阅读对象",mMe="每个人都可以阅读状态",pMe="每个人都可以写对象",OMe="每个人都可以写状态",EMe="组可以读取对象",_Me="群组可以读取状态",fMe="组可以写对象",SMe="组可以写状态",xMe="所有者可以读取对象",kMe="所有者可以读取状态",YMe="所有者可以写对象",QMe="所有者可以写状态",vMe="纽扣",UMe="更改为",bMe="关闭",$Me="创建布尔状态",PMe="创建频道",WMe="创建设备",RMe="创建号码状态",JMe="创建状态",BMe="创建字符串状态",GMe="天",FMe="r",HMe="莫",VMe="萨",ZMe="苏",XMe="Th",KMe="Tu",qMe="我们",ene="专家模式",tne="错误的",sne="所有文件",ine="声音的",rne="代码/JSON",one="图片",Mne="文本",nne="视频",ane="设定值",cne="没有",une="功能",lne="ID",Nne="名称",Lne="角色",jne="房间",gne="类型",Tne="无效的设定",yne="最后一次变更",Dne="本地",dne="4月",zne="八月",hne="十二月",Ine="二月",wne="简",Cne="七月",Ane="君",mne="迈",pne="三月",One="十一月",Ene="十月",_ne="九月",fne="4月",Sne="八月",xne="十二月",kne="二月",Yne="简",Qne="七月",vne="君",Une="迈",bne="三月",$ne="十一月",Pne="十月",Wne="九月",Rne="没有任何",Jne="物件变更者",Bne="对象上次更改时间为",Gne="来自其他适配器%s的设置",Fne="质量代码",Hne="重复",Vne="要选择文件夹,只需按住“shift”键单击文件夹即可。",Zne="显示全部",Xne="状态由",Kne="对象已从更改",qne="时间戳记",eae="致谢国旗",tae="评论",sae="复制状态值",iae="按住 Cltr/⌘ 键打开链接",rae="自定义设置",oae="删除物件",Mae="编辑物件",nae="编辑状态值",aae="有效期:",cae="从",uae="最后改变了",lae="质量",Nae="时间戳",Lae="用户",jae="值",gae="真的",Tae="值",yae="警告:CRON 作业将在指定期间内每分钟运行一次!",Dae="警告:CRON 作业将在指定期间内每秒运行一次!",dae="周期任务",zae="日期",hae="日",Iae="天",wae="星期",Cae="每",Aae="每N天",mae="每周的第 N 天",pae="每周N天",Oae="每N小时一次",Eae="每N分钟",_ae="每N个月",fae="每N秒",Sae="每天",xae="一周的每一天",kae="一周的每一天",Yae="每小时",Qae="每分钟",vae="每月",Uae="每秒",bae="从",$ae="小时",Pae="间隔",Wae="间隔时间",Rae="无效的 CRON",Jae="分钟",Bae="月",Gae="一次",Fae="周期",Hae="秒",Vae="简单模式",Zae="特定的时间",Xae="特定的日子",Kae="一周中的特定日子",qae="特定的一周",ece="特定的小时",tce="特定的分钟",sce="特定的月份",ice="特定的描述",rce="时间",oce="至",Mce="向导模式",nce="全选",ace="天文白天",cce="天文夜晚",uce="黎明",lce="黄昏",Nce="黄金时段",Lce="黄金时段结束",jce="天底",gce="航海黎明",Tce="航海黄昏",yce="夜晚",Dce="夜晚结束",dce="正午",zce="日出",hce="日出结束",Ice="日落",wce="日落开始",Cce="在",Ace="的%s",mce="每天",pce="每小时",Oce="每分钟",Ece="每月",_ce="每%s天",fce="每%s小时",Sce="每%s分钟",xce="每%s月",kce="每%s周",Yce="每%s年",Qce="每周",vce="每年",Uce="从%s到%s",bce="决不",$ce="在%s的%s上",Pce="在%s和%s上",Wce="在每天",Rce="%s",Jce="%s和%s",Bce="在%s上",Gce="在%s和%s上",Fce="在周末",Hce="在工作日",Vce="将不再执行,因为起始时间已经是过去的时间了。",Zce="在%s上",Xce="来自%s",Kce="从执行到",qce="到%s",eue="每",tue="特定的时间",sue="从",iue="从到",rue="间隔时间",oue="倒置",Mue="取消全选",nue="的",aue="周期",cue="每天",uue="日期",lue="天",Nue="每",Lue="每天",jue="每月",gue="每周",Tue="每年",yue="小时",Due="分钟",due="月",zue="每月一次",hue="一次",Iue="特定的月份",wue="周",Cue="工作日",Aue="周末",mue="每周",pue="工作日",Oue="年",Eue="每年",_ue="特定的时间",fue="时间",Sue="至",xue="生效",kue="从",Yue="至",Que="一整天",vue="每月",Uue={"ra_%s links from aliases":"来自别名的 %s 个链接","ra_%s object(s) processed":"已处理%s个对象","ra_%s was imported":"对象已导入","ra_Accept license":"接受许可",ra_Actions:Eoe,"ra_Add new child object to selected parent":"将新的子对象添加到选定的父对象","ra_Add objects tree from JSON file":"从JSON文件添加对象树","ra_Add row":"添加行","ra_Advanced options":"高级选项","ra_All items are filtered out":"所有项目都被过滤掉","ra_All objects":"所有对象",ra_Append:_oe,"ra_Append %s entries or replace existing?":"追加 %s 条目还是替换现有条目?","ra_Append or replace?":"追加还是替换?","ra_Are you sure?":"你确定吗?","ra_Auto (no custom columns)":"自动(无自定义列)","ra_Back to %s":"返回“%s”","ra_Background image":"背景图像",ra_Cancel:foe,"ra_Cannot add items with set filter":"无法使用设置过滤器添加项目","ra_Cannot decode license":"无法解码许可证","ra_Cannot determine position: System settings are empty and GPS detection is disabled in browser":"无法确定位置:系统设置为空且浏览器中禁用了 GPS 检测",'ra_Cannot find "%s"':"找不到“%s”",'ra_Cannot read "%s"':"无法阅读“%s”","ra_Cannot read licenses: %s":"无法读取许可证:%s","ra_Cannot retrieve options, as instance is offline":"无法检索选项,因为实例处于脱机状态","ra_Cannot update attribute, because not found in the object":"无法更新属性,因为在对象中找不到","ra_Cannot upload":"无法上传",ra_Categories:Soe,"ra_Chained certificate":"链式证书","ra_Change color theme":"更改颜色主题","ra_Changed from":"更改为","ra_Channel → State":"频道→状态","ra_Check license":"检查许可证",ra_Checked:xoe,ra_Clear:koe,"ra_Clear filter":"清除筛选","ra_Clear icon":"清除图标","ra_Click to see in full size":"点击查看完整尺寸","ra_Click to show":"点击显示","ra_Clone current row":"克隆当前行",ra_Close:Yoe,"ra_Collapse all nodes":"收合所有节点","ra_Collapse one step node":"折叠一级",ra_Commercial:Qoe,ra_Configure:voe,"ra_Configure visible columns":"配置可见列","ra_Confirm deletion of %s":"确认删除%s",ra_Connected:Uoe,ra_Continue:boe,ra_Copied:$oe,"ra_Copied %s":'复制的"%s"',"ra_Copy content":"复制内容",ra_Create:Poe,"ra_Create alias":"创建别名","ra_Create folder":"创建文件夹","ra_Create new folder in %s":"在%s中创建新文件夹",ra_Crop:Woe,"ra_Define CRON...":"定义 CRON...","ra_Define functions":"定义功能","ra_Define rooms":"定义房间","ra_Define schedule":"定义时间表","ra_Define schedule...":"定义时间表...",ra_Del:Roe,ra_Delete:Joe,"ra_Delete current row":"删除当前行","ra_Deselect all":"全部取消选择","ra_Device → Channel → State":"设备→频道→状态","ra_Disable/Enable translation":"禁用/启用翻译",ra_Discard:Boe,ra_Disconnected:Goe,"ra_Do not ask for next 2 hours in this session":"本次会话中不要询问接下来的 2 个小时","ra_Do not export values of states":"不导出状态值","ra_Do not use let's encrypt":"不要使用让我们加密","ra_Docker is not available":"Docker 不可用","ra_Docker is not installed or not running":"Docker 未安装或未运行","ra_Double click to reset table layout":"双击重置表格布局","ra_Drag 'n' drop some files here, or click to select files":"将一些文件拖放到此处,或单击以选择文件","ra_Drop file here":"将档案放在这里","ra_Drop the files here...":"把文件放在这里...","ra_Duplicate name":"名称重复","ra_Edit ACL":"编辑访问控制列表","ra_Edit alias":"编辑别名","ra_Edit custom config":"编辑自定义配置","ra_Edit full path":"编辑完整路径","ra_Edit function":"编辑功能","ra_Edit object field":"编辑对象字段","ra_Edit role":"编辑角色","ra_Edit room":"编辑室","ra_Edit value":"编辑值","ra_Enter the code from that page here":"在此处输入该页面的代码",ra_Error:Foe,"ra_Expand all nodes":"展开所有节点","ra_Expand one step node":"扩大一级","ra_Expand/Collapse card":"展开/折叠卡","ra_Export configuration section":"导出配置部分","ra_Export data to %s file":"将数据导出到 %s 文件","ra_Failed to open JSON File":"无法打开JSON文件","ra_Fallback custom certificates":"后备自定义证书","ra_File is too big. Max %sk allowed. Try use SVG.":"文件太大。允许的最大字节%s数。尝试使用 SVG。",ra_Filter:Hoe,"ra_Filter and Data Actions":"过滤和数据操作","ra_Filter files":"过滤文件","ra_Folder name":"文件夹名称","ra_Folder → Channel → State":"文件夹→频道→状态","ra_Folder → Device → Channel → State":"文件夹→设备→频道→状态","ra_Folder → State":"文件夹→状态","ra_Folders always first":"资料夹永远优先",ra_Friday:Voe,"ra_From file":"从文件","ra_From text":"文本","ra_Get %s access":"获取 %s 访问权限","ra_Good luck":"祝你好运","ra_Hide empty folders":"隐藏空文件夹","ra_If no file will be created in the folder, it will disappear after the browser closed":"如果在该文件夹中未创建任何文件,则该文件将在浏览器关闭后消失","ra_If the button above does not work, you can authorize manually this app by visiting this url":"如果上面的按钮不起作用,您可以通过访问此网址手动授权此应用","ra_Import and add configuration section":"导入并添加配置部分","ra_Import and replace configuration section":"导入和替换配置部分","ra_Import data from %s file":"从 %s 文件导入数据","ra_Import from %s":"从 %s 导入","ra_Instance %s is alive":"实例 %s 是活动的","ra_Instance %s is not alive":"实例 %s 不存在","ra_Instance is not alive":"实例不存在","ra_Invalid CRON":"无效的 CRON","ra_Invalid JSON":"JSON 无效","ra_Invalid JSON file.":"无效的JSON文件。","ra_Invalid JSON format. Expected an array.":"JSON格式无效。应为数组。","ra_Invalid answer from server":"来自服务器的无效答案","ra_Invalid parent folder!":"父文件夹无效!","ra_Invalid structure":"结构无效","ra_JSON editor":"JSON 编辑器","ra_Last change":"最后一次变更",ra_Latitude:Zoe,"ra_License %s":"许可证 %s","ra_License agreement":"许可协议","ra_License does not exist":"许可证不存在","ra_License expired on %s":"许可证已于 %s 过期",'ra_License for other product "%s"':"其他产品“%s”的许可证","ra_License is for version %s, but required version is %s.":"许可证适用于版本 %s,但所需版本为 %s。","ra_License must be converted":"许可证必须转换为更新版本。您可以在 iobroker.net 个人资料中执行此操作。","ra_License not found in license manager. Do you want to read licenses from iobroker.net?":"在许可证管理器中找不到许可证。您要从 iobroker.net 更新许可证吗?","ra_Listen on all IPs":"监听所有IP","ra_Load configuration from file":"从文件加载配置",ra_Logout:Xoe,ra_Longitude:Koe,'ra_May not trigger "updateLicenses"':"可能不会触发“updateLicenses”",ra_Message:qoe,ra_Monday:eMe,"ra_Move down":"下移","ra_Move up":"提升",ra_Name:tMe,"ra_No data found in file":"文件中未找到数据","ra_No one license found in license manager":"许可证管理器中未找到任何许可证","ra_No response from admin":"管理员没有回应","ra_No response from the backend":"后端无响应",'ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".':"非专家只能在“ 0_userdata.0”或“ alias.0”中创建新对象。","ra_Not a number":"不是数字","ra_OAuth Client ID":"OAuth客户端ID","ra_OAuth Client secret":"OAuth 客户端密钥",ra_Objects:sMe,ra_Ok:iMe,"ra_On weekdays":"在工作日","ra_Only following structures of objects are available:":"仅以下对象结构可用:","ra_Only selected":"只选择","ra_Owner group":"所有者组","ra_Owner user":"所有者用户","ra_Passwords are not equal!":"密码不相等!","ra_Place your files here or click here to open the browse dialog":"将文件放在此处或单击此处打开浏览对话框","ra_Please allow popups in your browser for this page!":"请允许浏览器弹出此页面!","ra_Please confirm":"请确认","ra_Please create license":"请创建许可证","ra_Please enter the license":"请输入许可证","ra_Please select file...":"请选择文件...","ra_Please select object ID...":"请选择对象ID ...","ra_Port could be used by %s":"%s 可以使用端口","ra_Port is already used by %s":"端口已被 %s 使用","ra_Press ENTER Key to add new item":"按 ENTER 键添加新项目","ra_Private certificate":"私有证书",ra_Product:rMe,"ra_Public certificate":"公共证书","ra_Quality code":"质量代码","ra_Refresh tree":"刷新树","ra_Reload files":"重新载入文件",ra_Rename_Move_Copy:oMe,"ra_Renew %s access":"续订 %s 访问权限",ra_Repeat:MMe,ra_Replace:nMe,"ra_Request timed out":"请求超时","ra_Restrict to folder":"限制到文件夹",ra_Root:aMe,ra_Saturday:cMe,ra_Save:uMe,"ra_Save and close":"保存并关闭","ra_Save configuration to file":"将配置保存到文件","ra_Save objects tree as JSON file":"将对象树另存为JSON文件","ra_Select all":"全选","ra_Select color":"选择颜色","ra_Select predefined icon":"选择预定义图标","ra_Select type of export":"选择导出类型",ra_Selected:lMe,"ra_Selected %s object(s)":"选定的 %s 个对象","ra_Serial number (UUID)":"序列号 (UUID)",'ra_Serial number (UUID) "%s" in license is for other device.':"许可证中的序列号 (UUID)“%s”用于其他设备。","ra_Session will expire in %s seconds. Continue?":"会话将在 %s 秒后过期。是否继续?","ra_Show all folders":"显示所有文件夹","ra_Show lines between rows":"显示行之间的线","ra_Show/Hide object descriptions":"显示/隐藏对象描述","ra_Show/hide filter input":"显示/隐藏过滤器输入","ra_Some data are not stored. Discard?":"部分数据未存储。丢弃?",ra_States:NMe,"ra_Successfully authorized. Token valid till %s and will be automatically renewed.":"授权成功。令牌有效期至 %s,并将自动续订。","ra_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":"授权成功。令牌有效期至 %s,但由于实例未运行,令牌可能会过期。","ra_Suitable license not found in license manager":"在许可证管理器中找不到合适的许可证",ra_Sunday:LMe,"ra_Suppress question for next %s minutes":"在接下来的%s分钟内取消提问","ra_System language":"系统语言","ra_Take browser position":"从浏览器获取位置","ra_Take position from system settings":"从系统设置中获取位置",'ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").':"专家可以在任何地方创建对象,但要从第二层开始(例如“ vis.0”或“ javascript.0”)。","ra_The page you are looking for was not found":"未找到您要查找的页面","ra_The schedule will be executed every minute. Are you sure?":"该计划将每分钟执行一次。您确定吗?","ra_The schedule will be executed every second. Are you sure?":"该计划将每秒执行一次。你确定吗?",ra_Thursday:jMe,ra_Timestamp:gMe,"ra_Toggle expert mode":"切换专家模式","ra_Toggle the states view":"切换状态视图","ra_Toggle view mode":"切换检视模式","ra_Too big":"太大","ra_Too small":"太小","ra_Transparent dialog":"透明对话框",ra_Tuesday:TMe,"ra_Unknown error":"未知错误","ra_Unknown error!":"未知错误!",ra_Update:yMe,"ra_Upload file":"上传文件","ra_Use all available let's encrypt certificates":"使用所有可用的让我们加密证书","ra_Use iobroker.acme adapter for letsencrypt certificates":"使用 iobroker.acme 适配器获取 letsencrypt 证书","ra_Use system settings for position":"使用系统设置定位","ra_Used system settings":"使用的系统设置","ra_User files":"用户档案",ra_ValidTill:DMe,ra_Value:dMe,ra_Version:zMe,"ra_View file":"查看文件","ra_View: %s":"查看:%s",ra_Wednesday:hMe,ra_Width:IMe,"ra_YAML editor":"YAML 编辑器",ra_Yes:wMe,"ra_You can export all objects or just the selected branch.":"您可以导出所有对象或仅导出选定的分支。","ra_You can filter entries by entering here some text":"您可以通过在此处输入一些文本来过滤条目","ra_You can use * as wildcard":"您可以使用 * 作为通配符",ra___different__:CMe,ra_aclEveryone_read_object:AMe,ra_aclEveryone_read_state:mMe,ra_aclEveryone_write_object:pMe,ra_aclEveryone_write_state:OMe,ra_aclGroup_read_object:EMe,ra_aclGroup_read_state:_Me,ra_aclGroup_write_object:fMe,ra_aclGroup_write_state:SMe,ra_aclOwner_read_object:xMe,ra_aclOwner_read_state:kMe,ra_aclOwner_write_object:YMe,ra_aclOwner_write_state:QMe,ra_buttons:vMe,ra_changedFrom:UMe,ra_close:bMe,ra_create_boolean_state:$Me,ra_create_channel:PMe,ra_create_device:WMe,ra_create_number_state:RMe,ra_create_state:JMe,ra_create_string_state:BMe,ra_daysShortText:GMe,ra_dow_Fr:FMe,ra_dow_Mo:HMe,ra_dow_Sa:VMe,ra_dow_Su:ZMe,ra_dow_Th:XMe,ra_dow_Tu:KMe,ra_dow_We:qMe,ra_expertMode:ene,ra_false:tne,ra_fileType_all:sne,ra_fileType_audio:ine,ra_fileType_code:rne,ra_fileType_images:one,ra_fileType_txt:Mne,ra_fileType_video:nne,"ra_fileType_video,":"视频",ra_filter_customs:ane,ra_filter_customs_without:cne,ra_filter_func:une,ra_filter_id:lne,ra_filter_name:Nne,ra_filter_role:Lne,ra_filter_room:jne,ra_filter_type:gne,"ra_import data from %s file":"从 %s 文件导入数据",ra_invalidConfig:Tne,ra_lastChange:yne,ra_locally:Dne,ra_month_Apr:dne,ra_month_Aug:zne,ra_month_Dec:hne,ra_month_Feb:Ine,ra_month_Jan:wne,ra_month_Jul:Cne,ra_month_Jun:Ane,ra_month_Mai:mne,ra_month_Mar:pne,ra_month_Nov:One,ra_month_Oct:Ene,ra_month_Sep:_ne,ra_months_Apr:fne,ra_months_Aug:Sne,ra_months_Dec:xne,ra_months_Feb:kne,ra_months_Jan:Yne,ra_months_Jul:Qne,ra_months_Jun:vne,ra_months_Mai:Une,ra_months_Mar:bne,ra_months_Nov:$ne,ra_months_Oct:Pne,ra_months_Sep:Wne,"ra_no confirm for 5 mins":"5分钟内无需确认",ra_none:Rne,ra_object_changed_by:Jne,ra_object_changed_by_user:Bne,ra_otherConfig:Gne,ra_qualityCode:Fne,ra_repeat:Hne,ra_select_folder_hint:Vne,ra_show_all:Zne,ra_state_changed_by:Xne,ra_state_changed_from:Kne,ra_timestamp:qne,ra_tooltip_ack:eae,ra_tooltip_comment:tae,ra_tooltip_copyState:sae,ra_tooltip_ctrlForLink:iae,ra_tooltip_customConfig:rae,ra_tooltip_deleteObject:oae,ra_tooltip_editObject:Mae,ra_tooltip_editState:nae,ra_tooltip_expire:aae,ra_tooltip_from:cae,ra_tooltip_lc:uae,ra_tooltip_quality:lae,ra_tooltip_ts:Nae,ra_tooltip_user:Lae,ra_tooltip_value:jae,ra_true:gae,"ra_use seconds":"用秒",ra_val:Tae,"ra_via internet":"通过互联网",ra_warning_every_minute:yae,ra_warning_every_second:Dae,sc_cron:dae,sc_date:zae,sc_dates:hae,sc_dow:Iae,sc_dows:wae,sc_every:Cae,sc_everyN_dates:Aae,sc_everyN_dow:mae,sc_everyN_dows:pae,sc_everyN_hours:Oae,sc_everyN_minutes:Eae,sc_everyN_months:_ae,sc_everyN_seconds:fae,sc_every_dates:Sae,sc_every_dow:xae,sc_every_dows:kae,sc_every_hours:Yae,sc_every_minutes:Qae,sc_every_months:vae,sc_every_seconds:Uae,sc_from:bae,sc_hours:$ae,sc_interval:Pae,sc_intervalBetween:Wae,sc_invalid_cron:Rae,sc_minutes:Jae,sc_months:Bae,sc_once:Gae,sc_period:Fae,sc_seconds:Hae,sc_simple:Vae,sc_specific:Zae,sc_specific_dates:Xae,sc_specific_dow:Kae,sc_specific_dows:qae,sc_specific_hours:ece,sc_specific_minutes:tce,sc_specific_months:sce,sc_specific_seconds:ice,sc_time:rce,sc_to:oce,sc_wizard:Mce,sch_all:nce,sch_astroDay:ace,sch_astroNight:cce,sch_astro_dawn:uce,sch_astro_dusk:lce,sch_astro_goldenHour:Nce,sch_astro_goldenHourEnd:Lce,sch_astro_nadir:jce,sch_astro_nauticalDawn:gce,sch_astro_nauticalDusk:Tce,sch_astro_night:yce,sch_astro_nightEnd:Dce,sch_astro_solarNoon:dce,sch_astro_sunrise:zce,sch_astro_sunriseEnd:hce,sch_astro_sunset:Ice,sch_astro_sunsetStart:wce,sch_at:Cce,sch_desc_atTime:Ace,sch_desc_everyDay:mce,sch_desc_everyHour:pce,sch_desc_everyMinute:Oce,sch_desc_everyMonth:Ece,sch_desc_everyNDay:_ce,sch_desc_everyNHours:fce,sch_desc_everyNMinutes:Sce,sch_desc_everyNMonths:xce,sch_desc_everyNWeeks:kce,sch_desc_everyNYears:Yce,sch_desc_everyWeek:Qce,sch_desc_everyYear:vce,sch_desc_intervalFromTo:Uce,sch_desc_never:bce,sch_desc_onDate:$ce,sch_desc_onDates:Pce,sch_desc_onEveryDate:Wce,sch_desc_onMonth:Rce,sch_desc_onMonths:Jce,sch_desc_onWeekday:Bce,sch_desc_onWeekdays:Gce,sch_desc_onWeekends:Fce,sch_desc_onWorkdays:Hce,sch_desc_onceInPast:Vce,sch_desc_once_on:Zce,sch_desc_validFrom:Xce,sch_desc_validFromTo:Kce,sch_desc_validTo:qce,sch_every:eue,sch_exactTime:tue,sch_from:sue,sch_fromTo:iue,sch_intervalTime:rue,sch_invert:oue,sch_no_one:Mue,sch_on:nue,sch_period:aue,sch_periodDaily:cue,sch_periodDates:uue,sch_periodDay:lue,sch_periodEvery:Nue,sch_periodEveryDay:Lue,sch_periodEveryMonth:jue,sch_periodEveryWeek:gue,sch_periodEveryYear:Tue,sch_periodHours:yue,sch_periodMinutes:Due,sch_periodMonth:due,sch_periodMonthly:zue,sch_periodOnce:hue,sch_periodSpecificMonths:Iue,sch_periodWeek:wue,sch_periodWeekdays:Cue,sch_periodWeekend:Aue,sch_periodWeekly:mue,sch_periodWorkdays:pue,sch_periodYear:Oue,sch_periodYearly:Eue,sch_specificTime:_ue,sch_time:fue,sch_to:Sue,sch_valid:xue,sch_validFrom:kue,sch_validTo:Yue,sch_wholeDay:Que,sch_yearEveryMonth:vue},bue={en:B1,de:tC,ru:lO,pt:Ix,nl:Sv,fr:W9,it:KR,es:aV,pl:Dee,uk:Ooe,"zh-cn":Uue},$ue=` @@ -597,7 +597,7 @@ body { V416z M464,400h-72v-80h72V400z`})))}function gge(i){return n.createElement("svg",{width:361,height:361,viewBox:"0 0 361 361",...i},n.createElement("path",{d:"M267.826 263.303c0 3.91-3.156 7.082-7.05 7.082l-157.885.021c-3.894 0-7.05-3.171-7.05-7.083v-157.5c0-3.911 3.156-7.083 7.05-7.083l157.885-.021c3.894 0 7.05 3.172 7.05 7.083v157.501z",fill:"none",stroke:"currentColor",strokeWidth:10,strokeMiterlimit:10}),n.createElement("path",{d:"M258.5 185.584h6.639c2.726 0 5-2.274 5-5s-2.274-5-5-5H258.5c-2.726 0-5 2.274-5 5s2.274 5 5 5z",fill:"currentColor"}),n.createElement("path",{d:"M267.826 103.208c0 2.485-2.711 4.5-6.053 4.5l-159.88.021c-3.342 0-6.052-2.015-6.052-4.5v-9c0-2.485 2.71-4.5 6.052-4.5l159.88-.021c3.342 0 6.053 2.015 6.053 4.5v9z",fill:"none",stroke:"currentColor",strokeWidth:10,strokeMiterlimit:10}))}function p4e(i){return n.createElement("svg",{viewBox:"0 0 361 361",...i},n.createElement("path",{d:"M267.826 263.303c0 3.91-3.156 7.082-7.05 7.082l-157.885.021c-3.894 0-7.05-3.171-7.05-7.083v-157.5c0-3.911 3.156-7.083 7.05-7.083l157.885-.021c3.894 0 7.05 3.172 7.05 7.083v157.501z",fill:"none",stroke:"currentColor",strokeWidth:10,strokeMiterlimit:10}),n.createElement("path",{d:"M228.5 205.584h6.639c2.726 0 5-2.274 5-5s-2.274-5-5-5H228.5c-2.726 0-5 2.274-5 5s2.274 5 5 5z",fill:"currentColor"}),n.createElement("path",{d:"M267.826 103.208c0 2.485-2.711 4.5-6.053 4.5l-159.88.021c-3.342 0-6.052-2.015-6.052-4.5v-9c0-2.485 2.71-4.5 6.052-4.5l159.88-.021c3.342 0 6.053 2.015 6.053 4.5v9z",fill:"none",stroke:"currentColor",strokeWidth:10,strokeMiterlimit:10}),n.createElement("path",{d:"M232.826 280.905c-.339 3.356-18.813-.782-20.919-1.06l-45.073-5.94-45.074-5.94-14.507-1.912c-1.456-.192-6.201-.055-6.412-2.147-.621-6.157 0-12.699 0-18.878v-43.5-82.076-5.13c0-2.551 5.184-1.015 6.412-.853l35.438 4.67 83.723 11.035c1.457.192 6.201.055 6.412 2.147.169 1.673 0 3.451 0 5.13v144.454c0 6.448 10 6.448 10 0V136.451v-5.13c0-7.619-6.137-10.793-12.673-11.655l-28.531-3.76-88.411-11.652-9.897-1.304c-6.555-.864-12.473 4.9-12.473 11.38v144.832c0 2.023-.071 4.04.132 6.053.717 7.111 6.606 9.563 12.759 10.374l76.827 10.125 39.896 5.259 9.697 1.278c7.063.931 12.011-4.778 12.673-11.346.648-6.415-9.358-6.352-9.999 0z",fill:"currentColor"}))}function Lu(i){return n.createElement("svg",{width:361,height:361,viewBox:"0 0 361 361",...i},n.createElement("path",{d:"M267.826 263.303c0 3.91-3.156 7.082-7.05 7.082l-157.885.021c-3.894 0-7.05-3.171-7.05-7.083v-157.5c0-3.911 3.156-7.083 7.05-7.083l157.885-.021c3.894 0 7.05 3.172 7.05 7.083v157.501z",fill:"none",stroke:"currentColor",strokeWidth:10,strokeMiterlimit:10}),n.createElement("path",{d:"M267.826 103.208c0 2.485-2.711 4.5-6.053 4.5l-159.88.021c-3.342 0-6.052-2.015-6.052-4.5v-9c0-2.485 2.71-4.5 6.052-4.5l159.88-.021c3.342 0 6.053 2.015 6.053 4.5v9zM265.732 265.178c.584 2.887-1.629 5.228-4.942 5.228H103.457c-3.313 0-6.474-2.341-7.058-5.228L75.24 130.633c-.584-2.887 1.628-5.228 4.942-5.228h157.333c3.313 0 6.474 2.34 7.058 5.228l21.159 134.545z",fill:"none",stroke:"currentColor",strokeWidth:10,strokeMiterlimit:10}),n.createElement("path",{d:"M247.194 199.667h6.639c2.726 0 5-2.274 5-5s-2.274-5-5-5h-6.639c-2.726 0-5 2.274-5 5s2.275 5 5 5z",fill:"currentColor"}))}const O4e={"type-Device type":"Device type","type-airCondition":"Air conditioner","type-blind":"Blinds","type-blindButtons":"Blind controlled by buttons","type-button":"Button","type-buttonSensor":"Button with feedback","type-camera":"Camera","type-chart":"Chart","type-cie":"CIE color light","type-ct":"Color temperature","type-dimmer":"Dimmer","type-door":"Door","type-fireAlarm":"Fire alarm","type-floodAlarm":"Flood alarm","type-gate":"Gate","type-hue":"HUE light","type-humidity":"Humidity","type-illuminance":"Illuminance","type-image":"Image","type-info":"Information","type-instance":"Instance","type-light":"Light","type-location":"Position","type-locationOne":"Position as one state","type-lock":"Lock","type-media":"Media-player","type-motion":"Motion sensor","type-percentage":"Percentage","type-rgb":"RGB light","type-rgbSingle":"R,G,B light - single states","type-rgbwSingle":"R,G,B,W light - single states","type-slider":"Slider","type-socket":"Socket","type-temperature":"Temperature","type-thermostat":"Thermostat","type-url":"URL","type-vacuumCleaner":"Vacuum cleaner","type-valve":"Valve","type-volume":"Volume","type-volumeGroup":"Volume group","type-warning":"Warning","type-weatherCurrent":"Current weather","type-weatherForecast":"Weather forecast","type-window":"Window sensor","type-windowTilt":"Window tilt sensor"},E4e={"type-Device type":"Gerätetyp","type-airCondition":"Klimaanlage","type-blind":"Jalousien","type-blindButtons":"Jalousie über Tasten gesteuert","type-button":"Taste","type-buttonSensor":"Taste mit Rückmeldung","type-camera":"Kamera","type-chart":"Diagramm","type-cie":"CIE Farblicht","type-ct":"Farbtemperatur","type-dimmer":"Dimmer","type-door":"Türsensor","type-fireAlarm":"Feueralarm","type-floodAlarm":"Wasseralarm","type-gate":"Tor-Steuerung","type-hue":"HUE-Licht","type-humidity":"Feuchtigkeit","type-illuminance":"Beleuchtungsstärke","type-image":"Bild","type-info":"Information","type-instance":"Instanz","type-light":"Licht","type-location":"Position","type-locationOne":"Position als ein Zustand","type-lock":"Schloss","type-media":"Mediaplayer","type-motion":"Bewegungssensor","type-percentage":"Prozentsatz","type-rgb":"RGB-Licht","type-rgbSingle":"R,G,B-Licht Einzelwerte","type-rgbwSingle":"R,G,B,W-Licht Einzelwerte","type-slider":"Schieberegler","type-socket":"Steckdose","type-temperature":"Temperatur","type-thermostat":"Thermostat","type-url":"URL","type-vacuumCleaner":"Staubsauger","type-valve":"Ventil","type-volume":"Lautstärke","type-volumeGroup":"Lautstärke-Gruppe","type-warning":"Warnung","type-weatherCurrent":"Aktuelle Wetterlage","type-weatherForecast":"Wettervorhersage","type-window":"Fenstersensor","type-windowTilt":"Fensterkippung-Sensor"},_4e={"type-Device type":"Тип устройства","type-airCondition":"Кондиционер","type-blind":"Рольставни/Жалюзи","type-blindButtons":"Жалюзи управляющиеся кнопками","type-button":"Кнопка","type-buttonSensor":"Кнопка с обратной связью","type-camera":"Камера","type-chart":"Диаграмма","type-cie":"CIE свет","type-ct":"Цветовая температура","type-dimmer":"Диммер","type-door":"Датчик положения двери","type-fireAlarm":"Датчик дыма","type-floodAlarm":"Датчик затопления","type-gate":"Ворота","type-hue":"HUE свет","type-humidity":"Влажность","type-illuminance":"Освещенность","type-image":"Изображение","type-info":"Информация","type-instance":"Инстанция","type-light":"Свет","type-location":"Местоположение","type-locationOne":"Позиция в одном состоянии","type-lock":"Замок","type-media":"Медиа-плейер","type-motion":"Датчик движения","type-percentage":"Проценты","type-rgb":"RGB свет","type-rgbSingle":"R,G,B как отдельные значение","type-rgbwSingle":"R,G,B,W как отдельные значение","type-slider":"Ползунок","type-socket":"Розетка","type-temperature":"Температура","type-thermostat":"Термостат","type-url":"URL","type-vacuumCleaner":"Пылесос","type-valve":"Вентиль","type-volume":"Громкость","type-volumeGroup":"Группа громкости","type-warning":"Предупреждение","type-weatherCurrent":"Актуальная погода","type-weatherForecast":"Прогноз погоды","type-window":"Датчик открытия окна","type-windowTilt":"Датчик наклона окна"},f4e={"type-Device type":"Tipo de dispositivo","type-airCondition":"Ar condicionado","type-blind":"persianas","type-blindButtons":"Persiana controlada por botões","type-button":"botão","type-buttonSensor":"Sensor de botão","type-camera":"câmera","type-chart":"Gráfico","type-cie":"Luz colorida CIE","type-ct":"Temperatura de cor","type-dimmer":"dimmer","type-door":"porta","type-fireAlarm":"alarme de incêndio","type-floodAlarm":"alarme de inundação","type-gate":"portão","type-hue":"Luz HUE","type-humidity":"umidade","type-illuminance":"Iluminância","type-image":"imagem","type-info":"informação","type-instance":"exemplo","type-light":"luz","type-location":"localização","type-locationOne":"Posição como um estado","type-lock":"trancar","type-media":"mídia","type-motion":"movimento","type-percentage":"Percentagem","type-rgb":"Luz RGB","type-rgbSingle":"Luz RGB única","type-rgbwSingle":"RGBW como valor único","type-slider":"controle deslizante","type-socket":"soquete","type-temperature":"temperatura","type-thermostat":"termostato","type-url":"URL","type-vacuumCleaner":"Aspirador de pó","type-valve":"válvula","type-volume":"volume","type-volumeGroup":"grupo de volume","type-warning":"aviso","type-weatherCurrent":"clima atual","type-weatherForecast":"previsão do tempo","type-window":"janela","type-windowTilt":"inclinação da janela"},S4e={"type-Device type":"Typ urządzenia","type-airCondition":"Klimatyzator","type-blind":"żaluzje","type-blindButtons":"Roleta sterowana przyciskami","type-button":"przycisk","type-buttonSensor":"Czujnik przycisku","type-camera":"kamera","type-chart":"Wykres","type-cie":"Światło kolorowe CIE","type-ct":"Temperatura barwowa","type-dimmer":"opornik","type-door":"drzwi","type-fireAlarm":"alarm pożarowy","type-floodAlarm":"alarm przeciwpowodziowy","type-gate":"brama","type-hue":"Światło HUE","type-humidity":"wilgotność","type-illuminance":"Natężenie oświetlenia","type-image":"obraz","type-info":"Informacje","type-instance":"przykład","type-light":"światło","type-location":"lokalizacja","type-locationOne":"Pozycja jako państwa","type-lock":"zamek","type-media":"głoska bezdźwięczna","type-motion":"ruch","type-percentage":"Procent","type-rgb":"Światło RGB","type-rgbSingle":"Pojedyncze światło RGB","type-rgbwSingle":"RGBW jako pojedyncza wartość","type-slider":"suwak","type-socket":"gniazdo","type-temperature":"temperatura","type-thermostat":"termostat","type-url":"Adres URL","type-vacuumCleaner":"Odkurzacz","type-valve":"zawór","type-volume":"tom","type-volumeGroup":"grupa woluminów","type-warning":"ostrzeżenie","type-weatherCurrent":"aktualna pogoda","type-weatherForecast":"prognoza pogody","type-window":"okno","type-windowTilt":"pochylenie okna"},x4e={"type-Device type":"Type d'appareil","type-airCondition":"Climatiseur","type-blind":"stores","type-blindButtons":"Store commandé par boutons","type-button":"bouton","type-buttonSensor":"Capteur de bouton","type-camera":"caméra","type-chart":"Graphique","type-cie":"lumière colorée CIE","type-ct":"Température de couleur","type-dimmer":"variateur","type-door":"porte","type-fireAlarm":"alarme incendie","type-floodAlarm":"alarme d'inondation","type-gate":"grille","type-hue":"Lumière HUE","type-humidity":"humidité","type-illuminance":"Éclairement","type-image":"image","type-info":"informations","type-instance":"exemple","type-light":"lumière","type-location":"emplacement","type-locationOne":"Position en tant qu'État","type-lock":"verrouillage","type-media":"médias","type-motion":"mouvement","type-percentage":"Pourcentage","type-rgb":"lumière RVB","type-rgbSingle":"Lumière RVB simple","type-rgbwSingle":"RGBW comme valeur unique","type-slider":"curseur","type-socket":"douille","type-temperature":"température","type-thermostat":"thermostat","type-url":"URL","type-vacuumCleaner":"Aspirateur","type-valve":"soupape","type-volume":"volume","type-volumeGroup":"groupe de volumes","type-warning":"avertissement","type-weatherCurrent":"météo actuelle","type-weatherForecast":"prévisions météorologiques","type-window":"fenêtre","type-windowTilt":"inclinaison de la fenêtre"},k4e={"type-Device type":"Tipo di dispositivo","type-airCondition":"Condizionatore d'aria","type-blind":"tende","type-blindButtons":"Tenda controllata da pulsanti","type-button":"pulsante","type-buttonSensor":"Sensore del pulsante","type-camera":"telecamera","type-chart":"Grafico","type-cie":"Luce colorata CIE","type-ct":"Temperatura del colore","type-dimmer":"dimmer","type-door":"porta","type-fireAlarm":"allarme antincendio","type-floodAlarm":"allarme allagamento","type-gate":"cancello","type-hue":"Luce HUE","type-humidity":"umidità","type-illuminance":"Illuminamento","type-image":"immagine","type-info":"informazioni","type-instance":"esempio","type-light":"leggero","type-location":"posizione","type-locationOne":"Posizione come stato","type-lock":"serratura","type-media":"media","type-motion":"movimento","type-percentage":"Percentuale","type-rgb":"luce RGB","type-rgbSingle":"Luce RGB singola","type-rgbwSingle":"RGBW come valore singolo","type-slider":"cursore","type-socket":"PRESA","type-temperature":"temperatura","type-thermostat":"termostato","type-url":"URL","type-vacuumCleaner":"Aspirapolvere","type-valve":"valvola","type-volume":"volume","type-volumeGroup":"gruppo di volumi","type-warning":"avvertimento","type-weatherCurrent":"meteo attuale","type-weatherForecast":"previsioni del tempo","type-window":"finestra","type-windowTilt":"inclinazione della finestra"},Y4e={"type-Device type":"Apparaattype","type-airCondition":"Airconditioner","type-blind":"jaloezieën","type-blindButtons":"Jaloezie bediend door knoppen","type-button":"knop","type-buttonSensor":"Knopsensor","type-camera":"camera","type-chart":"Grafiek","type-cie":"CIE-kleurenlicht","type-ct":"Kleurtemperatuur","type-dimmer":"dimmer","type-door":"deur","type-fireAlarm":"brandalarm","type-floodAlarm":"overstromingsalarm","type-gate":"hek","type-hue":"HUE-licht","type-humidity":"vochtigheid","type-illuminance":"Verlichtingssterkte","type-image":"afbeelding","type-info":"informatie","type-instance":"aanleg","type-light":"licht","type-location":"locatie","type-locationOne":"Positie als staat","type-lock":"slot","type-media":"media","type-motion":"beweging","type-percentage":"Percentage","type-rgb":"RGB-licht","type-rgbSingle":"RGB-licht enkel","type-rgbwSingle":"RGBW als enkele waarde","type-slider":"schuifregelaar","type-socket":"stopcontact","type-temperature":"temperatuur","type-thermostat":"thermostaat","type-url":"URL","type-vacuumCleaner":"Stofzuiger","type-valve":"ventiel","type-volume":"volume","type-volumeGroup":"volumegroep","type-warning":"waarschuwing","type-weatherCurrent":"huidige weersomstandigheden","type-weatherForecast":"weersvoorspelling","type-window":"raam","type-windowTilt":"raamkanteling"},Q4e={"type-Device type":"Тип пристрою","type-airCondition":"Кондиціонер","type-blind":"жалюзі","type-blindButtons":"Штора керується кнопками","type-button":"кнопку","type-buttonSensor":"Датчик кнопки","type-camera":"камера","type-chart":"Діаграма","type-cie":"Кольорове світло CIE","type-ct":"Колірна температура","type-dimmer":"диммер","type-door":"двері","type-fireAlarm":"пожежна сигналізація","type-floodAlarm":"сигналізація про повінь","type-gate":"ворота","type-hue":"світло HUE","type-humidity":"вологість","type-illuminance":"Освітленість","type-image":"зображення","type-info":"інформація","type-instance":"екземпляр","type-light":"світло","type-location":"розташування","type-locationOne":"Позиція як держави","type-lock":"замок","type-media":"ЗМІ","type-motion":"руху","type-percentage":"Відсоток","type-rgb":"RGB світло","type-rgbSingle":"Одиночне світло RGB","type-rgbwSingle":"RGBW як одне значення","type-slider":"повзунок","type-socket":"гніздо","type-temperature":"температура","type-thermostat":"термостат","type-url":"URL","type-vacuumCleaner":"Пилосос","type-valve":"клапан","type-volume":"обсяг","type-volumeGroup":"група обсягів","type-warning":"УВАГА","type-weatherCurrent":"поточна погода","type-weatherForecast":"прогноз погоди","type-window":"вікно","type-windowTilt":"нахил вікна"},v4e={"type-Device type":"设备类型","type-airCondition":"空调","type-blind":"百叶窗","type-blindButtons":"按钮控制百叶窗","type-button":"按钮","type-buttonSensor":"按钮传感器","type-camera":"相机","type-chart":"图表","type-cie":"CIE色光","type-ct":"色温","type-dimmer":"调光器","type-door":"门","type-fireAlarm":"火灾报警","type-floodAlarm":"洪水警报","type-gate":"门","type-hue":"色调灯","type-humidity":"湿度","type-illuminance":"照度","type-image":"图像","type-info":"信息","type-instance":"实例","type-light":"光","type-location":"地点","type-locationOne":"作为一个国家的地位","type-lock":"锁","type-media":"媒体","type-motion":"运动","type-percentage":"百分比","type-rgb":"RGB灯","type-rgbSingle":"RGB灯单","type-rgbwSingle":"RGBW 作为单一值","type-slider":"滑块","type-socket":"插座","type-temperature":"温度","type-thermostat":"恒温器","type-url":"网址","type-vacuumCleaner":"吸尘器","type-valve":"阀门","type-volume":"体积","type-volumeGroup":"卷组","type-warning":"警告","type-weatherCurrent":"当前天气","type-weatherForecast":"天气预报","type-window":"窗户","type-windowTilt":"窗户倾斜"};let Ma=!1;function ju(){Ma||(Ma=!0,D.extendTranslations({en:O4e,de:E4e,ru:_4e,pt:f4e,pl:S4e,fr:x4e,it:k4e,nl:Y4e,uk:Q4e,"zh-cn":v4e}))}const na={[B.Types.airCondition]:F0e,[B.Types.blind]:oa,[B.Types.blindButtons]:oa,[B.Types.button]:w4e,[B.Types.buttonSensor]:j4e,[B.Types.camera]:k0e,[B.Types.chart]:_0e,[B.Types.image]:G0e,[B.Types.dimmer]:X0e,[B.Types.door]:d4e,[B.Types.fireAlarm]:ia,"sensor.alarm.fire":ia,[B.Types.floodAlarm]:ra,"sensor.alarm.flood":ra,[B.Types.gate]:z4e,[B.Types.humidity]:h4e,[B.Types.illuminance]:T4e,[B.Types.info]:B0e,[B.Types.light]:J0e,[B.Types.lock]:R0e,[B.Types.location]:$0e,[B.Types.locationOne]:a4e,[B.Types.media]:P0e,[B.Types.motion]:I4e,[B.Types.ct]:Zn,[B.Types.percentage]:Vn,[B.Types.rgb]:kr,[B.Types.rgbSingle]:kr,[B.Types.rgbwSingle]:y4e,[B.Types.hue]:Zn,[B.Types.cie]:kr,[B.Types.slider]:Vn,[B.Types.socket]:C4e,[B.Types.temperature]:A4e,[B.Types.thermostat]:m4e,[B.Types.vacuumCleaner]:D4e,[B.Types.volume]:U0e,[B.Types.volumeGroup]:Q0e,[B.Types.window]:p4e,[B.Types.windowTilt]:Lu,[B.Types.weatherCurrent]:ta,[B.Types.weatherForecast]:ta,[B.Types.warning]:Xn,[B.Types.unknown]:n4e,[B.Types.instance]:Y0e,invalid:Xn,hub3:e4e,node:t4e,hub5:s4e,controller:M4e},Oi={width:32,height:32};function U4e(i){const[e,t]=n.useState(!1);if(ye(()=>{i.title&&!e&&(ju(),t(!0))},[i.title,e]),!e&&i.title)return n.createElement(W,{style:{...Oi,...i.style||void 0},className:i.className,sx:i.sx});const s=i.type||(i.src?Object.keys(na).find(M=>i.src===M):void 0);if(!s&&i.src)return n.createElement(xe,{style:Oi,...i,title:i.title===!0?void 0:i.title,src:i.src});const r=s&&na[s];if(!r)return s?n.createElement("span",{style:{...Oi,...i.style||void 0}},s[0].toUpperCase()):null;const o=n.createElement(r,{style:{...Oi,...i.style||void 0},onClick:i.onClick,className:i.className,sx:i.sx});return i.title?n.createElement(ae,{slotProps:{popper:{sx:{pointerEvents:"none"}}},title:i.title===!0?D.t(`type-${s}`):i.title},n.createElement("div",{style:{display:"flex"}},o)):o}const St={itemChildrenWrapper:{display:"flex",width:"100%",justifyContent:"space-between"},type:{marginTop:10},selectIcon:{paddingRight:8,verticalAlign:"middle",width:20,height:20},selectText:{verticalAlign:"middle"},iconWrapper:{display:"flex",alignItems:"center"},iconStyle:{width:16,height:16,margin:"0 3px"},emptyIcon:{width:16,height:16,margin:"0 3px"}};function Tge(i){const[e,t]=n.useState({}),[s,r]=n.useState([]);return ye(()=>{const o={};Object.keys(B.Types).filter(a=>{var u,l;return(!i.supportedDevices||((u=i.supportedDevices)==null?void 0:u.includes(a)))&&!((l=i.unsupportedDevices)!=null&&l.includes(a))}).forEach(a=>o[a]=D.t(`type-${B.Types[a]}`));const M=Object.keys(o);M.sort((a,u)=>o[a]===o[u]?0:o[a].localeCompare(o[u],"de")),ju(),r(M),t(o)},[i.supportedDevices,i.unsupportedDevices]),s?n.createElement(wt,{style:{...St.type,...i.style},sx:i.sx,variant:"standard",error:!!i.error},n.createElement(As,null,i.label||D.t("type-Device type")),n.createElement(Xe,{variant:"standard",disabled:!!i.disabled,value:i.value,onChange:o=>i.onChange(o.target.value)},s.map(o=>{var M;return n.createElement(te,{key:B.Types[o],value:B.Types[o]},n.createElement("div",{style:St.itemChildrenWrapper},n.createElement("div",null,n.createElement(U4e,{type:B.Types[o],style:{...St.selectIcon,color:i.themeType==="dark"?"#FFFFFF":"#000"}}),n.createElement("span",{style:St.selectText},e[o])),(M=i.showApplications)!=null&&M.TYPE_OPTIONS[o]?n.createElement("div",{style:St.iconWrapper},Object.keys(i.showApplications.TYPE_OPTIONS[o]).map(a=>i.showApplications.TYPE_OPTIONS[o][a]?n.createElement(xe,{key:a,style:St.iconStyle,src:i.showApplications.ICONS_TYPE[a]}):n.createElement("div",{key:a,style:St.emptyIcon}))):null))}))):n.createElement(W,{style:{...St.type,...i.style},sx:i.sx})}function b4e(i){return U({attr:{version:"1",viewBox:"0 0 48 48",enableBackground:"new 0 0 48 48"},child:[{tag:"circle",attr:{fill:"#B2EBF2",cx:"32",cy:"24",r:"9"},child:[]},{tag:"path",attr:{fill:"#4DD0E1",d:"M32,12c-6.6,0-12,5.4-12,12c0,6.6,5.4,12,12,12s12-5.4,12-12C44,17.4,38.6,12,32,12z M32,32 c-4.4,0-8-3.6-8-8s3.6-8,8-8s8,3.6,8,8S36.4,32,32,32z"},child:[]},{tag:"g",attr:{fill:"#3F51B5"},child:[{tag:"polygon",attr:{points:"25.4,22 19.8,5.1 13.6,27.7 11.4,22 4,22 4,26 8.6,26 14.4,40.3 20.2,18.9 22.6,26 30,26 30,22"},child:[]},{tag:"circle",attr:{cx:"32",cy:"24",r:"4"},child:[]}]}]})(i)}function $4e(i){return U({attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M4.428 2.727l3.335 3.335c-.486.07-.903.276-1.32.624L.886 12.383c-1.181 1.18-1.181 3.194 0 4.375a2.41 2.41 0 0 0 1.598.834l17.088 3.681-3.335-3.333c.486-.07.903-.278 1.32-.626l5.557-5.695c1.181-1.181 1.181-3.196 0-4.377a2.411 2.411 0 0 0-1.598-.833zM11.653 6.2c.694 0 1.25.486 1.25 1.18 0 .695-.486 1.251-1.181 1.251-.695 0-1.25-.485-1.25-1.18s.555-1.251 1.18-1.251zm1.51 3.792c.049-.006.088.046.088.098-.139.694-.695 1.181-1.39 1.181-.694 0-1.32-.487-1.46-1.112 0 0 .002-.07.071 0 .487.278.972.348 1.32.278.346 0 .833-.07 1.32-.416a.092.092 0 0 1 .05-.029zm.723 2.511c.058.013.06.106.06.158-.209.903-.973 1.666-1.946 1.666a2.167 2.167 0 0 1-2.084-1.528c-.07-.07 0-.138.138-.138.695.347 1.39.416 1.877.416.486 0 1.18-.14 1.875-.556.035-.017.06-.022.08-.018zm.597 3.018c.049-.013.087.09.087.195-.278 1.181-1.25 2.085-2.5 2.155-1.251 0-2.293-.835-2.57-1.946 0-.139.068-.278.207-.209.834.486 1.737.556 2.362.556s1.529-.208 2.362-.694c.018-.035.036-.053.052-.057z"},child:[]}]})(i)}function P4e(i){return U({attr:{version:"1.2",baseProfile:"tiny",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M13 5l.855 3.42 3.389-.971 1.501 2.6-2.535 2.449 2.535 2.451-1.5 2.6-3.39-.971-.855 3.422h-3l-.855-3.422-3.39.971-1.501-2.6 2.535-2.451-2.534-2.449 1.5-2.6 3.39.971.855-3.42h3m0-2h-3c-.918 0-1.718.625-1.939 1.516l-.354 1.412-1.4-.4c-.184-.053-.369-.078-.552-.078-.7 0-1.368.37-1.731 1l-1.5 2.6c-.459.796-.317 1.802.342 2.438l1.047 1.011-1.048 1.015c-.66.637-.802 1.643-.343 2.438l1.502 2.6c.363.631 1.031 1 1.731 1 .183 0 .368-.025.552-.076l1.399-.401.354 1.415c.222.885 1.022 1.51 1.94 1.51h3c.918 0 1.718-.625 1.939-1.516l.354-1.414 1.399.4c.184.053.369.077.552.077.7 0 1.368-.37 1.731-1l1.5-2.6c.459-.796.317-1.8-.342-2.438l-1.047-1.013 1.047-1.013c.66-.637.801-1.644.342-2.438l-1.5-2.6c-.365-.631-1.031-1-1.732-1-.184 0-.368.025-.551.076l-1.4.401-.354-1.413c-.22-.884-1.02-1.509-1.938-1.509zM11.5 10.5c1.104 0 2 .895 2 2 0 1.104-.896 2-2 2s-2-.896-2-2c0-1.105.896-2 2-2m0-1c-1.654 0-3 1.346-3 3s1.346 3 3 3 3-1.346 3-3-1.346-3-3-3z"},child:[]}]})(i)}function W4e(i){return U({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M7.707 17.707 13.414 12 7.707 6.293 6.293 7.707 10.586 12l-4.293 4.293zM15 6h2v12h-2z"},child:[]}]})(i)}function R4e(i){return U({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M327.467 19.992c.748 14.94 2.317 51.268 2.59 98.76 3.474-.286 6.557-.381 9.72 1.08 18.04 8.345 27.243 29.326 27.026 50.506-.217 21.18-11.283 44.136-36.104 54.307a41.62 41.62 0 0 1-2.486.923c-3.408 80.504-12.307 166.37-33.754 225.5-6.876 15.831-17.029 29.217-26.828 40.94l55.27.422c20.676-12.19 32.041-27.395 36.32-46.407l17.558 3.954c-3.67 16.312-11.99 30.662-24.511 42.677l143.052 1.094c-5.13-14.524-16.16-46.501-20.357-70.217C451.89 293.171 450.15 45 450.025 19.992zM18.279 38.984l.881 18.725c17.856 12.047 32.035 23.91 45.969 35.527 12.887-11.156 2.404-29.725-5.82-39.091-13.668-5.346-27.335-10.467-41.03-15.16zM86.723 65.13c4.77 14.56 3.347 29.656-7.477 39.746 24.105 19.479 50.832 38.151 97.1 55.635 13.836-22.588 12.08-43.852-3.338-60.739-29.03-10.9-57.703-22.997-86.285-34.642zm-31.721 42.988V400h17.996V122.723c-6.187-4.856-12.114-9.73-17.996-14.606zm145.264 1.434c3.253 8.283 4.54 16.754 3.982 25.043-.765 11.35-4.673 22.135-10.545 32.095 16.926 5.691 36.192 11.248 58.451 16.655l2.604.633 1.834 1.953c9.223 9.826 22.535 17.206 35.469 21.006 12.933 3.8 25.473 3.655 31.814 1.056 18.024-7.385 24.773-22.363 24.932-37.84.152-14.822-7.069-28.554-15.479-33.306-45.88-1.699-89.948-12.607-133.062-27.295zm-33.264 66.476V400h17.996V182.605a502.784 502.784 0 0 1-17.996-6.578zM32 419.002v17.996h176v-17.996z"},child:[]}]})(i)}function J4e(i){return U({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.7 21.04l-194.4.41L21.04 159.3l.41 194.4L159.3 491l194.4-.4L491 352.7l-.4-194.4L352.7 21.04zm-8 19.66l126.2 125.7.4 178.3-123.1 123.6-2.6 2.6-178.3.4L41.08 345.6l-.38-178.3L166.4 41.08l178.3-.38zm-7.5 18.01l-163.3.34L58.71 174.8l.34 163.3L174.8 453.3l163.3-.3 115.2-115.8-.3-163.3L337.2 58.71zM108.4 210.4c5.3 0 10.8.5 16.4 1.3 5.7.8 11.5 2 17.5 3.6v20.5c-5.3-2.4-10.5-4.2-15.6-5.4-5.1-1.2-9.9-1.8-14.4-1.8-6 0-10.4.8-13.25 2.5-2.87 1.6-4.3 4.2-4.3 7.7 0 2.6.96 4.6 2.87 6.1 1.95 1.4 5.48 2.7 10.58 3.7l10.6 2.1c10.8 2.2 18.5 5.5 23.1 9.9 4.5 4.5 6.8 10.8 6.8 18.9 0 10.7-3.2 18.7-9.5 24-6.4 5.2-16.1 7.8-29.2 7.8-6.1 0-12.3-.6-18.51-1.8-6.2-1.1-12.41-2.9-18.61-5.2v-21.1c6.2 3.3 12.19 5.8 17.96 7.5 5.82 1.6 11.46 2.4 16.76 2.4 5.5 0 9.7-.9 12.6-2.7 2.9-1.8 4.4-4.4 4.4-7.8 0-3.1-1-5.4-3-7.1-2-1.6-5.9-3.1-11.8-4.4l-9.7-2.1c-9.73-2.1-16.85-5.4-21.37-10-4.47-4.5-6.7-10.7-6.7-18.4 0-9.7 3.12-17.1 9.37-22.3 6.25-5.3 15.24-7.9 27-7.9zm187.7 0c15.6 0 27.8 4.5 36.7 13.5 8.9 8.9 13.3 21.2 13.3 37 0 15.7-4.4 28-13.3 37-8.9 8.9-21.1 13.4-36.7 13.4-15.6 0-27.8-4.5-36.7-13.4-8.9-9-13.3-21.3-13.3-37 0-15.8 4.4-28.1 13.3-37 8.9-9 21.1-13.5 36.7-13.5zm-141.9 1.8h89.6v18.9h-32.2v78.3h-25.1v-78.3h-32.3v-18.9zm205.8 0h41.6c12.3 0 21.8 2.8 28.4 8.3 6.7 5.4 10 13.2 10 23.4s-3.3 18.1-10 23.6c-6.6 5.4-16.1 8.2-28.4 8.2H385v33.7h-25v-97.2zm-63.9 16.4c-7.7 0-13.6 2.8-17.8 8.5-4.2 5.6-6.3 13.6-6.3 23.8 0 10.2 2.1 18.1 6.3 23.8 4.2 5.6 10.1 8.4 17.8 8.4 7.7 0 13.6-2.8 17.8-8.4 4.2-5.7 6.3-13.6 6.3-23.8 0-10.2-2.1-18.2-6.3-23.8-4.2-5.7-10.1-8.5-17.8-8.5zm88.9 1.8v27.1h13.9c4.9 0 8.6-1.2 11.3-3.5 2.6-2.4 3.9-5.8 3.9-10.1s-1.3-7.7-3.9-10c-2.7-2.4-6.4-3.5-11.3-3.5H385z"},child:[]}]})(i)}function B4e(i){return U({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 54.28c-124.603 0-226 101.398-226 226 0 47.864 14.975 92.293 40.465 128.876l29.79-19.86c-17.188-24.545-28.708-53.362-32.696-84.577H96v-18H66.115c-.07-2.14-.115-4.284-.115-6.44 0-45.378 15.816-86.97 42.236-119.598l17.4 17.4 12.727-12.727-18.133-18.132C152.735 114.057 197.335 92.8 247 90.498v29.22h18V90.5c49.665 2.302 94.265 23.56 126.77 56.725l-18.133 18.132 12.726 12.727 17.4-17.4c26.42 32.63 42.237 74.22 42.237 119.6 0 2.154-.044 4.3-.115 6.437H416v18h28.44c-3.987 31.214-15.507 60.03-32.694 84.575l29.79 19.86C467.025 372.574 482 328.146 482 280.282c0-124.602-101.397-226-226-226zm15.83 66.23a144 160 0 0 1 74.608 100.062l49.966-17.568a160 160 0 0 0-4.3-7.012l-5.135 5.153-30.368-30.29-5.76-5.746 7.85-7.874a160 160 0 0 0-86.862-36.726zm156.15 89.844l-175.332 60.6C240.505 272.618 231 283.155 231 295.72c0 13.7 11.3 25 25 25 6.77 0 12.95-2.764 17.473-7.208L427.98 210.354zm-16.513 32.322l-60.713 40.72a144 160 0 0 1-56.6 108.323h76.057a160 160 0 0 0 39.763-68.572H398.48v-52.515h17.022a160 160 0 0 0-4.035-27.957zM128 421.72v36h256v-36H128z"},child:[]}]})(i)}function aa(i){return U({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M140 29.92c-31.4 0-59.89 3.25-79.89 8.25-9.9 2.5-17.8 5.51-22.4 8.25-3.2 1.87-4.1 3.15-4.5 3.58.4.43 1.3 1.71 4.5 3.58 4.6 2.74 12.5 5.75 22.4 8.25 20 5 48.49 8.25 79.89 8.25h5.7c5.3-2 11.1-3.78 17.6-5.4 20.3-5.08 46.5-8.42 75.8-9.36 1.2-.57 2.3-1.14 3.2-1.7 3.1-1.87 4.1-3.15 4.5-3.58-.4-.43-1.4-1.71-4.5-3.58-4.6-2.74-12.5-5.75-22.5-8.25-19.9-5-48.4-8.25-79.8-8.25zm232 0c-31.4 0-59.9 3.25-79.8 8.25-10 2.5-17.9 5.51-22.5 8.25-3.1 1.87-4.1 3.15-4.5 3.58.4.43 1.4 1.71 4.5 3.58.9.56 2 1.13 3.2 1.7 29.3.94 55.5 4.28 75.8 9.36 6.5 1.62 12.3 3.4 17.6 5.4h5.7c31.4 0 59.9-3.25 79.8-8.25 10-2.5 17.9-5.51 22.5-8.25 3.1-1.87 4.1-3.15 4.5-3.58-.4-.43-1.4-1.71-4.5-3.58-4.6-2.74-12.5-5.75-22.5-8.25-19.9-5-48.4-8.25-79.8-8.25zM33.01 71.44V369.9c0 4.3 1.8 8 6.8 12.3 5 4.3 13.1 8.5 23.3 11.9 15.3 5.1 35 8.5 55.89 9.8V278.3l-16.5 28.6-7.79-4.5c-27.4-15.9-44.3-45.3-44.4-77v-9h52.59c-.6 2.6-.9 5.3-.9 8.1 0 13.1 6.8 24.8 17 31.7v-63.4c-1.9 1.3-3.6 2.7-5.2 4.2l-25.99-45.1 7.8-4.5c7.49-4.2 15.29-7.3 23.39-9.3V87.61c-24.19-1.08-45.99-4.01-63.19-8.32-8.9-2.21-16.5-4.76-22.8-7.85zm445.99 0c-6.3 3.09-14 5.63-22.8 7.84-17.2 4.31-39 7.24-63.2 8.32v50.6c8.1 2 16 5.1 23.4 9.3l7.7 4.5-4.4 7.8-21.5 37.2c-1.6-1.5-3.3-2.9-5.2-4.2v63.4c10.2-6.9 17-18.6 17-31.7 0-2.8-.3-5.5-.9-8.1h50.8v9c0 31.8-17 61.1-44.4 77l-7.8 4.5-14.7-25.5v122.5c20.9-1.3 40.7-4.7 55.9-9.8 10.2-3.4 18.3-7.6 23.3-11.9 5-4.3 6.8-8 6.8-12.3zM256 73c-34.7 0-66.2 3.57-88.3 9.1-11.1 2.77-19.8 6.09-25.1 9.19-4.3 2.58-5.3 4.42-5.5 4.71.2.29 1.2 2.12 5.5 4.7 5.3 3.1 14 6.4 25.1 9.2 22.1 5.5 53.6 9.1 88.3 9.1 34.7 0 66.2-3.6 88.3-9.1 11.1-2.8 19.8-6.1 25.1-9.2 4.3-2.58 5.3-4.41 5.5-4.7-.2-.29-1.2-2.13-5.5-4.71-5.3-3.1-14-6.42-25.1-9.19-22.1-5.53-53.6-9.1-88.3-9.1zm118.9 23c.1.1.1.1.1 0s0-.1-.1 0zm-237.8 0c-.1-.1-.1-.1-.1 0s0 .1.1 0zm-.1 22.1V448c0 5 2.2 9.3 7.9 14.2 5.6 4.8 14.7 9.5 25.9 13.3 22.6 7.5 54 11.5 85.2 11.5 31.2 0 62.6-4 85.2-11.5 11.2-3.8 20.3-8.5 25.9-13.3 5.7-4.9 7.9-9.2 7.9-14.2V118.1c-7.2 3.7-16 6.6-26.3 9.3-24.2 6-56.7 9.6-92.7 9.6s-68.5-3.6-92.7-9.6c-10.3-2.7-19.1-5.6-26.3-9.3zM256 191c16.8 0 33.5 4.4 48.5 13l7.8 4.5-4.5 7.8-24.1 41.6c-7.3-6.7-17-10.9-27.7-10.9s-20.4 4.2-27.7 10.9l-28.6-49.4 7.8-4.5c15-8.7 31.7-13 48.5-13zm0 74c12.8 0 23 10.2 23 23s-10.2 23-23 23-23-10.2-23-23 10.2-23 23-23zm-98 15h57.8c-.5 2.6-.8 5.3-.8 8 0 18.1 12 33.7 28.5 39l-29.2 50.5-7.8-4.5c-30-17.3-48.5-49.4-48.5-84zm138.2 0H352v9c0 34.6-18.5 66.7-48.5 84l-7.8 4.5-28.8-50c17.3-4.8 30.1-20.8 30.1-39.5 0-2.7-.3-5.4-.8-8z"},child:[]}]})(i)}function G4e(i){return U({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M288.3 13.4c-12.3-.01-23 6.49-27.3 15.31l-2.9 5.95-6.6-1.01c-5.5-.85-11.3-1.32-17.1-1.32-18.8 0-35.7 4.5-47.3 11.14-11.5 6.64-16.9 14.59-16.9 22 0 7.42 5.4 15.37 16.9 22 11.6 6.64 28.5 11.13 47.3 11.13 7.5-.02 14.9-.74 21.8-2.13l6.3-1.23 3.2 5.46c5.6 9.2 23.7 18.2 44.7 18.2 13.9 0 26.4-3.6 34.8-8.8 8.4-5.2 12.2-11.23 12.2-16.9 0-5.09-3-10.48-10-15.44-6.9-4.97-17.6-8.87-30-9.95l-18.3-1.59 12.5-13.49c4.1-4.41 6.1-9.6 6.1-14.87 0-12.88-12.4-24.46-29.4-24.46zM152.2 65.46C84.8 102.3 39 173.9 39 256c0 32.1 7 62.6 19.54 90 5.95-7.9 10.48-13.4 12.67-16C62.05 307.2 57 282.2 57 256c0-74 40.27-138.5 100.1-172.78-3.1-5.39-4.9-11.34-4.9-17.74v-.02zm210.7 1.75c7.5 6.93 12.5 15.9 12.5 25.99 0 1.14-.1 2.27-.2 3.38C423.7 132.9 455 190.7 455 256c0 23.7-4.2 46.5-11.8 67.6l18.3 2.2c7.4-21.9 11.5-45.4 11.5-69.8 0-80.8-44.4-151.5-110.1-188.79zm58.6 270.49c-11.1.2-23 1.1-35.9 3.1l-.5.1-.5.1c-25.8 7.3-37.1 15.2-46.4 24.7l-2.2 2.2-.3 3.1c-3.4 29.6-5.8 60 0 91.8l1.3 6.8 6.8.6c30.6 2.6 58.7 1.4 86.2 0l1-.1.9-.2c18.5-5.2 34.4-12.8 46.4-24.6l1.7-1.6.6-2.2c10-33.4 3.4-63.8.4-92.7l-.8-7.4-7.3-.7c-16.2-1.5-32.8-3.2-51.4-3zM79.62 348.2c-4.94 6.1-11.43 14.5-18.58 25.6-12.29 18.9-22.53 42.4-20.51 54.9 1.43 8.8 6.97 19.6 14.51 27.6 7.54 7.9 16.69 12.8 24.58 12.8 7.87 0 17.03-4.9 24.58-12.8 7.5-8 13.1-18.8 14.5-27.6 2-12.5-8.2-36-20.5-54.9-7.15-11-13.64-19.5-18.58-25.6zM427 355.7c1.7 0 3.3 0 5 .1 5.4.1 10.7.4 16 .8-5.9 3.4-12.1 6.8-19.5 9.9l-2.4.2c-19.5 1.4-37.7.3-55.4-2 4.7-2 10.5-4 18.3-6.2 13.8-2.2 26.3-2.9 38-2.8zm38 11.6c2.8 22.9 5 44.5-1 66.6-7 6.3-16 11.4-27 15.4 3-22.5 2-44.8-.5-66.6 11.3-5 20.2-10.2 28.5-15.4zm-112.2 13.1c20.7 3.2 42.3 5.4 65.8 4.5 2.5 23 3.5 45.6-.4 67.8-21.5 1-43.1 1.5-65.8-.1-3.5-24-2.2-47.9.4-72.2zm-216.4 34.7c.9 5.5 1 11 .1 16.4-.3 1.6-.6 3.3-1 4.9C170 459.5 211.4 473 256 473c21.6 0 42.5-3.2 62.3-9.1l-2-18.2c-19 6-39.3 9.3-60.3 9.3-44.9 0-86.3-14.8-119.6-39.9z"},child:[]}]})(i)}function F4e(i){return U({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M33.125 19.406L135.5 128.22l81-23.157 18.72-5.344-7.564 17.936-46.125 109.78 134.282-70 26.157-13.655L328.436 170 256.5 309.25l91.25-57.125 22.97-14.375-9.22 25.47-34.625 95.624 71-36.375 21.188-10.845L410.906 334l-33.937 93.063 45.124-6.688 4.53-.656 3.313 3.155 64.313 61.47-30.5-80.5 23.313-46.908-72.5 39.532 51.062-141.158-91.188 47.47 72.344-142.813-128.217 82.81L421.875 70.063 239.03 168.69l30.44-99.563-103.845 25.25-132.5-74.97zM18.155 30.78l77.876 108.25-31.124 75.532 94.125-46.78-98.905 166.812 190.25-99.656-101.03 185.406 140.25-79.063-46.94 102.22 106.5-53-45.655 92.28 86.5-14.467 93.47 31.562-63.158-60.344-56.125 8.314-15.53 2.312 5.374-14.75 31.158-85.437-70.907 36.31-21.124 10.814 8.094-22.313 33.47-92.436-97.22 60.875-28.938 18.092L224.22 331l74.06-143.344-131.06 68.313-22.97 12 10.03-23.908 48.626-115.687-67.75 19.375-5.5 1.563-3.875-4.157L18.157 30.78z"},child:[]}]})(i)}function H4e(i){return U({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M20.127 52.803v58.986L250.46 245.153c26.367-28.823 70.087-36.533 105.313-16.195 35.29 20.374 50.465 62.207 38.567 99.503l101.648 58.855-64.728-74.65 35.638-37.352-57.27-7.687 84.72-86.92-125.71 33.186 12.995-120.208-66.578 96.363-27.448-80.593-16.353 88.77L20.127 52.803zm0 105.12l-.008.018.007.005v-.02zm0 .022l-.002 87.582 155.344 89.95-89.94 33.287h135.493l-63.658 99.87 116.22-70.083 15.77 85.852 38.543-80.01 63.66 87.018-5.853-87.047 90.54 17.268-102.4-59.198c-26.546 26.964-68.89 33.744-103.183 13.945-34.322-19.816-49.62-59.928-39.49-96.424L20.127 157.945zm316.6 119.442c-.938-.003-1.874.027-2.805.092-12.42.86-24.164 7.707-30.9 19.375-10.78 18.67-4.455 42.27 14.214 53.047 18.67 10.78 42.27 4.455 53.047-14.214 10.78-18.67 4.454-42.27-14.215-53.047-6.125-3.536-12.78-5.23-19.34-5.253z"},child:[]}]})(i)}function V4e(i){return U({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 32l-64 96 80 16-16 80 64-96-80-16 16-80zm-96 217c-1.9 0-9.8 3-15.8 6.7-2.8 1.7-5.3 3.5-7.2 4.8v119c1.9 1.3 4.4 3.1 7.2 4.8 6 3.7 13.9 6.7 15.8 6.7 1.9 0 9.8-3 15.8-6.7 5.9-3.7 10.6-7.3 10.6-7.3l2.5-2H201V265h-12.1l-2.5-2s-4.7-3.6-10.6-7.3c-6-3.7-13.9-6.7-15.8-6.7zm192 0c-1.9 0-9.8 3-15.8 6.7-5.9 3.7-10.6 7.3-10.6 7.3l-2.5 2H311v110h12.1l2.5 2s4.7 3.6 10.6 7.3c6 3.7 13.9 6.7 15.8 6.7 1.9 0 9.8-3 15.8-6.7 2.8-1.7 5.3-3.5 7.2-4.8v-119c-1.9-1.3-4.4-3.1-7.2-4.8-6-3.7-13.9-6.7-15.8-6.7zm-133 16v110h14V265h-14zm32 0v110h42V265h-42zM95.5 311c-18.8 0-36.6 9.2-49.94 22.7C32.22 347.1 23 365 23 384v106h18V384c0-13 6.78-27.1 17.32-37.7C68.85 335.8 82.8 329 95.5 329H119v-18H95.5zm297.5 0v18h22.9c13.1 0 27.1 6.8 37.7 17.4C464.2 357 471 371 471 384v106h18V384c0-19-9.2-37-22.7-50.4-13.4-13.4-31.4-22.6-50.4-22.6H393z"},child:[]}]})(i)}function Z4e(i){return U({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M376 211H256V16L136 301h120v195z"},child:[]}]})(i)}function X4e(i){return U({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M18.36 6.64a9 9 0 1 1-12.73 0"},child:[]},{tag:"line",attr:{x1:"12",y1:"2",x2:"12",y2:"12"},child:[]}]})(i)}function K4e(i){return U({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"},child:[]}]})(i)}function q4e(i){return U({attr:{version:"1.1",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M6 0l-6 8h6l-4 8 14-10h-8l6-6z"},child:[]}]})(i)}const yge={SET:x0e,WORKING:qn,UNREACH:ea,LOWBAT:Kn,MAINTAIN:K0e,ERROR:i4e,DIRECTION:q0e,CONNECTED:ea,ACTUAL:P4e,SECOND:W4e,PRESS_LONG:Z0e,PRESS:V0e,MUTE:v0e,ACCURACY:H4e,RADIUS:O0e,ELEVATION:S0e,LATITUDE:f0e,LONGITUDE:p0e,GPS:r4e,ON_ACTUAL:Hn,ON_SET:Hn,OPEN:H0e,STOP:J4e,WATER_ALARM:sa,WASTE_ALARM:aa,PAUSE:m0e,STATE:G4e,BATTERY:Kn,WASTE:aa,WATER:sa,WORK_MODE:qn,MODE:o4e,POWER:E0e,BOOST:$4e,HUMIDITY:l4e,TEMPERATURE:c4e,BRIGHTNESS:L4e,MOTION:W0e,FIRE:N4e,WINDOW:Lu,SMOKE:u4e,SWING:R4e,SPEED:B4e,DIMMER:K4e,ON:X4e,COLOR_TEMP:b0e,ELECTRIC_POWER:q4e,CURRENT:Z4e,VOLTAGE:V4e,CONSUMPTION:b4e,FREQUENCY:F4e,HUE:g4e};class gu extends n.Component{static generateFile(e,t){const s=window.document.createElement("a");s.setAttribute("href",`data:application/json;charset=utf-8,${encodeURIComponent(JSON.stringify(t,null,2))}`),s.setAttribute("download",e),s.style.display="none",window.document.body.appendChild(s),s.click(),window.document.body.removeChild(s)}handleFileSelect=e=>{const t=e.target,s=t==null?void 0:t.files;if(!s||!s.length){console.error("No files found. Please report to developers");return}const r=s[0];if(r){const o=new window.FileReader;o.onload=()=>{var a;const M=((a=o.result)==null?void 0:a.toString())||"";try{const u=JSON.parse(M);u.native&&u.common?u.common.name!==this.props.common.name?this.props.onError&&this.props.onError(D.t("ra_otherConfig",u.common.name)):this.props.onLoad&&this.props.onLoad(u.native):this.props.onError&&this.props.onError(D.t("ra_invalidConfig"))}catch(u){this.props.onError&&this.props.onError(u==null?void 0:u.toString())}},o.readAsText(r)}else alert("Failed to open JSON File")};download(){const e={_id:`system.adapter.${this.props.common.name}.${this.props.instance}`,common:JSON.parse(JSON.stringify(this.props.common)),native:this.props.native};e.common.news&&delete e.common.news,e.common.titleLang&&delete e.common.titleLang,e.common.desc&&delete e.common.desc,gu.generateFile(`${e._id}.json`,e)}upload(){const e=window.document.createElement("input");e.setAttribute("type","file"),e.setAttribute("id","files"),e.setAttribute("opacity","0"),e.addEventListener("change",this.handleFileSelect,!1),e.click()}render(){return n.createElement("div",{className:this.props.className,style:this.props.style},this.props.common.icon?n.createElement(xe,{src:this.props.common.icon,style:{padding:8,width:64},alt:"logo"}):null,this.props.common.readme?n.createElement(Ct,{size:"small",color:"primary","aria-label":"Help",style:{marginRight:5,marginTop:5,float:"right"},onClick:()=>{const e=window.open(this.props.common.readme,"_blank");e==null||e.focus()}},n.createElement(Sl,null)):null,n.createElement(Ct,{size:"small",color:"primary","aria-label":"Load config",style:{marginRight:5,marginTop:5,float:"right"},title:D.t("ra_Load configuration from file"),onClick:()=>this.upload()},n.createElement(xl,null)),n.createElement(Ct,{size:"small",color:"primary","aria-label":"Save config",style:{marginRight:5,marginTop:5,float:"right"},title:D.t("ra_Save configuration to file"),onClick:()=>this.download()},n.createElement(kl,null)))}}class Tu{static text2link(e){const t=e.match(/\d+\.\)\s/);return t&&(e=e.replace(t[0],t[0].replace(/\s/," "))),e.replace(/[^a-zA-Zа-яА-Я0-9]/g,"").trim().replace(/\s/g,"").toLowerCase()}static openLink(e,t){e=e.replace(/\/\/([0-9a-f]*:[0-9a-f]*:[0-9a-f]*:[0-9a-f]*:[0-9a-f]*:[0-9a-f]*)(:\d+)?\//i,"//[$1]$2/"),t==="this"?window.location.href=e:window.open(e,t||"_blank")}static getTitle(e){const t=Tu.extractHeader(e);let s=t.body;const r=t.header;if(!r.title){s=s.replace(/{[^}]*}/g,""),s=s.trim();const o=s.replace(/\r/g,"").split(` `);for(let M=0;M{if(!M.trim())return;const a=M.indexOf(":");if(a!==-1){const u=M.substring(0,a).trim();let l=M.substring(a+1).trim();l=l.replace(/^['"]|['"]$/g,""),l==="true"?t[u]=!0:l==="false"?t[u]=!1:parseFloat(l).toString()===l?t[u]=parseFloat(l):t[u]=l}else t[M.trim()]=!0}),e=e.substring(s+7))}return{header:t,body:e}}static removeDocsify(e){const t=e.match(/{docsify-[^}]*}/g);return t&&t.forEach(s=>e=e.replace(s,"")),e}static onCopy(e,t){Hc(t),e&&e.stopPropagation(),e&&e.preventDefault()}}function eLe(i){return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:e=>i.onClick&&i.onClick(e),viewBox:"0 0 512 512",width:i.width||(i.fontSize==="small"?16:20),height:i.height||i.width||(i.fontSize==="small"?16:20),className:i.className,style:i.style},n.createElement("path",{fill:"currentColor",d:"M448 0L320 96v62.06l-83.03 83.03c6.79 4.25 13.27 9.06 19.07 14.87 5.8 5.8 10.62 12.28 14.87 19.07L353.94 192H416l96-128-64-64zM128 278.59L10.92 395.67c-14.55 14.55-14.55 38.15 0 52.71l52.7 52.7c14.56 14.56 38.15 14.56 52.71 0L233.41 384c29.11-29.11 29.11-76.3 0-105.41s-76.3-29.11-105.41 0z"}))}function yu(i){return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:e=>i.onClick&&i.onClick(e),viewBox:"0 0 320 320",width:i.width||(i.fontSize==="small"?16:20),height:i.height||i.width||(i.fontSize==="small"?16:20),className:i.className,style:i.style},n.createElement("g",{fill:"currentColor"},n.createElement("rect",{rx:"32",height:"272",width:"267",y:"25",x:"25",strokeWidth:"15",stroke:"currentColor",fill:"none"}),n.createElement("ellipse",{stroke:"currentColor",ry:"26",rx:"26",cy:"248",cx:"160",fill:"none",strokeWidth:"15"}),n.createElement("line",{y2:"201.94531",x2:"159.5",y1:"46.94531",x1:"159.5",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",stroke:"currentColor",fill:"none"}),n.createElement("rect",{height:"27",width:"50",y:"79.7979",x:"133.5",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",stroke:"currentColor",fill:"#fff"})))}function Ts(i){return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:e=>i.onClick&&i.onClick(e),viewBox:"0 0 512 512",width:i.width||(i.fontSize==="small"?16:20),height:i.height||i.width||(i.fontSize==="small"?16:20),className:i.className,style:i.style},n.createElement("path",{fill:"currentColor",d:"M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z"}))}function Du(i){return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:e=>i.onClick&&i.onClick(e),viewBox:"0 0 320 320",width:i.width||(i.fontSize==="small"?16:20),height:i.height||i.width||(i.fontSize==="small"?16:20),className:i.className,style:i.style},n.createElement("g",{fill:"currentColor"},n.createElement("rect",{rx:"32",height:"272",width:"267",y:"25",x:"25",strokeWidth:"15",stroke:"currentColor",fill:"none"}),n.createElement("ellipse",{stroke:"currentColor",ry:"26",rx:"26",cy:"252",cx:"160",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",fill:"#fff"}),n.createElement("line",{y2:"201.94531",x2:"159.5",y1:"46.94531",x1:"159.5",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",stroke:"currentColor",fill:"none"}),n.createElement("rect",{height:"27",width:"50",y:"140.83068",x:"133.5",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",stroke:"currentColor",fill:"#fff"}),n.createElement("ellipse",{stroke:"currentColor",ry:"26",rx:"26",cy:"251",cx:"241",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",fill:"#fff"}),n.createElement("line",{y2:"200.94531",x2:"240.5",y1:"45.94531",x1:"240.5",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",stroke:"currentColor",fill:"none"}),n.createElement("rect",{height:"27",width:"50",y:"78.7979",x:"214.5",strokeWidth:"15",stroke:"currentColor",fill:"#fff"}),n.createElement("ellipse",{stroke:"currentColor",ry:"26",rx:"26",cy:"252",cx:"84",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",fill:"#fff"}),n.createElement("line",{y2:"201.94531",x2:"83.5",y1:"46.94531",x1:"83.5",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",stroke:"currentColor",fill:"none"}),n.createElement("rect",{height:"27",width:"50",y:"79.7979",x:"57.5",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",stroke:"currentColor",fill:"#fff"})))}function tLe(i){return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",onClick:e=>i.onClick&&i.onClick(e),width:i.width||(i.fontSize==="small"?16:20),height:i.height||i.width||(i.fontSize==="small"?16:20),className:i.className,style:i.style},n.createElement("path",{fill:"currentColor",d:"M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48z"}))}function sLe(i){return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:e=>i.onClick&&i.onClick(e),viewBox:"0 0 512 512",width:i.width||(i.fontSize==="small"?16:20),height:i.height||i.width||(i.fontSize==="small"?16:20),className:i.className,style:i.style},n.createElement("path",{fill:"currentColor",d:"M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48z"}),n.createElement("path",{fill:"currentColor",stroke:"null",d:"m261,270l-12,0l0,-24c0,-33.12 -26.88,-60 -60,-60s-60,26.88 -60,60l0,24l-12,0c-13.2,0 -24,10.8 -24,24l0,120c0,13.2 10.8,24 24,24l144,0c13.2,0 24,-10.8 24,-24l0,-120c0,-13.2 -10.8,-24 -24,-24zm-72,108c-13.2,0 -24,-10.8 -24,-24s10.8,-24 24,-24s24,10.8 24,24s-10.8,24 -24,24zm37.2,-108l-74.4,0l0,-24c0,-20.52 16.68,-37.2 37.2,-37.2c20.52,0 37.2,16.68 37.2,37.2l0,24z"}))}function iLe(i){return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:e=>i.onClick&&i.onClick(e),viewBox:"0 0 512 512",width:i.width||(i.fontSize==="small"?16:20),height:i.height||i.width||(i.fontSize==="small"?16:20),className:i.className,style:i.style},n.createElement("path",{fill:"currentColor",d:"M448 0L320 96v62.06l-83.03 83.03c6.79 4.25 13.27 9.06 19.07 14.87 5.8 5.8 10.62 12.28 14.87 19.07L353.94 192H416l96-128-64-64zM128 278.59L10.92 395.67c-14.55 14.55-14.55 38.15 0 52.71l52.7 52.7c14.56 14.56 38.15 14.56 52.71 0L233.41 384c29.11-29.11 29.11-76.3 0-105.41s-76.3-29.11-105.41 0z"}))}function Xs(i){return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:e=>i.onClick&&i.onClick(e),viewBox:"0 0 320 320",width:i.width||(i.fontSize==="small"?16:20),height:i.height||i.width||(i.fontSize==="small"?16:20),className:i.className,style:i.style},n.createElement("rect",{fill:"none",rx:"32",height:"272",width:"267",y:"25",x:"25",strokeWidth:"15",stroke:"currentColor"}),n.createElement("ellipse",{fill:"none",ry:"54",rx:"54",cy:"160",cx:"160",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",stroke:"currentColor"}))}function rLe(i){return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:e=>i.onClick&&i.onClick(e),viewBox:"0 0 24 24",width:i.width||(i.fontSize==="small"?16:20),height:i.height||i.width||(i.fontSize==="small"?16:20),className:i.className,style:i.style},n.createElement("path",{fill:"currentColor",stroke:"currentColor",d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39A.998.998 0 0 0 18.95 4H5.04c-.83 0-1.3.95-.79 1.61z"}))}const Yr={root:{width:"100%",height:"100%"},overflowHidden:{overflow:"hidden"},container:{height:"100%"}};function oLe(i){var e;return n.createElement(Ja,{elevation:Number.isNaN(i.elevation)?1:i.elevation,style:{...Yr.root,...((e=i.styles)==null?void 0:e.root)||void 0,...i.overflow!=="visible"?Yr.overflowHidden:void 0},onKeyDown:i.onKeyDown,tabIndex:i.tabIndex},n.createElement(Ut,{container:!0,direction:"column",wrap:"nowrap",sx:Yr.container},i.children))}const ca={root:{height:"100%",overflow:"hidden"},overflowAuto:{overflow:"auto"}},MLe=n.forwardRef(function(e,t){return n.createElement(Ut,{sx:{...ca.root,...(e==null?void 0:e.style)||void 0,...e.overflow==="auto"?ca.overflowAuto:void 0},ref:t},e.children)});function nLe(i){return n.createElement(Ut,{container:!0,alignItems:"center"},i.children)}const Is=24,Ye=32,du=i=>i==="dark"?"#62ff25":"#37c400",zu=i=>i==="dark"?"#ee56ff":"#a204b4",aLe=i=>i==="dark"?"#fff46e":"#b89101",hu=i=>"#ff6d69",Iu=i=>"#5773ff",cLe=["0_userdata.0.","alias.0."],bt={headerCellInput:{width:"calc(100% - 5px)",height:Ye,pt:0,"& .itemIcon":{verticalAlign:"middle",width:Is,height:Is,display:"inline-block"}},headerCellSelectItem:{"& .itemIcon":{width:Is,height:Is,mr:"5px",display:"inline-block"}},selectNone:{opacity:.5},selectClearButton:{position:"absolute",top:0,right:0,borderRadius:5,backgroundColor:"background.default"},cellIdTooltipLink:{color:"#7ec2fd","&:hover":{color:"#7ec2fd"},"&:visited":{color:"#7ec2fd"}},cellIdTooltip:{fontSize:14}};function uLe(i){return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 436 436",style:i==null?void 0:i.style,width:"24",height:"24",className:"admin-button"},n.createElement("g",{fill:"currentColor"},n.createElement("path",{d:"m195.23077,24.30769c-36,3 -67,12 -96,26c-49,24 -82,61 -93,104l-3,11l-1,50c0,46 0,49 2,59l5,20c21,58 84,103 165,116c16,3 53,4 70,2c60,-6 111,-28 147,-64c21,-21 36,-49 40,-74a866,866 0 0 0 1,-104c-3,-18 -6,-28 -13,-43c-26,-52 -87,-90 -162,-101c-16,-2 -48,-3 -63,-2l1,0zm60,23c36,5 70,18 95,35c31,20 51,47 59,77c2,7 2,11 2,25c1,15 0,18 -2,26c-19,69 -104,117 -200,114c-47,-2 -90,-15 -124,-38c-31,-20 -51,-47 -59,-77c-3,-11 -4,-32 -2,-43c8,-42 41,-78 91,-101a260,260 0 0 1 140,-19l0,1zm-221,222c21,26 57,49 95,62c81,27 174,14 239,-32c14,-10 31,-27 41,-41c2,-2 2,-2 2,7c-1,23 -16,50 -38,72c-78,74 -233,74 -311,-1a121,121 0 0 1 -39,-76l0,-6l3,4l8,11z"}),n.createElement("path",{d:"m201.23077,47.30769c-40,3 -79,19 -104,44c-55,55 -38,133 37,171c52,26 122,24 172,-5c30,-17 51,-42 58,-71c3,-11 3,-34 0,-45c-6,-23 -21,-44 -40,-60l-27,-16a184,184 0 0 0 -96,-18zm30,21c56,5 100,35 112,75c4,11 4,30 0,41c-8,25 -26,45 -54,59a166,166 0 0 1 -160,-8a98,98 0 0 1 -41,-53c-5,-18 -2,-39 8,-57c23,-39 79,-62 135,-57z"})))}function ua(i){i=(i||"").toString();const e=i[0]==="*",t=i[i.length-1]==="*";return i=i.replace(/[-/\\^$+?.()|[\]{}]/g,"\\$&").replace(/\*/g,".*"),(e?"":"^")+i+(t?"":"$")}function lLe(i,e){const t=[];for(let s=0;s{if(r==null)return;const M=typeof r=="object";if(t&&M&&typeof r.en=="string"&&typeof r.de=="string"){s[o]=r.en;return}s[o]=M?jo(r,e,t):r}):NLe(i,(s,r,o)=>{if(r==null||e.includes(o))return;const M=typeof r=="object";if(t&&M&&typeof r.en=="string"&&typeof r.de=="string"){s[o]=r.en;return}s[o]=M?jo(r,e,t):r})}function la(i,e,t){const s=document.createElement("a"),r=[];t.excludeSystemRepositories&&r.push("system.repositories");const o=r.length>0||t.excludeTranslations?jo(e,r,t.excludeTranslations):e,M=t.beautify?JSON.stringify(o,null,2):JSON.stringify(o);s.setAttribute("href",`data:application/json;charset=utf-8,${encodeURIComponent(M)}`),s.setAttribute("download",i),s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s)}class LLe extends ze{hasIcons;timer=null;constructor(e){var t;super(e),this.state={value:e.initialValue||[]},this.hasIcons=!!((t=e.values)!=null&&t.find(s=>s.icon))}componentWillUnmount(){this.timer&&clearTimeout(this.timer)}render(){var e;return n.createElement("div",{style:{position:"relative"}},n.createElement(Xe,{variant:"standard",key:this.props.name,sx:bt.headerCellInput,className:"no-underline",multiple:!0,renderValue:t=>t!=null&&t.length?t.map(s=>{const r=this.props.values.find(u=>typeof u=="object"?u.value===s:u===s);let o,M,a;return typeof r=="object"?(o=r.value,M=r.name,a=r.icon):(o=r,M=r),n.createElement(W,{component:"span",sx:bt.headerCellSelectItem,key:o},a||(this.hasIcons?n.createElement("div",{className:"itemIcon"}):null),M)}):this.props.name==="custom"?this.props.texts.showAll:this.props.texts[`filter_${this.props.name}`],value:this.state.value,onChange:t=>{let s=t.target.value;if(this.state.value[0]==="_"&&s.includes("_")&&s.length>1){const r=s.indexOf("_");r!==-1&&s.splice(r,1)}else this.state.value[0]!=="_"&&s.includes("_")&&(s=["_"]);s.includes("")&&(s=[]),this.setState({value:s},()=>{this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.timer=null,this.props.onChange(this.props.name,s)},400)})},onClose:()=>{this.timer&&(clearTimeout(this.timer),this.timer=null,this.props.onChange(this.props.name,this.state.value))},inputProps:{name:this.props.name,id:this.props.name},displayEmpty:!0},n.createElement(te,{key:"empty",value:""},n.createElement("span",{style:bt.selectNone},this.props.name==="custom"?this.props.texts.showAll:this.props.texts[`filter_${this.props.name}`])),(e=this.props.values)==null?void 0:e.map(t=>{let s,r,o;return typeof t=="object"?(s=t.value,r=t.name,o=t.icon):(s=t,r=t),n.createElement(te,{sx:bt.headerCellSelectItem,key:s,value:s},o||(this.hasIcons?n.createElement("div",{className:"itemIcon"}):null),r)})),this.state.value.length?n.createElement(W,{component:"div",sx:bt.selectClearButton},n.createElement(P,{size:"small",onClick:()=>{this.timer&&(clearTimeout(this.timer),this.timer=null),this.setState({value:[]},()=>this.props.onChange(this.props.name,void 0))}},n.createElement(ge,null))):null)}}class jLe extends ze{timer=null;constructor(e){super(e),this.state={value:e.initialValue||""}}componentWillUnmount(){this.timer&&clearTimeout(this.timer)}render(){return n.createElement(wt,{sx:this.props.styles,key:this.props.name,title:this.props.t("ra_You can use * as wildcard"),margin:"dense"},n.createElement(vt,{classes:{underline:"no-underline"},id:this.props.name,placeholder:this.props.texts[`filter_${this.props.name}`],value:this.state.value,onChange:e=>{const t=e.target.value;this.setState({value:t},()=>{this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.timer=null,this.props.onChange(this.props.name,t)},400)})},onBlur:()=>{this.timer&&(clearTimeout(this.timer),this.timer=null,this.props.onChange(this.props.name,this.state.value))},autoComplete:"off"}),this.state.value?n.createElement("div",{style:{position:"absolute",right:0}},n.createElement(P,{size:"small",onClick:()=>{this.timer&&(clearTimeout(this.timer),this.timer=null),this.setState({value:""},()=>this.props.onChange(this.props.name,void 0))}},n.createElement(ge,null))):null)}}function oi(i,e,t,s){if(t||=0,s===void 0&&(s=i.length-1,!s))return i[0]===e;const r=Math.floor((t+s)/2);return e===i[r]?!0:s-1===t?i[t]===e||i[s]===e:e>i[r]?oi(i,e,r,s):ek.toLowerCase())),(L=e.custom)!=null&&L.length&&(r.custom=e.custom.map(k=>k.toLowerCase())),(j=e.role)!=null&&j.length&&(r.role=e.role.map(k=>k.toLowerCase())),(g=e.room)!=null&&g.length&&(r.room=[],e.room.forEach(k=>{var Y,J;r.room=r.room.concat(((J=(Y=s[k])==null?void 0:Y.common)==null?void 0:J.members)||[])})),(y=e.func)!=null&&y.length&&(r.func=[],e.func.forEach(k=>{var Y,J;r.func=r.func.concat(((J=(Y=s[k])==null?void 0:Y.common)==null?void 0:J.members)||[])}))}const N=i.data;if(N!=null&&N.id){const k=(d=N.obj)==null?void 0:d.common;if(M){if(M.type&&(typeof M.type=="string"?(!N.obj||M.type!==N.obj.type)&&(l=!0):Array.isArray(M.type)&&(!N.obj||!M.type.includes(N.obj.type))&&(l=!0)),!l&&((I=M.common)!=null&&I.type)&&(k!=null&&k.type?typeof M.common.type=="string"?M.common.type!==k.type&&(l=!0):Array.isArray(M.common.type)&&(M.common.type.includes(k.type)||(l=!0)):l=!0),!l&&((m=M.common)!=null&&m.role)&&(k!=null&&k.role?typeof M.common.role=="string"?k.role.startsWith(M.common.role)&&(l=!0):Array.isArray(M.common.role)&&(M.common.role.find(Y=>k.role.startsWith(Y))||(l=!0)):l=!0),!l&&((w=M.common)==null?void 0:w.custom)==="_"&&(k!=null&&k.custom))l=!0;else if(!l&&((O=M.common)!=null&&O.custom)&&((A=M.common)==null?void 0:A.custom)!=="_"){const Y=M.common.custom;if(!(k!=null&&k.custom))l=!0;else if(Y==="_dataSources")Object.keys(k.custom).find(J=>J.startsWith("history.")||J.startsWith("sql.")||J.startsWith("influxdb."))||(l=!0);else if(Array.isArray(Y)){const J=Object.keys(k.custom);Y.find(Le=>J.find(Je=>Je.startsWith(Le)))&&(l=!0)}else Y!==!0&&!Object.keys(k.custom).find(J=>J.startsWith(Y))&&(l=!0)}}!l&&!e.expertMode&&(l=N.id==="system"||N.id==="enum"||N.id.startsWith("system.")||N.id.startsWith("enum.")||N.id.startsWith("_design/")||N.id.endsWith(".admin")||!!(k!=null&&k.expert)),!l&&r.id&&(N.fID===void 0&&(N.fID=N.id.toLowerCase()),l=!N.fID.includes(r.id)),!l&&r.idRx&&(l=!r.idRx.test(N.id)),!l&&r.name&&(k?(N.fName===void 0&&(N.fName=Re(k.name,t)||"",N.fName=N.fName.toLowerCase()),l=!N.fName.includes(r.name)):l=!0),!l&&r.nameRx&&k&&(N.fName===void 0&&(N.fName=Re(k.name,t)||"",N.fName=N.fName.toLowerCase()),l=!r.nameRx.test(N.fName)),!l&&((h=e.role)!=null&&h.length)&&k&&(l=!(typeof k.role=="string"&&r.role.find(Y=>k.role.startsWith(Y)))),!l&&((p=r.room)!=null&&p.length)&&(l=!r.room.find(Y=>Y===N.id||N.id.startsWith(`${Y}.`))),!l&&((S=r.func)!=null&&S.length)&&(l=!r.func.find(Y=>Y===N.id||N.id.startsWith(`${Y}.`))),!l&&((f=r.type)!=null&&f.length)&&(l=!(($=N.obj)!=null&&$.type&&r.type.includes(N.obj.type))),!l&&a&&(l=!((x=N.obj)!=null&&x.type&&a.includes(N.obj.type))),!l&&((Z=r.custom)!=null&&Z.length)&&(k?r.custom[0]==="_"?l=!!k.custom:k.custom?l=!r.custom.find(Y=>k.custom[Y]):l=!0:l=r.custom[0]!=="_")}return N.visible=!l,N.hasVisibleChildren=!1,i.children&&u<20&&i.children.forEach(k=>{go(k,e,t,s,r,o,M,a,u+1)&&(N.hasVisibleChildren=!0)}),N.sumVisibility=N.visible||N.hasVisibleChildren,o&&N.sumVisibility&&o.count++,N.id&&N.sumVisibility&&i.children&&i.children.forEach(k=>k.data.hasVisibleParent=!0),N.visible||N.hasVisibleChildren}function wu(i,e,t,s){var o;s||=[];const r=i.data;return r.sumVisibility&&(r.id&&t[r.id]&&t[r.id].type===e&&s.push(r.id),(o=i.children)==null||o.forEach(M=>wu(M,e,t,s))),s}function Na(i,e,t,s,r,o){let M;return e==="alias"||e==="alias.0"?M=n.createElement(Za,{className:"iconOwn",style:{color:zu(s)}}):e==="0_userdata"||e==="0_userdata.0"?M=n.createElement(Yl,{className:"iconOwn",style:{color:du(s)}}):e.startsWith("_design/")||e==="system"?M=n.createElement(Wi,{className:"iconOwn",style:{color:hu(s)}}):e==="system.adapter"?M=n.createElement(Wi,{className:"iconOwn",style:{color:Iu(s)}}):e==="system.group"?M=n.createElement(vo,{className:"iconOwn"}):e==="system.user"?M=n.createElement(Uo,{className:"iconOwn"}):e==="system.host"?M=n.createElement(bo,{className:"iconOwn"}):e.endsWith(".connection")||e.endsWith(".connected")?M=n.createElement(zs,{className:"iconOwn"}):e.endsWith(".info")?M=n.createElement($o,{className:"iconOwn"}):i[e]&&i[e].type==="meta"?M=n.createElement(tr,{className:"iconOwn"}):t<2&&i[`system.adapter.${e}`]&&(M=Xi(i,`system.adapter.${e}`,r,o)),M||null}function Cu(i,e){var t,s;return(s=(t=i==null?void 0:i.obj)==null?void 0:t.common)!=null&&s.desc&&Re(i.obj.common.desc,e)||null}function gLe(i,e){const t=Cu(i,e);return t!=null&&t.startsWith("http")?n.createElement(W,{component:"a",sx:bt.cellIdTooltipLink,href:t,target:"_blank",rel:"noreferrer"},t):n.createElement("span",{style:bt.cellIdTooltip},t||i.id||"")}function La(i,e){var N,c,L,j,g,y,d,I,m,w;const t=e.imagePrefix||".";let s=Object.keys(i);s.sort((O,A)=>O===A?0:(O=O.replace(/\./g,"!!!"),A=A.replace(/\./g,"!!!"),O>A?1:-1)),e.root&&(s=s.filter(O=>O===e.root||O.startsWith(`${e.root}.`)));let r=[],o="",M=0;const a={data:{name:"",id:""},children:[]},u={funcEnums:[],roomEnums:[],roles:[],ids:[],types:[],objects:i,customs:["_"],enums:[],hasSomeCustoms:!1,aliasesMap:{}};let l=a;for(let O=0;Ox.role===$)?typeof $!="string"?console.warn(`Invalid role type "${typeof $}" in "${h._id}"`):u.roles.push({role:$,type:f.type}):A.startsWith("enum.rooms.")?(u.roomEnums.push(A),u.enums.push(A)):A.startsWith("enum.functions.")?(u.funcEnums.push(A),u.enums.push(A)):h.type==="enum"?u.enums.push(A):h.type==="instance"&&f&&(f.supportCustoms||(N=f.adminUI)!=null&&N.custom)&&(u.hasSomeCustoms=!0,u.customs.push(A.substring(15))),A.startsWith("alias.")&&((c=h.common.alias)!=null&&c.id))if(typeof h.common.alias.id=="string"){const x=h.common.alias.id;u.aliasesMap[x]?u.aliasesMap[x].includes(A)||u.aliasesMap[x].push(A):u.aliasesMap[x]=[A]}else{const x=h.common.alias.id.read;x&&(u.aliasesMap[x]?u.aliasesMap[x].includes(A)||u.aliasesMap[x].push(A):u.aliasesMap[x]=[A]);const Z=h.common.alias.id.write;Z&&(u.aliasesMap[Z]?u.aliasesMap[Z].includes(A)||u.aliasesMap[Z].push(A):u.aliasesMap[Z]=[A])}}u.ids.push(A);let S;do if(S=!1,!o||A.startsWith(`${o}.`)){if(p.length-M>1){let $=o;for(let x=M;xZ.data.name===p[x]));else{const Z={data:{name:p[x],parent:l,id:$,obj:i[$],level:x,icon:Na(i,$,x,e.themeType,e.lang,t),generated:!0}};l.children||=[],l.children.push(Z),l=Z,u.ids.push($)}}const f={data:{name:p[p.length-1],title:Re((L=h==null?void 0:h.common)==null?void 0:L.name,e.lang),obj:h,parent:l,icon:Xi(i,A,e.lang,t)||Na(i,A,0,e.themeType,e.lang,t),id:A,hasCustoms:!!((j=h.common)!=null&&j.custom&&Object.keys(h.common.custom).length),level:p.length-1,generated:!1,button:h.type==="state"&&!!((g=h.common)!=null&&g.role)&&typeof h.common.role=="string"&&h.common.role.startsWith("button")&&((y=h.common)==null?void 0:y.write)!==!1,switch:h.type==="state"&&((d=h.common)==null?void 0:d.type)==="boolean"&&((I=h.common)==null?void 0:I.write)!==!1&&((m=h.common)==null?void 0:m.read)!==!1,url:!!((w=h.common)!=null&&w.role)&&typeof h.common.role=="string"&&h.common.role.startsWith("url")}};l.children||=[],l.children.push(f),l=f,M=p.length,r=p,o=A}else{let f=0;for(;r[f]===p[f];)f++;if(f>0){let $=r.length;for(r=r.splice(0,f),M=f,o=r.join(".");$>f;)l.data.parent?l=l.data.parent:console.error(`Parent is null for ${A} ${o} ${r.join(".")}`),$--}else l=a,r=[],o="",M=0;S=!0}while(S)}return u.roomEnums.sort((O,A)=>{var S,f,$,x;const h=Re((f=(S=i[O])==null?void 0:S.common)==null?void 0:f.name,e.lang)||O.split(".").pop(),p=Re((x=($=i[A])==null?void 0:$.common)==null?void 0:x.name,e.lang)||A.split(".").pop();return h>p?1:h{var S,f,$,x;const h=Re((f=(S=i[O])==null?void 0:S.common)==null?void 0:f.name,e.lang)||O.split(".").pop(),p=Re((x=($=i[A])==null?void 0:$.common)==null?void 0:x.name,e.lang)||A.split(".").pop();return h>p?1:hO.role.localeCompare(A.role)),u.types.sort(),{info:u,root:a}}function Au(i,e,t,s,r){if(i.data.id===e)return i;if(t||(t=e.split("."),r=0,s=t[r]),!i.children&&i.data.id!==e)return null;let o;if(i.children)for(let M=0;Ms)break}return o?(r||=0,Au(o,e,t,`${s}.${t[r+1]}`,r+1)):null}function mu(i,e,t,s){var M,a;if(!e)return{rooms:[],per:!1};s||=[];for(const u of i.roomEnums){const l=(M=i.objects[u])==null?void 0:M.common;if(!l)continue;const N=Re(l.name,t);(a=l.members)!=null&&a.includes(e)&&!s.includes(N)&&s.push(N)}let r;const o=e.split(".");return o.pop(),e=o.join("."),i.objects[e]&&(r=s.length,mu(i,e,t,s)),{rooms:s,per:!r}}function ys(i,e,t,s){var r,o;if(!e)return[];s||=[];for(let M=0;M946681200&&l<9466812e5&&(l*=1e3),l=l&&new Date(l).toString();else if(a!=null&&a.role&&typeof a.role=="string"&&a.role.match(/^value\.duration/)){if(typeof l=="number"&&l>=0){const g=Math.floor(l/3600),y=Math.floor(l%3600/60),d=Math.floor(l%60);l=`${g.toString().padStart(2,"0")}:${y.toString().padStart(2,"0")}:${d.toString().padStart(2,"0")}`}else if(typeof l=="string"&&E.isStringInteger(l)){const g=parseInt(l,10);if(g>=0){const y=Math.floor(g/3600),d=Math.floor(g%3600/60),I=Math.floor(g%60);l=`${y.toString().padStart(2,"0")}:${d.toString().padStart(2,"0")}:${I.toString().padStart(2,"0")}`}}}else N==="number"?Number.isInteger(l)||(l=Math.round(l*1e8)/1e8,s&&(l=l.toString().replace(".",","))):N==="object"?l=JSON.stringify(l):N!=="string"?l=l.toString():l.startsWith("data:image/")&&(u="image"),typeof l!="string"&&(l=l.toString());const c={v:l};M&&M[l]!==void 0&&l!==M[l]&&(c.s=l,l=M[l],c.v=l),((j=c.v)==null?void 0:j.length)>40&&(c.c=c.v,c.v=`${c.v.substring(0,40)}...`),a!=null&&a.unit&&(c.u=a.unit);let L;if(i.full&&(typeof l=="string"&&l.length>100?L=[{t:r.value,v:`${l.substring(0,100)}...`}]:L=[{t:r.value,v:l}],t)){if(t.ack!==void 0&&t.ack!==null&&L.push({t:r.ack,v:t.ack.toString()}),t.ts&&L.push({t:r.ts,v:t.ts?E.formatDate(new Date(t.ts),e):""}),t.lc&&L.push({t:r.lc,v:t.lc?E.formatDate(new Date(t.lc),e):""}),t.from){let g=t.from.toString();g.startsWith("system.adapter.")&&(g=g.substring(15)),L.push({t:r.from,v:g})}if(t.user){let g=t.user.toString();g.startsWith("system.user.")&&(g=g.substring(12)),L.push({t:r.user,v:g})}t.c&&L.push({t:r.c,v:t.c}),L.push({t:r.quality,v:E.quality2text(t.q||0).join(", "),nbr:!0})}return{valText:c,valFull:L,fileViewer:u}}function TLe(i){const{state:e}=i;return{color:e!=null&&e.ack?e.q?"#ffa500":"":i.nonAckColor||"#ff2222c9"}}function yLe(i,e){let t=e,s=1;const r=[];for(;s=t)r.push(0);else if(s1){const s=e.path;let r;const o=i;if(o[s[0]]&&typeof o[s[0]]=="object")return s.length===2?r=o[s[0]][s[1]]:s.length===3?r=o[s[0]][s[1]]&&typeof o[s[0]][s[1]]=="object"?o[s[0]][s[1]][s[2]]:null:s.length===4?r=o[s[0]][s[1]]&&typeof o[s[0]][s[1]]=="object"&&o[s[0]][s[1]][s[2]]?o[s[0]][s[1]][s[2]][s[3]]:null:s.length===5?r=o[s[0]][s[1]]&&typeof o[s[0]][s[1]]=="object"&&o[s[0]][s[1]][s[2]]&&o[s[0]][s[1]][s[2]][s[3]]?o[s[0]][s[1]][s[2]][s[3]][s[4]]:null:s.length===6&&(r=o[s[0]][s[1]]&&typeof o[s[0]][s[1]]=="object"&&o[s[0]][s[1]][s[2]]&&o[s[0]][s[1]][s[2]][s[3]]&&o[s[0]][s[1]][s[2]][s[3]][s[4]]?o[s[0]][s[1]][s[2]][s[3]][s[4]][s[5]]:null),r??null}return null}function DLe(i,e,t){var s;if((s=i==null?void 0:i._id)!=null&&s.startsWith(`${e.adapter}.`)&&e.path.length>1){const r=e.path,o=i;if(o[r[0]]&&typeof o[r[0]]=="object"){if(r.length===2)return o[r[0]][r[1]]=t,!0;if(r.length===3){if(o[r[0]][r[1]]&&typeof o[r[0]][r[1]]=="object")return o[r[0]][r[1]][r[2]]=t,!0}else if(r.length===4){if(o[r[0]][r[1]]&&typeof o[r[0]][r[1]]=="object"&&o[r[0]][r[1]][r[2]]&&typeof o[r[0]][r[1]][r[2]]=="object")return o[r[0]][r[1]][r[2]][r[3]]=t,!0}else if(r.length===5){if(o[r[0]][r[1]]&&typeof o[r[0]][r[1]]=="object"&&o[r[0]][r[1]][r[2]]&&typeof o[r[0]][r[1]][r[2]]=="object"&&o[r[0]][r[1]][r[2]][r[3]]&&typeof o[r[0]][r[1]][r[2]][r[3]]=="object")return o[r[0]][r[1]][r[2]][r[3]][r[4]]=t,!0}else if(r.length===6&&o[r[0]][r[1]]&&typeof o[r[0]][r[1]]=="object"&&o[r[0]][r[1]][r[2]]&&typeof o[r[0]][r[1]][r[2]]=="object"&&o[r[0]][r[1]][r[2]][r[3]]&&typeof o[r[0]][r[1]][r[2]][r[3]]=="object"&&o[r[0]][r[1]][r[2]][r[3]][r[4]]&&typeof o[r[0]][r[1]][r[2]][r[3]][r[4]]=="object")return o[r[0]][r[1]][r[2]][r[3]][r[4]][r[5]]=t,!0}}return!1}function ga(i){return!!cLe.find(e=>i.startsWith(e))}const dLe=16,Te=20,Ou="#ff413c",Eu="#86211f",To="#57ff45",yo="#098c04",Do="#f3ad11",zo="#6c5008",C={toolbar:{minHeight:38},toolbarButtons:{padding:4,marginLeft:4},switchColumnAuto:{marginLeft:16},dialogColumns:{transition:"opacity 1s"},dialogColumnsLabel:{fontSize:12,paddingTop:8},columnCustom:{width:"100%",display:"inline-block"},columnCustomEditable:{cursor:"text"},columnCustom_center:{textAlign:"center"},columnCustom_left:{textAlign:"left"},columnCustom_right:{textAlign:"right"},width100:{width:"100%"},transparent_10:{opacity:.1},transparent_20:{opacity:.2},transparent_30:{opacity:.3},transparent_40:{opacity:.4},transparent_50:{opacity:.5},transparent_60:{opacity:.6},transparent_70:{opacity:.7},transparent_80:{opacity:.8},transparent_90:{opacity:.9},transparent_100:{opacity:1},headerRow:{paddingLeft:8,height:38,whiteSpace:"nowrap",userSelect:"none"},buttonClearFilter:{position:"relative",float:"right",padding:0},buttonClearFilterIcon:{zIndex:2,position:"absolute",top:0,left:0,color:"#FF0000",opacity:.7},tableDiv:{paddingTop:0,paddingLeft:0,width:"calc(100% - 8px)",height:"calc(100% - 38px)",overflow:"auto"},tableRow:i=>({pl:1,height:Ye,lineHeight:`${Ye}px`,verticalAlign:"top",userSelect:"none",position:"relative",width:"100%","&:hover":{background:`${i.palette.mode==="dark"?i.palette.primary.dark:i.palette.primary.light} !important`,color:E.invertColor(i.palette.primary.main,!0)},whiteSpace:"nowrap",flexWrap:"nowrap"}),tableRowLines:i=>({borderBottom:`1px solid ${i.palette.mode==="dark","#8888882e"}`,"& > div":{borderRight:`1px solid ${i.palette.mode==="dark","#8888882e"}`}}),tableRowNoDragging:{cursor:"pointer"},tableRowAlias:{height:Ye+10},tableRowAliasReadWrite:{height:Ye+22},tableRowFocused:i=>({"&:after":{content:'""',position:"absolute",top:1,left:1,right:1,bottom:1,border:i.palette.mode?"1px dotted #000":"1px dotted #FFF"}}),checkBox:{padding:0},cellId:{position:"relative",fontSize:"1rem",overflow:"hidden",textOverflow:"ellipsis","& .copyButton":{display:"none"},"&:hover .copyButton":{display:"block"},"& .iconOwn":{display:"block",width:Ye-4,height:Ye-4,mt:"2px",float:"right"},"&:hover .iconOwn":{display:"none"},"& *":{width:"initial"}},cellIdSpan:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},cellIdIconFolder:i=>({marginRight:8,width:Ye-4,height:Ye-4,cursor:"pointer",color:i.palette.secondary.main||"#fbff7d",verticalAlign:"top"}),cellIdIconDocument:{verticalAlign:"middle",marginLeft:(Ye-Te)/2,marginRight:8,width:Te,height:Te},cellIdIconOwn:{},cellCopyButton:{width:Te,height:Te,top:(Ye-Te)/2,opacity:.8,position:"absolute",right:3},cellCopyButtonInDetails:{width:Te,height:Te,top:(Ye-Te)/2,opacity:.8},cellEditButton:{width:Te,height:Te,color:"white",position:"absolute",top:(Ye-Te)/2,right:Te+3,opacity:.7,"&:hover":{opacity:1}},cellName:{display:"inline-block",verticalAlign:"top",fontSize:14,ml:"5px",overflow:"hidden",textOverflow:"ellipsis",position:"relative","& .copyButton":{display:"none"},"&:hover .copyButton":{display:"block"}},cellNameWithDesc:{lineHeight:"normal"},cellNameDivDiv:{},cellDescription:{fontSize:10,opacity:.5,fontStyle:"italic"},cellIdAlias:i=>({fontStyle:"italic",fontSize:12,opacity:.7,"&:hover":{color:i.palette.mode==="dark"?"#009900":"#007700"}}),cellIdAliasReadWriteDiv:{height:24,marginTop:-5},cellIdAliasAlone:{lineHeight:0},cellIdAliasReadWrite:{lineHeight:"12px"},cellType:{display:"inline-block",verticalAlign:"top","& .itemIcon":{verticalAlign:"middle",width:Is,height:Is,display:"inline-block"},"& .itemIconFolder":{marginLeft:3}},cellRole:{display:"inline-block",verticalAlign:"top",textOverflow:"ellipsis",overflow:"hidden"},cellRoom:{display:"inline-block",verticalAlign:"top",textOverflow:"ellipsis",overflow:"hidden"},cellEnumParent:{opacity:.4},cellFunc:{display:"inline-block",verticalAlign:"top",textOverflow:"ellipsis",overflow:"hidden"},cellValue:{display:"inline-block",verticalAlign:"top",textOverflow:"ellipsis",overflow:"hidden"},cellValueButton:{marginTop:5},cellValueButtonFalse:{opacity:.3},cellAdapter:{display:"inline-block",verticalAlign:"top"},cellValueTooltip:{fontSize:12},cellValueText:{width:"100%",height:Ye,fontSize:16,display:"flex",overflow:"hidden",textOverflow:"ellipsis",position:"relative",verticalAlign:"top","& .copyButton":{display:"none"},"&:hover .copyButton":{display:"block"}},cellValueFile:{color:"#2837b9"},cellValueTooltipTitle:{fontStyle:"italic",width:100,display:"inline-block"},cellValueTooltipValue:{width:120,display:"inline-block",whiteSpace:"nowrap",textOverflow:"ellipsis"},cellValueTooltipImage:{width:100,height:"auto"},cellValueTooltipBoth:{width:220,display:"inline-block",whiteSpace:"nowrap"},cellValueTooltipBox:{width:250,overflow:"hidden",pointerEvents:"none"},tooltip:{pointerEvents:"none"},cellValueTextUnit:{marginLeft:4,opacity:.8,display:"inline-block"},cellValueTextState:{opacity:.7},cellValueTooltipCopy:{position:"absolute",bottom:3,right:3},cellValueTooltipEdit:{position:"absolute",bottom:3,right:15},cellButtons:{display:"inline-block",verticalAlign:"top"},cellButtonsButton:{display:"inline-block",opacity:.5,width:Te+4,height:Te+4,"&:hover":{opacity:1},p:0,mt:"-2px"},cellButtonsEmptyButton:{fontSize:12},cellButtonMinWidth:{minWidth:40},cellButtonsButtonAlone:{ml:`${Te+6}px`,pt:0,mt:"-2px"},cellButtonsButtonWithCustoms:i=>({color:i.palette.mode==="dark"?i.palette.primary.main:i.palette.secondary.main}),cellButtonsButtonWithoutCustoms:{opacity:.2},cellButtonsValueButton:i=>({position:"absolute",top:Te/2-2,opacity:.7,width:Te-2,height:Te-2,color:i.palette.action.active,"&:hover":{opacity:1}}),cellButtonsValueButtonCopy:{right:8,cursor:"pointer"},cellButtonsValueButtonEdit:{right:Te/2+16},cellDetailsLine:{display:"flex",alignItems:"center",width:"100%",height:32,fontSize:16},cellDetailsName:{fontWeight:"bold",marginRight:8,minWidth:80},filteredOut:{opacity:.5},filteredParentOut:{opacity:.3},filterInput:{mt:0,mb:0},selectIcon:{width:24,height:24,marginRight:4},itemSelected:i=>({background:`${i.palette.primary.main} !important`,color:`${E.invertColor(i.palette.primary.main,!0)} !important`}),header:{width:"100%"},headerCell:{display:"inline-block",verticalAlign:"top"},headerCellValue:{paddingTop:4,fontSize:16},visibleButtons:{color:"#2196f3",opacity:.7},grow:{flexGrow:1},enumIconDiv:{marginRight:8,width:32,height:32,borderRadius:8,background:"#FFFFFF"},enumIcon:{marginTop:4,marginLeft:4,width:24,height:24},enumDialog:{overflow:"hidden"},enumList:{minWidth:250,height:"calc(100% - 50px)",overflow:"auto"},enumCheckbox:{minWidth:0},buttonDiv:{display:"flex",height:"100%",alignItems:"center"},aclText:{fontSize:13,marginTop:6},rightsObject:{color:"#55ff55",paddingLeft:3},rightsState:{color:"#86b6ff",paddingLeft:3},textCenter:{padding:12,textAlign:"center"},tooltipAccessControl:{display:"flex",flexDirection:"column"},fontSizeTitle:{"@media screen and (max-width: 465px)":{"& *":{fontSize:12}}},draggable:{cursor:"copy"},nonDraggable:{cursor:"no-drop"},iconDeviceConnected:i=>({color:i.palette.mode==="dark"?To:yo,opacity:.8,position:"absolute",top:4,right:32,width:20}),iconDeviceDisconnected:i=>({color:i.palette.mode==="dark"?Do:zo,opacity:.8,position:"absolute",top:4,right:32,width:20}),iconDeviceError:i=>({color:i.palette.mode==="dark"?Ou:Eu,opacity:.8,position:"absolute",top:4,right:50,width:20}),resizeHandle:{display:"block",position:"absolute",cursor:"col-resize",width:7,top:2,bottom:2,zIndex:1},resizeHandleRight:{right:3,borderRight:"2px dotted #888","&:hover":{borderColor:"#ccc",borderRightStyle:"solid"},"&.active":{borderColor:"#517ea5",borderRightStyle:"solid"}},invertedBackground:i=>({backgroundColor:i.palette.mode==="dark"?"#9a9a9a":"#565656",padding:"0 3px",borderRadius:"2px 0 0 2px"}),invertedBackgroundFlex:i=>({backgroundColor:i.palette.mode==="dark"?"#9a9a9a":"#565656",borderRadius:"0 2px 2px 0"}),contextMenuEdit:i=>({color:i.palette.mode==="dark"?"#ffee48":"#cbb801"}),contextMenuEditValue:i=>({color:i.palette.mode==="dark"?"#5dff45":"#1cd301"}),contextMenuView:i=>({color:i.palette.mode==="dark"?"#FFF":"#000"}),contextMenuCustom:i=>({color:i.palette.mode==="dark"?"#42eaff":"#01bbc2"}),contextMenuACL:i=>({color:i.palette.mode==="dark"?"#e079ff":"#500070"}),contextMenuRoom:i=>({color:i.palette.mode==="dark"?"#ff9a33":"#642a00"}),contextMenuRole:i=>({color:i.palette.mode==="dark"?"#ffdb43":"#562d00"}),contextMenuDelete:i=>({color:i.palette.mode==="dark"?"#ff4f4f":"#cf0000"}),contextMenuKeys:{marginLeft:8,opacity:.7,fontSize:"smaller"},contextMenuWithSubMenu:{display:"flex"},...bt},Ta={state:n.createElement(Xs,{className:"itemIcon",style:{verticalAlign:"middle"}}),channel:n.createElement(yu,{className:"itemIcon",style:{verticalAlign:"middle"}}),device:n.createElement(Du,{className:"itemIcon",style:{verticalAlign:"middle"}}),adapter:n.createElement(eLe,{className:"itemIcon",style:{verticalAlign:"middle"}}),meta:n.createElement(tr,{className:"itemIcon",style:{verticalAlign:"middle"}}),instance:n.createElement(iLe,{className:"itemIcon",style:{color:"#7da7ff",verticalAlign:"middle"}}),enum:n.createElement(Kl,{className:"itemIcon",style:{verticalAlign:"middle"}}),chart:n.createElement(Xl,{className:"itemIcon",style:{verticalAlign:"middle"}}),config:n.createElement(Hr,{className:"itemIcon",style:{verticalAlign:"middle"}}),group:n.createElement(vo,{className:"itemIcon",style:{verticalAlign:"middle"}}),user:n.createElement(Uo,{className:"itemIcon",style:{verticalAlign:"middle"}}),host:n.createElement(bo,{className:"itemIcon",style:{verticalAlign:"middle"}}),schedule:n.createElement(Zl,{className:"itemIcon",style:{verticalAlign:"middle"}}),script:n.createElement(Wo,{className:"itemIcon",style:{verticalAlign:"middle"}}),folder:n.createElement(ms,{className:"itemIcon itemIconFolder",style:{verticalAlign:"middle"}})},je={xs:{idWidth:"100%",fields:[],widths:{}},sm:{idWidth:300,fields:["room","val"],widths:{room:100,val:200}},md:{idWidth:300,fields:["room","func","val","buttons"],widths:{name:200,room:150,func:150,val:120,buttons:120}},lg:{idWidth:300,fields:["name","type","role","room","func","val","buttons","changedFrom","qualityCode","timestamp","lastChange"],widths:{name:300,type:80,role:120,room:180,func:180,val:140,buttons:120,changedFrom:120,qualityCode:100,timestamp:165,lastChange:165}},xl:{idWidth:550,fields:["name","type","role","room","func","val","buttons","changedFrom","qualityCode","timestamp","lastChange"],widths:{name:400,type:80,role:120,room:180,func:180,val:140,buttons:120,changedFrom:120,qualityCode:100,timestamp:170,lastChange:170}}};let ya=!1;const Ds={id:"",name:"",room:[],func:[],role:[],type:[],custom:[],expertMode:!1};class Ki extends ze{info={funcEnums:[],roomEnums:[],roles:[],ids:[],types:[],objects:{},customs:[],enums:[],hasSomeCustoms:!1,aliasesMap:{}};localStorage=window._localStorage||window.localStorage;tableRef;pausedSubscribes=!1;selectFirst;root=null;states={};subscribes=[];unsubscribeTimer=null;statesUpdateTimer=null;objectsUpdateTimer=null;visibleCols;texts;possibleCols;imagePrefix;adapterColumns=[];styleTheme="";edit={id:"",val:"",q:0,ack:!1};levelPadding;customWidth=!1;resizeTimeout=null;resizerNextName=null;resizerActiveName=null;resizerCurrentWidths={};resizeLeft=!1;resizerOldWidth=0;resizerMin=0;resizerNextMin=0;resizerOldWidthNext=0;resizerPosition=0;resizerActiveDiv=null;resizerNextDiv=null;storedWidths=null;systemConfig;objects;defaultHistory="";ctrlPressed=!1;columnsVisibility={};changedIds=null;contextMenu=null;recordStates=[];styles={};expertMode=!1;customColumnDialog=null;constructor(e){super(e);const t=this.localStorage.getItem(`${e.dialogName||"App"}.objectSelected`)||"";if(this.selectFirst="",this.expertMode=!!this.props.expertMode,t.startsWith("["))try{const d=JSON.parse(t);this.selectFirst=d[0]||""}catch{}else this.selectFirst=t;let s;const r=this.localStorage.getItem(`${e.dialogName||"App"}.objectExpanded`)||"[]";try{s=JSON.parse(r)}catch{s=[]}let o;const M=e.defaultFilters?"":this.localStorage.getItem(`${e.dialogName||"App"}.objectFilter`)||"";if(M)try{o=JSON.parse(M)}catch{o={...Ds}}else e.defaultFilters&&typeof e.defaultFilters=="object"?o={...e.defaultFilters}:o={...Ds};if(typeof o.room=="string"&&o.room&&(o.room=[o.room].filter(d=>d),o.room.length||delete o.room),typeof o.func=="string"&&o.func&&(o.func=[o.func].filter(d=>d),o.func.length||delete o.func),typeof o.role=="string"&&o.role&&(o.role=[o.role].filter(d=>d),o.role.length||delete o.role),typeof o.type=="string"&&(o.type=[o.type].filter(d=>d),o.type.length||delete o.type),typeof o.custom=="string"&&(o.custom=[o.custom].filter(d=>d),o.custom.length||delete o.custom),o.expertMode=e.expertMode!==void 0?e.expertMode:(window._sessionStorage||window.sessionStorage).getItem("App.expertMode")==="true",this.tableRef=Pa(),this.visibleCols=e.columns||je[e.width||"lg"].fields,e.types&&e.types.length===1){const d=this.visibleCols.indexOf("type");d!==-1&&this.visibleCols.splice(d,1)}this.possibleCols=je.xl.fields;let a=null;if(e.router){const d=e.router.getLocation();d.id&&d.dialog==="customs"&&(a=[d.id],this.pauseSubscribe(!0))}let u;Array.isArray(e.selected)?u=e.selected:u=[e.selected||""],u=u.map(d=>d.replace(/["']/g,"")).filter(d=>d),this.selectFirst=u.length&&u[0]?u[0]:this.selectFirst;const l=this.localStorage.getItem(`${e.dialogName||"App"}.columns`);let N;try{N=l?JSON.parse(l):null}catch{N=null}let c=null;try{c=c?JSON.parse(c):{}}catch{c={}}this.imagePrefix=e.imagePrefix||".";let L;const j=this.localStorage.getItem(`${e.dialogName||"App"}.foldersFirst`);j==="false"?L=!1:j==="true"?L=!0:L=e.foldersFirst===void 0?!0:e.foldersFirst;let g=!1;try{g=this.props.objectStatesView&&JSON.parse(this.localStorage.getItem(`${e.dialogName||"App"}.objectStatesView`)||"")||!1}catch{}this.state={aliasMenu:"",beautifyJsonExport:!0,columns:N,columnsAuto:this.localStorage.getItem(`${e.dialogName||"App"}.columnsAuto`)!=="false",columnsDialogTransparent:100,columnsEditCustomDialog:null,columnsForAdmin:null,columnsSelectorShow:!1,columnsWidths:c,customColumnDialogValueChanged:!1,customDialog:a,depth:0,editObjectAlias:!1,editObjectDialog:"",enumDialog:null,excludeSystemRepositoriesFromExport:!0,excludeTranslations:!1,expandAllVisible:!1,expanded:s,filter:o,filterKey:0,focused:this.localStorage.getItem(`${e.dialogName||"App"}.focused`)||"",foldersFirst:L,linesEnabled:this.localStorage.getItem(`${e.dialogName||"App"}.lines`)==="true",loaded:!1,noStatesByExportImport:!1,roleDialog:null,scrollBarWidth:16,selected:u,selectedNonObject:this.localStorage.getItem(`${e.dialogName||"App"}.selectedNonObject`)||"",showAliasEditor:"",showAllExportOptions:!1,showContextMenu:null,showDescription:this.localStorage.getItem(`${e.dialogName||"App"}.desc`)!=="false",showExportDialog:!1,showImportDialog:!1,showImportMenu:null,showRenameDialog:null,statesView:g,toast:"",tooltipInfo:null,viewFileDialog:""},this.texts={name:e.t("ra_Name"),categories:e.t("ra_Categories"),value:e.t("ra_tooltip_value"),ack:e.t("ra_tooltip_ack"),ts:e.t("ra_tooltip_ts"),lc:e.t("ra_tooltip_lc"),from:e.t("ra_tooltip_from"),user:e.t("ra_tooltip_user"),c:e.t("ra_tooltip_comment"),quality:e.t("ra_tooltip_quality"),editObject:e.t("ra_tooltip_editObject"),deleteObject:e.t("ra_tooltip_deleteObject"),customConfig:e.t("ra_tooltip_customConfig"),copyState:e.t("ra_tooltip_copyState"),editState:e.t("ra_tooltip_editState"),ctrlForLink:e.t("ra_tooltip_ctrlForLink"),close:e.t("ra_Close"),filter_id:e.t("ra_filter_id"),filter_name:e.t("ra_filter_name"),filter_type:e.t("ra_filter_type"),filter_role:e.t("ra_filter_role"),filter_room:e.t("ra_filter_room"),filter_func:e.t("ra_filter_func"),filter_custom:e.t("ra_filter_customs"),filterCustomsWithout:e.t("ra_filter_customs_without"),objectChangedByUser:e.t("ra_object_changed_by_user"),objectChangedBy:e.t("ra_object_changed_by"),objectChangedFrom:e.t("ra_state_changed_from"),stateChangedBy:e.t("ra_state_changed_by"),stateChangedFrom:e.t("ra_state_changed_from"),ownerGroup:e.t("ra_Owner group"),ownerUser:e.t("ra_Owner user"),showAll:e.t("ra_show_all"),deviceError:e.t("ra_Error"),deviceDisconnected:e.t("ra_Disconnected"),deviceConnected:e.t("ra_Connected"),aclOwner_read_object:e.t("ra_aclOwner_read_object"),aclOwner_read_state:e.t("ra_aclOwner_read_state"),aclOwner_write_object:e.t("ra_aclOwner_write_object"),aclOwner_write_state:e.t("ra_aclOwner_write_state"),aclGroup_read_object:e.t("ra_aclGroup_read_object"),aclGroup_read_state:e.t("ra_aclGroup_read_state"),aclGroup_write_object:e.t("ra_aclGroup_write_object"),aclGroup_write_state:e.t("ra_aclGroup_write_state"),aclEveryone_read_object:e.t("ra_aclEveryone_read_object"),aclEveryone_read_state:e.t("ra_aclEveryone_read_state"),aclEveryone_write_object:e.t("ra_aclEveryone_write_object"),aclEveryone_write_state:e.t("ra_aclEveryone_write_state"),create:e.t("ra_Create"),createBooleanState:e.t("ra_create_boolean_state"),createNumberState:e.t("ra_create_number_state"),createStringState:e.t("ra_create_string_state"),createState:e.t("ra_create_state"),createChannel:e.t("ra_create_channel"),createDevice:e.t("ra_create_device"),createFolder:e.t("ra_Create folder")},this.levelPadding=e.levelPadding||dLe;const y=this.localStorage.getItem(`${this.props.dialogName||"App"}.table`);if(y)try{const d=JSON.parse(y),I=this.props.width||"lg";this.storedWidths=JSON.parse(JSON.stringify(je[I])),Object.keys(d).forEach(m=>{m==="id"?je[I].idWidth=d.id:m==="nameHeader"?je[I].widths.name=d[m]:je[I].widths[m]!==void 0&&(je[I].widths[m]=d[m])}),this.customWidth=!0}catch{}this.calculateColumnsVisibility()}async loadAllObjects(e){var s;const t=this.props;try{await new Promise(l=>{this.setState({updating:!0},()=>l())});const r=(t.objectsWorker?await t.objectsWorker.getObjects(e):await t.socket.getObjects(e,!0))||{};if(t.types&&Ee.isWeb())for(let l=0;l{try{if(l(r[N]))this.objects[N]=r[N];else{const c=r[N]&&r[N].type;c&&(c==="channel"||c==="device"||c==="folder"||c==="adapter"||c==="instance")&&(this.objects[N]=r[N])}}catch(c){console.log(`Error by filtering of "${N}": ${c}`)}})}else if(t.types){this.objects={};const l=t.types;Object.keys(r).forEach(N=>{var L;const c=(L=r[N])==null?void 0:L.type;c&&(c==="channel"||c==="device"||c==="enum"||c==="folder"||c==="adapter"||c==="instance"||l.includes(c))&&(this.objects[N]=r[N])})}else this.objects=r;t.setObjectsReference&&t.setObjectsReference(this.objects),this.defaultHistory=this.systemConfig.common.defaultHistory,this.defaultHistory&&t.socket.getState(`system.adapter.${this.defaultHistory}.alive`).then(l=>{l!=null&&l.val||(this.defaultHistory="")}).catch(l=>window.alert(`Cannot get state: ${l}`));const o=await this.getAdditionalColumns();this.calculateColumnsVisibility(null,null,o);const{info:M,root:a}=La(this.objects,{imagePrefix:t.imagePrefix,root:t.root,lang:t.lang,themeType:t.themeType});this.root=a,this.info=M;const u=((s=this.state.selected)==null?void 0:s.length)&&Au(this.root,this.state.selected[0]);u&&!go(u,this.state.filter,t.lang,this.objects,void 0,void 0,t.customFilter,t.types)?this.setState({filter:{...Ds},columnsForAdmin:o},()=>{this.doFilter(),this.setState({loaded:!0,updating:!1},()=>this.expandAllSelected(()=>this.onAfterSelect()))}):(this.doFilter(),this.setState({loaded:!0,updating:!1,columnsForAdmin:o},()=>this.expandAllSelected(()=>this.onAfterSelect())))}catch(r){this.showError(r)}}expandAllSelected(e){const t=[...this.state.expanded];let s=!1;this.state.selected.forEach(r=>{const o=r.split("."),M=[];for(let a=0;a!this.objects[N]))&&((u=(a=this.props).onSelect)==null||u.call(a,this.state.selected,null,e))}else this.localStorage.removeItem(`${this.props.dialogName||"App"}.objectSelected`),this.state.selected.length?this.setState({selected:[]},()=>{this.props.onSelect&&(this.state.focused&&this.props.allowNonObjects?(this.selectFirst&&this.selectFirst!==this.state.selected[0]&&(this.selectFirst=""),this.props.onSelect([this.state.focused],null,e)):this.props.onSelect([],""))}):this.props.onSelect&&(this.state.focused&&this.props.allowNonObjects?(this.selectFirst&&this.selectFirst!==this.state.selected[0]&&(this.selectFirst=""),this.props.onSelect([this.state.focused],null,e)):this.props.onSelect([],""))}static getDerivedStateFromProps(e,t){const s={};let r=!1;return e.expertMode!==void 0&&e.expertMode!==t.filter.expertMode&&(r=!0,s.filter={...t.filter},s.filter.expertMode=e.expertMode),r?s:null}async componentDidMount(){await this.loadAllObjects(!ya),this.props.objectsWorker?this.props.objectsWorker.registerHandler(this.onObjectChangeFromWorker):await this.props.socket.subscribeObject("*",this.onObjectChange),ya=!0,window.addEventListener("contextmenu",this.onContextMenu,!0),window.addEventListener("keydown",this.onKeyPress,!0),window.addEventListener("keyup",this.onKeyPress,!0),this.props.onAllLoaded&&setTimeout(()=>{var e,t;(t=(e=this.props).onAllLoaded)==null||t.call(e)},100)}onKeyPress=e=>{e.type==="keydown"&&e.ctrlKey&&!this.ctrlPressed?(this.ctrlPressed=!0,this.tableRef.current&&(this.tableRef.current.className="highlight-link")):e.type==="keyup"&&!e.ctrlKey&&this.ctrlPressed&&(this.ctrlPressed=!1,this.tableRef.current&&(this.tableRef.current.className=""))};componentWillUnmount(){window.removeEventListener("contextmenu",this.onContextMenu,!0),window.removeEventListener("keydown",this.onKeyPress,!0),window.removeEventListener("keyup",this.onKeyPress,!0),this.props.objectsWorker?this.props.objectsWorker.unregisterHandler(this.onObjectChangeFromWorker,!0):this.props.socket.unsubscribeObject("*",this.onObjectChange).catch(e=>console.error(`Cannot unsubscribe *: ${e}`)),this.subscribes.forEach(e=>{this.props.socket.unsubscribeState(e,this.onStateChange)}),this.subscribes=[],this.objects={}}showDeleteDialog(e){var u,l,N,c;const{id:t,obj:s,item:r}=e,o=Object.keys(this.objects);o.sort();let M=0;const a=`${t}.`;for(let L=0;La)break;(c=(N=this.props).onObjectDelete)==null||c.call(N,t,!!((u=r.children)!=null&&u.length),!((l=s.common)!=null&&l.dontDelete),M+1)}onContextMenu=e=>{this.contextMenu&&Date.now()-this.contextMenu.ts<2e3?(e.preventDefault(),this.setState({showContextMenu:{item:this.contextMenu.item,position:{left:e.clientX+2,top:e.clientY-6}}})):this.state.showContextMenu&&(e.preventDefault(),this.setState({showContextMenu:null})),this.contextMenu=null};refreshComponent(){this.subscribes.forEach(e=>{this.props.socket.unsubscribeState(e,this.onStateChange)}),this.subscribes=[],this.loadAllObjects(!0).then(()=>console.log("updated!")).catch(e=>this.showError(e))}renderErrorDialog(){return this.state.error?n.createElement(de,{open:!0,maxWidth:"sm",fullWidth:!0,onClose:()=>this.setState({error:""}),"aria-labelledby":"error-dialog-title","aria-describedby":"error-dialog-description"},n.createElement(Ie,{id:"alert-dialog-title"},this.props.t("ra_Error")),n.createElement(Ae,null,n.createElement(Jt,{id:"alert-dialog-description"},this.state.error)),n.createElement(me,null,n.createElement(X,{variant:"contained",onClick:()=>this.setState({error:""}),color:"primary",autoFocus:!0,startIcon:n.createElement(ve,null)},this.props.t("ra_Ok")))):null}showError(e){this.setState({error:typeof e=="object"?e&&typeof e.toString=="function"?e.toString():JSON.stringify(e):e})}onSelect(e,t,s){if(this.localStorage.setItem(`${this.props.dialogName||"App"}.focused`,e),!this.props.multiSelect)this.objects[e]&&(!this.props.types||this.props.types.includes(this.objects[e].type))?(this.localStorage.removeItem(`${this.props.dialogName||"App"}.selectedNonObject`),this.state.selected[0]!==e?this.setState({selected:[e],selectedNonObject:"",focused:e},()=>{this.onAfterSelect(t),s&&s()}):t&&this.props.onSelect&&this.onAfterSelect(t)):(this.localStorage.setItem(`${this.props.dialogName||"App"}.selectedNonObject`,e),this.setState({selected:[],selectedNonObject:e,focused:e},()=>{this.onAfterSelect(),s&&s()}));else if(this.objects[e]&&(!this.props.types||this.props.types.includes(this.objects[e].type))){this.localStorage.removeItem(`${this.props.dialogName||"App"}.selectedNonObject`);const r=[...this.state.selected],o=r.indexOf(e);o===-1?(r.push(e),r.sort()):t||r.splice(o,1),this.setState({selected:r,selectedNonObject:"",focused:e},()=>{this.onAfterSelect(t),s&&s()})}}_renderDefinedList(e){const t=[...this.possibleCols];if(t.unshift("id"),this.props.columns&&!this.props.columns.includes("buttons")){const s=t.indexOf("buttons");s!==-1&&t.splice(s,1)}return t.filter(s=>e&&(s==="val"||s==="buttons")||!e&&s!=="val"&&s!=="buttons").map(s=>{var r;return n.createElement(wM,{onClick:()=>{if(!this.state.columnsAuto&&s!=="id"){const o=[...this.state.columns||[]],M=o.indexOf(s);M===-1?(o.push(s),o.sort()):o.splice(M,1),this.localStorage.setItem(`${this.props.dialogName||"App"}.columns`,JSON.stringify(o)),this.calculateColumnsVisibility(null,o),this.setState({columns:o})}},key:s},n.createElement(ne,{edge:"start",disabled:s==="id"||this.state.columnsAuto,checked:s==="id"||!!(this.state.columnsAuto?this.visibleCols.includes(s):(r=this.state.columns)!=null&&r.includes(s)),disableRipple:!0}),n.createElement(nt,{primary:this.texts[`filter_${s}`]||this.props.t(`ra_${s}`)}))})}renderColumnsSelectorDialog(){return this.state.columnsSelectorShow?n.createElement(de,{onClose:()=>this.setState({columnsSelectorShow:!1}),open:!0,sx:{"& .MuiPaper-root":E.getStyle(this.props.theme,C.dialogColumns,C[`transparent_${this.state.columnsDialogTransparent}`])}},n.createElement(Ie,{sx:C.fontSizeTitle},this.props.t("ra_Configure")),n.createElement(Ae,{sx:C.fontSizeTitle},n.createElement(H,{style:C.switchColumnAuto,control:n.createElement(Di,{checked:this.state.foldersFirst,onChange:()=>{this.localStorage.setItem(`${this.props.dialogName||"App"}.foldersFirst`,this.state.foldersFirst?"false":"true"),this.setState({foldersFirst:!this.state.foldersFirst})}}),label:this.props.t("ra_Folders always first")}),n.createElement(H,{style:C.switchColumnAuto,control:n.createElement(Di,{checked:this.state.linesEnabled,onChange:()=>{this.localStorage.setItem(`${this.props.dialogName||"App"}.lines`,this.state.linesEnabled?"false":"true"),this.setState({linesEnabled:!this.state.linesEnabled})}}),label:this.props.t("ra_Show lines between rows")}),n.createElement(H,{style:C.switchColumnAuto,control:n.createElement(Di,{checked:this.state.columnsAuto,onChange:()=>{this.localStorage.setItem(`${this.props.dialogName||"App"}.columnsAuto`,this.state.columnsAuto?"false":"true"),this.state.columnsAuto?this.state.columns?(this.calculateColumnsVisibility(!1),this.setState({columnsAuto:!1})):(this.calculateColumnsVisibility(!1,[...this.visibleCols]),this.setState({columnsAuto:!1,columns:[...this.visibleCols]})):(this.calculateColumnsVisibility(!0),this.setState({columnsAuto:!0}))}}),label:this.props.t("ra_Auto (no custom columns)")}),n.createElement(CM,null,this._renderDefinedList(!1),this.state.columnsForAdmin&&Object.keys(this.state.columnsForAdmin).sort().map(e=>{var t;return(t=this.state.columnsForAdmin)==null?void 0:t[e].map(s=>{var r;return n.createElement(wM,{onClick:()=>{if(!this.state.columnsAuto){const o=[...this.state.columns||[]],M=`_${e}_${s.path}`,a=o.indexOf(M);a===-1?(o.push(M),o.sort()):o.splice(a,1),this.calculateColumnsVisibility(null,o),this.localStorage.setItem(`${this.props.dialogName||"App"}.columns`,JSON.stringify(o)),this.setState({columns:o})}},key:`${e}_${s.name}`},n.createElement(Yt,null,n.createElement(ne,{disabled:this.state.columnsAuto,edge:"start",checked:!this.state.columnsAuto&&((r=this.state.columns)==null?void 0:r.includes(`_${e}_${s.path}`)),disableRipple:!0})),n.createElement(nt,{primary:`${s.name} (${e})`}))})}),this._renderDefinedList(!0))),n.createElement(me,null,n.createElement(X,{variant:"contained",onClick:()=>this.setState({columnsSelectorShow:!1}),color:"primary",startIcon:n.createElement(ge,null)},this.texts.close))):null}async getAdditionalColumns(){try{const e=await this.props.socket.getAdapters();let t=null;return e.forEach(s=>t=this.parseObjectForAdmins(t,s)),t}catch(e){return console.error(`Cannot get adapters: ${e}`),null}}checkUnsubscribes(){for(let e=this.subscribes.length-1;e>=0;e--)this.recordStates.includes(this.subscribes[e])||this.unsubscribe(this.subscribes[e]);this.recordStates=[]}findItem(e,t,s,r){if(t||=e.split("."),s||=this.root,!s||!t.length)return null;if(r=(r?`${r}.`:"")+t.shift(),s.children){const o=s.children.find(M=>M.data.id===r);if(o){if(o.data.id===e)return o;if(t.length)return this.findItem(e,t,o,r)}else return null}return null}onStateChange=(e,t)=>{if(this.states[e]){const s=this.findItem(e);s!=null&&s.data.state&&(s.data.state=void 0)}t?this.states[e]=t:delete this.states[e],this.pausedSubscribes?this.statesUpdateTimer&&(clearTimeout(this.statesUpdateTimer),this.statesUpdateTimer=null):this.statesUpdateTimer||(this.statesUpdateTimer=setTimeout(()=>{this.statesUpdateTimer=null,this.forceUpdate()},300))};parseObjectForAdmins(e,t){var s;if((s=t.common)!=null&&s.adminColumns&&t.common.name){const r=t.common.adminColumns;let o;r&&typeof r!="object"?o=[r]:r&&(o=r);let M;r?M=o.map(a=>{if(typeof a!="object")return{path:a,name:a.split(".").pop()};const u=a;return u.objTypes&&typeof u.objTypes!="object"?u.objTypes=[u.objTypes]:u.objTypes||(u.objTypes=void 0),!u.name&&u.path?{path:u.path,name:u.path.split(".").pop(),width:u.width,edit:!!u.edit,type:u.type,objTypes:u.objTypes}:u.path?{path:u.path,name:Re(u.name||"",this.props.lang),width:u.width,edit:!!u.edit,type:u.type,objTypes:u.objTypes}:(console.warn(`Admin columns for ${t._id} ignored, because path not found`),null)}).filter(a=>a):M=null,M!=null&&M.length&&(e||={},e[t.common.name]=M.sort((a,u)=>a.path>u.path?-1:a.path{if(Array.isArray(e)){let t=null;e.forEach(s=>{const{newInnerState:r,filtered:o}=this.processOnObjectChangeElement(s.id,s.obj);o||(r&&t?Object.assign(t,r):t=r)}),t&&this.setState(t),this.afterObjectUpdated()}};onObjectChange=(e,t)=>{const{newInnerState:s,filtered:r}=this.processOnObjectChangeElement(e,t);r||(s&&this.setState(s),this.afterObjectUpdated())};afterObjectUpdated(){!this.objectsUpdateTimer&&this.objects&&(this.objectsUpdateTimer=setTimeout(()=>{this.objectsUpdateTimer=null;const{info:e,root:t}=La(this.objects,{imagePrefix:this.props.imagePrefix,root:this.props.root,lang:this.props.lang,themeType:this.props.themeType});this.root=t,this.info=e,this.pausedSubscribes||this.doFilter()},500))}updateAliases(e){var s,r,o;if(!this.objects||!((s=this.info)!=null&&s.aliasesMap)||!(e!=null&&e.startsWith("alias.")))return;const t=Object.keys(this.objects).filter(M=>M.startsWith("alias.0"));this.info.aliasesMap={};for(const M of t){const a=this.objects[M];if((o=(r=a==null?void 0:a.common)==null?void 0:r.alias)!=null&&o.id)if(typeof a.common.alias.id=="string"){const u=a.common.alias.id;this.info.aliasesMap[u]?this.info.aliasesMap[u].includes(M)||this.info.aliasesMap[u].push(M):this.info.aliasesMap[u]=[M]}else{const u=a.common.alias.id.read;u&&(this.info.aliasesMap[u]?this.info.aliasesMap[u].includes(M)||this.info.aliasesMap[u].push(M):this.info.aliasesMap[u]=[M]);const l=a.common.alias.id.write;l&&(this.info.aliasesMap[l]?this.info.aliasesMap[l].includes(M)||this.info.aliasesMap[l].push(M):this.info.aliasesMap[l]=[M])}}}processOnObjectChangeElement(e,t){const s=t==null?void 0:t.type;if(t&&typeof this.props.filterFunc=="function"&&!this.props.filterFunc(t)&&s!=="channel"&&s!=="device"&&s!=="folder"&&s!=="adapter"&&s!=="instance")return{newInnerState:null,filtered:!0};let r=null;if(e.startsWith("system.adapter.")&&(t==null?void 0:t.type)==="adapter"){const o=JSON.parse(JSON.stringify(this.state.columnsForAdmin));this.parseObjectForAdmins(o,t),JSON.stringify(this.state.columnsForAdmin)!==JSON.stringify(o)&&(r={columnsForAdmin:o})}return this.objects||={},t?this.objects[e]=t:this.objects[e]&&delete this.objects[e],this.updateAliases(e),{newInnerState:r,filtered:!1}}subscribe(e){this.subscribes.includes(e)||(this.subscribes.push(e),this.pausedSubscribes||this.props.socket.subscribeState(e,this.onStateChange).catch(t=>console.error(`Cannot subscribe on state ${e}: ${t}`)))}unsubscribe(e){const t=this.subscribes.indexOf(e);t!==-1&&(this.subscribes.splice(t,1),this.states[e]&&delete this.states[e],this.props.socket.unsubscribeState(e,this.onStateChange),this.pausedSubscribes&&console.warn("Unsubscribe during pause?"))}pauseSubscribe(e){!this.pausedSubscribes&&e?(this.pausedSubscribes=!0,this.subscribes.forEach(t=>this.props.socket.unsubscribeState(t,this.onStateChange))):this.pausedSubscribes&&!e&&(this.pausedSubscribes=!1,this.subscribes.forEach(t=>this.props.socket.subscribeState(t,this.onStateChange)))}clearFilter(){JSON.stringify(this.state.filter)!==JSON.stringify(Ds)&&this.setState({filter:{...Ds},filterKey:this.state.filterKey+1},()=>{var e,t;this.doFilter(),(t=(e=this.props).onFilterChanged)==null||t.call(e,{...Ds})})}isFilterEmpty(){var e,t,s,r,o;return!!this.state.filter.id||!!this.state.filter.name||!!((e=this.state.filter.room)!=null&&e.length)||!!((t=this.state.filter.func)!=null&&t.length)||!!((s=this.state.filter.role)!=null&&s.length)||!!((r=this.state.filter.type)!=null&&r.length)||!!((o=this.state.filter.custom)!=null&&o.length)}getFilterInput(e){return n.createElement(jLe,{key:`${e}_${this.state.filterKey}`,styles:this.styles.filterInput,name:e,texts:this.texts,t:this.props.t,initialValue:this.state.filter[e],onChange:(t,s)=>{const r={...this.state.filter};s===void 0?delete r[t]:r[t]=s,this.setState({filter:r},()=>{var o,M;this.doFilter(),(M=(o=this.props).onFilterChanged)==null||M.call(o,r)})}})}getFilterSelect(e,t){return n.createElement(LLe,{key:`${e}_${this.state.filterKey}`,name:e,texts:this.texts,initialValue:this.state.filter[e]||[],values:t,onChange:(s,r)=>{const o={...this.state.filter};r===void 0?delete o[s]:o[s]=r,this.setState({filter:o},()=>{var M,a;this.doFilter(),(a=(M=this.props).onFilterChanged)==null||a.call(M,o)})}})}getFilterSelectRole(){return this.getFilterSelect("role",this.info.roles.map(e=>e.role))}getFilterSelectRoom(){const e=this.info.roomEnums.map(t=>{var s,r,o,M;return{name:Re((r=(s=this.objects[t])==null?void 0:s.common)==null?void 0:r.name,this.props.lang)||t.split(".").pop(),value:t,icon:n.createElement(xe,{src:((M=(o=this.objects[t])==null?void 0:o.common)==null?void 0:M.icon)||"",style:C.selectIcon})}});return this.getFilterSelect("room",e)}getFilterSelectFunction(){const e=this.info.funcEnums.map(t=>{var s,r,o,M;return{name:Re((r=(s=this.objects[t])==null?void 0:s.common)==null?void 0:r.name,this.props.lang)||t.split(".").pop(),value:t,icon:n.createElement(xe,{src:((M=(o=this.objects[t])==null?void 0:o.common)==null?void 0:M.icon)||"",style:C.selectIcon})}});return this.getFilterSelect("func",e)}getFilterSelectType(){const e=this.info.types.map(t=>({name:t,value:t,icon:Ta[t]||null}));return this.getFilterSelect("type",e)}getFilterSelectCustoms(){if(this.info.customs.length>1){const e=this.info.customs.map(t=>({name:t==="_"?this.texts.filterCustomsWithout:t,value:t,icon:t==="_"?null:n.createElement(xe,{src:Xi(this.objects,t,this.props.lang,this.imagePrefix)||"",style:C.selectIcon})}));return this.getFilterSelect("custom",e)}return null}onExpandAll(e,t){var r;const s=e||this.root;t||=[],(r=s==null?void 0:s.children)==null||r.forEach(o=>{o.data.sumVisibility&&(t.push(o.data.id),this.onExpandAll(o,t))}),s===this.root&&(t.sort(),this.localStorage.setItem(`${this.props.dialogName||"App"}.objectExpanded`,JSON.stringify(t)),this.setState({expanded:t}))}onCollapseAll(){this.localStorage.setItem(`${this.props.dialogName||"App"}.objectExpanded`,JSON.stringify([])),this.localStorage.setItem(`${this.props.dialogName||"App"}.objectSelected`,"[]"),this.setState({expanded:[],depth:0,selected:[]},()=>this.onAfterSelect())}expandDepth(e,t,s){var r;e||=this.root,t>0&&((r=e.children)==null||r.forEach(o=>{o.data.sumVisibility&&(oi(s,o.data.id)||(s.push(o.data.id),s.sort()),t-1>0&&this.expandDepth(o,t-1,s))}))}static collapseDepth(e,t){return t.filter(s=>s.split(".").length<=e)}onExpandVisible(){if(this.state.depth<9){const e=this.state.depth+1,t=[...this.state.expanded];this.root&&this.expandDepth(this.root,e,t),this.localStorage.setItem(`${this.props.dialogName||"App"}.objectExpanded`,JSON.stringify(t)),this.setState({depth:e,expanded:t})}}onStatesViewVisible(){const e=!this.state.statesView;this.localStorage.setItem(`${this.props.dialogName||"App"}.objectStatesView`,JSON.stringify(e)),this.setState({statesView:e})}onCollapseVisible(){if(this.state.depth>0){const e=this.state.depth-1,t=Ki.collapseDepth(e,this.state.expanded);this.localStorage.setItem(`${this.props.dialogName||"App"}.objectExpanded`,JSON.stringify(t)),this.setState({depth:e,expanded:t})}}getEnumsForId=e=>{const t=[];return this.info.enums.forEach(s=>{var r,o,M;if((M=(o=(r=this.objects[s])==null?void 0:r.common)==null?void 0:o.members)!=null&&M.includes(e)){const a={_id:this.objects[s]._id,common:JSON.parse(JSON.stringify(this.objects[s].common)),native:this.objects[s].native,type:"enum"};a.common&&(delete a.common.members,delete a.common.custom,delete a.common.mobile),t.push(a)}}),t.length?t:void 0};_createAllEnums=async(e,t)=>{var s,r;for(let o=0;or)break}return e}return[]}async _exportObjects(e){var o;if(e.isAll){la("allObjects.json",this.objects,e);return}if(!(this.state.selected.length||this.state.selectedNonObject)){window.alert(this.props.t("ra_Save of objects-tree is not possible"));return}const t={},s=this.state.selected[0]||this.state.selectedNonObject,r=this._getSelectedIdsForExport();for(const M of r){if(t[M]=JSON.parse(JSON.stringify(this.objects[M])),((o=t[M])==null?void 0:o.type)==="state"&&!e.noStatesByExportImport){const a=await this.props.socket.getState(M);a&&(t[M].val=a.val,t[M].ack=a.ack)}if(t[M].common){const a=this.getEnumsForId(M);a&&(t[M].common.enums=a)}}la(`${s}.json`,t,e)}renderExportDialog(){return this.state.showExportDialog===!1?null:n.createElement(de,{open:!0,maxWidth:"lg"},n.createElement(Ie,null,this.props.t("ra_Select type of export")),n.createElement(Ae,null,n.createElement(Jt,null,this.state.filter.expertMode||this.state.showAllExportOptions?n.createElement(n.Fragment,null,this.props.t("ra_You can export all objects or just the selected branch."),n.createElement("br",null),this.props.t("ra_Selected %s object(s)",this.state.showExportDialog),n.createElement("br",null),n.createElement(H,{control:n.createElement(ne,{checked:this.state.noStatesByExportImport,onChange:e=>this.setState({noStatesByExportImport:e.target.checked})}),label:this.props.t("ra_Do not export values of states")}),n.createElement("br",null),this.props.t("These options can reduce the size of the export file:"),n.createElement(H,{control:n.createElement(ne,{checked:this.state.beautifyJsonExport,onChange:e=>this.setState({beautifyJsonExport:e.target.checked})}),label:this.props.t("Beautify JSON output")}),n.createElement("br",null),n.createElement(H,{control:n.createElement(ne,{checked:this.state.excludeSystemRepositoriesFromExport,onChange:e=>this.setState({excludeSystemRepositoriesFromExport:e.target.checked})}),label:this.props.t("Exclude system repositories from export JSON")}),n.createElement(H,{control:n.createElement(ne,{checked:this.state.excludeTranslations,onChange:e=>this.setState({excludeTranslations:e.target.checked})}),label:this.props.t("Exclude translations (except english) from export JSON")})):null)),n.createElement(me,null,this.state.filter.expertMode||this.state.showAllExportOptions?n.createElement(X,{color:"grey",variant:"outlined",onClick:()=>this.setState({showExportDialog:!1,showAllExportOptions:!1},()=>this._exportObjects({isAll:!0,noStatesByExportImport:this.state.noStatesByExportImport,beautify:this.state.beautifyJsonExport,excludeSystemRepositories:this.state.excludeSystemRepositoriesFromExport,excludeTranslations:this.state.excludeTranslations}))},n.createElement("span",{style:{marginRight:8}},this.props.t("ra_All objects")),"(",Object.keys(this.objects).length,")"):n.createElement(X,{color:"grey",variant:"outlined",startIcon:n.createElement(No,null),onClick:()=>this.setState({showAllExportOptions:!0})},this.props.t("ra_Advanced options")),n.createElement(X,{color:"primary",variant:"contained",autoFocus:!0,onClick:()=>this.setState({showExportDialog:!1,showAllExportOptions:!1},()=>this._exportObjects({isAll:!1,noStatesByExportImport:this.state.noStatesByExportImport,beautify:this.state.beautifyJsonExport,excludeSystemRepositories:this.state.excludeSystemRepositoriesFromExport,excludeTranslations:this.state.excludeTranslations}))},n.createElement("span",{style:{marginRight:8}},this.props.t("ra_Only selected")),"(",this.state.showExportDialog,")"),n.createElement(X,{color:"grey",variant:"contained",onClick:()=>this.setState({showExportDialog:!1,showAllExportOptions:!1}),startIcon:n.createElement(ge,null)},this.props.t("ra_Cancel"))))}renderRenameDialog(){var t;if(!this.state.showRenameDialog)return null;const e=this.props.objectMoveRenameDialog;return n.createElement(e,{expertMode:this.props.expertMode,onClose:()=>this.setState({showRenameDialog:null}),id:this.state.showRenameDialog.id,childrenIds:this.state.showRenameDialog.childrenIds,theme:this.props.theme,socket:this.props.socket,t:this.props.t,objectType:(t=this.objects[this.state.showRenameDialog.id])==null?void 0:t.type})}async parseJsonFile(e){try{const t=JSON.parse(e),s=Object.keys(t).length,r=t._id;if(r===void 0&&s)await this.loadObjects(t),window.alert(this.props.t("ra_%s object(s) processed",s));else{if(!r)return window.alert(this.props.t("ra_Invalid structure"));try{let o,M,a;if(t.common.enums&&(o=t.common.enums,delete t.common.enums),t.val&&(M=t.val,delete t.val),t.ack!==void 0&&(a=t.ack,delete t.ack),await this.props.socket.setObject(t._id,t),t.type==="state")if(M!=null)await this.props.socket.setState(t._id,M,a===void 0?!0:a);else{const u=await this.props.socket.getState(t._id);(!u||u.val===null||u.val===void 0)&&await this.props.socket.setState(t._id,t.common.def===void 0?null:t.common.def,!0)}o&&await this._createAllEnums(o,t._id),window.alert(this.props.t("ra_%s was imported",t._id))}catch(o){window.alert(o)}}}catch(t){window.alert(t)}}handleJsonUpload(e){var r;const t=e.target,s=((r=t.files)==null?void 0:r.length)&&t.files[0];if(s){const o=new FileReader;o.onload=M=>{var a;return this.parseJsonFile((a=M.target)==null?void 0:a.result),null},o.readAsText(s)}else window.alert(this.props.t("ra_Failed to open JSON File"))}toolTipObjectCreating=()=>{var s,r;const{t:e}=this.props;let t=[n.createElement("div",{key:1},e("ra_Only following structures of objects are available:")),n.createElement("div",{key:2},e("ra_Folder → State")),n.createElement("div",{key:3},e("ra_Folder → Channel → State")),n.createElement("div",{key:4},e("ra_Folder → Device → Channel → State")),n.createElement("div",{key:5},e("ra_Device → Channel → State")),n.createElement("div",{key:6},e("ra_Channel → State")),n.createElement("div",{key:7,style:{height:10}}),n.createElement("div",{key:8},e('ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".')),n.createElement("div",{key:9},e('ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").'))];if(this.state.selected.length||this.state.selectedNonObject){const o=this.state.selected[0]||this.state.selectedNonObject;if(!(o.split(".").length<2||this.objects[o]&&((s=this.objects[o])==null?void 0:s.type)==="state"))if(this.state.filter.expertMode)switch((r=this.objects[o])==null?void 0:r.type){case"device":t=[n.createElement("div",{key:1},e("ra_Only following structures of objects are available:")),n.createElement("div",{key:5},e("ra_Device → Channel → State")),n.createElement("div",{key:7,style:{height:10}}),n.createElement("div",{key:8},e('ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".')),n.createElement("div",{key:9},e('ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").'))];break;case"folder":t=[n.createElement("div",{key:1},e("ra_Only following structures of objects are available:")),n.createElement("div",{key:2},e("ra_Folder → State")),n.createElement("div",{key:3},e("ra_Folder → Channel → State")),n.createElement("div",{key:4},e("ra_Folder → Device → Channel → State")),n.createElement("div",{key:7,style:{height:10}}),n.createElement("div",{key:8},e('ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".')),n.createElement("div",{key:9},e('ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").'))];break;case"channel":t=[n.createElement("div",{key:1},e("ra_Only following structures of objects are available:")),n.createElement("div",{key:1},e("ra_Channel → State")),n.createElement("div",{key:7,style:{height:10}}),n.createElement("div",{key:8},e('ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".')),n.createElement("div",{key:9},e('ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").'))];break}else(o.startsWith("alias.0")||o.startsWith("0_userdata"))&&(t=[n.createElement("div",{key:1},e("ra_Only following structures of objects are available:")),n.createElement("div",{key:2},e("ra_Folder → State")),n.createElement("div",{key:3},e("ra_Folder → Channel → State")),n.createElement("div",{key:4},e("ra_Folder → Device → Channel → State")),n.createElement("div",{key:5},e("ra_Device → Channel → State")),n.createElement("div",{key:6},e("ra_Channel → State")),n.createElement("div",{key:7,style:{height:10}}),n.createElement("div",{key:7},e('ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".')),n.createElement("div",{key:8},e('ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").'))])}return t.length?t:e("ra_Add new child object to selected parent")};onOpenFile(){const e=document.createElement("input");e.setAttribute("type","file"),e.setAttribute("id","files"),e.setAttribute("opacity","0"),e.addEventListener("change",t=>this.handleJsonUpload(t),!1),e.click()}renderInputJsonDialog(){const e=this.props.objectBrowserInsertJsonObjects;return this.state.showImportDialog?n.createElement(e,{onClose:t=>{this.setState({showImportDialog:!1}),t&&this.parseJsonFile(t)},themeName:this.props.themeName,themeType:this.props.themeType,t:this.props.t}):null}getToolbar(){let e=!1;if(this.state.selected.length||this.state.selectedNonObject){const t=this.state.selected[0]||this.state.selectedNonObject;t.split(".").length<2||this.objects[t]&&this.objects[t].type==="state"?e=!1:(this.state.filter.expertMode||t.startsWith("alias.0")||t.startsWith("0_userdata"))&&(e=!0)}return n.createElement("div",{style:{display:"flex",width:"100%",alignItems:"center",overflowX:"auto"}},n.createElement("div",{style:{display:"flex",width:"100%",alignItems:"center"}},n.createElement(ae,{title:this.props.t("ra_Refresh tree"),slotProps:{popper:{sx:C.tooltip}}},n.createElement("div",null,n.createElement(P,{onClick:()=>this.refreshComponent(),disabled:this.state.updating,size:"large"},n.createElement(Fa,null)))),this.props.showExpertButton&&!this.props.expertMode&&n.createElement(ae,{title:this.props.t("ra_expertMode"),slotProps:{popper:{sx:C.tooltip}}},n.createElement(P,{key:"expertMode",color:this.state.filter.expertMode?"secondary":"default",onClick:()=>{const t={...this.state.filter};t.expertMode=!t.expertMode,this.localStorage.setItem(`${this.props.dialogName||"App"}.objectFilter`,JSON.stringify(t)),this.setState({filter:t})},size:"large"},n.createElement(No,null))),!this.props.disableColumnSelector&&this.props.width!=="xs"&&n.createElement(ae,{title:this.props.t("ra_Configure"),slotProps:{popper:{sx:C.tooltip}}},n.createElement(P,{key:"columnSelector",color:this.state.columnsAuto?"primary":"default",onClick:()=>this.setState({columnsSelectorShow:!0}),size:"large"},n.createElement(Ql,null))),this.props.width!=="xs"&&this.state.expandAllVisible&&n.createElement(ae,{title:this.props.t("ra_Expand all nodes"),slotProps:{popper:{sx:C.tooltip}}},n.createElement(P,{key:"expandAll",onClick:()=>this.onExpandAll(),size:"large"},n.createElement(bi,null))),n.createElement(ae,{title:this.props.t("ra_Collapse all nodes"),slotProps:{popper:{sx:C.tooltip}}},n.createElement(P,{key:"collapseAll",onClick:()=>this.onCollapseAll(),size:"large"},n.createElement(ms,null))),this.props.width!=="xs"&&n.createElement(ae,{title:this.props.t("ra_Expand one step node"),slotProps:{popper:{sx:C.tooltip}}},n.createElement(P,{key:"expandVisible",color:"primary",onClick:()=>this.onExpandVisible(),size:"large"},n.createElement(AM,{badgeContent:this.state.depth,color:"secondary",sx:t=>({badge:{right:3,top:3,border:`2px solid ${t.palette.background.paper}`,padding:"0 4px"}})},n.createElement(bi,null)))),this.props.width!=="xs"&&n.createElement(ae,{title:this.props.t("ra_Collapse one step node"),slotProps:{popper:{sx:C.tooltip}}},n.createElement(P,{key:"collapseVisible",color:"primary",onClick:()=>this.onCollapseVisible(),size:"large"},n.createElement(AM,{sx:t=>({badge:{right:3,top:3,border:`2px solid ${t.palette.background.paper}`,padding:"0 4px"}}),badgeContent:this.state.depth,color:"secondary"},n.createElement(ms,null)))),this.props.objectStatesView&&n.createElement(ae,{title:this.props.t("ra_Toggle the states view"),slotProps:{popper:{sx:C.tooltip}}},n.createElement(P,{onClick:()=>this.onStatesViewVisible(),size:"large"},n.createElement(vl,{color:this.state.statesView?"primary":"inherit"}))),n.createElement(ae,{title:this.props.t("ra_Show/Hide object descriptions"),slotProps:{popper:{sx:C.tooltip}}},n.createElement(P,{onClick:()=>{this.localStorage.setItem(`${this.props.dialogName||"App"}.desc`,this.state.showDescription?"false":"true"),this.setState({showDescription:!this.state.showDescription})},size:"large"},n.createElement(Ul,{color:this.state.showDescription?"primary":"inherit"}))),this.props.objectAddBoolean?n.createElement(ae,{title:this.toolTipObjectCreating(),slotProps:{popper:{sx:C.tooltip}}},n.createElement("div",null,n.createElement(P,{disabled:!e,onClick:()=>this.setState({modalNewObj:{id:this.state.selected[0]||this.state.selectedNonObject}}),size:"large"},n.createElement(Fr,null)))):null,this.props.objectImportExport&&n.createElement(ae,{title:this.props.t("ra_Add objects tree from JSON file"),slotProps:{popper:{sx:C.tooltip}}},n.createElement(P,{onClick:t=>{this.props.objectBrowserInsertJsonObjects?this.setState({showImportMenu:t.currentTarget}):this.onOpenFile()},size:"large"},n.createElement(Ri,null))),this.props.objectBrowserInsertJsonObjects?n.createElement(ss,{anchorEl:this.state.showImportMenu,open:!!this.state.showImportMenu,onClose:()=>this.setState({showImportMenu:null})},n.createElement(te,{onClick:()=>this.setState({showImportMenu:null},()=>this.onOpenFile())},n.createElement(Yt,null,n.createElement(bl,null)),n.createElement(nt,null,this.props.t("ra_From file"))),n.createElement(te,{onClick:()=>this.setState({showImportMenu:null,showImportDialog:!0})},n.createElement(Yt,null,n.createElement($l,null)),n.createElement(nt,null,this.props.t("ra_From text")))):null,this.props.objectImportExport&&(!!this.state.selected.length||this.state.selectedNonObject)&&n.createElement(ae,{title:this.props.t("ra_Save objects tree as JSON file"),slotProps:{popper:{sx:C.tooltip}}},n.createElement(P,{onClick:()=>this.setState({showExportDialog:this._getSelectedIdsForExport().length}),size:"large"},n.createElement(Ri,{style:{transform:"rotate(180deg)"}})))),!!this.props.objectBrowserEditObject&&this.props.width!=="xs"&&n.createElement("div",{style:{display:"flex",whiteSpace:"nowrap"}},`${this.props.t("ra_Objects")}: ${Object.keys(this.info.objects).length}, ${this.props.t("ra_States")}: ${Object.keys(this.info.objects).filter(t=>this.info.objects[t].type==="state").length}`),this.props.objectEditBoolean&&n.createElement(ae,{title:this.props.t("ra_Edit custom config"),slotProps:{popper:{sx:C.tooltip}}},n.createElement(P,{onClick:()=>{var s;const t=this.root?wu(this.root,"state",this.objects):[];t.length?(this.pauseSubscribe(!0),t.length===1&&(this.localStorage.setItem(`${this.props.dialogName||"App"}.objectSelected`,this.state.selected[0]),(s=this.props.router)==null||s.doNavigate(null,"custom",this.state.selected[0])),this.setState({customDialog:t,customDialogAll:!0})):this.setState({toast:this.props.t("ra_please select object")})},size:"large"},n.createElement(Pl,null))))}toggleExpanded(e){const t=JSON.parse(JSON.stringify(this.state.expanded)),s=t.indexOf(e);s===-1?(t.push(e),t.sort()):t.splice(s,1),this.localStorage.setItem(`${this.props.dialogName||"App"}.objectExpanded`,JSON.stringify(t)),this.setState({expanded:t})}onCopy(e,t){e.stopPropagation(),e.preventDefault(),t&&(E.copyToClipboard(t),t.length<50?this.setState({toast:this.props.t("ra_Copied %s",t)}):this.setState({toast:this.props.t("ra_Copied")}))}renderTooltipAccessControl=e=>{if(!e)return null;const t=[{value:"0x400",valueNum:1024,title:"read",group:"Owner"},{value:"0x200",valueNum:512,title:"write",group:"Owner"},{value:"0x40",valueNum:64,title:"read",group:"Group"},{value:"0x20",valueNum:32,title:"write",group:"Group"},{value:"0x4",valueNum:4,title:"read",group:"Everyone"},{value:"0x2",valueNum:2,title:"write",group:"Everyone"}],s=[],r=o=>{const M=e[o];t.forEach((a,u)=>{M&a.valueNum&&s.push(n.createElement("span",{key:o+u},this.texts[`acl${a.group}_${a.title}_${o}`],",",n.createElement("span",{style:o==="object"?C.rightsObject:C.rightsState},a.value)))})};return s.push(n.createElement("span",{key:"group"},`${this.texts.ownerGroup}: ${(e.ownerGroup||"").replace("system.group.","")}`)),s.push(n.createElement("span",{key:"owner"},`${this.texts.ownerUser}: ${(e.owner||"").replace("system.user.","")}`)),r("object"),e.state&&r("state"),s.length?n.createElement("span",{style:C.tooltipAccessControl},s.map(o=>o)):null};renderColumnButtons(e,t){var M,a,u,l;if(!t.data.obj)return this.props.onObjectDelete||this.props.objectEditOfAccessControl?n.createElement("div",{style:C.buttonDiv},this.state.filter.expertMode&&this.props.objectEditOfAccessControl?n.createElement(P,{sx:{...C.cellButtonsButton,...C.cellButtonsEmptyButton,...C.cellButtonMinWidth},onClick:()=>this.setState({modalEditOfAccess:!0,modalEditOfAccessObjData:t.data}),size:"large"},n.createElement("div",{style:{height:15}},"---")):null,this.props.onObjectDelete&&((M=t.children)!=null&&M.length)?n.createElement(P,{sx:{...C.cellButtonsButton,...C.cellButtonsButtonAlone},size:"small","aria-label":"delete",title:this.texts.deleteObject,onClick:()=>{var j;const N=Object.keys(this.objects);N.sort();let c=0;const L=`${e}.`;for(let g=0;gL)break;this.props.onObjectDelete&&this.props.onObjectDelete(e,!!((j=t.children)!=null&&j.length),!1,c+1)}},n.createElement(ut,{style:C.cellButtonsButtonIcon})):null):null;t.data.aclTooltip=t.data.aclTooltip||this.renderTooltipAccessControl(t.data.obj.acl);const s=t.data.obj.acl?t.data.obj.type==="state"?t.data.obj.acl.state:t.data.obj.acl.object:0,r=t.data.obj.acl&&(t.data.obj.type==="state"?this.systemConfig.common.defaultNewAcl.state:this.systemConfig.common.defaultNewAcl.object),o=this.state.filter.expertMode||ga(t.data.id);return[this.state.filter.expertMode&&this.props.objectEditOfAccessControl?n.createElement(ae,{key:"acl",title:t.data.aclTooltip,slotProps:{popper:{sx:C.tooltip}}},n.createElement(P,{sx:{...C.cellButtonsButton,...C.cellButtonMinWidth,opacity:1},onClick:()=>this.setState({modalEditOfAccess:!0,modalEditOfAccessObjData:t.data}),size:"large"},n.createElement("div",{style:C.aclText},Number.isNaN(Number(s))?Number(r).toString(16):Number(s).toString(16)))):n.createElement("div",{key:"aclEmpty",style:C.cellButtonMinWidth}),o?n.createElement(P,{key:"edit",sx:{marginRight:"2px",...C.cellButtonsButton},size:"small","aria-label":"edit",title:this.texts.editObject,onClick:()=>{this.localStorage.setItem(`${this.props.dialogName||"App"}.objectSelected`,e),this.setState({editObjectDialog:e,editObjectAlias:!1})}},n.createElement(Ks,{style:C.cellButtonsButtonIcon})):n.createElement(W,{component:"div",key:"editDisabled",sx:C.cellButtonsButton}),this.props.onObjectDelete&&((a=t.children)!=null&&a.length||!((u=t.data.obj.common)!=null&&u.dontDelete))?n.createElement(P,{key:"delete",sx:C.cellButtonsButton,size:"small","aria-label":"delete",onClick:()=>{var j,g,y;const N=Object.keys(this.objects);N.sort();let c=0;const L=`${e}.`;for(let d=0;dL)break;this.props.onObjectDelete&&this.props.onObjectDelete(e,!!((j=t.children)!=null&&j.length),!((y=(g=t.data.obj)==null?void 0:g.common)!=null&&y.dontDelete),c)},title:this.texts.deleteObject},n.createElement(ut,{style:C.cellButtonsButtonIcon})):null,this.props.objectCustomDialog&&this.info.hasSomeCustoms&&t.data.obj.type==="state"&&((l=t.data.obj.common)==null?void 0:l.type)!=="file"?n.createElement(P,{sx:{...C.cellButtonsButton,...t.data.hasCustoms?this.styles.cellButtonsButtonWithCustoms:C.cellButtonsButtonWithoutCustoms},key:"custom",size:"small","aria-label":"config",title:this.texts.customConfig,onClick:()=>{var N;this.localStorage.setItem(`${this.props.dialogName||"App"}.objectSelected`,e),this.pauseSubscribe(!0),(N=this.props.router)==null||N.doNavigate(null,"customs",e),this.setState({customDialog:[e],customDialogAll:!1})}},n.createElement(Hr,{style:C.cellButtonsButtonIcon})):null]}readHistory(e){var t,s;if(window.sparkline&&this.defaultHistory&&((s=(t=this.objects[e])==null?void 0:t.common)!=null&&s.custom)&&this.objects[e].common.custom[this.defaultHistory]){const r=new Date;r.setHours(r.getHours()-24),r.setMinutes(0),r.setSeconds(0),r.setMilliseconds(0);const o=r.getTime();this.props.socket.getHistory(e,{instance:this.defaultHistory,start:o,end:Date.now(),step:36e5,from:!1,ack:!1,q:!1,addId:!1,aggregate:"minmax"}).then(M=>{const a=window.document.getElementsByClassName("sparkline");for(let u=0;uconsole.warn(`Cannot read history: ${M}`))}}getTooltipInfo(e,t){var l,N,c;const s=this.objects[e],r=this.states[e],{valFull:o,fileViewer:M}=Qr({state:r,obj:s,texts:this.texts,dateFormat:this.props.dateFormat||this.systemConfig.common.dateFormat,isFloatComma:this.props.isFloatComma===void 0?this.systemConfig.common.isFloatComma:this.props.isFloatComma,full:!0}),a=[];o==null||o.forEach(L=>{L.t===this.texts.quality&&r.q?(a.push(n.createElement("div",{style:C.cellValueTooltipBoth,key:L.t},L.t,": ",L.v)),L.nbr||a.push(n.createElement("br",{key:`${L.t}_br`}))):(a.push(n.createElement("div",{style:C.cellValueTooltipTitle,key:L.t},L.t,": ")),a.push(n.createElement("div",{style:C.cellValueTooltipValue,key:`${L.t}_v`},L.v)),L.nbr||a.push(n.createElement("br",{key:`${L.t}_br`})))});const u=((l=s==null?void 0:s.common)==null?void 0:l.role)||"";M==="image"?a.push(n.createElement("img",{style:C.cellValueTooltipImage,src:r.val,alt:e})):u==="url"||s.common.role==="url.self"||s.common.role==="url.blank"?a.unshift(n.createElement("div",{key:"ctrl",style:{textDecoration:"underline",fontWeight:"bold"}},this.texts.ctrlForLink)):this.defaultHistory&&((c=(N=s==null?void 0:s.common)==null?void 0:N.custom)!=null&&c[this.defaultHistory])&&a.push(n.createElement("svg",{key:"sparkline",className:"sparkline","data-id":e,style:{fill:"#3d85de"},width:"200",height:"30",strokeWidth:"3"})),this.setState({tooltipInfo:{el:a,id:e}},()=>t&&t())}renderColumnValue(e,t,s){var u,l;const r=t.data.obj;if(!r||!this.states)return null;if(((u=r.common)==null?void 0:u.type)==="file")return n.createElement(W,{component:"div",sx:{...C.cellValueText,...C.cellValueFile}},"[file]");if(!this.states[e])return r.type==="state"&&(this.recordStates.includes(e)||this.recordStates.push(e),this.states[e]={val:null},this.subscribe(e)),null;this.recordStates.includes(e)||this.recordStates.push(e);const o=this.states[e];let M=t.data.state;if(!M){const{valText:N}=Qr({state:o,obj:r,texts:this.texts,dateFormat:this.props.dateFormat||this.systemConfig.common.dateFormat,isFloatComma:this.props.isFloatComma===void 0?this.systemConfig.common.isFloatComma:this.props.isFloatComma}),c=[];if(t.data.state={valTextRx:c},c.push(n.createElement("span",{className:`newValueBrowser-${this.props.themeType||"light"}`,key:`${N.v.toString()}valText`,style:{whiteSpace:"nowrap",display:"inline-block",overflow:"hidden",textOverflow:"ellipsis"}},N.v.toString())),N.u&&c.push(n.createElement("span",{className:`newValueBrowser-${this.props.themeType||"light"}`,style:C.cellValueTextUnit,key:`${N.v.toString()}unit`},N.u)),N.s!==void 0&&c.push(n.createElement("span",{style:C.cellValueTextState,className:`newValueBrowser-${this.props.themeType||"light"}`,key:`${N.v.toString()}states`},"(",N.s,")")),!s){const L=N.c!==void 0?N.c:N.v||"";c.push(n.createElement(Ts,{className:"copyButton",style:this.styles.iconCopy,onClick:j=>this.onCopy(j,L),key:"cc"}))}M=t.data.state}M.style=TLe({state:o,isExpertMode:this.state.filter.expertMode,isButton:t.data.button,nonAckColor:this.props.theme.palette.nonAck});let a=M.valTextRx;return this.state.filter.expertMode||(t.data.button?a=[n.createElement(uLe,{key:"button",style:{color:M.style.color,...C.cellValueButton}})]:t.data.switch&&(a=[n.createElement(Di,{key:"switch",sx:{"& .MuiSwitch-thumb":{color:M.style.color},"& .MuiSwitch-track":{backgroundColor:this.states[e].val&&this.state.selected.includes(e)?this.props.themeType==="dark"?"#FFF !important":"#111 !important":void 0}},checked:!!this.states[e].val})])),n.createElement(ae,{key:"value",title:(l=this.state.tooltipInfo)==null?void 0:l.el,slotProps:{popper:{sx:C.cellValueTooltipBox},tooltip:{sx:C.cellValueTooltip}},onOpen:()=>this.getTooltipInfo(e,()=>this.readHistory(e)),onClose:()=>{var N;return((N=this.state.tooltipInfo)==null?void 0:N.id)===e&&this.setState({tooltipInfo:null})}},n.createElement(W,{component:"div",style:M.style,className:t.data.url?"iob-link":void 0,sx:{...C.cellValueText,height:s?void 0:Ye,"& .admin-button:active":{transform:"translate(0, 2px)"}}},a))}_syncEnum(e,t,s,r){var a,u,l;if(!(t!=null&&t.length)){r&&r();return}const o=t.pop()||"",M=[];if((a=this.info.objects[o])!=null&&a.common){if((u=this.info.objects[o].common.members)!=null&&u.length){const N=this.info.objects[o].common.members.indexOf(e);if(N!==-1&&!s.includes(o)){const c=JSON.parse(JSON.stringify(this.info.objects[o]));c.common.members.splice(N,1),M.push(this.props.socket.setObject(o,c).then(()=>this.info.objects[o]=c).catch(L=>this.showError(L)))}}if(s.includes(o)&&!((l=this.info.objects[o].common.members)!=null&&l.includes(e))){const N=JSON.parse(JSON.stringify(this.info.objects[o]));N.common.members||=[],N.common.members.push(e),N.common.members.sort(),M.push(this.props.socket.setObject(o,N).then(()=>this.info.objects[o]=N).catch(c=>this.showError(c)))}}Promise.all(M).then(()=>{setTimeout(()=>this._syncEnum(e,t,s,r),0)})}syncEnum(e,t,s){const r=[...this.info[t==="func"?"funcEnums":"roomEnums"]];return new Promise(o=>{this._syncEnum(e,r,s,()=>{o()})})}renderEnumDialog(){if(!this.state.enumDialog)return null;const e=this.state.enumDialog.type,t=this.state.enumDialog.item,s=this.state.enumDialogEnums,r=this.state.enumDialog.enumsOriginal,o=(e==="room"?this.info.roomEnums:this.info.funcEnums).map(M=>{var a,u;return{name:Re(((u=(a=this.objects[M])==null?void 0:a.common)==null?void 0:u.name)||M.split(".").pop()||"",this.props.lang),value:M,icon:Xi(this.objects,M,this.props.lang,this.imagePrefix)}}).sort((M,a)=>M.name>a.name?1:-1);return o.forEach(M=>{M.icon&&typeof M.icon=="string"&&(M.icon=n.createElement(W,{style:C.enumIconDiv},n.createElement("img",{src:M.icon,style:C.enumIcon,alt:M.name})))}),n.createElement(de,{sx:{"& .MuiPaper-root":C.enumDialog},onClose:()=>this.setState({enumDialog:null}),"aria-labelledby":"enum-dialog-title",open:!0},n.createElement(Ie,{id:"enum-dialog-title",style:{display:"flex",justifyContent:"space-between",width:"100%",flexWrap:"nowrap",gap:8,paddingRight:12}},e==="func"?this.props.t("ra_Define functions"):this.props.t("ra_Define rooms"),n.createElement(Ct,{color:"primary",disabled:r===JSON.stringify(s),size:"small",onClick:()=>this.syncEnum(t.data.id,e,s).then(()=>this.setState({enumDialog:null,enumDialogEnums:null}))},n.createElement(ve,null))),n.createElement(CM,{sx:{"&.MuiList-root":C.enumList}},o.map(M=>{let a,u,l;typeof M=="object"?(a=M.value,u=M.name,l=M.icon):(a=M,u=M);const N=`checkbox-list-label-${a}`;return n.createElement(ul,{sx:C.headerCellSelectItem,key:a,onClick:()=>{const c=s.indexOf(a),L=JSON.parse(JSON.stringify(this.state.enumDialogEnums));c===-1?(L.push(a),L.sort()):L.splice(c,1),this.setState({enumDialogEnums:L})},secondaryAction:l},n.createElement(Yt,{sx:{"&.MuiListItemIcon-root":C.enumCheckbox}},n.createElement(ne,{edge:"start",checked:s.includes(a),tabIndex:-1,disableRipple:!0,slotProps:{input:{"aria-labelledby":N}}})),n.createElement(nt,{id:N},u))})))}renderEditRoleDialog(){var e,t;if(!this.state.roleDialog||!this.props.objectBrowserEditRole)return null;if(this.state.roleDialog&&this.props.objectBrowserEditRole){const s=this.props.objectBrowserEditRole;return n.createElement(s,{key:"objectBrowserEditRole",id:this.state.roleDialog,socket:this.props.socket,t:this.props.t,roleArray:this.info.roles,commonType:(t=(e=this.info.objects[this.state.roleDialog])==null?void 0:e.common)==null?void 0:t.type,onClose:r=>{r&&(this.info.objects[this.state.roleDialog]=r),this.setState({roleDialog:null})}})}return null}onColumnsEditCustomDialogClose(e){var s,r;const t=this.customColumnDialog;if(e){let o=t.value;t.type==="boolean"?o=o==="true"||o===!0:t.type==="number"&&(o=parseFloat(o)),this.customColumnDialog=null,this.props.socket.getObject(((r=(s=this.state.columnsEditCustomDialog)==null?void 0:s.obj)==null?void 0:r._id)||"").then(M=>{var a;if(M&&DLe(M,(a=this.state.columnsEditCustomDialog)==null?void 0:a.it,o))return this.props.socket.setObject(M._id,M);throw new Error(this.props.t("ra_Cannot update attribute, because not found in the object"))}).then(()=>this.setState({columnsEditCustomDialog:null})).catch(M=>this.showError(M))}else this.customColumnDialog=null,this.setState({columnsEditCustomDialog:null})}renderColumnsEditCustomDialog(){if(!this.state.columnsEditCustomDialog)return null;if(!this.customColumnDialog){const e=ja(this.state.columnsEditCustomDialog.obj,this.state.columnsEditCustomDialog.it);this.customColumnDialog={type:this.state.columnsEditCustomDialog.it.type||typeof e,initValue:(e??"").toString(),value:(e??"").toString()}}return n.createElement(de,{onClose:()=>this.setState({columnsEditCustomDialog:null}),maxWidth:"md","aria-labelledby":"custom-dialog-title",open:!0},n.createElement(Ie,{id:"custom-dialog-title"},`${this.props.t("ra_Edit object field")}: ${this.state.columnsEditCustomDialog.obj._id}`),n.createElement(Ae,null,n.createElement(Jt,{id:"alert-dialog-description"},this.customColumnDialog.type==="boolean"?n.createElement(H,{control:n.createElement(ne,{onKeyUp:e=>e.key==="Enter"&&this.onColumnsEditCustomDialogClose(!0),defaultChecked:this.customColumnDialog.value==="true",onChange:e=>{const t=this.customColumnDialog;t.value=e.target.checked.toString();const s=t.value!==t.initValue;s===!this.state.customColumnDialogValueChanged&&this.setState({customColumnDialogValueChanged:s})}}),label:`${this.state.columnsEditCustomDialog.it.name} (${this.state.columnsEditCustomDialog.it.pathText})`}):n.createElement(le,{variant:"standard",defaultValue:this.customColumnDialog.value,fullWidth:!0,onKeyUp:e=>e.key==="Enter"&&this.onColumnsEditCustomDialogClose(!0),label:`${this.state.columnsEditCustomDialog.it.name} (${this.state.columnsEditCustomDialog.it.pathText})`,onChange:e=>{const t=this.customColumnDialog;t.value=e.target.value;const s=t.value!==t.initValue;s===!this.state.customColumnDialogValueChanged&&this.setState({customColumnDialogValueChanged:s})},autoFocus:!0}))),n.createElement(me,null,n.createElement(X,{variant:"contained",onClick:()=>this.onColumnsEditCustomDialogClose(!0),disabled:!this.state.customColumnDialogValueChanged,color:"primary",startIcon:n.createElement(ve,null)},this.props.t("ra_Update")),n.createElement(X,{color:"grey",variant:"contained",onClick:()=>this.onColumnsEditCustomDialogClose(),startIcon:n.createElement(ge,null)},this.props.t("ra_Cancel"))))}renderCustomValue(e,t,s){const r=ja(e,t);return r!=null?t.edit&&!this.props.notEditable&&(!t.objTypes||t.objTypes.includes(e.type))?n.createElement(W,{component:"div",style:{...C.columnCustom,...C.columnCustomEditable,...C[`columnCustom_${t.align}`]},onClick:()=>this.setState({columnsEditCustomDialog:{item:s,it:t,obj:e},customColumnDialogValueChanged:!1})},r):n.createElement(W,{component:"div",style:{...C.columnCustom,...C[`columnCustom_${t.align}`]}},r):null}renderAliasLink(e,t,s){const r=t||0,o=this.objects[this.info.aliasesMap[e][r]].common.alias.id;return o?n.createElement(W,{component:"div",onClick:M=>{M.stopPropagation(),M.preventDefault();const a=this.info.aliasesMap[e][r];this.info.aliasesMap[e].length>1&&this.setState({aliasMenu:""}),this.onSelect(a),setTimeout(()=>this.expandAllSelected(()=>this.scrollToItem(a)),100)},sx:s||this.styles.aliasAlone},n.createElement("span",{className:"admin-browser-arrow"},typeof o=="string"||o.read===e&&o.write===e?"↔":o.read===e?"→":"←"),this.info.aliasesMap[e][r]):null}renderLeaf(e,t,s){var Us,bs,$s,Ti,yi,lM,NM,LM,jM,gM,TM,yM,DM,dM;const r=e.data.id;s.count++,t=t===void 0?this.state.expanded.includes(r):t;let o;const M=e.data.obj,a=M==null?void 0:M.type;e.children||a==="folder"||a==="device"||a==="channel"||a==="meta"?o=t?n.createElement(bi,{style:this.styles.cellIdIconFolder,onClick:()=>this.toggleExpanded(r)}):n.createElement(ms,{style:this.styles.cellIdIconFolder,onClick:()=>this.toggleExpanded(r)}):M&&M.common&&M.common.write===!1&&M.type==="state"?o=n.createElement(sLe,{style:this.styles.cellIdIconDocument}):o=n.createElement(tLe,{style:this.styles.cellIdIconDocument});let u=null;e.data.icon&&(typeof e.data.icon=="string"?e.data.icon.length<3?u=n.createElement("span",{className:"iconOwn",style:C.cellIdIconOwn},e.data.icon):u=n.createElement(xe,{style:C.cellIdIconOwn,className:"iconOwn",src:e.data.icon,alt:""}):u=e.data.icon);const l=M==null?void 0:M.common,N=(M==null?void 0:M.type)&&Ta[M.type]||n.createElement("div",{className:"itemIcon"}),c=this.levelPadding*(e.data.level||0);if(e.data.lang!==this.props.lang){const{rooms:Q,per:q}=mu(this.info,r,this.props.lang);e.data.rooms=Q.join(", "),e.data.per=q;const{funcs:Ue,pef:we}=pu(this.info,r,this.props.lang);e.data.funcs=Ue.join(", "),e.data.pef=we,e.data.lang=this.props.lang}const L=this.props.multiSelect&&this.objects[r]&&(!this.props.types||this.props.types.includes(this.objects[r].type))?n.createElement(ne,{style:C.checkBox,checked:this.state.selected.includes(r)}):null;let j=!this.props.notEditable&&a==="state"&&(this.state.filter.expertMode||(l==null?void 0:l.write)!==!1);this.props.objectBrowserViewFile&&(l==null?void 0:l.type)==="file"&&(j=!0);const g=!this.props.notEditable&&this.objects[r]&&(this.state.filter.expertMode||a==="state"||a==="channel"||a==="device"),y=this.state.statesView&&(a==="state"||a==="channel"||a==="device");let d="";const I=[];if(y&&(d=(Us=this.states[r])==null?void 0:Us.from,d===void 0?d=" ":(d=d?d.replace(/^system\.adapter\.|^system\./,""):"",I.push(`${this.texts.stateChangedFrom} ${d}`)),M!=null&&M.user)){const Q=M.user.replace("system.user.","");d+=`/${Q}`,I.push(`${this.texts.stateChangedBy} ${Q}`)}M&&(M.from&&I.push(`${this.texts.objectChangedFrom} ${M.from.replace(/^system\.adapter\.|^system\./,"")}`),M.user&&I.push(`${this.texts.objectChangedBy} ${M.user.replace(/^system\.user\./,"")}`),M.ts&&I.push(`${this.texts.objectChangedByUser} ${E.formatDate(new Date(M.ts),this.props.dateFormat||this.systemConfig.common.dateFormat)}`));let m=!1,w=null;r.startsWith("alias.")&&((bs=l==null?void 0:l.alias)!=null&&bs.id)?(m=typeof l.alias.id=="object",m?w=n.createElement("div",{style:C.cellIdAliasReadWriteDiv},l.alias.id.read?n.createElement(W,{component:"div",onClick:Q=>{Q.stopPropagation(),Q.preventDefault(),this.onSelect(l.alias.id.read),setTimeout(()=>this.expandAllSelected(()=>this.scrollToItem(l.alias.id.read)),100)},sx:this.styles.aliasReadWrite},"←",l.alias.id.read):null,l.alias.id.write?n.createElement(W,{component:"div",onClick:Q=>{Q.stopPropagation(),Q.preventDefault(),this.onSelect(l.alias.id.write),setTimeout(()=>this.expandAllSelected(()=>this.scrollToItem(l.alias.id.write)),100)},sx:this.styles.aliasReadWrite},"→",l.alias.id.write):null):w=n.createElement(W,{component:"div",onClick:Q=>{Q.stopPropagation(),Q.preventDefault(),this.onSelect(l.alias.id),setTimeout(()=>this.expandAllSelected(()=>this.scrollToItem(l.alias.id)),100)},sx:this.styles.aliasAlone},"→",l.alias.id)):this.info.aliasesMap[r]&&(this.info.aliasesMap[r].length>1?w=n.createElement(W,{component:"div",id:`alias_${r}`,onClick:Q=>{Q.stopPropagation(),Q.preventDefault(),this.setState({aliasMenu:r})},sx:this.styles.aliasAlone},this.props.t("ra_%s links from aliases",this.info.aliasesMap[r].length)):w=this.renderAliasLink(r,0));let O=l==null?void 0:l.color,A;if(O&&!this.state.selected.includes(r)){const Q=this.props.themeName==="dark"?"#1f1f1f":this.props.themeName==="blue"?"#222a2e":"#FFFFFF";E.colorDistance(O,Q)<1e3&&(A=this.props.themeType==="dark"?"#9a9a9a":"#565656")}let h=!1;r==="0_userdata"?(O=du(this.props.themeType),h=!0):r==="alias"?(O=zu(this.props.themeType),h=!0):r==="javascript"?(O=aLe(this.props.themeType),h=!0):r==="system"?(O=hu(this.props.themeType),h=!0):r==="system.adapter"?O=Iu(this.props.themeType):(!O||this.state.selected.includes(r))&&(O="inherit");const p=[];if(l!=null&&l.statusStates){const Q={};Object.keys(l.statusStates).forEach(Ue=>{var it;let we=l.statusStates[Ue];we.split(".").length<3&&(we=`${r}.${we}`),Q[Ue]=we,this.states[we]?this.recordStates.includes(we)||this.recordStates.push(we):((it=this.objects[we])==null?void 0:it.type)==="state"&&(this.recordStates.includes(we)||this.recordStates.push(we),this.states[we]={val:null},this.subscribe(we))});let q=!1;l.statusStates.errorId&&this.states[Q.errorId]&&this.states[Q.errorId].val&&(O=this.props.themeType==="dark"?Ou:Eu,q=!0,p.push(n.createElement(Wl,{key:"error",style:this.styles.iconDeviceError}))),Q.onlineId&&this.states[Q.onlineId]?q?this.states[Q.onlineId].val?p.push(n.createElement(zs,{key:"conn",style:this.styles.iconDeviceConnected})):p.push(n.createElement(di,{key:"disc",style:this.styles.iconDeviceDisconnected})):this.states[Q.onlineId].val?(O=this.props.themeType==="dark"?To:yo,p.push(n.createElement(zs,{key:"conn",style:this.styles.iconDeviceConnected}))):(O=this.props.themeType==="dark"?Do:zo,p.push(n.createElement(di,{key:"disc",style:this.styles.iconDeviceDisconnected}))):Q.offlineId&&this.states[Q.offlineId]&&(q?this.states[Q.offlineId].val?p.push(n.createElement(di,{key:"disc",style:this.styles.iconDeviceDisconnected})):p.push(n.createElement(zs,{key:"conn",style:this.styles.iconDeviceConnected})):this.states[Q.offlineId].val?(O=this.props.themeType==="dark"?Do:zo,p.push(n.createElement(di,{key:"disc",style:this.styles.iconDeviceDisconnected}))):(O=this.props.themeType==="dark"?To:yo,p.push(n.createElement(zs,{key:"conn",style:this.styles.iconDeviceConnected}))))}const S=y?E.quality2text((($s=this.states[r])==null?void 0:$s.q)||0).join(", "):null;let f=((Ti=e.data)==null?void 0:Ti.title)||"",$=!1;if(this.state.showDescription){const Q=Cu(e.data,this.props.lang);Q&&(f=[n.createElement("div",{key:"name",style:C.cellNameDivDiv},f),n.createElement("div",{key:"desc",style:C.cellDescription},Q)],$=!!Q)}const x=this.props.width==="xs"&&this.state.focused===r,Z=n.createElement(Ut,{container:!0,wrap:"nowrap",direction:"row",sx:C.cellId,style:{width:this.columnsVisibility.id,paddingLeft:c}},n.createElement(Ut,{container:!0,alignItems:"center"},L,o),n.createElement(Ut,{style:{...C.cellIdSpan,...A?this.styles.invertedBackground:void 0,color:O,fontWeight:h?"bold":void 0}},n.createElement(ae,{title:gLe(e.data,this.props.lang),slotProps:{popper:{sx:C.tooltip}}},n.createElement("div",null,e.data.name)),w,p),n.createElement("div",{style:{...C.grow,...A?this.styles.invertedBackgroundFlex:{}}}),n.createElement(Ut,{container:!0,alignItems:"center"},u),this.props.width!=="xs"?n.createElement("div",null,n.createElement(Ts,{className:x?"":"copyButton",style:C.cellCopyButton,onClick:Q=>this.onCopy(Q,r)})):null);let k=x&&f||this.columnsVisibility.name?n.createElement(W,{component:"div",sx:{...C.cellName,...$?C.cellNameWithDesc:void 0,width:this.props.width!=="xs"?this.columnsVisibility.name:void 0,ml:x?0:"5px"}},f,!x&&((yi=e.data)!=null&&yi.title)?n.createElement(W,{style:{color:O}},n.createElement(Ts,{className:"copyButton",style:C.cellCopyButton,onClick:Q=>{var q;return this.onCopy(Q,(q=e.data)==null?void 0:q.title)}})):null):null,Y;this.state.statesView?Y=[x&&y&&((lM=this.states[r])!=null&&lM.from)||this.columnsVisibility.changedFrom?{el:n.createElement("div",{key:"from",style:{...C.cellRole,width:this.props.width!=="xs"?this.columnsVisibility.changedFrom:void 0},title:I.join(` +`).forEach(M=>{if(!M.trim())return;const a=M.indexOf(":");if(a!==-1){const u=M.substring(0,a).trim();let l=M.substring(a+1).trim();l=l.replace(/^['"]|['"]$/g,""),l==="true"?t[u]=!0:l==="false"?t[u]=!1:parseFloat(l).toString()===l?t[u]=parseFloat(l):t[u]=l}else t[M.trim()]=!0}),e=e.substring(s+7))}return{header:t,body:e}}static removeDocsify(e){const t=e.match(/{docsify-[^}]*}/g);return t&&t.forEach(s=>e=e.replace(s,"")),e}static onCopy(e,t){Hc(t),e&&e.stopPropagation(),e&&e.preventDefault()}}function eLe(i){return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:e=>i.onClick&&i.onClick(e),viewBox:"0 0 512 512",width:i.width||(i.fontSize==="small"?16:20),height:i.height||i.width||(i.fontSize==="small"?16:20),className:i.className,style:i.style},n.createElement("path",{fill:"currentColor",d:"M448 0L320 96v62.06l-83.03 83.03c6.79 4.25 13.27 9.06 19.07 14.87 5.8 5.8 10.62 12.28 14.87 19.07L353.94 192H416l96-128-64-64zM128 278.59L10.92 395.67c-14.55 14.55-14.55 38.15 0 52.71l52.7 52.7c14.56 14.56 38.15 14.56 52.71 0L233.41 384c29.11-29.11 29.11-76.3 0-105.41s-76.3-29.11-105.41 0z"}))}function yu(i){return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:e=>i.onClick&&i.onClick(e),viewBox:"0 0 320 320",width:i.width||(i.fontSize==="small"?16:20),height:i.height||i.width||(i.fontSize==="small"?16:20),className:i.className,style:i.style},n.createElement("g",{fill:"currentColor"},n.createElement("rect",{rx:"32",height:"272",width:"267",y:"25",x:"25",strokeWidth:"15",stroke:"currentColor",fill:"none"}),n.createElement("ellipse",{stroke:"currentColor",ry:"26",rx:"26",cy:"248",cx:"160",fill:"none",strokeWidth:"15"}),n.createElement("line",{y2:"201.94531",x2:"159.5",y1:"46.94531",x1:"159.5",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",stroke:"currentColor",fill:"none"}),n.createElement("rect",{height:"27",width:"50",y:"79.7979",x:"133.5",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",stroke:"currentColor",fill:"#fff"})))}function Ts(i){return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:e=>i.onClick&&i.onClick(e),viewBox:"0 0 512 512",width:i.width||(i.fontSize==="small"?16:20),height:i.height||i.width||(i.fontSize==="small"?16:20),className:i.className,style:i.style},n.createElement("path",{fill:"currentColor",d:"M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z"}))}function Du(i){return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:e=>i.onClick&&i.onClick(e),viewBox:"0 0 320 320",width:i.width||(i.fontSize==="small"?16:20),height:i.height||i.width||(i.fontSize==="small"?16:20),className:i.className,style:i.style},n.createElement("g",{fill:"currentColor"},n.createElement("rect",{rx:"32",height:"272",width:"267",y:"25",x:"25",strokeWidth:"15",stroke:"currentColor",fill:"none"}),n.createElement("ellipse",{stroke:"currentColor",ry:"26",rx:"26",cy:"252",cx:"160",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",fill:"#fff"}),n.createElement("line",{y2:"201.94531",x2:"159.5",y1:"46.94531",x1:"159.5",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",stroke:"currentColor",fill:"none"}),n.createElement("rect",{height:"27",width:"50",y:"140.83068",x:"133.5",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",stroke:"currentColor",fill:"#fff"}),n.createElement("ellipse",{stroke:"currentColor",ry:"26",rx:"26",cy:"251",cx:"241",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",fill:"#fff"}),n.createElement("line",{y2:"200.94531",x2:"240.5",y1:"45.94531",x1:"240.5",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",stroke:"currentColor",fill:"none"}),n.createElement("rect",{height:"27",width:"50",y:"78.7979",x:"214.5",strokeWidth:"15",stroke:"currentColor",fill:"#fff"}),n.createElement("ellipse",{stroke:"currentColor",ry:"26",rx:"26",cy:"252",cx:"84",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",fill:"#fff"}),n.createElement("line",{y2:"201.94531",x2:"83.5",y1:"46.94531",x1:"83.5",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",stroke:"currentColor",fill:"none"}),n.createElement("rect",{height:"27",width:"50",y:"79.7979",x:"57.5",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",stroke:"currentColor",fill:"#fff"})))}function tLe(i){return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",onClick:e=>i.onClick&&i.onClick(e),width:i.width||(i.fontSize==="small"?16:20),height:i.height||i.width||(i.fontSize==="small"?16:20),className:i.className,style:i.style},n.createElement("path",{fill:"currentColor",d:"M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48z"}))}function sLe(i){return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:e=>i.onClick&&i.onClick(e),viewBox:"0 0 512 512",width:i.width||(i.fontSize==="small"?16:20),height:i.height||i.width||(i.fontSize==="small"?16:20),className:i.className,style:i.style},n.createElement("path",{fill:"currentColor",d:"M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48z"}),n.createElement("path",{fill:"currentColor",stroke:"null",d:"m261,270l-12,0l0,-24c0,-33.12 -26.88,-60 -60,-60s-60,26.88 -60,60l0,24l-12,0c-13.2,0 -24,10.8 -24,24l0,120c0,13.2 10.8,24 24,24l144,0c13.2,0 24,-10.8 24,-24l0,-120c0,-13.2 -10.8,-24 -24,-24zm-72,108c-13.2,0 -24,-10.8 -24,-24s10.8,-24 24,-24s24,10.8 24,24s-10.8,24 -24,24zm37.2,-108l-74.4,0l0,-24c0,-20.52 16.68,-37.2 37.2,-37.2c20.52,0 37.2,16.68 37.2,37.2l0,24z"}))}function iLe(i){return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:e=>i.onClick&&i.onClick(e),viewBox:"0 0 512 512",width:i.width||(i.fontSize==="small"?16:20),height:i.height||i.width||(i.fontSize==="small"?16:20),className:i.className,style:i.style},n.createElement("path",{fill:"currentColor",d:"M448 0L320 96v62.06l-83.03 83.03c6.79 4.25 13.27 9.06 19.07 14.87 5.8 5.8 10.62 12.28 14.87 19.07L353.94 192H416l96-128-64-64zM128 278.59L10.92 395.67c-14.55 14.55-14.55 38.15 0 52.71l52.7 52.7c14.56 14.56 38.15 14.56 52.71 0L233.41 384c29.11-29.11 29.11-76.3 0-105.41s-76.3-29.11-105.41 0z"}))}function Xs(i){return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:e=>i.onClick&&i.onClick(e),viewBox:"0 0 320 320",width:i.width||(i.fontSize==="small"?16:20),height:i.height||i.width||(i.fontSize==="small"?16:20),className:i.className,style:i.style},n.createElement("rect",{fill:"none",rx:"32",height:"272",width:"267",y:"25",x:"25",strokeWidth:"15",stroke:"currentColor"}),n.createElement("ellipse",{fill:"none",ry:"54",rx:"54",cy:"160",cx:"160",fillOpacity:"null",strokeOpacity:"null",strokeWidth:"15",stroke:"currentColor"}))}function rLe(i){return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",onClick:e=>i.onClick&&i.onClick(e),viewBox:"0 0 24 24",width:i.width||(i.fontSize==="small"?16:20),height:i.height||i.width||(i.fontSize==="small"?16:20),className:i.className,style:i.style},n.createElement("path",{fill:"currentColor",stroke:"currentColor",d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39A.998.998 0 0 0 18.95 4H5.04c-.83 0-1.3.95-.79 1.61z"}))}const Yr={root:{width:"100%",height:"100%"},overflowHidden:{overflow:"hidden"},container:{height:"100%"}};function oLe(i){var e;return n.createElement(Ja,{elevation:Number.isNaN(i.elevation)?1:i.elevation,style:{...Yr.root,...((e=i.styles)==null?void 0:e.root)||void 0,...i.overflow!=="visible"?Yr.overflowHidden:void 0},onKeyDown:i.onKeyDown,tabIndex:i.tabIndex},n.createElement(Ut,{container:!0,direction:"column",wrap:"nowrap",sx:Yr.container},i.children))}const ca={root:{height:"100%",overflow:"hidden"},overflowAuto:{overflow:"auto"}},MLe=n.forwardRef(function(e,t){return n.createElement(Ut,{sx:{...ca.root,...(e==null?void 0:e.style)||void 0,...e.overflow==="auto"?ca.overflowAuto:void 0},ref:t},e.children)});function nLe(i){return n.createElement(Ut,{container:!0,alignItems:"center"},i.children)}const Is=24,Ye=32,du=i=>i==="dark"?"#62ff25":"#37c400",zu=i=>i==="dark"?"#ee56ff":"#a204b4",aLe=i=>i==="dark"?"#fff46e":"#b89101",hu=i=>"#ff6d69",Iu=i=>"#5773ff",cLe=["0_userdata.0.","alias.0."],bt={headerCellInput:{width:"calc(100% - 5px)",height:Ye,pt:0,"& .itemIcon":{verticalAlign:"middle",width:Is,height:Is,display:"inline-block"}},headerCellSelectItem:{"& .itemIcon":{width:Is,height:Is,mr:"5px",display:"inline-block"}},selectNone:{opacity:.5},selectClearButton:{position:"absolute",top:0,right:0,borderRadius:5,backgroundColor:"background.default"},cellIdTooltipLink:{color:"#7ec2fd","&:hover":{color:"#7ec2fd"},"&:visited":{color:"#7ec2fd"}},cellIdTooltip:{fontSize:14}};function uLe(i){return n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 436 436",style:i==null?void 0:i.style,width:"24",height:"24",className:"admin-button"},n.createElement("g",{fill:"currentColor"},n.createElement("path",{d:"m195.23077,24.30769c-36,3 -67,12 -96,26c-49,24 -82,61 -93,104l-3,11l-1,50c0,46 0,49 2,59l5,20c21,58 84,103 165,116c16,3 53,4 70,2c60,-6 111,-28 147,-64c21,-21 36,-49 40,-74a866,866 0 0 0 1,-104c-3,-18 -6,-28 -13,-43c-26,-52 -87,-90 -162,-101c-16,-2 -48,-3 -63,-2l1,0zm60,23c36,5 70,18 95,35c31,20 51,47 59,77c2,7 2,11 2,25c1,15 0,18 -2,26c-19,69 -104,117 -200,114c-47,-2 -90,-15 -124,-38c-31,-20 -51,-47 -59,-77c-3,-11 -4,-32 -2,-43c8,-42 41,-78 91,-101a260,260 0 0 1 140,-19l0,1zm-221,222c21,26 57,49 95,62c81,27 174,14 239,-32c14,-10 31,-27 41,-41c2,-2 2,-2 2,7c-1,23 -16,50 -38,72c-78,74 -233,74 -311,-1a121,121 0 0 1 -39,-76l0,-6l3,4l8,11z"}),n.createElement("path",{d:"m201.23077,47.30769c-40,3 -79,19 -104,44c-55,55 -38,133 37,171c52,26 122,24 172,-5c30,-17 51,-42 58,-71c3,-11 3,-34 0,-45c-6,-23 -21,-44 -40,-60l-27,-16a184,184 0 0 0 -96,-18zm30,21c56,5 100,35 112,75c4,11 4,30 0,41c-8,25 -26,45 -54,59a166,166 0 0 1 -160,-8a98,98 0 0 1 -41,-53c-5,-18 -2,-39 8,-57c23,-39 79,-62 135,-57z"})))}function ua(i){i=(i||"").toString();const e=i[0]==="*",t=i[i.length-1]==="*";return i=i.replace(/[-/\\^$+?.()|[\]{}]/g,"\\$&").replace(/\*/g,".*"),(e?"":"^")+i+(t?"":"$")}function lLe(i,e){const t=[];for(let s=0;s{if(r==null)return;const M=typeof r=="object";if(t&&M&&typeof r.en=="string"&&typeof r.de=="string"){s[o]=r.en;return}s[o]=M?jo(r,e,t):r}):NLe(i,(s,r,o)=>{if(r==null||e.includes(o))return;const M=typeof r=="object";if(t&&M&&typeof r.en=="string"&&typeof r.de=="string"){s[o]=r.en;return}s[o]=M?jo(r,e,t):r})}function la(i,e,t){const s=document.createElement("a"),r=[];t.excludeSystemRepositories&&r.push("system.repositories");const o=r.length>0||t.excludeTranslations?jo(e,r,t.excludeTranslations):e,M=t.beautify?JSON.stringify(o,null,2):JSON.stringify(o);s.setAttribute("href",`data:application/json;charset=utf-8,${encodeURIComponent(M)}`),s.setAttribute("download",i),s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s)}class LLe extends ze{hasIcons;timer=null;constructor(e){var t;super(e),this.state={value:e.initialValue||[]},this.hasIcons=!!((t=e.values)!=null&&t.find(s=>s.icon))}componentWillUnmount(){this.timer&&clearTimeout(this.timer)}render(){var e;return n.createElement("div",{style:{position:"relative"}},n.createElement(Xe,{variant:"standard",key:this.props.name,sx:bt.headerCellInput,className:"no-underline",multiple:!0,renderValue:t=>t!=null&&t.length?t.map(s=>{const r=this.props.values.find(u=>typeof u=="object"?u.value===s:u===s);let o,M,a;return typeof r=="object"?(o=r.value,M=r.name,a=r.icon):(o=r,M=r),n.createElement(W,{component:"span",sx:bt.headerCellSelectItem,key:o},a||(this.hasIcons?n.createElement("div",{className:"itemIcon"}):null),M)}):this.props.name==="custom"?this.props.texts.showAll:this.props.texts[`filter_${this.props.name}`],value:this.state.value,onChange:t=>{let s=t.target.value;if(this.state.value[0]==="_"&&s.includes("_")&&s.length>1){const r=s.indexOf("_");r!==-1&&s.splice(r,1)}else this.state.value[0]!=="_"&&s.includes("_")&&(s=["_"]);s.includes("")&&(s=[]),this.setState({value:s},()=>{this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.timer=null,this.props.onChange(this.props.name,s)},400)})},onClose:()=>{this.timer&&(clearTimeout(this.timer),this.timer=null,this.props.onChange(this.props.name,this.state.value))},inputProps:{name:this.props.name,id:this.props.name},displayEmpty:!0},n.createElement(te,{key:"empty",value:""},n.createElement("span",{style:bt.selectNone},this.props.name==="custom"?this.props.texts.showAll:this.props.texts[`filter_${this.props.name}`])),(e=this.props.values)==null?void 0:e.map(t=>{let s,r,o;return typeof t=="object"?(s=t.value,r=t.name,o=t.icon):(s=t,r=t),n.createElement(te,{sx:bt.headerCellSelectItem,key:s,value:s},o||(this.hasIcons?n.createElement("div",{className:"itemIcon"}):null),r)})),this.state.value.length?n.createElement(W,{component:"div",sx:bt.selectClearButton},n.createElement(P,{size:"small",onClick:()=>{this.timer&&(clearTimeout(this.timer),this.timer=null),this.setState({value:[]},()=>this.props.onChange(this.props.name,void 0))}},n.createElement(ge,null))):null)}}class jLe extends ze{timer=null;constructor(e){super(e),this.state={value:e.initialValue||""}}componentWillUnmount(){this.timer&&clearTimeout(this.timer)}render(){return n.createElement(wt,{sx:this.props.styles,key:this.props.name,title:this.props.t("ra_You can use * as wildcard"),margin:"dense"},n.createElement(vt,{classes:{underline:"no-underline"},id:this.props.name,placeholder:this.props.texts[`filter_${this.props.name}`],value:this.state.value,onChange:e=>{const t=e.target.value;this.setState({value:t},()=>{this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.timer=null,this.props.onChange(this.props.name,t)},400)})},onBlur:()=>{this.timer&&(clearTimeout(this.timer),this.timer=null,this.props.onChange(this.props.name,this.state.value))},autoComplete:"off"}),this.state.value?n.createElement("div",{style:{position:"absolute",right:0}},n.createElement(P,{size:"small",onClick:()=>{this.timer&&(clearTimeout(this.timer),this.timer=null),this.setState({value:""},()=>this.props.onChange(this.props.name,void 0))}},n.createElement(ge,null))):null)}}function oi(i,e,t,s){if(t||=0,s===void 0&&(s=i.length-1,!s))return i[0]===e;const r=Math.floor((t+s)/2);return e===i[r]?!0:s-1===t?i[t]===e||i[s]===e:e>i[r]?oi(i,e,r,s):ek.toLowerCase())),(L=e.custom)!=null&&L.length&&(r.custom=e.custom.map(k=>k.toLowerCase())),(j=e.role)!=null&&j.length&&(r.role=e.role.map(k=>k.toLowerCase())),(g=e.room)!=null&&g.length&&(r.room=[],e.room.forEach(k=>{var Y,J;r.room=r.room.concat(((J=(Y=s[k])==null?void 0:Y.common)==null?void 0:J.members)||[])})),(y=e.func)!=null&&y.length&&(r.func=[],e.func.forEach(k=>{var Y,J;r.func=r.func.concat(((J=(Y=s[k])==null?void 0:Y.common)==null?void 0:J.members)||[])}))}const N=i.data;if(N!=null&&N.id){const k=(d=N.obj)==null?void 0:d.common;if(M){if(M.type&&(typeof M.type=="string"?(!N.obj||M.type!==N.obj.type)&&(l=!0):Array.isArray(M.type)&&(!N.obj||!M.type.includes(N.obj.type))&&(l=!0)),!l&&((I=M.common)!=null&&I.type)&&(k!=null&&k.type?typeof M.common.type=="string"?M.common.type!==k.type&&(l=!0):Array.isArray(M.common.type)&&(M.common.type.includes(k.type)||(l=!0)):l=!0),!l&&((m=M.common)!=null&&m.role)&&(k!=null&&k.role?typeof M.common.role=="string"?k.role.startsWith(M.common.role)&&(l=!0):Array.isArray(M.common.role)&&(M.common.role.find(Y=>k.role.startsWith(Y))||(l=!0)):l=!0),!l&&((w=M.common)==null?void 0:w.custom)==="_"&&(k!=null&&k.custom))l=!0;else if(!l&&((O=M.common)!=null&&O.custom)&&((A=M.common)==null?void 0:A.custom)!=="_"){const Y=M.common.custom;if(!(k!=null&&k.custom))l=!0;else if(Y==="_dataSources")Object.keys(k.custom).find(J=>J.startsWith("history.")||J.startsWith("sql.")||J.startsWith("influxdb."))||(l=!0);else if(Array.isArray(Y)){const J=Object.keys(k.custom);Y.find(Le=>J.find(Je=>Je.startsWith(Le)))&&(l=!0)}else Y!==!0&&!Object.keys(k.custom).find(J=>J.startsWith(Y))&&(l=!0)}}!l&&!e.expertMode&&(l=N.id==="system"||N.id==="enum"||N.id.startsWith("system.")||N.id.startsWith("enum.")||N.id.startsWith("_design/")||N.id.endsWith(".admin")||!!(k!=null&&k.expert)),!l&&r.id&&(N.fID===void 0&&(N.fID=N.id.toLowerCase()),l=!N.fID.includes(r.id)),!l&&r.idRx&&(l=!r.idRx.test(N.id)),!l&&r.name&&(k?(N.fName===void 0&&(N.fName=Re(k.name,t)||"",N.fName=N.fName.toLowerCase()),l=!N.fName.includes(r.name)):l=!0),!l&&r.nameRx&&k&&(N.fName===void 0&&(N.fName=Re(k.name,t)||"",N.fName=N.fName.toLowerCase()),l=!r.nameRx.test(N.fName)),!l&&((h=e.role)!=null&&h.length)&&k&&(l=!(typeof k.role=="string"&&r.role.find(Y=>k.role.startsWith(Y)))),!l&&((p=r.room)!=null&&p.length)&&(l=!r.room.find(Y=>Y===N.id||N.id.startsWith(`${Y}.`))),!l&&((S=r.func)!=null&&S.length)&&(l=!r.func.find(Y=>Y===N.id||N.id.startsWith(`${Y}.`))),!l&&((f=r.type)!=null&&f.length)&&(l=!(($=N.obj)!=null&&$.type&&r.type.includes(N.obj.type))),!l&&a&&(l=!((x=N.obj)!=null&&x.type&&a.includes(N.obj.type))),!l&&((Z=r.custom)!=null&&Z.length)&&(k?r.custom[0]==="_"?l=!!k.custom:k.custom?l=!r.custom.find(Y=>k.custom[Y]):l=!0:l=r.custom[0]!=="_")}return N.visible=!l,N.hasVisibleChildren=!1,i.children&&u<20&&i.children.forEach(k=>{go(k,e,t,s,r,o,M,a,u+1)&&(N.hasVisibleChildren=!0)}),N.sumVisibility=N.visible||N.hasVisibleChildren,o&&N.sumVisibility&&o.count++,N.id&&N.sumVisibility&&i.children&&i.children.forEach(k=>k.data.hasVisibleParent=!0),N.visible||N.hasVisibleChildren}function wu(i,e,t,s){var o;s||=[];const r=i.data;return r.sumVisibility&&(r.id&&t[r.id]&&t[r.id].type===e&&s.push(r.id),(o=i.children)==null||o.forEach(M=>wu(M,e,t,s))),s}function Na(i,e,t,s,r,o){let M;return e==="alias"||e==="alias.0"?M=n.createElement(Za,{className:"iconOwn",style:{color:zu(s)}}):e==="0_userdata"||e==="0_userdata.0"?M=n.createElement(Yl,{className:"iconOwn",style:{color:du(s)}}):e.startsWith("_design/")||e==="system"?M=n.createElement(Wi,{className:"iconOwn",style:{color:hu(s)}}):e==="system.adapter"?M=n.createElement(Wi,{className:"iconOwn",style:{color:Iu(s)}}):e==="system.group"?M=n.createElement(vo,{className:"iconOwn"}):e==="system.user"?M=n.createElement(Uo,{className:"iconOwn"}):e==="system.host"?M=n.createElement(bo,{className:"iconOwn"}):e.endsWith(".connection")||e.endsWith(".connected")?M=n.createElement(zs,{className:"iconOwn"}):e.endsWith(".info")?M=n.createElement($o,{className:"iconOwn"}):i[e]&&i[e].type==="meta"?M=n.createElement(tr,{className:"iconOwn"}):t<2&&i[`system.adapter.${e}`]&&(M=Xi(i,`system.adapter.${e}`,r,o)),M||null}function Cu(i,e){var t,s;return(s=(t=i==null?void 0:i.obj)==null?void 0:t.common)!=null&&s.desc&&Re(i.obj.common.desc,e)||null}function gLe(i,e){const t=Cu(i,e);return t!=null&&t.startsWith("http")?n.createElement(W,{component:"a",sx:bt.cellIdTooltipLink,href:t,target:"_blank",rel:"noreferrer"},t):n.createElement("span",{style:bt.cellIdTooltip},t||i.id||"")}function La(i,e){var N,c,L,j,g,y,d,I,m,w;const t=e.imagePrefix||".";let s=Object.keys(i);s.sort((O,A)=>O===A?0:(O=O.replace(/\./g,"!!!"),A=A.replace(/\./g,"!!!"),O>A?1:-1)),e.root&&(s=s.filter(O=>O===e.root||O.startsWith(`${e.root}.`)));let r=[],o="",M=0;const a={data:{name:"",id:""},children:[]},u={funcEnums:[],roomEnums:[],roles:[],ids:[],types:[],objects:i,customs:["_"],enums:[],hasSomeCustoms:!1,aliasesMap:{}};let l=a;for(let O=0;Ox.role===$)?typeof $!="string"?console.warn(`Invalid role type "${typeof $}" in "${h._id}"`):u.roles.push({role:$,type:f.type}):A.startsWith("enum.rooms.")?(u.roomEnums.push(A),u.enums.push(A)):A.startsWith("enum.functions.")?(u.funcEnums.push(A),u.enums.push(A)):h.type==="enum"?u.enums.push(A):h.type==="instance"&&f&&(f.supportCustoms||(N=f.adminUI)!=null&&N.custom)&&(u.hasSomeCustoms=!0,u.customs.push(A.substring(15))),A.startsWith("alias.")&&((c=h.common.alias)!=null&&c.id))if(typeof h.common.alias.id=="string"){const x=h.common.alias.id;u.aliasesMap[x]?u.aliasesMap[x].includes(A)||u.aliasesMap[x].push(A):u.aliasesMap[x]=[A]}else{const x=h.common.alias.id.read;x&&(u.aliasesMap[x]?u.aliasesMap[x].includes(A)||u.aliasesMap[x].push(A):u.aliasesMap[x]=[A]);const Z=h.common.alias.id.write;Z&&(u.aliasesMap[Z]?u.aliasesMap[Z].includes(A)||u.aliasesMap[Z].push(A):u.aliasesMap[Z]=[A])}}u.ids.push(A);let S;do if(S=!1,!o||A.startsWith(`${o}.`)){if(p.length-M>1){let $=o;for(let x=M;xZ.data.name===p[x]));else{const Z={data:{name:p[x],parent:l,id:$,obj:i[$],level:x,icon:Na(i,$,x,e.themeType,e.lang,t),generated:!0}};l.children||=[],l.children.push(Z),l=Z,u.ids.push($)}}const f={data:{name:p[p.length-1],title:Re((L=h==null?void 0:h.common)==null?void 0:L.name,e.lang),obj:h,parent:l,icon:Xi(i,A,e.lang,t)||Na(i,A,0,e.themeType,e.lang,t),id:A,hasCustoms:!!((j=h.common)!=null&&j.custom&&Object.keys(h.common.custom).length),level:p.length-1,generated:!1,button:h.type==="state"&&!!((g=h.common)!=null&&g.role)&&typeof h.common.role=="string"&&h.common.role.startsWith("button")&&((y=h.common)==null?void 0:y.write)!==!1,switch:h.type==="state"&&((d=h.common)==null?void 0:d.type)==="boolean"&&((I=h.common)==null?void 0:I.write)!==!1&&((m=h.common)==null?void 0:m.read)!==!1,url:!!((w=h.common)!=null&&w.role)&&typeof h.common.role=="string"&&h.common.role.startsWith("url")}};l.children||=[],l.children.push(f),l=f,M=p.length,r=p,o=A}else{let f=0;for(;r[f]===p[f];)f++;if(f>0){let $=r.length;for(r=r.splice(0,f),M=f,o=r.join(".");$>f;)l.data.parent?l=l.data.parent:console.error(`Parent is null for ${A} ${o} ${r.join(".")}`),$--}else l=a,r=[],o="",M=0;S=!0}while(S)}return u.roomEnums.sort((O,A)=>{var S,f,$,x;const h=Re((f=(S=i[O])==null?void 0:S.common)==null?void 0:f.name,e.lang)||O.split(".").pop(),p=Re((x=($=i[A])==null?void 0:$.common)==null?void 0:x.name,e.lang)||A.split(".").pop();return h>p?1:h{var S,f,$,x;const h=Re((f=(S=i[O])==null?void 0:S.common)==null?void 0:f.name,e.lang)||O.split(".").pop(),p=Re((x=($=i[A])==null?void 0:$.common)==null?void 0:x.name,e.lang)||A.split(".").pop();return h>p?1:hO.role.localeCompare(A.role)),u.types.sort(),{info:u,root:a}}function Au(i,e,t,s,r){if(i.data.id===e)return i;if(t||(t=e.split("."),r=0,s=t[r]),!i.children&&i.data.id!==e)return null;let o;if(i.children)for(let M=0;Ms)break}return o?(r||=0,Au(o,e,t,`${s}.${t[r+1]}`,r+1)):null}function mu(i,e,t,s){var M,a;if(!e)return{rooms:[],per:!1};s||=[];for(const u of i.roomEnums){const l=(M=i.objects[u])==null?void 0:M.common;if(!l)continue;const N=Re(l.name,t);(a=l.members)!=null&&a.includes(e)&&!s.includes(N)&&s.push(N)}let r;const o=e.split(".");return o.pop(),e=o.join("."),i.objects[e]&&(r=s.length,mu(i,e,t,s)),{rooms:s,per:!r}}function ys(i,e,t,s){var r,o;if(!e)return[];s||=[];for(let M=0;M946681200&&l<9466812e5&&(l*=1e3),l=l&&new Date(l).toString();else if(a!=null&&a.role&&typeof a.role=="string"&&a.role.match(/^value\.duration/)){if(typeof l=="number"&&l>=0){const g=Math.floor(l/3600),y=Math.floor(l%3600/60),d=Math.floor(l%60);l=`${g.toString().padStart(2,"0")}:${y.toString().padStart(2,"0")}:${d.toString().padStart(2,"0")}`}else if(typeof l=="string"&&E.isStringInteger(l)){const g=parseInt(l,10);if(g>=0){const y=Math.floor(g/3600),d=Math.floor(g%3600/60),I=Math.floor(g%60);l=`${y.toString().padStart(2,"0")}:${d.toString().padStart(2,"0")}:${I.toString().padStart(2,"0")}`}}}else N==="number"?Number.isInteger(l)||(l=Math.round(l*1e8)/1e8,s&&(l=l.toString().replace(".",","))):N==="object"?l=JSON.stringify(l):N!=="string"?l=l.toString():l.startsWith("data:image/")&&(u="image"),typeof l!="string"&&(l=l.toString());const c={v:l};M&&M[l]!==void 0&&l!==M[l]&&(c.s=l,l=M[l],c.v=l),((j=c.v)==null?void 0:j.length)>40&&(c.c=c.v,c.v=`${c.v.substring(0,40)}...`),a!=null&&a.unit&&(c.u=a.unit);let L;if(i.full&&(typeof l=="string"&&l.length>100?L=[{t:r.value,v:`${l.substring(0,100)}...`}]:L=[{t:r.value,v:l}],t)){if(t.ack!==void 0&&t.ack!==null&&L.push({t:r.ack,v:t.ack.toString()}),t.ts&&L.push({t:r.ts,v:t.ts?E.formatDate(new Date(t.ts),e):""}),t.lc&&L.push({t:r.lc,v:t.lc?E.formatDate(new Date(t.lc),e):""}),t.from){let g=t.from.toString();g.startsWith("system.adapter.")&&(g=g.substring(15)),L.push({t:r.from,v:g})}if(t.user){let g=t.user.toString();g.startsWith("system.user.")&&(g=g.substring(12)),L.push({t:r.user,v:g})}t.c&&L.push({t:r.c,v:t.c}),L.push({t:r.quality,v:E.quality2text(t.q||0).join(", "),nbr:!0})}return{valText:c,valFull:L,fileViewer:u}}function TLe(i){const{state:e}=i;return{color:e!=null&&e.ack?e.q?"#ffa500":"":i.nonAckColor||"#ff2222c9"}}function yLe(i,e){let t=e,s=1;const r=[];for(;s=t)r.push(0);else if(s1){const s=e.path;let r;const o=i;if(o[s[0]]&&typeof o[s[0]]=="object")return s.length===2?r=o[s[0]][s[1]]:s.length===3?r=o[s[0]][s[1]]&&typeof o[s[0]][s[1]]=="object"?o[s[0]][s[1]][s[2]]:null:s.length===4?r=o[s[0]][s[1]]&&typeof o[s[0]][s[1]]=="object"&&o[s[0]][s[1]][s[2]]?o[s[0]][s[1]][s[2]][s[3]]:null:s.length===5?r=o[s[0]][s[1]]&&typeof o[s[0]][s[1]]=="object"&&o[s[0]][s[1]][s[2]]&&o[s[0]][s[1]][s[2]][s[3]]?o[s[0]][s[1]][s[2]][s[3]][s[4]]:null:s.length===6&&(r=o[s[0]][s[1]]&&typeof o[s[0]][s[1]]=="object"&&o[s[0]][s[1]][s[2]]&&o[s[0]][s[1]][s[2]][s[3]]&&o[s[0]][s[1]][s[2]][s[3]][s[4]]?o[s[0]][s[1]][s[2]][s[3]][s[4]][s[5]]:null),r??null}return null}function DLe(i,e,t){var s;if((s=i==null?void 0:i._id)!=null&&s.startsWith(`${e.adapter}.`)&&e.path.length>1){const r=e.path,o=i;if(o[r[0]]&&typeof o[r[0]]=="object"){if(r.length===2)return o[r[0]][r[1]]=t,!0;if(r.length===3){if(o[r[0]][r[1]]&&typeof o[r[0]][r[1]]=="object")return o[r[0]][r[1]][r[2]]=t,!0}else if(r.length===4){if(o[r[0]][r[1]]&&typeof o[r[0]][r[1]]=="object"&&o[r[0]][r[1]][r[2]]&&typeof o[r[0]][r[1]][r[2]]=="object")return o[r[0]][r[1]][r[2]][r[3]]=t,!0}else if(r.length===5){if(o[r[0]][r[1]]&&typeof o[r[0]][r[1]]=="object"&&o[r[0]][r[1]][r[2]]&&typeof o[r[0]][r[1]][r[2]]=="object"&&o[r[0]][r[1]][r[2]][r[3]]&&typeof o[r[0]][r[1]][r[2]][r[3]]=="object")return o[r[0]][r[1]][r[2]][r[3]][r[4]]=t,!0}else if(r.length===6&&o[r[0]][r[1]]&&typeof o[r[0]][r[1]]=="object"&&o[r[0]][r[1]][r[2]]&&typeof o[r[0]][r[1]][r[2]]=="object"&&o[r[0]][r[1]][r[2]][r[3]]&&typeof o[r[0]][r[1]][r[2]][r[3]]=="object"&&o[r[0]][r[1]][r[2]][r[3]][r[4]]&&typeof o[r[0]][r[1]][r[2]][r[3]][r[4]]=="object")return o[r[0]][r[1]][r[2]][r[3]][r[4]][r[5]]=t,!0}}return!1}function ga(i){return!!cLe.find(e=>i.startsWith(e))}const dLe=16,Te=20,Ou="#ff413c",Eu="#86211f",To="#57ff45",yo="#098c04",Do="#f3ad11",zo="#6c5008",C={toolbar:{minHeight:38},toolbarButtons:{padding:4,marginLeft:4},switchColumnAuto:{marginLeft:16},dialogColumns:{transition:"opacity 1s"},dialogColumnsLabel:{fontSize:12,paddingTop:8},columnCustom:{width:"100%",display:"inline-block"},columnCustomEditable:{cursor:"text"},columnCustom_center:{textAlign:"center"},columnCustom_left:{textAlign:"left"},columnCustom_right:{textAlign:"right"},width100:{width:"100%"},transparent_10:{opacity:.1},transparent_20:{opacity:.2},transparent_30:{opacity:.3},transparent_40:{opacity:.4},transparent_50:{opacity:.5},transparent_60:{opacity:.6},transparent_70:{opacity:.7},transparent_80:{opacity:.8},transparent_90:{opacity:.9},transparent_100:{opacity:1},headerRow:{paddingLeft:8,height:38,whiteSpace:"nowrap",userSelect:"none"},buttonClearFilter:{position:"relative",float:"right",padding:0},buttonClearFilterIcon:{zIndex:2,position:"absolute",top:0,left:0,color:"#FF0000",opacity:.7},tableDiv:{paddingTop:0,paddingLeft:0,width:"calc(100% - 8px)",height:"calc(100% - 38px)",overflow:"auto"},tableRow:i=>({pl:1,height:Ye,lineHeight:`${Ye}px`,verticalAlign:"top",userSelect:"none",position:"relative",width:"100%","&:hover":{background:`${i.palette.mode==="dark"?i.palette.primary.dark:i.palette.primary.light} !important`,color:E.invertColor(i.palette.primary.main,!0)},whiteSpace:"nowrap",flexWrap:"nowrap"}),tableRowLines:i=>({borderBottom:`1px solid ${i.palette.mode==="dark","#8888882e"}`,"& > div":{borderRight:`1px solid ${i.palette.mode==="dark","#8888882e"}`}}),tableRowNoDragging:{cursor:"pointer"},tableRowAlias:{height:Ye+10},tableRowAliasReadWrite:{height:Ye+22},tableRowFocused:i=>({"&:after":{content:'""',position:"absolute",top:1,left:1,right:1,bottom:1,border:i.palette.mode?"1px dotted #000":"1px dotted #FFF"}}),checkBox:{padding:0},cellId:{position:"relative",fontSize:"1rem",overflow:"hidden",textOverflow:"ellipsis","& .copyButton":{display:"none"},"&:hover .copyButton":{display:"block"},"& .iconOwn":{display:"block",width:Ye-4,height:Ye-4,mt:"2px",float:"right"},"&:hover .iconOwn":{display:"none"},"& *":{width:"initial"}},cellIdSpan:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},cellIdIconFolder:i=>({marginRight:8,width:Ye-4,height:Ye-4,cursor:"pointer",color:i.palette.secondary.main||"#fbff7d",verticalAlign:"top"}),cellIdIconDocument:{verticalAlign:"middle",marginLeft:(Ye-Te)/2,marginRight:8,width:Te,height:Te},cellIdIconOwn:{},cellCopyButton:{width:Te,height:Te,top:(Ye-Te)/2,opacity:.8,position:"absolute",right:3},cellCopyButtonInDetails:{width:Te,height:Te,top:(Ye-Te)/2,opacity:.8},cellEditButton:{width:Te,height:Te,color:"white",position:"absolute",top:(Ye-Te)/2,right:Te+3,opacity:.7,"&:hover":{opacity:1}},cellName:{display:"inline-block",verticalAlign:"top",fontSize:14,ml:"5px",overflow:"hidden",textOverflow:"ellipsis",position:"relative","& .copyButton":{display:"none"},"&:hover .copyButton":{display:"block"}},cellNameWithDesc:{lineHeight:"normal"},cellNameDivDiv:{},cellDescription:{fontSize:10,opacity:.5,fontStyle:"italic"},cellIdAlias:i=>({fontStyle:"italic",fontSize:12,opacity:.7,"&:hover":{color:i.palette.mode==="dark"?"#009900":"#007700"}}),cellIdAliasReadWriteDiv:{height:24,marginTop:-5},cellIdAliasAlone:{lineHeight:0},cellIdAliasReadWrite:{lineHeight:"12px"},cellType:{display:"inline-block",verticalAlign:"top","& .itemIcon":{verticalAlign:"middle",width:Is,height:Is,display:"inline-block"},"& .itemIconFolder":{marginLeft:3}},cellRole:{display:"inline-block",verticalAlign:"top",textOverflow:"ellipsis",overflow:"hidden"},cellRoom:{display:"inline-block",verticalAlign:"top",textOverflow:"ellipsis",overflow:"hidden"},cellEnumParent:{opacity:.4},cellFunc:{display:"inline-block",verticalAlign:"top",textOverflow:"ellipsis",overflow:"hidden"},cellValue:{display:"inline-block",verticalAlign:"top",textOverflow:"ellipsis",overflow:"hidden"},cellValueButton:{marginTop:5},cellValueButtonFalse:{opacity:.3},cellAdapter:{display:"inline-block",verticalAlign:"top"},cellValueTooltip:{fontSize:12},cellValueText:{width:"100%",height:Ye,fontSize:16,display:"flex",overflow:"hidden",textOverflow:"ellipsis",position:"relative",verticalAlign:"top","& .copyButton":{display:"none"},"&:hover .copyButton":{display:"block"}},cellValueFile:{color:"#2837b9"},cellValueTooltipTitle:{fontStyle:"italic",width:100,display:"inline-block"},cellValueTooltipValue:{width:120,display:"inline-block",whiteSpace:"nowrap",textOverflow:"ellipsis"},cellValueTooltipImage:{width:100,height:"auto"},cellValueTooltipBoth:{width:220,display:"inline-block",whiteSpace:"nowrap"},cellValueTooltipBox:{width:250,overflow:"hidden",pointerEvents:"none"},tooltip:{pointerEvents:"none"},cellValueTextUnit:{marginLeft:4,opacity:.8,display:"inline-block"},cellValueTextState:{opacity:.7},cellValueTooltipCopy:{position:"absolute",bottom:3,right:3},cellValueTooltipEdit:{position:"absolute",bottom:3,right:15},cellButtons:{display:"inline-block",verticalAlign:"top"},cellButtonsButton:{display:"inline-block",opacity:.5,width:Te+4,height:Te+4,"&:hover":{opacity:1},p:0,mt:"-2px"},cellButtonsEmptyButton:{fontSize:12},cellButtonMinWidth:{minWidth:40},cellButtonsButtonAlone:{ml:`${Te+6}px`,pt:0,mt:"-2px"},cellButtonsButtonWithCustoms:i=>({color:i.palette.mode==="dark"?i.palette.primary.main:i.palette.secondary.main}),cellButtonsButtonWithoutCustoms:{opacity:.2},cellButtonsValueButton:i=>({position:"absolute",top:Te/2-2,opacity:.7,width:Te-2,height:Te-2,color:i.palette.action.active,"&:hover":{opacity:1}}),cellButtonsValueButtonCopy:{right:8,cursor:"pointer"},cellButtonsValueButtonEdit:{right:Te/2+16},cellDetailsLine:{display:"flex",alignItems:"center",width:"100%",height:32,fontSize:16},cellDetailsName:{fontWeight:"bold",marginRight:8,minWidth:80},filteredOut:{opacity:.5},filteredParentOut:{opacity:.3},filterInput:{mt:0,mb:0},selectIcon:{width:24,height:24,marginRight:4},itemSelected:i=>({background:`${i.palette.primary.main} !important`,color:`${E.invertColor(i.palette.primary.main,!0)} !important`}),header:{width:"100%"},headerCell:{display:"inline-block",verticalAlign:"top"},headerCellValue:{paddingTop:4,fontSize:16},visibleButtons:{color:"#2196f3",opacity:.7},grow:{flexGrow:1},enumIconDiv:{marginRight:8,width:32,height:32,borderRadius:8,background:"#FFFFFF"},enumIcon:{marginTop:4,marginLeft:4,width:24,height:24},enumDialog:{overflow:"hidden"},enumList:{minWidth:250,height:"calc(100% - 50px)",overflow:"auto"},enumCheckbox:{minWidth:0},buttonDiv:{display:"flex",height:"100%",alignItems:"center"},aclText:{fontSize:13,marginTop:6},rightsObject:{color:"#55ff55",paddingLeft:3},rightsState:{color:"#86b6ff",paddingLeft:3},textCenter:{padding:12,textAlign:"center"},tooltipAccessControl:{display:"flex",flexDirection:"column"},fontSizeTitle:{"@media screen and (max-width: 465px)":{"& *":{fontSize:12}}},draggable:{cursor:"copy"},nonDraggable:{cursor:"no-drop"},iconDeviceConnected:i=>({color:i.palette.mode==="dark"?To:yo,opacity:.8,position:"absolute",top:4,right:32,width:20}),iconDeviceDisconnected:i=>({color:i.palette.mode==="dark"?Do:zo,opacity:.8,position:"absolute",top:4,right:32,width:20}),iconDeviceError:i=>({color:i.palette.mode==="dark"?Ou:Eu,opacity:.8,position:"absolute",top:4,right:50,width:20}),resizeHandle:{display:"block",position:"absolute",cursor:"col-resize",width:7,top:2,bottom:2,zIndex:1},resizeHandleRight:{right:3,borderRight:"2px dotted #888","&:hover":{borderColor:"#ccc",borderRightStyle:"solid"},"&.active":{borderColor:"#517ea5",borderRightStyle:"solid"}},invertedBackground:i=>({backgroundColor:i.palette.mode==="dark"?"#9a9a9a":"#565656",padding:"0 3px",borderRadius:"2px 0 0 2px"}),invertedBackgroundFlex:i=>({backgroundColor:i.palette.mode==="dark"?"#9a9a9a":"#565656",borderRadius:"0 2px 2px 0"}),contextMenuEdit:i=>({color:i.palette.mode==="dark"?"#ffee48":"#cbb801"}),contextMenuEditValue:i=>({color:i.palette.mode==="dark"?"#5dff45":"#1cd301"}),contextMenuView:i=>({color:i.palette.mode==="dark"?"#FFF":"#000"}),contextMenuCustom:i=>({color:i.palette.mode==="dark"?"#42eaff":"#01bbc2"}),contextMenuACL:i=>({color:i.palette.mode==="dark"?"#e079ff":"#500070"}),contextMenuRoom:i=>({color:i.palette.mode==="dark"?"#ff9a33":"#642a00"}),contextMenuRole:i=>({color:i.palette.mode==="dark"?"#ffdb43":"#562d00"}),contextMenuDelete:i=>({color:i.palette.mode==="dark"?"#ff4f4f":"#cf0000"}),contextMenuKeys:{marginLeft:8,opacity:.7,fontSize:"smaller"},contextMenuWithSubMenu:{display:"flex"},...bt},Ta={state:n.createElement(Xs,{className:"itemIcon",style:{verticalAlign:"middle"}}),channel:n.createElement(yu,{className:"itemIcon",style:{verticalAlign:"middle"}}),device:n.createElement(Du,{className:"itemIcon",style:{verticalAlign:"middle"}}),adapter:n.createElement(eLe,{className:"itemIcon",style:{verticalAlign:"middle"}}),meta:n.createElement(tr,{className:"itemIcon",style:{verticalAlign:"middle"}}),instance:n.createElement(iLe,{className:"itemIcon",style:{color:"#7da7ff",verticalAlign:"middle"}}),enum:n.createElement(Kl,{className:"itemIcon",style:{verticalAlign:"middle"}}),chart:n.createElement(Xl,{className:"itemIcon",style:{verticalAlign:"middle"}}),config:n.createElement(Hr,{className:"itemIcon",style:{verticalAlign:"middle"}}),group:n.createElement(vo,{className:"itemIcon",style:{verticalAlign:"middle"}}),user:n.createElement(Uo,{className:"itemIcon",style:{verticalAlign:"middle"}}),host:n.createElement(bo,{className:"itemIcon",style:{verticalAlign:"middle"}}),schedule:n.createElement(Zl,{className:"itemIcon",style:{verticalAlign:"middle"}}),script:n.createElement(Wo,{className:"itemIcon",style:{verticalAlign:"middle"}}),folder:n.createElement(ms,{className:"itemIcon itemIconFolder",style:{verticalAlign:"middle"}})},je={xs:{idWidth:"100%",fields:[],widths:{}},sm:{idWidth:300,fields:["room","val"],widths:{room:100,val:200}},md:{idWidth:300,fields:["room","func","val","buttons"],widths:{name:200,room:150,func:150,val:120,buttons:120}},lg:{idWidth:300,fields:["name","type","role","room","func","val","buttons","changedFrom","qualityCode","timestamp","lastChange"],widths:{name:300,type:80,role:120,room:180,func:180,val:140,buttons:120,changedFrom:120,qualityCode:100,timestamp:165,lastChange:165}},xl:{idWidth:550,fields:["name","type","role","room","func","val","buttons","changedFrom","qualityCode","timestamp","lastChange"],widths:{name:400,type:80,role:120,room:180,func:180,val:140,buttons:120,changedFrom:120,qualityCode:100,timestamp:170,lastChange:170}}};let ya=!1;const Ds={id:"",name:"",room:[],func:[],role:[],type:[],custom:[],expertMode:!1};class Ki extends ze{info={funcEnums:[],roomEnums:[],roles:[],ids:[],types:[],objects:{},customs:[],enums:[],hasSomeCustoms:!1,aliasesMap:{}};localStorage=window._localStorage||window.localStorage;tableRef;pausedSubscribes=!1;selectFirst;root=null;states={};subscribes=[];unsubscribeTimer=null;statesUpdateTimer=null;objectsUpdateTimer=null;visibleCols;texts;possibleCols;imagePrefix;adapterColumns=[];styleTheme="";edit={id:"",val:"",q:0,ack:!1};levelPadding;customWidth=!1;resizeTimeout=null;resizerNextName=null;resizerActiveName=null;resizerCurrentWidths={};resizeLeft=!1;resizerOldWidth=0;resizerMin=0;resizerNextMin=0;resizerOldWidthNext=0;resizerPosition=0;resizerActiveDiv=null;resizerNextDiv=null;storedWidths=null;systemConfig;objects;defaultHistory="";ctrlPressed=!1;columnsVisibility={};changedIds=null;contextMenu=null;recordStates=[];styles={};expertMode=!1;customColumnDialog=null;constructor(e){super(e);const t=this.localStorage.getItem(`${e.dialogName||"App"}.objectSelected`)||"";if(this.selectFirst="",this.expertMode=!!this.props.expertMode,t.startsWith("["))try{const d=JSON.parse(t);this.selectFirst=d[0]||""}catch{}else this.selectFirst=t;let s;const r=this.localStorage.getItem(`${e.dialogName||"App"}.objectExpanded`)||"[]";try{s=JSON.parse(r)}catch{s=[]}let o;const M=e.defaultFilters?"":this.localStorage.getItem(`${e.dialogName||"App"}.objectFilter`)||"";if(M)try{o=JSON.parse(M)}catch{o={...Ds}}else e.defaultFilters&&typeof e.defaultFilters=="object"?o={...e.defaultFilters}:o={...Ds};if(typeof o.room=="string"&&o.room&&(o.room=[o.room].filter(d=>d),o.room.length||delete o.room),typeof o.func=="string"&&o.func&&(o.func=[o.func].filter(d=>d),o.func.length||delete o.func),typeof o.role=="string"&&o.role&&(o.role=[o.role].filter(d=>d),o.role.length||delete o.role),typeof o.type=="string"&&(o.type=[o.type].filter(d=>d),o.type.length||delete o.type),typeof o.custom=="string"&&(o.custom=[o.custom].filter(d=>d),o.custom.length||delete o.custom),o.expertMode=e.expertMode!==void 0?e.expertMode:(window._sessionStorage||window.sessionStorage).getItem("App.expertMode")==="true",this.tableRef=Pa(),this.visibleCols=e.columns||je[e.width||"lg"].fields,e.types&&e.types.length===1){const d=this.visibleCols.indexOf("type");d!==-1&&this.visibleCols.splice(d,1)}this.possibleCols=je.xl.fields;let a=null;if(e.router){const d=e.router.getLocation();d.id&&d.dialog==="customs"&&(a=[d.id],this.pauseSubscribe(!0))}let u;Array.isArray(e.selected)?u=e.selected:u=[e.selected||""],u=u.map(d=>d.replace(/["']/g,"")).filter(d=>d),this.selectFirst=u.length&&u[0]?u[0]:this.selectFirst;const l=this.localStorage.getItem(`${e.dialogName||"App"}.columns`);let N;try{N=l?JSON.parse(l):null}catch{N=null}let c=null;try{c=c?JSON.parse(c):{}}catch{c={}}this.imagePrefix=e.imagePrefix||".";let L;const j=this.localStorage.getItem(`${e.dialogName||"App"}.foldersFirst`);j==="false"?L=!1:j==="true"?L=!0:L=e.foldersFirst===void 0?!0:e.foldersFirst;let g=!1;try{g=this.props.objectStatesView&&JSON.parse(this.localStorage.getItem(`${e.dialogName||"App"}.objectStatesView`)||"")||!1}catch{}this.state={aliasMenu:"",beautifyJsonExport:!0,columns:N,columnsAuto:this.localStorage.getItem(`${e.dialogName||"App"}.columnsAuto`)!=="false",columnsDialogTransparent:100,columnsEditCustomDialog:null,columnsForAdmin:null,columnsSelectorShow:!1,columnsWidths:c,customColumnDialogValueChanged:!1,customDialog:a,depth:0,editObjectAlias:!1,editObjectDialog:"",enumDialog:null,excludeSystemRepositoriesFromExport:!0,excludeTranslations:!1,expandAllVisible:!1,expanded:s,filter:o,filterKey:0,focused:this.localStorage.getItem(`${e.dialogName||"App"}.focused`)||"",foldersFirst:L,linesEnabled:this.localStorage.getItem(`${e.dialogName||"App"}.lines`)==="true",loaded:!1,noStatesByExportImport:!1,roleDialog:null,scrollBarWidth:16,selected:u,selectedNonObject:this.localStorage.getItem(`${e.dialogName||"App"}.selectedNonObject`)||"",showAliasEditor:"",showAllExportOptions:!1,showContextMenu:null,showDescription:this.localStorage.getItem(`${e.dialogName||"App"}.desc`)!=="false",showExportDialog:!1,showImportDialog:!1,showImportMenu:null,showRenameDialog:null,statesView:g,toast:"",tooltipInfo:null,viewFileDialog:""},this.texts={name:e.t("ra_Name"),categories:e.t("ra_Categories"),value:e.t("ra_tooltip_value"),ack:e.t("ra_tooltip_ack"),ts:e.t("ra_tooltip_ts"),lc:e.t("ra_tooltip_lc"),from:e.t("ra_tooltip_from"),user:e.t("ra_tooltip_user"),c:e.t("ra_tooltip_comment"),quality:e.t("ra_tooltip_quality"),editObject:e.t("ra_tooltip_editObject"),deleteObject:e.t("ra_tooltip_deleteObject"),customConfig:e.t("ra_tooltip_customConfig"),copyState:e.t("ra_tooltip_copyState"),editState:e.t("ra_tooltip_editState"),ctrlForLink:e.t("ra_tooltip_ctrlForLink"),close:e.t("ra_Close"),filter_id:e.t("ra_filter_id"),filter_name:e.t("ra_filter_name"),filter_type:e.t("ra_filter_type"),filter_role:e.t("ra_filter_role"),filter_room:e.t("ra_filter_room"),filter_func:e.t("ra_filter_func"),filter_custom:e.t("ra_filter_customs"),filterCustomsWithout:e.t("ra_filter_customs_without"),objectChangedByUser:e.t("ra_object_changed_by_user"),objectChangedBy:e.t("ra_object_changed_by"),objectChangedFrom:e.t("ra_state_changed_from"),stateChangedBy:e.t("ra_state_changed_by"),stateChangedFrom:e.t("ra_state_changed_from"),ownerGroup:e.t("ra_Owner group"),ownerUser:e.t("ra_Owner user"),showAll:e.t("ra_show_all"),deviceError:e.t("ra_Error"),deviceDisconnected:e.t("ra_Disconnected"),deviceConnected:e.t("ra_Connected"),aclOwner_read_object:e.t("ra_aclOwner_read_object"),aclOwner_read_state:e.t("ra_aclOwner_read_state"),aclOwner_write_object:e.t("ra_aclOwner_write_object"),aclOwner_write_state:e.t("ra_aclOwner_write_state"),aclGroup_read_object:e.t("ra_aclGroup_read_object"),aclGroup_read_state:e.t("ra_aclGroup_read_state"),aclGroup_write_object:e.t("ra_aclGroup_write_object"),aclGroup_write_state:e.t("ra_aclGroup_write_state"),aclEveryone_read_object:e.t("ra_aclEveryone_read_object"),aclEveryone_read_state:e.t("ra_aclEveryone_read_state"),aclEveryone_write_object:e.t("ra_aclEveryone_write_object"),aclEveryone_write_state:e.t("ra_aclEveryone_write_state"),create:e.t("ra_Create"),createBooleanState:e.t("ra_create_boolean_state"),createNumberState:e.t("ra_create_number_state"),createStringState:e.t("ra_create_string_state"),createState:e.t("ra_create_state"),createChannel:e.t("ra_create_channel"),createDevice:e.t("ra_create_device"),createFolder:e.t("ra_Create folder")},this.levelPadding=e.levelPadding||dLe;const y=this.localStorage.getItem(`${this.props.dialogName||"App"}.table`);if(y)try{const d=JSON.parse(y),I=this.props.width||"lg";this.storedWidths=JSON.parse(JSON.stringify(je[I])),Object.keys(d).forEach(m=>{m==="id"?je[I].idWidth=d.id:m==="nameHeader"?je[I].widths.name=d[m]:je[I].widths[m]!==void 0&&(je[I].widths[m]=d[m])}),this.customWidth=!0}catch{}this.calculateColumnsVisibility()}async loadAllObjects(e){var s;const t=this.props;try{await new Promise(l=>{this.setState({updating:!0},()=>l())});const r=(t.objectsWorker?await t.objectsWorker.getObjects(e):await t.socket.getObjects(e,!0))||{};if(t.types&&Ee.isWeb())for(let l=0;l{try{if(l(r[N]))this.objects[N]=r[N];else{const c=r[N]&&r[N].type;c&&(c==="channel"||c==="device"||c==="folder"||c==="adapter"||c==="instance")&&(this.objects[N]=r[N])}}catch(c){console.log(`Error by filtering of "${N}": ${c}`)}})}else if(t.types){this.objects={};const l=t.types;Object.keys(r).forEach(N=>{var L;const c=(L=r[N])==null?void 0:L.type;c&&(c==="channel"||c==="device"||c==="enum"||c==="folder"||c==="adapter"||c==="instance"||l.includes(c))&&(this.objects[N]=r[N])})}else this.objects=r;t.setObjectsReference&&t.setObjectsReference(this.objects),this.defaultHistory=this.systemConfig.common.defaultHistory,this.defaultHistory&&t.socket.getState(`system.adapter.${this.defaultHistory}.alive`).then(l=>{l!=null&&l.val||(this.defaultHistory="")}).catch(l=>window.alert(`Cannot get state: ${l}`));const o=await this.getAdditionalColumns();this.calculateColumnsVisibility(null,null,o);const{info:M,root:a}=La(this.objects,{imagePrefix:t.imagePrefix,root:t.root,lang:t.lang,themeType:t.themeType});this.root=a,this.info=M;const u=((s=this.state.selected)==null?void 0:s.length)&&Au(this.root,this.state.selected[0]);u&&!go(u,this.state.filter,t.lang,this.objects,void 0,void 0,t.customFilter,t.types)?this.setState({filter:{...Ds},columnsForAdmin:o},()=>{this.doFilter(),this.setState({loaded:!0,updating:!1},()=>this.expandAllSelected(()=>this.onAfterSelect()))}):(this.doFilter(),this.setState({loaded:!0,updating:!1,columnsForAdmin:o},()=>this.expandAllSelected(()=>this.onAfterSelect())))}catch(r){this.showError(r)}}expandAllSelected(e){const t=[...this.state.expanded];let s=!1;this.state.selected.forEach(r=>{const o=r.split("."),M=[];for(let a=0;a!this.objects[N]))&&((u=(a=this.props).onSelect)==null||u.call(a,this.state.selected,null,e))}else this.localStorage.removeItem(`${this.props.dialogName||"App"}.objectSelected`),this.state.selected.length?this.setState({selected:[]},()=>{this.props.onSelect&&(this.state.focused&&this.props.allowNonObjects?(this.selectFirst&&this.selectFirst!==this.state.selected[0]&&(this.selectFirst=""),this.props.onSelect([this.state.focused],null,e)):this.props.onSelect([],""))}):this.props.onSelect&&(this.state.focused&&this.props.allowNonObjects?(this.selectFirst&&this.selectFirst!==this.state.selected[0]&&(this.selectFirst=""),this.props.onSelect([this.state.focused],null,e)):this.props.onSelect([],""))}static getDerivedStateFromProps(e,t){const s={};let r=!1;return e.expertMode!==void 0&&e.expertMode!==t.filter.expertMode&&(r=!0,s.filter={...t.filter},s.filter.expertMode=e.expertMode),r?s:null}async componentDidMount(){await this.loadAllObjects(!ya),this.props.objectsWorker?this.props.objectsWorker.registerHandler(this.onObjectChangeFromWorker):await this.props.socket.subscribeObject("*",this.onObjectChange),ya=!0,window.addEventListener("contextmenu",this.onContextMenu,!0),window.addEventListener("keydown",this.onKeyPress,!0),window.addEventListener("keyup",this.onKeyPress,!0),this.props.onAllLoaded&&setTimeout(()=>{var e,t;(t=(e=this.props).onAllLoaded)==null||t.call(e)},100)}onKeyPress=e=>{e.type==="keydown"&&e.ctrlKey&&!this.ctrlPressed?(this.ctrlPressed=!0,this.tableRef.current&&(this.tableRef.current.className="highlight-link")):e.type==="keyup"&&!e.ctrlKey&&this.ctrlPressed&&(this.ctrlPressed=!1,this.tableRef.current&&(this.tableRef.current.className=""))};componentWillUnmount(){window.removeEventListener("contextmenu",this.onContextMenu,!0),window.removeEventListener("keydown",this.onKeyPress,!0),window.removeEventListener("keyup",this.onKeyPress,!0),this.props.objectsWorker?this.props.objectsWorker.unregisterHandler(this.onObjectChangeFromWorker,!0):this.props.socket.unsubscribeObject("*",this.onObjectChange).catch(e=>console.error(`Cannot unsubscribe *: ${e}`)),this.subscribes.forEach(e=>{this.props.socket.unsubscribeState(e,this.onStateChange)}),this.subscribes=[],this.objects={}}showDeleteDialog(e){var u,l,N,c;const{id:t,obj:s,item:r}=e,o=Object.keys(this.objects);o.sort();let M=0;const a=`${t}.`;for(let L=0;La)break;(c=(N=this.props).onObjectDelete)==null||c.call(N,t,!!((u=r.children)!=null&&u.length),!((l=s.common)!=null&&l.dontDelete),M+1)}onContextMenu=e=>{this.contextMenu&&Date.now()-this.contextMenu.ts<2e3?(e.preventDefault(),this.setState({showContextMenu:{item:this.contextMenu.item,position:{left:e.clientX+2,top:e.clientY-6}}})):this.state.showContextMenu&&(e.preventDefault(),this.setState({showContextMenu:null})),this.contextMenu=null};refreshComponent(){this.subscribes.forEach(e=>{this.props.socket.unsubscribeState(e,this.onStateChange)}),this.subscribes=[],this.loadAllObjects(!0).then(()=>console.log("updated!")).catch(e=>this.showError(e))}renderErrorDialog(){return this.state.error?n.createElement(de,{open:!0,maxWidth:"sm",fullWidth:!0,onClose:()=>this.setState({error:""}),"aria-labelledby":"error-dialog-title","aria-describedby":"error-dialog-description"},n.createElement(Ie,{id:"alert-dialog-title"},this.props.t("ra_Error")),n.createElement(Ae,null,n.createElement(Jt,{id:"alert-dialog-description"},this.state.error)),n.createElement(me,null,n.createElement(X,{variant:"contained",onClick:()=>this.setState({error:""}),color:"primary",autoFocus:!0,startIcon:n.createElement(ve,null)},this.props.t("ra_Ok")))):null}showError(e){this.setState({error:typeof e=="object"?e&&typeof e.toString=="function"?e.toString():JSON.stringify(e):e})}onSelect(e,t,s){if(this.localStorage.setItem(`${this.props.dialogName||"App"}.focused`,e),!this.props.multiSelect)this.objects[e]&&(!this.props.types||this.props.types.includes(this.objects[e].type))?(this.localStorage.removeItem(`${this.props.dialogName||"App"}.selectedNonObject`),this.state.selected[0]!==e?this.setState({selected:[e],selectedNonObject:"",focused:e},()=>{this.onAfterSelect(t),s&&s()}):t&&this.props.onSelect&&this.onAfterSelect(t)):(this.localStorage.setItem(`${this.props.dialogName||"App"}.selectedNonObject`,e),this.setState({selected:[],selectedNonObject:e,focused:e},()=>{this.onAfterSelect(),s&&s()}));else if(this.objects[e]&&(!this.props.types||this.props.types.includes(this.objects[e].type))){this.localStorage.removeItem(`${this.props.dialogName||"App"}.selectedNonObject`);const r=[...this.state.selected],o=r.indexOf(e);o===-1?(r.push(e),r.sort()):t||r.splice(o,1),this.setState({selected:r,selectedNonObject:"",focused:e},()=>{this.onAfterSelect(t),s&&s()})}}_renderDefinedList(e){const t=[...this.possibleCols];if(t.unshift("id"),this.props.columns&&!this.props.columns.includes("buttons")){const s=t.indexOf("buttons");s!==-1&&t.splice(s,1)}return t.filter(s=>e&&(s==="val"||s==="buttons")||!e&&s!=="val"&&s!=="buttons").map(s=>{var r;return n.createElement(wM,{onClick:()=>{if(!this.state.columnsAuto&&s!=="id"){const o=[...this.state.columns||[]],M=o.indexOf(s);M===-1?(o.push(s),o.sort()):o.splice(M,1),this.localStorage.setItem(`${this.props.dialogName||"App"}.columns`,JSON.stringify(o)),this.calculateColumnsVisibility(null,o),this.setState({columns:o})}},key:s},n.createElement(ne,{edge:"start",disabled:s==="id"||this.state.columnsAuto,checked:s==="id"||!!(this.state.columnsAuto?this.visibleCols.includes(s):(r=this.state.columns)!=null&&r.includes(s)),disableRipple:!0}),n.createElement(nt,{primary:this.texts[`filter_${s}`]||this.props.t(`ra_${s}`)}))})}renderColumnsSelectorDialog(){return this.state.columnsSelectorShow?n.createElement(de,{onClose:()=>this.setState({columnsSelectorShow:!1}),open:!0,sx:{"& .MuiPaper-root":E.getStyle(this.props.theme,C.dialogColumns,C[`transparent_${this.state.columnsDialogTransparent}`])}},n.createElement(Ie,{sx:C.fontSizeTitle},this.props.t("ra_Configure")),n.createElement(Ae,{sx:C.fontSizeTitle},n.createElement(H,{style:C.switchColumnAuto,control:n.createElement(Di,{checked:this.state.foldersFirst,onChange:()=>{this.localStorage.setItem(`${this.props.dialogName||"App"}.foldersFirst`,this.state.foldersFirst?"false":"true"),this.setState({foldersFirst:!this.state.foldersFirst})}}),label:this.props.t("ra_Folders always first")}),n.createElement(H,{style:C.switchColumnAuto,control:n.createElement(Di,{checked:this.state.linesEnabled,onChange:()=>{this.localStorage.setItem(`${this.props.dialogName||"App"}.lines`,this.state.linesEnabled?"false":"true"),this.setState({linesEnabled:!this.state.linesEnabled})}}),label:this.props.t("ra_Show lines between rows")}),n.createElement(H,{style:C.switchColumnAuto,control:n.createElement(Di,{checked:this.state.columnsAuto,onChange:()=>{this.localStorage.setItem(`${this.props.dialogName||"App"}.columnsAuto`,this.state.columnsAuto?"false":"true"),this.state.columnsAuto?this.state.columns?(this.calculateColumnsVisibility(!1),this.setState({columnsAuto:!1})):(this.calculateColumnsVisibility(!1,[...this.visibleCols]),this.setState({columnsAuto:!1,columns:[...this.visibleCols]})):(this.calculateColumnsVisibility(!0),this.setState({columnsAuto:!0}))}}),label:this.props.t("ra_Auto (no custom columns)")}),n.createElement(CM,null,this._renderDefinedList(!1),this.state.columnsForAdmin&&Object.keys(this.state.columnsForAdmin).sort().map(e=>{var t;return(t=this.state.columnsForAdmin)==null?void 0:t[e].map(s=>{var r;return n.createElement(wM,{onClick:()=>{if(!this.state.columnsAuto){const o=[...this.state.columns||[]],M=`_${e}_${s.path}`,a=o.indexOf(M);a===-1?(o.push(M),o.sort()):o.splice(a,1),this.calculateColumnsVisibility(null,o),this.localStorage.setItem(`${this.props.dialogName||"App"}.columns`,JSON.stringify(o)),this.setState({columns:o})}},key:`${e}_${s.name}`},n.createElement(Yt,null,n.createElement(ne,{disabled:this.state.columnsAuto,edge:"start",checked:!this.state.columnsAuto&&((r=this.state.columns)==null?void 0:r.includes(`_${e}_${s.path}`)),disableRipple:!0})),n.createElement(nt,{primary:`${s.name} (${e})`}))})}),this._renderDefinedList(!0))),n.createElement(me,null,n.createElement(X,{variant:"contained",onClick:()=>this.setState({columnsSelectorShow:!1}),color:"primary",startIcon:n.createElement(ge,null)},this.texts.close))):null}async getAdditionalColumns(){try{const e=await this.props.socket.getAdapters();let t=null;return e.forEach(s=>t=this.parseObjectForAdmins(t,s)),t}catch(e){return console.error(`Cannot get adapters: ${e}`),null}}checkUnsubscribes(){for(let e=this.subscribes.length-1;e>=0;e--)this.recordStates.includes(this.subscribes[e])||this.unsubscribe(this.subscribes[e]);this.recordStates=[]}findItem(e,t,s,r){if(t||=e.split("."),s||=this.root,!s||!t.length)return null;if(r=(r?`${r}.`:"")+t.shift(),s.children){const o=s.children.find(M=>M.data.id===r);if(o){if(o.data.id===e)return o;if(t.length)return this.findItem(e,t,o,r)}else return null}return null}onStateChange=(e,t)=>{if(this.states[e]){const s=this.findItem(e);s!=null&&s.data.state&&(s.data.state=void 0)}t?this.states[e]=t:delete this.states[e],this.pausedSubscribes?this.statesUpdateTimer&&(clearTimeout(this.statesUpdateTimer),this.statesUpdateTimer=null):this.statesUpdateTimer||(this.statesUpdateTimer=setTimeout(()=>{this.statesUpdateTimer=null,this.forceUpdate()},300))};parseObjectForAdmins(e,t){var s;if((s=t.common)!=null&&s.adminColumns&&t.common.name){const r=t.common.adminColumns;let o;r&&typeof r!="object"?o=[r]:r&&(o=r);let M;r?M=o.map(a=>{if(typeof a!="object")return{path:a,name:a.split(".").pop()};const u=a;return u.objTypes&&typeof u.objTypes!="object"?u.objTypes=[u.objTypes]:u.objTypes||(u.objTypes=void 0),!u.name&&u.path?{path:u.path,name:u.path.split(".").pop(),width:u.width,edit:!!u.edit,type:u.type,objTypes:u.objTypes}:u.path?{path:u.path,name:Re(u.name||"",this.props.lang),width:u.width,edit:!!u.edit,type:u.type,objTypes:u.objTypes}:(console.warn(`Admin columns for ${t._id} ignored, because path not found`),null)}).filter(a=>a):M=null,M!=null&&M.length&&(e||={},e[t.common.name]=M.sort((a,u)=>a.path>u.path?-1:a.path{if(Array.isArray(e)){let t=null;e.forEach(s=>{const{newInnerState:r,filtered:o}=this.processOnObjectChangeElement(s.id,s.obj);o||(r&&t?Object.assign(t,r):t=r)}),t&&this.setState(t),this.afterObjectUpdated()}};onObjectChange=(e,t)=>{const{newInnerState:s,filtered:r}=this.processOnObjectChangeElement(e,t);r||(s&&this.setState(s),this.afterObjectUpdated())};afterObjectUpdated(){!this.objectsUpdateTimer&&this.objects&&(this.objectsUpdateTimer=setTimeout(()=>{this.objectsUpdateTimer=null;const{info:e,root:t}=La(this.objects,{imagePrefix:this.props.imagePrefix,root:this.props.root,lang:this.props.lang,themeType:this.props.themeType});this.root=t,this.info=e,this.pausedSubscribes||this.doFilter()},500))}updateAliases(e){var s,r,o;if(!this.objects||!((s=this.info)!=null&&s.aliasesMap)||!(e!=null&&e.startsWith("alias.")))return;const t=Object.keys(this.objects).filter(M=>M.startsWith("alias.0"));this.info.aliasesMap={};for(const M of t){const a=this.objects[M];if((o=(r=a==null?void 0:a.common)==null?void 0:r.alias)!=null&&o.id)if(typeof a.common.alias.id=="string"){const u=a.common.alias.id;this.info.aliasesMap[u]?this.info.aliasesMap[u].includes(M)||this.info.aliasesMap[u].push(M):this.info.aliasesMap[u]=[M]}else{const u=a.common.alias.id.read;u&&(this.info.aliasesMap[u]?this.info.aliasesMap[u].includes(M)||this.info.aliasesMap[u].push(M):this.info.aliasesMap[u]=[M]);const l=a.common.alias.id.write;l&&(this.info.aliasesMap[l]?this.info.aliasesMap[l].includes(M)||this.info.aliasesMap[l].push(M):this.info.aliasesMap[l]=[M])}}}processOnObjectChangeElement(e,t){const s=t==null?void 0:t.type;if(t&&typeof this.props.filterFunc=="function"&&!this.props.filterFunc(t)&&s!=="channel"&&s!=="device"&&s!=="folder"&&s!=="adapter"&&s!=="instance")return{newInnerState:null,filtered:!0};let r=null;if(e.startsWith("system.adapter.")&&(t==null?void 0:t.type)==="adapter"){const o=JSON.parse(JSON.stringify(this.state.columnsForAdmin));this.parseObjectForAdmins(o,t),JSON.stringify(this.state.columnsForAdmin)!==JSON.stringify(o)&&(r={columnsForAdmin:o})}return this.objects||={},t?this.objects[e]=t:this.objects[e]&&delete this.objects[e],this.updateAliases(e),{newInnerState:r,filtered:!1}}subscribe(e){this.subscribes.includes(e)||(this.subscribes.push(e),this.pausedSubscribes||this.props.socket.subscribeState(e,this.onStateChange).catch(t=>console.error(`Cannot subscribe on state ${e}: ${t}`)))}unsubscribe(e){const t=this.subscribes.indexOf(e);t!==-1&&(this.subscribes.splice(t,1),this.states[e]&&delete this.states[e],this.props.socket.unsubscribeState(e,this.onStateChange),this.pausedSubscribes&&console.warn("Unsubscribe during pause?"))}pauseSubscribe(e){!this.pausedSubscribes&&e?(this.pausedSubscribes=!0,this.subscribes.forEach(t=>this.props.socket.unsubscribeState(t,this.onStateChange))):this.pausedSubscribes&&!e&&(this.pausedSubscribes=!1,this.subscribes.forEach(t=>this.props.socket.subscribeState(t,this.onStateChange)))}clearFilter(){JSON.stringify(this.state.filter)!==JSON.stringify(Ds)&&this.setState({filter:{...Ds},filterKey:this.state.filterKey+1},()=>{var e,t;this.doFilter(),(t=(e=this.props).onFilterChanged)==null||t.call(e,{...Ds})})}isFilterEmpty(){var e,t,s,r,o;return!!this.state.filter.id||!!this.state.filter.name||!!((e=this.state.filter.room)!=null&&e.length)||!!((t=this.state.filter.func)!=null&&t.length)||!!((s=this.state.filter.role)!=null&&s.length)||!!((r=this.state.filter.type)!=null&&r.length)||!!((o=this.state.filter.custom)!=null&&o.length)}getFilterInput(e){return n.createElement(jLe,{key:`${e}_${this.state.filterKey}`,styles:this.styles.filterInput,name:e,texts:this.texts,t:this.props.t,initialValue:this.state.filter[e],onChange:(t,s)=>{const r={...this.state.filter};s===void 0?delete r[t]:r[t]=s,this.setState({filter:r},()=>{var o,M;this.doFilter(),(M=(o=this.props).onFilterChanged)==null||M.call(o,r)})}})}getFilterSelect(e,t){return n.createElement(LLe,{key:`${e}_${this.state.filterKey}`,name:e,texts:this.texts,initialValue:this.state.filter[e]||[],values:t,onChange:(s,r)=>{const o={...this.state.filter};r===void 0?delete o[s]:o[s]=r,this.setState({filter:o},()=>{var M,a;this.doFilter(),(a=(M=this.props).onFilterChanged)==null||a.call(M,o)})}})}getFilterSelectRole(){return this.getFilterSelect("role",this.info.roles.map(e=>e.role))}getFilterSelectRoom(){const e=this.info.roomEnums.map(t=>{var s,r,o,M;return{name:Re((r=(s=this.objects[t])==null?void 0:s.common)==null?void 0:r.name,this.props.lang)||t.split(".").pop(),value:t,icon:n.createElement(xe,{src:((M=(o=this.objects[t])==null?void 0:o.common)==null?void 0:M.icon)||"",style:C.selectIcon})}});return this.getFilterSelect("room",e)}getFilterSelectFunction(){const e=this.info.funcEnums.map(t=>{var s,r,o,M;return{name:Re((r=(s=this.objects[t])==null?void 0:s.common)==null?void 0:r.name,this.props.lang)||t.split(".").pop(),value:t,icon:n.createElement(xe,{src:((M=(o=this.objects[t])==null?void 0:o.common)==null?void 0:M.icon)||"",style:C.selectIcon})}});return this.getFilterSelect("func",e)}getFilterSelectType(){const e=this.info.types.map(t=>({name:t,value:t,icon:Ta[t]||null}));return this.getFilterSelect("type",e)}getFilterSelectCustoms(){if(this.info.customs.length>1){const e=this.info.customs.map(t=>({name:t==="_"?this.texts.filterCustomsWithout:t,value:t,icon:t==="_"?null:n.createElement(xe,{src:Xi(this.objects,t,this.props.lang,this.imagePrefix)||"",style:C.selectIcon})}));return this.getFilterSelect("custom",e)}return null}onExpandAll(e,t){var r;const s=e||this.root;t||=[],(r=s==null?void 0:s.children)==null||r.forEach(o=>{o.data.sumVisibility&&(t.push(o.data.id),this.onExpandAll(o,t))}),s===this.root&&(t.sort(),this.localStorage.setItem(`${this.props.dialogName||"App"}.objectExpanded`,JSON.stringify(t)),this.setState({expanded:t}))}onCollapseAll(){this.localStorage.setItem(`${this.props.dialogName||"App"}.objectExpanded`,JSON.stringify([])),this.localStorage.setItem(`${this.props.dialogName||"App"}.objectSelected`,"[]"),this.setState({expanded:[],depth:0,selected:[]},()=>this.onAfterSelect())}expandDepth(e,t,s){var r;e||=this.root,t>0&&((r=e.children)==null||r.forEach(o=>{o.data.sumVisibility&&(oi(s,o.data.id)||(s.push(o.data.id),s.sort()),t-1>0&&this.expandDepth(o,t-1,s))}))}static collapseDepth(e,t){return t.filter(s=>s.split(".").length<=e)}onExpandVisible(){if(this.state.depth<9){const e=this.state.depth+1,t=[...this.state.expanded];this.root&&this.expandDepth(this.root,e,t),this.localStorage.setItem(`${this.props.dialogName||"App"}.objectExpanded`,JSON.stringify(t)),this.setState({depth:e,expanded:t})}}onStatesViewVisible(){const e=!this.state.statesView;this.localStorage.setItem(`${this.props.dialogName||"App"}.objectStatesView`,JSON.stringify(e)),this.setState({statesView:e})}onCollapseVisible(){if(this.state.depth>0){const e=this.state.depth-1,t=Ki.collapseDepth(e,this.state.expanded);this.localStorage.setItem(`${this.props.dialogName||"App"}.objectExpanded`,JSON.stringify(t)),this.setState({depth:e,expanded:t})}}getEnumsForId=e=>{const t=[];return this.info.enums.forEach(s=>{var r,o,M;if((M=(o=(r=this.objects[s])==null?void 0:r.common)==null?void 0:o.members)!=null&&M.includes(e)){const a={_id:this.objects[s]._id,common:JSON.parse(JSON.stringify(this.objects[s].common)),native:this.objects[s].native,type:"enum"};a.common&&(delete a.common.members,delete a.common.custom,delete a.common.mobile),t.push(a)}}),t.length?t:void 0};_createAllEnums=async(e,t)=>{var s,r;for(let o=0;or)break}return e}return[]}async _exportObjects(e){var o;if(e.isAll){la("allObjects.json",this.objects,e);return}if(!(this.state.selected.length||this.state.selectedNonObject)){window.alert(this.props.t("ra_Save of objects-tree is not possible"));return}const t={},s=this.state.selected[0]||this.state.selectedNonObject,r=this._getSelectedIdsForExport();for(const M of r){if(t[M]=JSON.parse(JSON.stringify(this.objects[M])),((o=t[M])==null?void 0:o.type)==="state"&&!e.noStatesByExportImport){const a=await this.props.socket.getState(M);a&&(t[M].val=a.val,t[M].ack=a.ack)}if(t[M].common){const a=this.getEnumsForId(M);a&&(t[M].common.enums=a)}}la(`${s}.json`,t,e)}renderExportDialog(){return this.state.showExportDialog===!1?null:n.createElement(de,{open:!0,maxWidth:"lg"},n.createElement(Ie,null,this.props.t("ra_Select type of export")),n.createElement(Ae,null,n.createElement(Jt,null,this.state.filter.expertMode||this.state.showAllExportOptions?n.createElement(n.Fragment,null,this.props.t("ra_You can export all objects or just the selected branch."),n.createElement("br",null),this.props.t("ra_Selected %s object(s)",this.state.showExportDialog),n.createElement("br",null),n.createElement(H,{control:n.createElement(ne,{checked:this.state.noStatesByExportImport,onChange:e=>this.setState({noStatesByExportImport:e.target.checked})}),label:this.props.t("ra_Do not export values of states")}),n.createElement("br",null),this.props.t("These options can reduce the size of the export file:"),n.createElement(H,{control:n.createElement(ne,{checked:this.state.beautifyJsonExport,onChange:e=>this.setState({beautifyJsonExport:e.target.checked})}),label:this.props.t("Beautify JSON output")}),n.createElement("br",null),n.createElement(H,{control:n.createElement(ne,{checked:this.state.excludeSystemRepositoriesFromExport,onChange:e=>this.setState({excludeSystemRepositoriesFromExport:e.target.checked})}),label:this.props.t("Exclude system repositories from export JSON")}),n.createElement(H,{control:n.createElement(ne,{checked:this.state.excludeTranslations,onChange:e=>this.setState({excludeTranslations:e.target.checked})}),label:this.props.t("Exclude translations (except english) from export JSON")})):null)),n.createElement(me,null,this.state.filter.expertMode||this.state.showAllExportOptions?n.createElement(X,{color:"grey",variant:"outlined",onClick:()=>this.setState({showExportDialog:!1,showAllExportOptions:!1},()=>this._exportObjects({isAll:!0,noStatesByExportImport:this.state.noStatesByExportImport,beautify:this.state.beautifyJsonExport,excludeSystemRepositories:this.state.excludeSystemRepositoriesFromExport,excludeTranslations:this.state.excludeTranslations}))},n.createElement("span",{style:{marginRight:8}},this.props.t("ra_All objects")),"(",Object.keys(this.objects).length,")"):n.createElement(X,{color:"grey",variant:"outlined",startIcon:n.createElement(No,null),onClick:()=>this.setState({showAllExportOptions:!0})},this.props.t("ra_Advanced options")),n.createElement(X,{color:"primary",variant:"contained",autoFocus:!0,onClick:()=>this.setState({showExportDialog:!1,showAllExportOptions:!1},()=>this._exportObjects({isAll:!1,noStatesByExportImport:this.state.noStatesByExportImport,beautify:this.state.beautifyJsonExport,excludeSystemRepositories:this.state.excludeSystemRepositoriesFromExport,excludeTranslations:this.state.excludeTranslations}))},n.createElement("span",{style:{marginRight:8}},this.props.t("ra_Only selected")),"(",this.state.showExportDialog,")"),n.createElement(X,{color:"grey",variant:"contained",onClick:()=>this.setState({showExportDialog:!1,showAllExportOptions:!1}),startIcon:n.createElement(ge,null)},this.props.t("ra_Cancel"))))}renderRenameDialog(){var t;if(!this.state.showRenameDialog)return null;const e=this.props.objectMoveRenameDialog;return n.createElement(e,{expertMode:this.props.expertMode,onClose:()=>this.setState({showRenameDialog:null}),id:this.state.showRenameDialog.id,childrenIds:this.state.showRenameDialog.childrenIds,theme:this.props.theme,socket:this.props.socket,t:this.props.t,objectType:(t=this.objects[this.state.showRenameDialog.id])==null?void 0:t.type})}async parseJsonFile(e){try{const t=JSON.parse(e),s=Object.keys(t).length,r=t._id;if(r===void 0&&s)await this.loadObjects(t),window.alert(this.props.t("ra_%s object(s) processed",s));else{if(!r)return window.alert(this.props.t("ra_Invalid structure"));try{let o,M,a;if(t.common.enums&&(o=t.common.enums,delete t.common.enums),t.val&&(M=t.val,delete t.val),t.ack!==void 0&&(a=t.ack,delete t.ack),await this.props.socket.setObject(t._id,t),t.type==="state")if(M!=null)await this.props.socket.setState(t._id,M,a===void 0?!0:a);else{const u=await this.props.socket.getState(t._id);(!u||u.val===null||u.val===void 0)&&await this.props.socket.setState(t._id,t.common.def===void 0?null:t.common.def,!0)}o&&await this._createAllEnums(o,t._id),window.alert(this.props.t("ra_%s was imported",t._id))}catch(o){window.alert(o)}}}catch(t){window.alert(t)}}handleJsonUpload(e){var r;const t=e.target,s=((r=t.files)==null?void 0:r.length)&&t.files[0];if(s){const o=new FileReader;o.onload=M=>{var a;return this.parseJsonFile((a=M.target)==null?void 0:a.result),null},o.readAsText(s)}else window.alert(this.props.t("ra_Failed to open JSON File"))}toolTipObjectCreating=()=>{var s,r;const{t:e}=this.props;let t=[n.createElement("div",{key:1},e("ra_Only following structures of objects are available:")),n.createElement("div",{key:2},e("ra_Folder → State")),n.createElement("div",{key:3},e("ra_Folder → Channel → State")),n.createElement("div",{key:4},e("ra_Folder → Device → Channel → State")),n.createElement("div",{key:5},e("ra_Device → Channel → State")),n.createElement("div",{key:6},e("ra_Channel → State")),n.createElement("div",{key:7,style:{height:10}}),n.createElement("div",{key:8},e('ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".')),n.createElement("div",{key:9},e('ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").'))];if(this.state.selected.length||this.state.selectedNonObject){const o=this.state.selected[0]||this.state.selectedNonObject;if(!(o.split(".").length<2||this.objects[o]&&((s=this.objects[o])==null?void 0:s.type)==="state"))if(this.state.filter.expertMode)switch((r=this.objects[o])==null?void 0:r.type){case"device":t=[n.createElement("div",{key:1},e("ra_Only following structures of objects are available:")),n.createElement("div",{key:5},e("ra_Device → Channel → State")),n.createElement("div",{key:7,style:{height:10}}),n.createElement("div",{key:8},e('ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".')),n.createElement("div",{key:9},e('ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").'))];break;case"folder":t=[n.createElement("div",{key:1},e("ra_Only following structures of objects are available:")),n.createElement("div",{key:2},e("ra_Folder → State")),n.createElement("div",{key:3},e("ra_Folder → Channel → State")),n.createElement("div",{key:4},e("ra_Folder → Device → Channel → State")),n.createElement("div",{key:7,style:{height:10}}),n.createElement("div",{key:8},e('ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".')),n.createElement("div",{key:9},e('ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").'))];break;case"channel":t=[n.createElement("div",{key:1},e("ra_Only following structures of objects are available:")),n.createElement("div",{key:1},e("ra_Channel → State")),n.createElement("div",{key:7,style:{height:10}}),n.createElement("div",{key:8},e('ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".')),n.createElement("div",{key:9},e('ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").'))];break}else(o.startsWith("alias.0")||o.startsWith("0_userdata"))&&(t=[n.createElement("div",{key:1},e("ra_Only following structures of objects are available:")),n.createElement("div",{key:2},e("ra_Folder → State")),n.createElement("div",{key:3},e("ra_Folder → Channel → State")),n.createElement("div",{key:4},e("ra_Folder → Device → Channel → State")),n.createElement("div",{key:5},e("ra_Device → Channel → State")),n.createElement("div",{key:6},e("ra_Channel → State")),n.createElement("div",{key:7,style:{height:10}}),n.createElement("div",{key:7},e('ra_Non-experts may create new objects only in "0_userdata.0" or "alias.0".')),n.createElement("div",{key:8},e('ra_The experts may create objects everywhere but from second level (e.g. "vis.0" or "javascript.0").'))])}return t.length?t:e("ra_Add new child object to selected parent")};onOpenFile(){const e=document.createElement("input");e.setAttribute("type","file"),e.setAttribute("id","files"),e.setAttribute("opacity","0"),e.addEventListener("change",t=>this.handleJsonUpload(t),!1),e.click()}renderInputJsonDialog(){const e=this.props.objectBrowserInsertJsonObjects;return this.state.showImportDialog?n.createElement(e,{onClose:t=>{this.setState({showImportDialog:!1}),t&&this.parseJsonFile(t)},themeName:this.props.themeName,themeType:this.props.themeType,t:this.props.t}):null}getToolbar(){let e=!1;if(this.state.selected.length||this.state.selectedNonObject){const t=this.state.selected[0]||this.state.selectedNonObject;t.split(".").length<2||this.objects[t]&&this.objects[t].type==="state"?e=!1:(this.state.filter.expertMode||t.startsWith("alias.0")||t.startsWith("0_userdata"))&&(e=!0)}return n.createElement("div",{style:{display:"flex",width:"100%",alignItems:"center",overflowX:"auto"}},n.createElement("div",{style:{display:"flex",width:"100%",alignItems:"center"}},n.createElement(ae,{title:this.props.t("ra_Refresh tree"),slotProps:{popper:{sx:C.tooltip}}},n.createElement("div",null,n.createElement(P,{onClick:()=>this.refreshComponent(),disabled:this.state.updating,size:"large"},n.createElement(Fa,null)))),this.props.showExpertButton&&!this.props.expertMode&&n.createElement(ae,{title:this.props.t("ra_expertMode"),slotProps:{popper:{sx:C.tooltip}}},n.createElement(P,{key:"expertMode",color:this.state.filter.expertMode?"secondary":"default",onClick:()=>{const t={...this.state.filter};t.expertMode=!t.expertMode,this.localStorage.setItem(`${this.props.dialogName||"App"}.objectFilter`,JSON.stringify(t)),this.setState({filter:t})},size:"large"},n.createElement(No,null))),!this.props.disableColumnSelector&&this.props.width!=="xs"&&n.createElement(ae,{title:this.props.t("ra_Configure"),slotProps:{popper:{sx:C.tooltip}}},n.createElement(P,{key:"columnSelector",color:this.state.columnsAuto?"primary":"default",onClick:()=>this.setState({columnsSelectorShow:!0}),size:"large"},n.createElement(Ql,null))),this.props.width!=="xs"&&this.state.expandAllVisible&&n.createElement(ae,{title:this.props.t("ra_Expand all nodes"),slotProps:{popper:{sx:C.tooltip}}},n.createElement(P,{key:"expandAll",onClick:()=>this.onExpandAll(),size:"large"},n.createElement(bi,null))),n.createElement(ae,{title:this.props.t("ra_Collapse all nodes"),slotProps:{popper:{sx:C.tooltip}}},n.createElement(P,{key:"collapseAll",onClick:()=>this.onCollapseAll(),size:"large"},n.createElement(ms,null))),this.props.width!=="xs"&&n.createElement(ae,{title:this.props.t("ra_Expand one step node"),slotProps:{popper:{sx:C.tooltip}}},n.createElement(P,{key:"expandVisible",color:"primary",onClick:()=>this.onExpandVisible(),size:"large"},n.createElement(AM,{badgeContent:this.state.depth,color:"secondary",sx:t=>({badge:{right:3,top:3,border:`2px solid ${t.palette.background.paper}`,padding:"0 4px"}})},n.createElement(bi,null)))),this.props.width!=="xs"&&n.createElement(ae,{title:this.props.t("ra_Collapse one step node"),slotProps:{popper:{sx:C.tooltip}}},n.createElement(P,{key:"collapseVisible",color:"primary",onClick:()=>this.onCollapseVisible(),size:"large"},n.createElement(AM,{sx:t=>({badge:{right:3,top:3,border:`2px solid ${t.palette.background.paper}`,padding:"0 4px"}}),badgeContent:this.state.depth,color:"secondary"},n.createElement(ms,null)))),this.props.objectStatesView&&n.createElement(ae,{title:this.props.t("ra_Toggle the states view"),slotProps:{popper:{sx:C.tooltip}}},n.createElement(P,{onClick:()=>this.onStatesViewVisible(),size:"large"},n.createElement(vl,{color:this.state.statesView?"primary":"inherit"}))),n.createElement(ae,{title:this.props.t("ra_Show/Hide object descriptions"),slotProps:{popper:{sx:C.tooltip}}},n.createElement(P,{onClick:()=>{this.localStorage.setItem(`${this.props.dialogName||"App"}.desc`,this.state.showDescription?"false":"true"),this.setState({showDescription:!this.state.showDescription})},size:"large"},n.createElement(Ul,{color:this.state.showDescription?"primary":"inherit"}))),this.props.objectAddBoolean?n.createElement(ae,{title:this.toolTipObjectCreating(),slotProps:{popper:{sx:C.tooltip}}},n.createElement("div",null,n.createElement(P,{disabled:!e,onClick:()=>this.setState({modalNewObj:{id:this.state.selected[0]||this.state.selectedNonObject}}),size:"large"},n.createElement(Fr,null)))):null,this.props.objectImportExport&&n.createElement(ae,{title:this.props.t("ra_Add objects tree from JSON file"),slotProps:{popper:{sx:C.tooltip}}},n.createElement(P,{onClick:t=>{this.props.objectBrowserInsertJsonObjects?this.setState({showImportMenu:t.currentTarget}):this.onOpenFile()},size:"large"},n.createElement(Ri,null))),this.props.objectBrowserInsertJsonObjects?n.createElement(ss,{anchorEl:this.state.showImportMenu,open:!!this.state.showImportMenu,onClose:()=>this.setState({showImportMenu:null})},n.createElement(te,{onClick:()=>this.setState({showImportMenu:null},()=>this.onOpenFile())},n.createElement(Yt,null,n.createElement(bl,null)),n.createElement(nt,null,this.props.t("ra_From file"))),n.createElement(te,{onClick:()=>this.setState({showImportMenu:null,showImportDialog:!0})},n.createElement(Yt,null,n.createElement($l,null)),n.createElement(nt,null,this.props.t("ra_From text")))):null,this.props.objectImportExport&&(!!this.state.selected.length||this.state.selectedNonObject)&&n.createElement(ae,{title:this.props.t("ra_Save objects tree as JSON file"),slotProps:{popper:{sx:C.tooltip}}},n.createElement(P,{onClick:()=>this.setState({showExportDialog:this._getSelectedIdsForExport().length}),size:"large"},n.createElement(Ri,{style:{transform:"rotate(180deg)"}})))),!!this.props.objectBrowserEditObject&&this.props.width!=="xs"&&n.createElement("div",{style:{display:"flex",whiteSpace:"nowrap"}},`${this.props.t("ra_Objects")}: ${Object.keys(this.info.objects).length}, ${this.props.t("ra_States")}: ${Object.keys(this.info.objects).filter(t=>this.info.objects[t].type==="state").length}`),this.props.objectEditBoolean&&n.createElement(ae,{title:this.props.t("ra_Edit custom config"),slotProps:{popper:{sx:C.tooltip}}},n.createElement(P,{onClick:()=>{var s;const t=this.root?wu(this.root,"state",this.objects):[];t.length?(this.pauseSubscribe(!0),t.length===1&&(this.localStorage.setItem(`${this.props.dialogName||"App"}.objectSelected`,this.state.selected[0]),(s=this.props.router)==null||s.doNavigate(null,"custom",this.state.selected[0])),this.setState({customDialog:t,customDialogAll:!0})):this.setState({toast:this.props.t("ra_please select object")})},size:"large"},n.createElement(Pl,null))))}toggleExpanded(e){const t=JSON.parse(JSON.stringify(this.state.expanded)),s=t.indexOf(e);s===-1?(t.push(e),t.sort()):t.splice(s,1),this.localStorage.setItem(`${this.props.dialogName||"App"}.objectExpanded`,JSON.stringify(t)),this.setState({expanded:t})}onCopy(e,t){e.stopPropagation(),e.preventDefault(),t&&(E.copyToClipboard(t),t.length<50?this.setState({toast:this.props.t("ra_Copied %s",t)}):this.setState({toast:this.props.t("ra_Copied")}))}renderTooltipAccessControl=e=>{if(!e)return null;const t=[{value:"0x400",valueNum:1024,title:"read",group:"Owner"},{value:"0x200",valueNum:512,title:"write",group:"Owner"},{value:"0x40",valueNum:64,title:"read",group:"Group"},{value:"0x20",valueNum:32,title:"write",group:"Group"},{value:"0x4",valueNum:4,title:"read",group:"Everyone"},{value:"0x2",valueNum:2,title:"write",group:"Everyone"}],s=[],r=o=>{const M=e[o];t.forEach((a,u)=>{M&a.valueNum&&s.push(n.createElement("span",{key:o+u},this.texts[`acl${a.group}_${a.title}_${o}`],",",n.createElement("span",{style:o==="object"?C.rightsObject:C.rightsState},a.value)))})};return s.push(n.createElement("span",{key:"group"},`${this.texts.ownerGroup}: ${(e.ownerGroup||"").replace("system.group.","")}`)),s.push(n.createElement("span",{key:"owner"},`${this.texts.ownerUser}: ${(e.owner||"").replace("system.user.","")}`)),r("object"),e.state&&r("state"),s.length?n.createElement("span",{style:C.tooltipAccessControl},s.map(o=>o)):null};renderColumnButtons(e,t){var M,a,u,l;if(!t.data.obj)return this.props.onObjectDelete||this.props.objectEditOfAccessControl?n.createElement("div",{style:C.buttonDiv},this.state.filter.expertMode&&this.props.objectEditOfAccessControl?n.createElement(P,{sx:{...C.cellButtonsButton,...C.cellButtonsEmptyButton,...C.cellButtonMinWidth},onClick:()=>this.setState({modalEditOfAccess:!0,modalEditOfAccessObjData:t.data}),size:"large"},n.createElement("div",{style:{height:15}},"---")):null,this.props.onObjectDelete&&((M=t.children)!=null&&M.length)?n.createElement(P,{sx:{...C.cellButtonsButton,...C.cellButtonsButtonAlone},size:"small","aria-label":"delete",title:this.texts.deleteObject,onClick:()=>{var j;const N=Object.keys(this.objects);N.sort();let c=0;const L=`${e}.`;for(let g=0;gL)break;this.props.onObjectDelete&&this.props.onObjectDelete(e,!!((j=t.children)!=null&&j.length),!1,c+1)}},n.createElement(ut,{style:C.cellButtonsButtonIcon})):null):null;t.data.aclTooltip=t.data.aclTooltip||this.renderTooltipAccessControl(t.data.obj.acl);const s=t.data.obj.acl?t.data.obj.type==="state"?t.data.obj.acl.state:t.data.obj.acl.object:0,r=t.data.obj.acl&&(t.data.obj.type==="state"?this.systemConfig.common.defaultNewAcl.state:this.systemConfig.common.defaultNewAcl.object),o=this.state.filter.expertMode||ga(t.data.id);return[this.state.filter.expertMode&&this.props.objectEditOfAccessControl?n.createElement(ae,{key:"acl",title:t.data.aclTooltip,slotProps:{popper:{sx:C.tooltip}}},n.createElement(P,{sx:{...C.cellButtonsButton,...C.cellButtonMinWidth,opacity:1},onClick:()=>this.setState({modalEditOfAccess:!0,modalEditOfAccessObjData:t.data}),size:"large"},n.createElement("div",{style:C.aclText},Number.isNaN(Number(s))?Number(r).toString(16):Number(s).toString(16)))):n.createElement("div",{key:"aclEmpty",style:C.cellButtonMinWidth}),o?n.createElement(P,{key:"edit",sx:{marginRight:"2px",...C.cellButtonsButton},size:"small","aria-label":"edit",title:this.texts.editObject,onClick:()=>{this.localStorage.setItem(`${this.props.dialogName||"App"}.objectSelected`,e),this.setState({editObjectDialog:e,editObjectAlias:!1})}},n.createElement(Ks,{style:C.cellButtonsButtonIcon})):n.createElement(W,{component:"div",key:"editDisabled",sx:C.cellButtonsButton}),this.props.onObjectDelete&&((a=t.children)!=null&&a.length||!((u=t.data.obj.common)!=null&&u.dontDelete))?n.createElement(P,{key:"delete",sx:C.cellButtonsButton,size:"small","aria-label":"delete",onClick:()=>{var j,g,y;const N=Object.keys(this.objects);N.sort();let c=0;const L=`${e}.`;for(let d=0;dL)break;this.props.onObjectDelete&&this.props.onObjectDelete(e,!!((j=t.children)!=null&&j.length),!((y=(g=t.data.obj)==null?void 0:g.common)!=null&&y.dontDelete),c)},title:this.texts.deleteObject},n.createElement(ut,{style:C.cellButtonsButtonIcon})):null,this.props.objectCustomDialog&&this.info.hasSomeCustoms&&t.data.obj.type==="state"&&((l=t.data.obj.common)==null?void 0:l.type)!=="file"?n.createElement(P,{sx:{...C.cellButtonsButton,...t.data.hasCustoms?this.styles.cellButtonsButtonWithCustoms:C.cellButtonsButtonWithoutCustoms},key:"custom",size:"small","aria-label":"config",title:this.texts.customConfig,onClick:()=>{var N;this.localStorage.setItem(`${this.props.dialogName||"App"}.objectSelected`,e),this.pauseSubscribe(!0),(N=this.props.router)==null||N.doNavigate(null,"customs",e),this.setState({customDialog:[e],customDialogAll:!1})}},n.createElement(Hr,{style:C.cellButtonsButtonIcon})):null]}readHistory(e){var t,s;if(window.sparkline&&this.defaultHistory&&((s=(t=this.objects[e])==null?void 0:t.common)!=null&&s.custom)&&this.objects[e].common.custom[this.defaultHistory]){const r=new Date;r.setHours(r.getHours()-24),r.setMinutes(0),r.setSeconds(0),r.setMilliseconds(0);const o=r.getTime();this.props.socket.getHistory(e,{instance:this.defaultHistory,start:o,end:Date.now(),step:36e5,from:!1,ack:!1,q:!1,addId:!1,aggregate:"minmax"}).then(M=>{const a=window.document.getElementsByClassName("sparkline");for(let u=0;uconsole.warn(`Cannot read history: ${M}`))}}getTooltipInfo(e,t){var l,N,c;const s=this.objects[e],r=this.states[e],{valFull:o,fileViewer:M}=Qr({state:r,obj:s,texts:this.texts,dateFormat:this.props.dateFormat||this.systemConfig.common.dateFormat,isFloatComma:this.props.isFloatComma===void 0?this.systemConfig.common.isFloatComma:this.props.isFloatComma,full:!0}),a=[];o==null||o.forEach(L=>{L.t===this.texts.quality&&r.q?(a.push(n.createElement("div",{style:C.cellValueTooltipBoth,key:L.t},L.t,": ",L.v)),L.nbr||a.push(n.createElement("br",{key:`${L.t}_br`}))):(a.push(n.createElement("div",{style:C.cellValueTooltipTitle,key:L.t},L.t,": ")),a.push(n.createElement("div",{style:C.cellValueTooltipValue,key:`${L.t}_v`},L.v)),L.nbr||a.push(n.createElement("br",{key:`${L.t}_br`})))});const u=((l=s==null?void 0:s.common)==null?void 0:l.role)||"";M==="image"?a.push(n.createElement("img",{style:C.cellValueTooltipImage,src:r.val,alt:e})):u==="url"||s.common.role==="url.self"||s.common.role==="url.blank"?a.unshift(n.createElement("div",{key:"ctrl",style:{textDecoration:"underline",fontWeight:"bold"}},this.texts.ctrlForLink)):this.defaultHistory&&((c=(N=s==null?void 0:s.common)==null?void 0:N.custom)!=null&&c[this.defaultHistory])&&a.push(n.createElement("svg",{key:"sparkline",className:"sparkline","data-id":e,style:{fill:"#3d85de"},width:"200",height:"30",strokeWidth:"3"})),this.setState({tooltipInfo:{el:a,id:e}},()=>t&&t())}renderColumnValue(e,t,s){var u,l;const r=t.data.obj;if(!r||!this.states)return null;if(((u=r.common)==null?void 0:u.type)==="file")return n.createElement(W,{component:"div",sx:{...C.cellValueText,...C.cellValueFile}},"[file]");if(!this.states[e])return r.type==="state"&&(this.recordStates.includes(e)||this.recordStates.push(e),this.states[e]={val:null},this.subscribe(e)),null;this.recordStates.includes(e)||this.recordStates.push(e);const o=this.states[e];let M=t.data.state;if(!M){const{valText:N}=Qr({state:o,obj:r,texts:this.texts,dateFormat:this.props.dateFormat||this.systemConfig.common.dateFormat,isFloatComma:this.props.isFloatComma===void 0?this.systemConfig.common.isFloatComma:this.props.isFloatComma}),c=[];if(t.data.state={valTextRx:c},c.push(n.createElement("span",{className:`newValueBrowser-${this.props.themeType||"light"}`,key:`${N.v.toString()}valText`,style:{whiteSpace:"nowrap",display:"inline-block",overflow:"hidden",textOverflow:"ellipsis"}},N.v.toString())),N.u&&c.push(n.createElement("span",{className:`newValueBrowser-${this.props.themeType||"light"}`,style:C.cellValueTextUnit,key:`${N.v.toString()}unit`},N.u)),N.s!==void 0&&c.push(n.createElement("span",{style:C.cellValueTextState,className:`newValueBrowser-${this.props.themeType||"light"}`,key:`${N.v.toString()}states`},"(",N.s,")")),!s){const L=N.c!==void 0?N.c:N.v||"";c.push(n.createElement(Ts,{className:"copyButton",style:this.styles.iconCopy,onClick:j=>this.onCopy(j,L),key:"cc"}))}M=t.data.state}M.style=TLe({state:o,isExpertMode:this.state.filter.expertMode,isButton:t.data.button,nonAckColor:this.props.theme.palette.nonAck});let a=M.valTextRx;return this.state.filter.expertMode||(t.data.button?a=[n.createElement(uLe,{key:"button",style:{color:M.style.color,...C.cellValueButton}})]:t.data.switch&&(a=[n.createElement(Di,{key:"switch",sx:{"& .MuiSwitch-thumb":{color:M.style.color},"& .MuiSwitch-track":{backgroundColor:this.states[e].val&&this.state.selected.includes(e)?this.props.themeType==="dark"?"#FFF !important":"#111 !important":void 0}},checked:!!this.states[e].val})])),n.createElement(ae,{key:"value",title:(l=this.state.tooltipInfo)==null?void 0:l.el,slotProps:{popper:{sx:C.cellValueTooltipBox},tooltip:{sx:C.cellValueTooltip}},onOpen:()=>this.getTooltipInfo(e,()=>this.readHistory(e)),onClose:()=>{var N;return((N=this.state.tooltipInfo)==null?void 0:N.id)===e&&this.setState({tooltipInfo:null})}},n.createElement(W,{component:"div",style:M.style,className:t.data.url?"iob-link":void 0,sx:{...C.cellValueText,height:s?void 0:Ye,"& .admin-button:active":{transform:"translate(0, 2px)"}}},a))}_syncEnum(e,t,s,r){var a,u,l;if(!(t!=null&&t.length)){r&&r();return}const o=t.pop()||"",M=[];if((a=this.info.objects[o])!=null&&a.common){if((u=this.info.objects[o].common.members)!=null&&u.length){const N=this.info.objects[o].common.members.indexOf(e);if(N!==-1&&!s.includes(o)){const c=JSON.parse(JSON.stringify(this.info.objects[o]));c.common.members.splice(N,1),M.push(this.props.socket.setObject(o,c).then(()=>this.info.objects[o]=c).catch(L=>this.showError(L)))}}if(s.includes(o)&&!((l=this.info.objects[o].common.members)!=null&&l.includes(e))){const N=JSON.parse(JSON.stringify(this.info.objects[o]));N.common.members||=[],N.common.members.push(e),N.common.members.sort(),M.push(this.props.socket.setObject(o,N).then(()=>this.info.objects[o]=N).catch(c=>this.showError(c)))}}Promise.all(M).then(()=>{setTimeout(()=>this._syncEnum(e,t,s,r),0)})}syncEnum(e,t,s){const r=[...this.info[t==="func"?"funcEnums":"roomEnums"]];return new Promise(o=>{this._syncEnum(e,r,s,()=>{o()})})}renderEnumDialog(){if(!this.state.enumDialog)return null;const e=this.state.enumDialog.type,t=this.state.enumDialog.item,s=this.state.enumDialogEnums,r=this.state.enumDialog.enumsOriginal,o=(e==="room"?this.info.roomEnums:this.info.funcEnums).map(M=>{var a,u;return{name:Re(((u=(a=this.objects[M])==null?void 0:a.common)==null?void 0:u.name)||M.split(".").pop()||"",this.props.lang),value:M,icon:Xi(this.objects,M,this.props.lang,this.imagePrefix)}}).sort((M,a)=>M.name>a.name?1:-1);return o.forEach(M=>{M.icon&&typeof M.icon=="string"&&(M.icon=n.createElement(W,{style:C.enumIconDiv},n.createElement("img",{src:M.icon,style:C.enumIcon,alt:M.name})))}),n.createElement(de,{sx:{"& .MuiPaper-root":C.enumDialog},onClose:()=>this.setState({enumDialog:null}),"aria-labelledby":"enum-dialog-title",open:!0},n.createElement(Ie,{id:"enum-dialog-title",style:{display:"flex",justifyContent:"space-between",width:"100%",flexWrap:"nowrap",gap:8,paddingRight:12}},e==="func"?this.props.t("ra_Define functions"):this.props.t("ra_Define rooms"),n.createElement(Ct,{color:"primary",disabled:r===JSON.stringify(s),size:"small",onClick:()=>this.syncEnum(t.data.id,e,s).then(()=>this.setState({enumDialog:null,enumDialogEnums:null}))},n.createElement(ve,null))),n.createElement(CM,{sx:{"&.MuiList-root":C.enumList}},o.map(M=>{let a,u,l;typeof M=="object"?(a=M.value,u=M.name,l=M.icon):(a=M,u=M);const N=`checkbox-list-label-${a}`;return n.createElement(ul,{sx:C.headerCellSelectItem,key:a,onClick:()=>{const c=s.indexOf(a),L=JSON.parse(JSON.stringify(this.state.enumDialogEnums));c===-1?(L.push(a),L.sort()):L.splice(c,1),this.setState({enumDialogEnums:L})},secondaryAction:l},n.createElement(Yt,{sx:{"&.MuiListItemIcon-root":C.enumCheckbox}},n.createElement(ne,{edge:"start",checked:s.includes(a),tabIndex:-1,disableRipple:!0,slotProps:{input:{"aria-labelledby":N}}})),n.createElement(nt,{id:N},u))})))}renderEditRoleDialog(){var e,t;if(!this.state.roleDialog||!this.props.objectBrowserEditRole)return null;if(this.state.roleDialog&&this.props.objectBrowserEditRole){const s=this.props.objectBrowserEditRole;return n.createElement(s,{key:"objectBrowserEditRole",id:this.state.roleDialog,socket:this.props.socket,t:this.props.t,roleArray:this.info.roles,commonType:(t=(e=this.info.objects[this.state.roleDialog])==null?void 0:e.common)==null?void 0:t.type,onClose:r=>{r&&(this.info.objects[this.state.roleDialog]=r),this.setState({roleDialog:null})}})}return null}onColumnsEditCustomDialogClose(e){var s,r;const t=this.customColumnDialog;if(e){let o=t.value;t.type==="boolean"?o=o==="true"||o===!0:t.type==="number"&&(o=parseFloat(o)),this.customColumnDialog=null,this.props.socket.getObject(((r=(s=this.state.columnsEditCustomDialog)==null?void 0:s.obj)==null?void 0:r._id)||"").then(M=>{var a;if(M&&DLe(M,(a=this.state.columnsEditCustomDialog)==null?void 0:a.it,o))return this.props.socket.setObject(M._id,M);throw new Error(this.props.t("ra_Cannot update attribute, because not found in the object"))}).then(()=>this.setState({columnsEditCustomDialog:null})).catch(M=>this.showError(M))}else this.customColumnDialog=null,this.setState({columnsEditCustomDialog:null})}renderColumnsEditCustomDialog(){if(!this.state.columnsEditCustomDialog)return null;if(!this.customColumnDialog){const e=ja(this.state.columnsEditCustomDialog.obj,this.state.columnsEditCustomDialog.it);this.customColumnDialog={type:this.state.columnsEditCustomDialog.it.type||typeof e,initValue:(e??"").toString(),value:(e??"").toString()}}return n.createElement(de,{onClose:()=>this.setState({columnsEditCustomDialog:null}),maxWidth:"md","aria-labelledby":"custom-dialog-title",open:!0},n.createElement(Ie,{id:"custom-dialog-title"},`${this.props.t("ra_Edit object field")}: ${this.state.columnsEditCustomDialog.obj._id}`),n.createElement(Ae,null,n.createElement(Jt,{id:"alert-dialog-description"},this.customColumnDialog.type==="boolean"?n.createElement(H,{control:n.createElement(ne,{onKeyUp:e=>e.key==="Enter"&&this.onColumnsEditCustomDialogClose(!0),defaultChecked:this.customColumnDialog.value==="true",onChange:e=>{const t=this.customColumnDialog;t.value=e.target.checked.toString();const s=t.value!==t.initValue;s===!this.state.customColumnDialogValueChanged&&this.setState({customColumnDialogValueChanged:s})}}),label:`${this.state.columnsEditCustomDialog.it.name} (${this.state.columnsEditCustomDialog.it.pathText})`}):n.createElement(le,{variant:"standard",defaultValue:this.customColumnDialog.value,fullWidth:!0,onKeyUp:e=>e.key==="Enter"&&this.onColumnsEditCustomDialogClose(!0),label:`${this.state.columnsEditCustomDialog.it.name} (${this.state.columnsEditCustomDialog.it.pathText})`,onChange:e=>{const t=this.customColumnDialog;t.value=e.target.value;const s=t.value!==t.initValue;s===!this.state.customColumnDialogValueChanged&&this.setState({customColumnDialogValueChanged:s})},autoFocus:!0}))),n.createElement(me,null,n.createElement(X,{variant:"contained",onClick:()=>this.onColumnsEditCustomDialogClose(!0),disabled:!this.state.customColumnDialogValueChanged,color:"primary",startIcon:n.createElement(ve,null)},this.props.t("ra_Update")),n.createElement(X,{color:"grey",variant:"contained",onClick:()=>this.onColumnsEditCustomDialogClose(),startIcon:n.createElement(ge,null)},this.props.t("ra_Cancel"))))}renderCustomValue(e,t,s){const r=ja(e,t);return r!=null?t.edit&&!this.props.notEditable&&(!t.objTypes||t.objTypes.includes(e.type))?n.createElement(W,{component:"div",style:{...C.columnCustom,...C.columnCustomEditable,...C[`columnCustom_${t.align}`]},onClick:()=>this.setState({columnsEditCustomDialog:{item:s,it:t,obj:e},customColumnDialogValueChanged:!1})},r):n.createElement(W,{component:"div",style:{...C.columnCustom,...C[`columnCustom_${t.align}`]}},r):null}renderAliasLink(e,t,s){const r=t||0,o=this.objects[this.info.aliasesMap[e][r]].common.alias.id;return o?n.createElement(W,{component:"div",onClick:M=>{M.stopPropagation(),M.preventDefault();const a=this.info.aliasesMap[e][r];this.info.aliasesMap[e].length>1&&this.setState({aliasMenu:""}),this.onSelect(a),setTimeout(()=>this.expandAllSelected(()=>this.scrollToItem(a)),100)},sx:s||this.styles.aliasAlone},n.createElement("span",{className:"admin-browser-arrow"},typeof o=="string"||o.read===e&&o.write===e?"↔":o.read===e?"→":"←"),this.info.aliasesMap[e][r]):null}renderLeaf(e,t,s){var Us,bs,$s,Ti,yi,lM,NM,LM,jM,gM,TM,yM,DM,dM;const r=e.data.id;s.count++,t=t===void 0?this.state.expanded.includes(r):t;let o;const M=e.data.obj,a=M==null?void 0:M.type;e.children||a==="folder"||a==="device"||a==="channel"||a==="meta"?o=t?n.createElement(bi,{style:this.styles.cellIdIconFolder,onClick:()=>this.toggleExpanded(r)}):n.createElement(ms,{style:this.styles.cellIdIconFolder,onClick:()=>this.toggleExpanded(r)}):M&&M.common&&M.common.write===!1&&M.type==="state"?o=n.createElement(sLe,{style:this.styles.cellIdIconDocument}):o=n.createElement(tLe,{style:this.styles.cellIdIconDocument});let u=null;e.data.icon&&(typeof e.data.icon=="string"?e.data.icon.length<3?u=n.createElement("span",{className:"iconOwn",style:C.cellIdIconOwn},e.data.icon):u=n.createElement(xe,{style:C.cellIdIconOwn,className:"iconOwn",src:e.data.icon,alt:""}):u=e.data.icon);const l=M==null?void 0:M.common,N=(M==null?void 0:M.type)&&Ta[M.type]||n.createElement("div",{className:"itemIcon"}),c=this.levelPadding*(e.data.level||0);if(e.data.lang!==this.props.lang){const{rooms:Q,per:q}=mu(this.info,r,this.props.lang);e.data.rooms=Q.join(", "),e.data.per=q;const{funcs:Ue,pef:we}=pu(this.info,r,this.props.lang);e.data.funcs=Ue.join(", "),e.data.pef=we,e.data.lang=this.props.lang}const L=this.props.multiSelect&&this.objects[r]&&(!this.props.types||this.props.types.includes(this.objects[r].type))?n.createElement(ne,{style:C.checkBox,checked:this.state.selected.includes(r)}):null;let j=!this.props.notEditable&&a==="state"&&(this.state.filter.expertMode||(l==null?void 0:l.write)!==!1);this.props.objectBrowserViewFile&&(l==null?void 0:l.type)==="file"&&(j=!0);const g=!this.props.notEditable&&this.objects[r]&&(this.state.filter.expertMode||a==="state"||a==="channel"||a==="device"),y=this.state.statesView&&(a==="state"||a==="channel"||a==="device");let d="";const I=[];if(y&&(d=(Us=this.states[r])==null?void 0:Us.from,d===void 0?d=" ":(d=d?d.replace(/^system\.adapter\.|^system\./,""):"",I.push(`${this.texts.stateChangedFrom} ${d}`)),M!=null&&M.user)){const Q=M.user.replace("system.user.","");d+=`/${Q}`,I.push(`${this.texts.stateChangedBy} ${Q}`)}M&&(M.from&&I.push(`${this.texts.objectChangedFrom} ${M.from.replace(/^system\.adapter\.|^system\./,"")}`),M.user&&I.push(`${this.texts.objectChangedBy} ${M.user.replace(/^system\.user\./,"")}`),M.ts&&I.push(`${this.texts.objectChangedByUser} ${E.formatDate(new Date(M.ts),this.props.dateFormat||this.systemConfig.common.dateFormat)}`));let m=!1,w=null;r.startsWith("alias.")&&((bs=l==null?void 0:l.alias)!=null&&bs.id)?(m=typeof l.alias.id=="object",m?w=n.createElement("div",{style:C.cellIdAliasReadWriteDiv},l.alias.id.read?n.createElement(W,{component:"div",onClick:Q=>{Q.stopPropagation(),Q.preventDefault(),this.onSelect(l.alias.id.read),setTimeout(()=>this.expandAllSelected(()=>this.scrollToItem(l.alias.id.read)),100)},sx:this.styles.aliasReadWrite},"←",l.alias.id.read):null,l.alias.id.write?n.createElement(W,{component:"div",onClick:Q=>{Q.stopPropagation(),Q.preventDefault(),this.onSelect(l.alias.id.write),setTimeout(()=>this.expandAllSelected(()=>this.scrollToItem(l.alias.id.write)),100)},sx:this.styles.aliasReadWrite},"→",l.alias.id.write):null):w=n.createElement(W,{component:"div",onClick:Q=>{Q.stopPropagation(),Q.preventDefault(),this.onSelect(l.alias.id),setTimeout(()=>this.expandAllSelected(()=>this.scrollToItem(l.alias.id)),100)},sx:this.styles.aliasAlone},"→",l.alias.id)):this.info.aliasesMap[r]&&(this.info.aliasesMap[r].length>1?w=n.createElement(W,{component:"div",id:`alias_${r}`,onClick:Q=>{Q.stopPropagation(),Q.preventDefault(),this.setState({aliasMenu:r})},sx:this.styles.aliasAlone},this.props.t("ra_%s links from aliases",this.info.aliasesMap[r].length)):w=this.renderAliasLink(r,0));let O=l==null?void 0:l.color,A;if(O&&!this.state.selected.includes(r)){const Q=this.props.themeName==="dark"?"#1f1f1f":this.props.themeName==="blue"?"#222a2e":"#FFFFFF";E.colorDistance(O,Q)<1e3&&(A=this.props.themeType==="dark"?"#9a9a9a":"#565656")}let h=!1;r==="0_userdata"?(O=du(this.props.themeType),h=!0):r==="alias"?(O=zu(this.props.themeType),h=!0):r==="javascript"?(O=aLe(this.props.themeType),h=!0):r==="system"?(O=hu(this.props.themeType),h=!0):r==="system.adapter"?O=Iu(this.props.themeType):(!O||this.state.selected.includes(r))&&(O="inherit");const p=[];if(l!=null&&l.statusStates){const Q={};Object.keys(l.statusStates).forEach(Ue=>{var it;let we=l.statusStates[Ue];we.split(".").length<3&&(we=`${r}.${we}`),Q[Ue]=we,this.states[we]?this.recordStates.includes(we)||this.recordStates.push(we):((it=this.objects[we])==null?void 0:it.type)==="state"&&(this.recordStates.includes(we)||this.recordStates.push(we),this.states[we]={val:null},this.subscribe(we))});let q=!1;l.statusStates.errorId&&this.states[Q.errorId]&&this.states[Q.errorId].val&&(O=this.props.themeType==="dark"?Ou:Eu,q=!0,p.push(n.createElement(Wl,{key:"error",style:this.styles.iconDeviceError}))),Q.onlineId&&this.states[Q.onlineId]?q?this.states[Q.onlineId].val?p.push(n.createElement(zs,{key:"conn",style:this.styles.iconDeviceConnected})):p.push(n.createElement(di,{key:"disc",style:this.styles.iconDeviceDisconnected})):this.states[Q.onlineId].val?(O=this.props.themeType==="dark"?To:yo,p.push(n.createElement(zs,{key:"conn",style:this.styles.iconDeviceConnected}))):(O=this.props.themeType==="dark"?Do:zo,p.push(n.createElement(di,{key:"disc",style:this.styles.iconDeviceDisconnected}))):Q.offlineId&&this.states[Q.offlineId]&&(q?this.states[Q.offlineId].val?p.push(n.createElement(di,{key:"disc",style:this.styles.iconDeviceDisconnected})):p.push(n.createElement(zs,{key:"conn",style:this.styles.iconDeviceConnected})):this.states[Q.offlineId].val?(O=this.props.themeType==="dark"?Do:zo,p.push(n.createElement(di,{key:"disc",style:this.styles.iconDeviceDisconnected}))):(O=this.props.themeType==="dark"?To:yo,p.push(n.createElement(zs,{key:"conn",style:this.styles.iconDeviceConnected}))))}const S=y?E.quality2text((($s=this.states[r])==null?void 0:$s.q)||0).join(", "):null;let f=((Ti=e.data)==null?void 0:Ti.title)||"",$=!1;if(this.state.showDescription){const Q=Cu(e.data,this.props.lang);Q&&(f=[n.createElement("div",{key:"name",style:C.cellNameDivDiv},f),n.createElement("div",{key:"desc",style:C.cellDescription},Q)],$=!!Q)}const x=this.props.width==="xs"&&this.state.focused===r,Z=n.createElement(Ut,{container:!0,wrap:"nowrap",direction:"row",sx:C.cellId,style:{width:this.columnsVisibility.id,paddingLeft:c}},n.createElement(Ut,{container:!0,alignItems:"center"},L,o),n.createElement(Ut,{style:{...C.cellIdSpan,...A?this.styles.invertedBackground:void 0,color:O,fontWeight:h?"bold":void 0}},n.createElement(ae,{title:gLe(e.data,this.props.lang),slotProps:{popper:{sx:C.tooltip}}},n.createElement("div",null,e.data.name)),w,p),n.createElement("div",{style:{...C.grow,...A?this.styles.invertedBackgroundFlex:{}}}),n.createElement(Ut,{container:!0,alignItems:"center"},u),this.props.width!=="xs"?n.createElement("div",null,n.createElement(Ts,{className:x?"":"copyButton",style:C.cellCopyButton,onClick:Q=>this.onCopy(Q,r)})):null);let k=x&&f||this.columnsVisibility.name?n.createElement(W,{component:"div",sx:{...C.cellName,...$?C.cellNameWithDesc:void 0,width:this.props.width!=="xs"?this.columnsVisibility.name:void 0,ml:x?0:"5px"}},f,!x&&((yi=e.data)!=null&&yi.title)?n.createElement(W,{style:{color:O}},n.createElement(Ts,{className:"copyButton",style:C.cellCopyButton,onClick:Q=>{var q;return this.onCopy(Q,(q=e.data)==null?void 0:q.title)}})):null):null,Y;this.state.statesView?Y=[x&&y&&((lM=this.states[r])!=null&&lM.from)||this.columnsVisibility.changedFrom?{el:n.createElement("div",{key:"from",style:{...C.cellRole,width:this.props.width!=="xs"?this.columnsVisibility.changedFrom:void 0},title:I.join(` `)},y&&((NM=this.states[r])!=null&&NM.from)?d:null),type:"from"}:null,x&&S||this.columnsVisibility.qualityCode?{el:n.createElement("div",{key:"q",style:{...C.cellRole,width:this.props.width!=="xs"?this.columnsVisibility.qualityCode:void 0},title:S||""},S),type:"quality"}:null,x&&y&&((LM=this.states[r])!=null&&LM.ts)||this.columnsVisibility.timestamp?{el:n.createElement("div",{key:"ts",style:{...C.cellRole,width:this.props.width!=="xs"?this.columnsVisibility.timestamp:void 0}},y&&((jM=this.states[r])!=null&&jM.ts)?E.formatDate(new Date(this.states[r].ts),this.props.dateFormat||this.systemConfig.common.dateFormat):null),type:"ts"}:null,x&&y&&((gM=this.states[r])!=null&&gM.lc)||this.columnsVisibility.lastChange?{el:n.createElement("div",{key:"lc",style:{...C.cellRole,width:this.props.width!=="xs"?this.columnsVisibility.lastChange:void 0}},y&&((TM=this.states[r])!=null&&TM.lc)?E.formatDate(new Date(this.states[r].lc),this.props.dateFormat||this.systemConfig.common.dateFormat):null),type:"lc"}:null]:Y=[x&&(M!=null&&M.type)||this.columnsVisibility.type?{el:n.createElement("div",{key:"type",style:{...C.cellType,width:this.props.width!=="xs"?this.columnsVisibility.type:void 0}},N," ",M==null?void 0:M.type),type:"filter_type"}:null,x&&l||this.columnsVisibility.role?{el:n.createElement("div",{key:"role",style:{...C.cellRole,width:this.props.width!=="xs"?this.columnsVisibility.role:"100%",cursor:this.state.filter.expertMode&&g&&this.props.objectBrowserEditRole?"text":"default"},onClick:!x&&this.state.filter.expertMode&&g&&this.props.objectBrowserEditRole?()=>this.setState({roleDialog:e.data.id}):void 0},l==null?void 0:l.role),type:"filter_role",onClick:x&&this.state.filter.expertMode&&g&&this.props.objectBrowserEditRole?()=>this.setState({roleDialog:e.data.id}):void 0}:null,x&&l||this.columnsVisibility.room?{el:n.createElement("div",{key:"room",style:{...C.cellRoom,...e.data.per?C.cellEnumParent:{},width:this.props.width!=="xs"?this.columnsVisibility.room:"100%",cursor:g?"text":"default"},onClick:!x&&g?()=>{const Q=ys(this.info,e.data.id,"roomEnums");this.setState({enumDialogEnums:Q,enumDialog:{item:e,type:"room",enumsOriginal:JSON.stringify(Q)}})}:void 0},e.data.rooms),type:"filter_room",onClick:x&&g?()=>{const Q=ys(this.info,e.data.id,"roomEnums");this.setState({enumDialogEnums:Q,enumDialog:{item:e,type:"room",enumsOriginal:JSON.stringify(Q)}})}:void 0}:null,x&&l||this.columnsVisibility.func?{el:n.createElement("div",{key:"func",style:{...C.cellFunc,...e.data.pef?C.cellEnumParent:{},width:this.props.width!=="xs"?this.columnsVisibility.func:"100%",cursor:g?"text":"default"},onClick:!x&&g?()=>{const Q=ys(this.info,e.data.id,"funcEnums");this.setState({enumDialogEnums:Q,enumDialog:{item:e,type:"func",enumsOriginal:JSON.stringify(Q)}})}:void 0},e.data.funcs),type:"filter_func",onClick:x&&g?()=>{const Q=ys(this.info,e.data.id,"funcEnums");this.setState({enumDialogEnums:Q,enumDialog:{item:e,type:"func",enumsOriginal:JSON.stringify(Q)}})}:void 0}:null];let J=((yM=this.adapterColumns)==null?void 0:yM.map(Q=>n.createElement("div",{style:{...C.cellAdapter,width:this.props.width!=="xs"?this.columnsVisibility[Q.id]:void 0},key:Q.id,title:`${Q.adapter} => ${Q.pathText}`},M?this.renderCustomValue(M,Q,e):null)))||null;const Le=x||this.columnsVisibility.val?this.renderColumnValue(r,e,x):null;let Je=x&&Le||this.columnsVisibility.val?n.createElement("div",{style:{...C.cellValue,width:this.props.width!=="xs"?this.columnsVisibility.val:"calc(100% - 100px)",cursor:j?(l==null?void 0:l.type)==="file"?"zoom-in":e.data.button?"grab":"text":"default"},onClick:Q=>{var q,Ue,we;if(j){if(!(!M||!this.states))if((l==null?void 0:l.type)==="file")this.setState({viewFileDialog:r});else if(e.data.url&&Q.ctrlKey){if((q=this.states[r])!=null&&q.val&&typeof this.states[r].val=="string")if((l==null?void 0:l.role)==="url.self")window.location.href=this.states[r].val;else{const it=window.open(this.states[r].val,"_blank");it==null||it.focus()}}else!this.state.filter.expertMode&&e.data.button?this.props.socket.setState(r,!0).catch(it=>window.alert(`Cannot write state "${r}": ${it}`)):!this.state.filter.expertMode&&e.data.switch?this.props.socket.setState(r,!this.states[r].val).catch(it=>window.alert(`Cannot write state "${r}": ${it}`)):(this.edit={val:this.states[r]?this.states[r].val:"",q:this.states[r]&&this.states[r].q||0,ack:!1,id:r},this.setState({updateOpened:!0}))}else(l==null?void 0:l.role)==="url"||(l==null?void 0:l.role)==="url.blank"&&Q.ctrlKey?(Ue=this.states[r])!=null&&Ue.val&&typeof this.states[r].val=="string"&&window.open(this.states[r].val,"_blank"):(l==null?void 0:l.role)==="url.self"&&Q.ctrlKey&&(we=this.states[r])!=null&&we.val&&typeof this.states[r].val=="string"&&(window.location.href=this.states[r].val)}},Le):null,qe=x||this.columnsVisibility.buttons?n.createElement("div",{style:{...C.cellButtons,width:this.props.width!=="xs"?this.columnsVisibility.buttons:void 0}},this.renderColumnButtons(r,e)):null,us=null;if(this.props.width==="xs"&&this.state.focused===r){Y=Y.filter(q=>q);let Q;Y.length?Q=Y.map(q=>q?n.createElement("div",{key:q.type,style:C.cellDetailsLine},n.createElement("span",{style:C.cellDetailsName},this.texts[q.type],":"),q.el,n.createElement("div",{style:{flexGrow:1}}),q.onClick?n.createElement(Ks,{style:C.cellCopyButtonInDetails,onClick:()=>{q!=null&&q.onClick&&q.onClick()}}):null):null):Q=null,J.length||(J=null),us=n.createElement(Ja,{style:{width:"100%",display:"flex",flexDirection:"column",padding:10,backgroundColor:this.props.theme.palette.mode==="dark"?"#333":"#ccc"}},n.createElement("div",{style:C.cellDetailsLine},n.createElement("div",{style:{flexGrow:1}}),n.createElement(Ts,{style:C.cellCopyButtonInDetails,onClick:q=>this.onCopy(q,r)})),k&&n.createElement("div",{style:C.cellDetailsLine},n.createElement("span",{style:C.cellDetailsName},this.texts.name,":"),k,n.createElement("div",{style:{flexGrow:1}}),(DM=e.data)!=null&&DM.title?n.createElement(Ts,{className:"copyButton",style:C.cellCopyButtonInDetails,onClick:q=>{var Ue;return this.onCopy(q,(Ue=e.data)==null?void 0:Ue.title)}}):null),Q,J&&n.createElement("div",{style:C.cellDetailsLine},J),((dM=this.objects[r])==null?void 0:dM.type)==="state"&&n.createElement("div",{style:C.cellDetailsLine},n.createElement("span",{style:C.cellDetailsName},this.texts.value,":"),Je,n.createElement("div",{style:{flexGrow:1}}),n.createElement(Ts,{className:"copyButton",style:C.cellCopyButtonInDetails,onClick:q=>{const{valText:Ue}=Qr({state:this.states[r],obj:this.objects[r],texts:this.texts,dateFormat:this.props.dateFormat||this.systemConfig.common.dateFormat,isFloatComma:this.props.isFloatComma===void 0?this.systemConfig.common.isFloatComma:this.props.isFloatComma});this.onCopy(q,Ue.c!==void 0?Ue.c:Ue.v.toString())},key:"cc"})),qe&&n.createElement("div",{style:{...C.cellDetailsLine,justifyContent:"right"}},qe)),k=null,Y=null,J=null,Je=null,qe=null}return{row:n.createElement(Ut,{container:!0,direction:"row",wrap:"nowrap",sx:E.getStyle(this.props.theme,C.tableRow,this.state.linesEnabled&&C.tableRowLines,!this.props.dragEnabled&&C.tableRowNoDragging,w&&C.tableRowAlias,m&&C.tableRowAliasReadWrite,this.state.focused===r&&this.props.multiSelect&&C.tableRowFocused,!e.data.visible&&C.filteredOut,e.data.hasVisibleParent&&!e.data.visible&&!e.data.hasVisibleChildren&&C.filteredParentOut,this.state.selected.includes(r)&&C.itemSelected,this.state.selectedNonObject===r&&C.itemSelected),key:r,id:r,onMouseDown:Q=>{this.onSelect(r);let q;"which"in Q?q=Q.which===3:"button"in Q&&(q=Q.button===2),q?this.contextMenu={item:e,ts:Date.now()}:this.contextMenu=null},onDoubleClick:()=>{e.children?this.toggleExpanded(r):this.onSelect(r,!0)}},Z,k,Y==null?void 0:Y.map(Q=>Q==null?void 0:Q.el),J,Je,qe),details:us}}renderItem(e,t,s){const r=[];s=s||{count:0};const o=this.renderLeaf(e,t,s);let M;const a=this.props.DragWrapper;return this.props.dragEnabled&&a?e.data.sumVisibility?M=n.createElement(a,{key:e.data.id,item:e,style:C.draggable},o.row):M=n.createElement("div",{key:e.data.id,style:C.nonDraggable},o.row):M=o.row,e.data.id&&M&&r.push(M),o.details&&r.push(o.details),t=t===void 0?oi(this.state.expanded,e.data.id):t,(!e.data.id||t)&&(this.state.foldersFirst?e.children&&(r.push(e.children.map(u=>u.children&&(!this.state.columnsSelectorShow||s.count<15)&&u.data.sumVisibility?this.renderItem(u,void 0,s):null)),r.push(e.children.map(u=>!u.children&&(!this.state.columnsSelectorShow||s.count<15)&&u.data.sumVisibility?this.renderItem(u,void 0,s):null))):e.children&&r.push(e.children.map(u=>(!this.state.columnsSelectorShow||s.count<15)&&u.data.sumVisibility?this.renderItem(u,void 0,s):null))),r}calculateColumnsVisibility(e,t,s,r){let o=r||this.state.columnsWidths;const M=s||this.state.columnsForAdmin,a=t||this.state.columns||[],u=typeof e!="boolean"?this.state.columnsAuto:e;o=JSON.parse(JSON.stringify(o)),Object.keys(o).forEach(N=>{o[N]&&(o[N]=parseInt(o[N],10)||0)}),this.adapterColumns=[];const l=je[this.props.width||"lg"].widths;if(u){if(this.columnsVisibility={id:je[this.props.width||"lg"].idWidth,name:this.visibleCols.includes("name")&&l.name||0,nameHeader:this.visibleCols.includes("name")&&l.name||0,type:this.visibleCols.includes("type")&&l.type||0,role:this.visibleCols.includes("role")&&l.role||0,room:this.visibleCols.includes("room")&&l.room||0,func:this.visibleCols.includes("func")&&l.func||0,changedFrom:this.visibleCols.includes("changedFrom")&&l.changedFrom||0,qualityCode:this.visibleCols.includes("qualityCode")&&l.qualityCode||0,timestamp:this.visibleCols.includes("timestamp")&&l.timestamp||0,lastChange:this.visibleCols.includes("lastChange")&&l.lastChange||0,val:this.visibleCols.includes("val")&&l.val||0,buttons:this.visibleCols.includes("buttons")&&l.buttons||0},this.columnsVisibility.name&&!this.customWidth){let N=this.columnsVisibility.id||0;this.state.statesView?(N+=this.columnsVisibility.changedFrom||0,N+=this.columnsVisibility.qualityCode||0,N+=this.columnsVisibility.timestamp||0,N+=this.columnsVisibility.lastChange||0):(N+=this.columnsVisibility.type||0,N+=this.columnsVisibility.role||0,N+=this.columnsVisibility.room||0,N+=this.columnsVisibility.func||0),N+=this.columnsVisibility.val||0,N+=this.columnsVisibility.buttons||0,this.columnsVisibility.name=`calc(100% - ${N+5}px)`,this.columnsVisibility.nameHeader=`calc(100% - ${N+5+this.state.scrollBarWidth}px)`}else if(!this.customWidth){let N=0;this.state.statesView?(N+=this.columnsVisibility.changedFrom||0,N+=this.columnsVisibility.qualityCode||0,N+=this.columnsVisibility.timestamp||0,N+=this.columnsVisibility.lastChange||0):(N+=this.columnsVisibility.type||0,N+=this.columnsVisibility.role||0,N+=this.columnsVisibility.room||0,N+=this.columnsVisibility.func||0),N+=this.columnsVisibility.val||0,N+=this.columnsVisibility.buttons||0,this.columnsVisibility.id=`calc(100% - ${N+5}px)`}}else{const N=this.props.width||"lg";this.columnsVisibility={id:o.id||je[N].idWidth,name:a.includes("name")&&(o.name||l.name||je[N].widths.name)||0,type:a.includes("type")&&(o.type||l.type||je[N].widths.type)||0,role:a.includes("role")&&(o.role||l.role||je[N].widths.role)||0,room:a.includes("room")&&(o.room||l.room||je[N].widths.room)||0,func:a.includes("func")&&(o.func||l.func||je[N].widths.func)||0};let c=this.columnsVisibility.id;if(this.columnsVisibility.name&&(c+=this.columnsVisibility.type||0,c+=this.columnsVisibility.role||0,c+=this.columnsVisibility.room||0,c+=this.columnsVisibility.func||0),M&&a&&Object.keys(M).sort().forEach(L=>M[L].forEach(j=>{const g=`_${L}_${j.path}`;if(a.includes(g)){const y={adapter:L,id:`_${L}_${j.path}`,name:j.name,path:j.path.split("."),pathText:j.path};j.edit&&(y.edit=!0,j.type&&(y.type=j.type),j.objTypes&&(y.objTypes=j.objTypes)),this.adapterColumns.push(y),this.columnsVisibility[g]=o[y.id]||j.width||je[N].widths.func||je.xl.widths.func||0,c+=this.columnsVisibility[g]}else this.columnsVisibility[g]=0})),this.adapterColumns.sort((L,j)=>L.id>j.id?-1:L.idg==="id"||typeof this.columnsVisibility[g]=="string"||!this.columnsVisibility[g]?j:j+this.columnsVisibility[g],0);this.columnsVisibility.id=`calc(100% - ${L}px)`}}}resizerMouseMove=e=>{if(this.resizerActiveDiv){let t,s;this.resizeLeft?(t=this.resizerOldWidth-e.clientX+this.resizerPosition,s=this.resizerOldWidthNext+e.clientX-this.resizerPosition):(t=this.resizerOldWidth+e.clientX-this.resizerPosition,s=this.resizerOldWidthNext-e.clientX+this.resizerPosition),this.resizerActiveName&&this.resizerNextName&&(!this.resizerMin||t>this.resizerMin)&&(!this.resizerNextMin||s>this.resizerNextMin)&&(this.resizerCurrentWidths[this.resizerActiveName]=t,this.resizerCurrentWidths[this.resizerNextName]=s,this.resizerActiveDiv.style.width=`${t}px`,this.resizerNextDiv&&(this.resizerNextDiv.style.width=`${s}px`),this.columnsVisibility[this.resizerActiveName]=t,this.columnsVisibility[this.resizerNextName]=s,this.resizerNextName==="nameHeader"?(this.columnsVisibility.name=s-this.state.scrollBarWidth,this.resizerCurrentWidths.name=s-this.state.scrollBarWidth):this.resizerActiveName==="nameHeader"&&(this.columnsVisibility.name=t-this.state.scrollBarWidth,this.resizerCurrentWidths.name=t-this.state.scrollBarWidth),this.customWidth=!0,this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=null,this.forceUpdate()},200))}};resizerMouseUp=()=>{this.localStorage.setItem(`${this.props.dialogName||"App"}.table`,JSON.stringify(this.resizerCurrentWidths)),this.resizerActiveName=null,this.resizerNextName=null,this.resizerActiveDiv=null,this.resizerNextDiv=null,window.removeEventListener("mousemove",this.resizerMouseMove),window.removeEventListener("mouseup",this.resizerMouseUp)};resizerMouseDown=e=>{if(this.storedWidths||=JSON.parse(JSON.stringify(je[this.props.width||"lg"])),this.resizerCurrentWidths||={},this.resizerActiveDiv=e.target.parentNode,this.resizerActiveName=this.resizerActiveDiv.dataset.name||null,this.resizerActiveName){let t=0;if(e.target.dataset.left==="true"){this.resizeLeft=!0,this.resizerNextDiv=this.resizerActiveDiv.previousElementSibling;let s=this.resizerNextDiv.querySelector(".iob-ob-resize-handler");for(;this.resizerNextDiv&&!s&&t<10;)this.resizerNextDiv=this.resizerNextDiv.previousElementSibling,s=this.resizerNextDiv.querySelector(".iob-ob-resize-handler"),t++;(s==null?void 0:s.dataset.left)!=="true"&&(this.resizerNextDiv=this.resizerNextDiv.nextElementSibling)}else this.resizeLeft=!1,this.resizerNextDiv=this.resizerActiveDiv.nextElementSibling;this.resizerNextName=this.resizerNextDiv.dataset.name||null,this.resizerMin=parseInt(this.resizerActiveDiv.dataset.min,10)||0,this.resizerNextMin=parseInt(this.resizerNextDiv.dataset.min,10)||0,this.resizerPosition=e.clientX,this.resizerCurrentWidths[this.resizerActiveName]=this.resizerActiveDiv.offsetWidth,this.resizerOldWidth=this.resizerCurrentWidths[this.resizerActiveName],this.resizerNextName&&(this.resizerCurrentWidths[this.resizerNextName]=this.resizerNextDiv.offsetWidth,this.resizerOldWidthNext=this.resizerCurrentWidths[this.resizerNextName]),window.addEventListener("mousemove",this.resizerMouseMove),window.addEventListener("mouseup",this.resizerMouseUp)}};navigateKeyPress(e){var s,r;const t=this.state.selectedNonObject||this.state.selected[0];if(t){if(e.code==="ArrowUp"||e.code==="ArrowDown"){e.preventDefault();const o=[];(s=this.tableRef.current)==null||s.childNodes.forEach(l=>o.push(l.id));const M=o.indexOf(t),a=e.code==="ArrowDown"?M+1:M-1,u=o[a]||t;this.onSelect(u),this.scrollToItem(u)}if((e.code==="ArrowRight"||e.code==="ArrowLeft")&&this.toggleExpanded(t),e.code==="Delete"&&this.root&&t){const o=Ki.getItemFromRoot(this.root,t);if(o){const{obj:M}=o.data;M&&!((r=M.common)!=null&&r.dontDelete)&&this.showDeleteDialog({id:t,obj:M,item:o})}}}}static getItemFromRoot(e,t){const s=t.split(".");let r="",o=e;for(let M=0;M{this.customWidth=!1,je[this.props.width||"lg"]=JSON.parse(JSON.stringify(this.storedWidths)),this.calculateColumnsVisibility(),this.localStorage.removeItem(`${this.props.dialogName||"App"}.table`),this.forceUpdate()};renderHandleRight(){return n.createElement(W,{component:"div",className:"iob-ob-resize-handler",sx:{...C.resizeHandle,...C.resizeHandleRight},onMouseDown:this.resizerMouseDown,onDoubleClick:this.resizerReset,title:this.props.t("ra_Double click to reset table layout")})}renderHeader(){let e=null;return!this.columnsVisibility.buttons&&!this.isFilterEmpty()&&(e=n.createElement(P,{onClick:()=>this.clearFilter(),style:C.buttonClearFilter,title:this.props.t("ra_Clear filter"),size:"large"},n.createElement(rLe,null),n.createElement(ge,{style:C.buttonClearFilterIcon}))),this.props.width==="xs"?n.createElement("div",{style:C.headerRow},n.createElement("div",{style:{...C.headerCell,width:"100%"}},this.getFilterInput("id"))):n.createElement("div",{style:C.headerRow},n.createElement("div",{style:{...C.headerCell,width:this.columnsVisibility.id,position:"relative"},"data-min":240,"data-name":"id"},this.getFilterInput("id"),this.renderHandleRight()),this.columnsVisibility.name?n.createElement("div",{style:{...C.headerCell,width:this.columnsVisibility.nameHeader,position:"relative"},"data-min":100,"data-name":"nameHeader"},this.getFilterInput("name"),this.renderHandleRight()):null,!this.state.statesView&&n.createElement(n.Fragment,null,this.columnsVisibility.type?n.createElement("div",{style:{...C.headerCell,width:this.columnsVisibility.type,position:"relative"},"data-min":100,"data-name":"type"},this.getFilterSelectType(),this.renderHandleRight()):null,this.columnsVisibility.role?n.createElement("div",{style:{...C.headerCell,width:this.columnsVisibility.role,position:"relative"},"data-min":100,"data-name":"role"},this.getFilterSelectRole(),this.renderHandleRight()):null,this.columnsVisibility.room?n.createElement("div",{style:{...C.headerCell,width:this.columnsVisibility.room,position:"relative"},"data-min":100,"data-name":"room"},this.getFilterSelectRoom(),this.renderHandleRight()):null,this.columnsVisibility.func?n.createElement("div",{style:{...C.headerCell,width:this.columnsVisibility.func,position:"relative"},"data-min":100,"data-name":"func"},this.getFilterSelectFunction(),this.renderHandleRight()):null),this.state.statesView&&n.createElement(n.Fragment,null,n.createElement("div",{style:{...C.headerCell,...C.headerCellValue,width:this.columnsVisibility.changedFrom,position:"relative"},"data-min":100,"data-name":"changedFrom"},this.props.t("ra_Changed from"),this.renderHandleRight()),n.createElement("div",{style:{...C.headerCell,...C.headerCellValue,width:this.columnsVisibility.qualityCode,position:"relative"},"data-min":100,"data-name":"qualityCode"},this.props.t("ra_Quality code"),this.renderHandleRight()),n.createElement("div",{style:{...C.headerCell,...C.headerCellValue,width:this.columnsVisibility.timestamp,position:"relative"},"data-min":100,"data-name":"timestamp"},this.props.t("ra_Timestamp"),this.renderHandleRight()),n.createElement("div",{style:{...C.headerCell,...C.headerCellValue,width:this.columnsVisibility.lastChange,position:"relative"},"data-min":100,"data-name":"lastChange"},this.props.t("ra_Last change"),this.renderHandleRight())),this.adapterColumns.map(t=>n.createElement("div",{style:{...C.headerCell,...C.headerCellValue,width:this.columnsVisibility[t.id]},title:t.adapter,key:t.id,"data-min":100,"data-name":t.id},t.name)),this.columnsVisibility.val?n.createElement("div",{style:{...C.headerCell,...C.headerCellValue,width:this.columnsVisibility.val,position:"relative"},"data-min":120,"data-name":"val"},this.props.t("ra_Value"),e):null,this.columnsVisibility.buttons?n.createElement("div",{title:this.texts.filter_custom,style:{...C.headerCell,width:this.columnsVisibility.buttons}}," ",this.getFilterSelectCustoms()):null)}renderToast(){return n.createElement(Br,{open:!!this.state.toast,autoHideDuration:3e3,onClick:()=>this.setState({toast:""}),onClose:()=>this.setState({toast:""}),message:this.state.toast,action:n.createElement(P,{size:"small","aria-label":"close",color:"inherit",onClick:()=>this.setState({toast:""})},n.createElement(ge,{fontSize:"small"}))})}componentDidUpdate(){if(this.tableRef.current){const e=this.tableRef.current.offsetWidth-this.tableRef.current.clientWidth;this.state.scrollBarWidth!==e?setTimeout(()=>this.setState({scrollBarWidth:e}),100):this.selectFirst&&this.scrollToItem(this.selectFirst)}}scrollToItem(e){this.selectFirst="";const t=window.document.getElementById(e);t==null||t.scrollIntoView({behavior:"auto",block:"center",inline:"center"})}renderCustomDialog(){if(this.state.customDialog&&this.props.objectCustomDialog){const e=this.props.objectCustomDialog;return n.createElement(e,{reportChangedIds:t=>this.changedIds=[...t],objectIDs:this.state.customDialog,allVisibleObjects:!!this.state.customDialogAll,expertMode:this.state.filter.expertMode,isFloatComma:this.props.isFloatComma===void 0?this.systemConfig.common.isFloatComma:this.props.isFloatComma,t:this.props.t,lang:this.props.lang,socket:this.props.socket,themeName:this.props.themeName,themeType:this.props.themeType,theme:this.props.theme,objects:this.objects,customsInstances:this.info.customs,onClose:()=>{var t;this.pauseSubscribe(!1),this.setState({customDialog:null}),this.changedIds&&(this.changedIds=null,this.forceUpdate()),(t=this.props.router)==null||t.doNavigate("tab-objects")},systemConfig:this.systemConfig})}return null}onUpdate(e){this.props.socket.setState(this.edit.id,{val:e.val,ack:e.ack,q:e.q||0,expire:e.expire||void 0}).catch(t=>this.showError(`Cannot write value: ${t}`))}renderEditObjectDialog(){if(!this.state.editObjectDialog||!this.props.objectBrowserEditObject)return null;const e=this.props.objectBrowserEditObject;return n.createElement(e,{key:this.state.editObjectDialog,obj:this.objects[this.state.editObjectDialog],roleArray:this.info.roles,objects:this.objects,dateFormat:this.props.dateFormat||this.systemConfig.common.dateFormat,isFloatComma:this.props.isFloatComma===void 0?this.systemConfig.common.isFloatComma:this.props.isFloatComma,themeType:this.props.themeType,theme:this.props.theme,socket:this.props.socket,dialogName:this.props.dialogName,aliasTab:this.state.editObjectAlias,t:this.props.t,expertMode:!!this.state.filter.expertMode,onNewObject:t=>this.props.socket.setObject(t._id,t).then(()=>this.setState({editObjectDialog:t._id,editObjectAlias:!1},()=>this.onSelect(t._id))).catch(s=>this.showError(`Cannot write object: ${s}`)),onClose:t=>{var s,r;if(t){let o;this.state.editObjectDialog.startsWith("alias.")&&JSON.stringify((s=this.objects[this.state.editObjectDialog].common)==null?void 0:s.alias)!==JSON.stringify((r=t.common)==null?void 0:r.alias)&&(o=this.state.editObjectDialog),this.props.socket.setObject(t._id,t).then(()=>{o&&this.subscribes.includes(o)&&(this.unsubscribe(o),setTimeout(()=>this.subscribe(o),100))}).catch(M=>this.showError(`Cannot write object: ${M}`))}this.setState({editObjectDialog:"",editObjectAlias:!1})},width:this.props.width})}renderViewObjectFileDialog(){if(!this.state.viewFileDialog||!this.props.objectBrowserViewFile)return null;const e=this.props.objectBrowserViewFile;return n.createElement(e,{key:"viewFile",obj:this.objects[this.state.viewFileDialog],socket:this.props.socket,t:this.props.t,onClose:()=>this.setState({viewFileDialog:""})})}renderAliasEditorDialog(){if(!this.props.objectBrowserAliasEditor||!this.state.showAliasEditor)return null;const e=this.props.objectBrowserAliasEditor;return n.createElement(e,{key:"editAlias",obj:this.objects[this.state.showAliasEditor],roleArray:this.info.roles,objects:this.objects,socket:this.props.socket,t:this.props.t,onClose:()=>this.setState({showAliasEditor:""}),onRedirect:(t,s)=>setTimeout(()=>this.onSelect(t,!1,()=>this.expandAllSelected(()=>{this.scrollToItem(t),setTimeout(()=>this.setState({editObjectDialog:t,showAliasEditor:"",editObjectAlias:!0}),300)})),s||0)})}showAddDataPointDialog(e,t,s){this.setState({showContextMenu:null,modalNewObj:{id:e,initialType:t,initialStateType:s}})}renderAliasMenu(){return this.state.aliasMenu?n.createElement(ss,{key:"aliasmenu",open:!0,anchorEl:window.document.getElementById(`alias_${this.state.aliasMenu}`),onClose:()=>this.setState({aliasMenu:""})},this.info.aliasesMap[this.state.aliasMenu].map((e,t)=>n.createElement(te,{key:e,onClick:()=>this.onSelect(e)},n.createElement(nt,null,this.renderAliasLink(this.state.aliasMenu,t,{"& .admin-browser-arrow":{mr:"8px"}}))))):null}renderContextMenu(){var L,j,g,y,d,I,m;if(!this.state.showContextMenu)return null;const e=this.state.showContextMenu.item,t=e.data.id,s=[],r=e.data.obj;let o="";if(this.props.objectEditOfAccessControl&&this.state.filter.expertMode)if(!r)o="---";else{const w=r.acl?r.type==="state"?r.acl.state:r.acl.object:0,O=r.acl&&(r.type==="state"?this.systemConfig.common.defaultNewAcl.state:this.systemConfig.common.defaultNewAcl.object);o=Number.isNaN(Number(w))?Number(O).toString(16):Number(w).toString(16)}const M=!this.props.notEditable&&r&&(this.state.filter.expertMode||r.type==="state"||r.type==="channel"||r.type==="device"),a=!e.data.obj||e.data.obj.type==="folder"||e.data.obj.type==="channel"||e.data.obj.type==="device"||e.data.id==="0_userdata.0"||e.data.obj.type==="meta",u=!e.data.obj||e.data.obj.type==="folder"||e.data.obj.type==="device"||e.data.id==="0_userdata.0"||e.data.obj.type==="meta",l=!e.data.obj||e.data.obj.type==="folder"||e.data.id==="0_userdata.0"||e.data.obj.type==="meta",N=!e.data.obj||e.data.obj.type==="folder"||e.data.id==="0_userdata.0"||e.data.obj.type==="meta",c={EDIT:{key:"0",visibility:!!(this.props.objectBrowserEditObject&&r&&(this.state.filter.expertMode||ga(t))),icon:n.createElement(Ks,{fontSize:"small",style:this.styles.contextMenuEdit}),label:this.texts.editObject,onClick:()=>this.setState({editObjectDialog:e.data.id,showContextMenu:null,editObjectAlias:!1})},EDIT_VALUE:{key:"1",visibility:!!(this.states&&!this.props.notEditable&&r&&r.type==="state"&&((L=r.common)==null?void 0:L.type)!=="file"&&(this.state.filter.expertMode||r.common.write!==!1)),icon:n.createElement(Hl,{fontSize:"small",style:this.styles.contextMenuEditValue}),label:this.props.t("ra_Edit value"),onClick:()=>{var w;this.edit={val:this.states[t]?this.states[t].val:"",q:((w=this.states[t])==null?void 0:w.q)||0,ack:!1,id:t},this.setState({updateOpened:!0,showContextMenu:null})}},VIEW:{visibility:!!this.props.objectBrowserViewFile&&(r==null?void 0:r.type)==="state"&&((j=r.common)==null?void 0:j.type)==="file",icon:n.createElement(Fl,{fontSize:"small",style:this.styles.contextMenuView}),label:this.props.t("ra_View file"),onClick:()=>this.setState({viewFileDialog:(r==null?void 0:r._id)||"",showContextMenu:null})},CUSTOM:{key:"2",visibility:!(this.props.objectCustomDialog&&this.info.hasSomeCustoms&&r&&r.type==="state"&&((g=r.common)==null?void 0:g.type)!=="file"),icon:n.createElement(Hr,{fontSize:"small",style:e.data.hasCustoms?this.styles.cellButtonsButtonWithCustoms:C.cellButtonsButtonWithoutCustoms}),style:this.styles.contextMenuCustom,label:this.texts.customConfig,onClick:()=>{var w;this.pauseSubscribe(!0),(w=this.props.router)==null||w.doNavigate(null,"customs",t),this.setState({customDialog:[t],showContextMenu:null})}},ACL:{key:"3",visibility:!!o,icon:o,iconStyle:{fontSize:"smaller"},listItemIconStyle:this.styles.contextMenuACL,style:this.styles.contextMenuACL,label:this.props.t("ra_Edit ACL"),onClick:()=>this.setState({showContextMenu:null,modalEditOfAccess:!0,modalEditOfAccessObjData:e.data})},ROLE:{key:"4",visibility:!!(this.state.filter.expertMode&&M&&this.props.objectBrowserEditRole),icon:n.createElement(Gl,{fontSize:"small",style:this.styles.contextMenuRole}),label:this.props.t("ra_Edit role"),onClick:()=>this.setState({roleDialog:e.data.id,showContextMenu:null})},FUNCTION:{key:"5",visibility:!!M,icon:n.createElement(Bl,{fontSize:"small",style:this.styles.contextMenuRole}),label:this.props.t("ra_Edit function"),onClick:()=>{const w=ys(this.info,e.data.id,"funcEnums");this.setState({enumDialogEnums:w,enumDialog:{item:e,type:"func",enumsOriginal:JSON.stringify(w)},showContextMenu:null})}},ROOM:{key:"6",visibility:!!M,icon:n.createElement(Jl,{fontSize:"small",style:this.styles.contextMenuRoom}),label:this.props.t("ra_Edit room"),onClick:()=>{const w=ys(this.info,e.data.id,"roomEnums");this.setState({enumDialogEnums:w,enumDialog:{item:e,type:"room",enumsOriginal:JSON.stringify(w)},showContextMenu:null})}},ALIAS:{key:"7",visibility:!!(!this.props.notEditable&&this.props.objectBrowserAliasEditor&&this.props.objectBrowserEditObject&&(r==null?void 0:r.type)==="state"&&((y=r.common)==null?void 0:y.type)!=="file"),icon:n.createElement(Za,{style:(d=r==null?void 0:r.common)!=null&&d.alias?this.styles.cellButtonsButtonWithCustoms:C.cellButtonsButtonWithoutCustoms}),label:this.info.aliasesMap[e.data.id]||e.data.id.startsWith("alias.0.")?this.props.t("ra_Edit alias"):this.props.t("ra_Create alias"),onClick:()=>{var w;(w=r==null?void 0:r.common)!=null&&w.alias?this.setState({showContextMenu:null,editObjectDialog:e.data.id,editObjectAlias:!0}):this.setState({showContextMenu:null,showAliasEditor:e.data.id})}},CREATE:{key:"+",visibility:(e.data.id.startsWith("0_userdata.0")||e.data.id.startsWith("javascript."))&&(a||u||l||N),icon:n.createElement(Fr,{fontSize:"small",style:this.styles.cellButtonsButtonWithCustoms}),style:C.contextMenuWithSubMenu,label:this.texts.create,subMenu:[{label:this.texts.createBooleanState,visibility:a,icon:n.createElement(Xs,{fontSize:"small"}),onClick:()=>this.showAddDataPointDialog(e.data.id,"state","boolean")},{label:this.texts.createNumberState,visibility:a,icon:n.createElement(Xs,{fontSize:"small"}),onClick:()=>this.showAddDataPointDialog(e.data.id,"state","number")},{label:this.texts.createStringState,visibility:a,icon:n.createElement(Xs,{fontSize:"small"}),onClick:()=>this.showAddDataPointDialog(e.data.id,"state","string")},{label:this.texts.createState,visibility:a,icon:n.createElement(Xs,{fontSize:"small"}),onClick:()=>this.showAddDataPointDialog(e.data.id,"state")},{label:this.texts.createChannel,visibility:u,icon:n.createElement(yu,{fontSize:"small"}),onClick:()=>this.showAddDataPointDialog(e.data.id,"channel")},{label:this.texts.createDevice,visibility:l,icon:n.createElement(Du,{fontSize:"small"}),onClick:()=>this.showAddDataPointDialog(e.data.id,"device")},{label:this.texts.createFolder,icon:n.createElement(Ha,{fontSize:"small"}),visibility:N,onClick:()=>this.showAddDataPointDialog(e.data.id,"folder")}]},RENAME:{key:"8",visibility:!!(!this.props.notEditable&&this.props.objectMoveRenameDialog&&!e.data.id.startsWith("system.")&&e.data.id.split(".").length>2&&(this.props.expertMode||e.data.id.startsWith("javascript.0.")||e.data.id.startsWith("0_userdata.0."))),icon:n.createElement(Rl,null),label:this.props.t("ra_Rename_Move_Copy"),onClick:()=>{const w=Object.keys(this.objects),O=`${e.data.id}.`;this.setState({showContextMenu:null,showRenameDialog:{id:e.data.id,childrenIds:w.filter(A=>A.startsWith(O))}})}},DELETE:{key:"Delete",visibility:!!(this.props.onObjectDelete&&((I=e.children)!=null&&I.length||r&&!((m=r.common)!=null&&m.dontDelete))),icon:n.createElement(ut,{fontSize:"small",style:this.styles.contextMenuDelete}),style:this.styles.contextMenuDelete,label:this.texts.deleteObject,onClick:()=>this.setState({showContextMenu:null},()=>this.showDeleteDialog({id:t,obj:r||{},item:e}))}};return Object.keys(c).forEach(w=>{var O,A;c[w].visibility&&(c[w].subMenu?(s.push(n.createElement(te,{key:w,href:"",onClick:h=>this.state.showContextMenu&&this.setState({showContextMenu:{item:this.state.showContextMenu.item,position:this.state.showContextMenu.position,subItem:w,subAnchor:h.target}}),style:c[w].style},n.createElement(Yt,{style:{...c[w].iconStyle,...c[w].listItemIconStyle}},c[w].icon),n.createElement(nt,null,c[w].label,"..."),n.createElement("div",{style:{...C.contextMenuKeys,opacity:1}},n.createElement(Vl,null)))),((O=this.state.showContextMenu)==null?void 0:O.subItem)===w&&s.push(n.createElement(ss,{key:"subContextMenu",open:!0,anchorEl:this.state.showContextMenu.subAnchor,onClose:()=>{this.state.showContextMenu&&this.setState({showContextMenu:{item:this.state.showContextMenu.item,position:this.state.showContextMenu.position}}),this.contextMenu=null}},(A=c[w].subMenu)==null?void 0:A.map(h=>h.visibility?n.createElement(te,{key:h.label,onClick:h.onClick,style:h.style},n.createElement(Yt,{style:{...h.iconStyle,...h.listItemIconStyle||void 0}},h.icon),n.createElement(nt,null,h.label)):null)))):s.push(n.createElement(te,{key:w,onClick:c[w].onClick,sx:c[w].style},n.createElement(Yt,{style:{...c[w].iconStyle,...c[w].listItemIconStyle}},c[w].icon),n.createElement(nt,null,c[w].label),c[w].key?n.createElement("div",{style:C.contextMenuKeys},`Alt+${c[w].key==="Delete"?this.props.t("ra_Del"):c[w].key}`):null)))}),s.length?n.createElement(ss,{key:"contextMenu",open:!0,onKeyUp:w=>{w.preventDefault(),w.altKey&&Object.keys(c).forEach(O=>{w.key===c[O].key&&c[O].onClick&&c[O].onClick()})},anchorReference:"anchorPosition",anchorPosition:this.state.showContextMenu.position,onClose:()=>{this.setState({showContextMenu:null}),this.contextMenu=null}},s):(setTimeout(()=>this.setState({showContextMenu:null}),100),null)}renderEditValueDialog(){var r;if(!this.state.updateOpened||!this.props.objectBrowserValue)return null;if(!this.edit.id)return console.error(`Invalid ID for edit: ${JSON.stringify(this.edit)}`),null;if(!this.objects[this.edit.id])return console.error(`Something went wrong. Possibly the object ${this.edit.id} was deleted.`),null;const e=(r=this.objects[this.edit.id].common)!=null&&r.type?this.objects[this.edit.id].common.type:typeof this.edit.val,t=this.objects[this.edit.id].common.role,s=this.props.objectBrowserValue;return n.createElement(s,{t:this.props.t,lang:this.props.lang,type:e,role:t||"",states:E.getStates(this.objects[this.edit.id]),themeType:this.props.themeType,theme:this.props.theme,expertMode:!!this.state.filter.expertMode,value:this.edit.val,socket:this.props.socket,object:this.objects[this.edit.id],defaultHistory:this.defaultHistory,dateFormat:this.props.dateFormat||this.systemConfig.common.dateFormat,isFloatComma:this.props.isFloatComma===void 0?this.systemConfig.common.isFloatComma:this.props.isFloatComma,onClose:o=>{this.setState({updateOpened:!1}),o&&this.onUpdate(o)},width:this.props.width})}doFilter(e){if(!this.objects||!this.root)return;e||this.localStorage.setItem(`${this.props.dialogName||"App"}.objectFilter`,JSON.stringify(this.state.filter));const t={count:0};go(this.root,this.state.filter,this.props.lang,this.objects,void 0,t,this.props.customFilter,this.props.types),t.count<500&&!this.state.expandAllVisible?setTimeout(()=>this.setState({expandAllVisible:!0})):t.count>=500&&this.state.expandAllVisible?setTimeout(()=>this.setState({expandAllVisible:!1})):this.forceUpdate()}render(){if(this.recordStates=[],this.unsubscribeTimer&&clearTimeout(this.unsubscribeTimer),this.styleTheme!==this.props.themeType&&(this.styles={cellIdIconFolder:E.getStyle(this.props.theme,C.cellIdIconFolder),cellIdIconDocument:E.getStyle(this.props.theme,C.cellIdIconDocument),iconDeviceError:E.getStyle(this.props.theme,C.iconDeviceError),iconDeviceConnected:E.getStyle(this.props.theme,C.iconDeviceConnected),iconDeviceDisconnected:E.getStyle(this.props.theme,C.iconDeviceDisconnected),cellButtonsButtonWithCustoms:E.getStyle(this.props.theme,C.cellButtonsButtonWithCustoms),invertedBackground:E.getStyle(this.props.theme,C.invertedBackground),invertedBackgroundFlex:E.getStyle(this.props.theme,C.invertedBackgroundFlex),contextMenuEdit:E.getStyle(this.props.theme,C.contextMenuEdit),contextMenuEditValue:E.getStyle(this.props.theme,C.contextMenuEditValue),contextMenuView:E.getStyle(this.props.theme,C.contextMenuView),contextMenuCustom:E.getStyle(this.props.theme,C.contextMenuCustom),contextMenuACL:E.getStyle(this.props.theme,C.contextMenuACL),contextMenuRoom:E.getStyle(this.props.theme,C.contextMenuRoom),contextMenuRole:E.getStyle(this.props.theme,C.contextMenuRole),contextMenuDelete:E.getStyle(this.props.theme,C.contextMenuDelete),filterInput:E.getStyle(this.props.theme,C.headerCellInput,C.filterInput),iconCopy:E.getStyle(this.props.theme,C.cellButtonsValueButton,C.cellButtonsValueButtonCopy),aliasReadWrite:E.getStyle(this.props.theme,C.cellIdAlias,C.cellIdAliasReadWrite),aliasAlone:E.getStyle(this.props.theme,C.cellIdAlias,C.cellIdAliasAlone)},this.styleTheme=this.props.themeType),this.unsubscribeTimer=setTimeout(()=>{this.unsubscribeTimer=null,this.checkUnsubscribes()},200),this.expertMode!==!!this.state.filter.expertMode&&(this.expertMode=!!this.state.filter.expertMode,this.doFilter(!0)),!this.state.loaded)return n.createElement(er,{key:`${this.props.dialogName}_c`});const e=this.root?this.renderItem(this.root,void 0):null;return n.createElement(oLe,{key:this.props.dialogName},n.createElement("style",null,` @keyframes newValueAnimation-light { 0% { diff --git a/admin/custom/assets/localSharedImportMap-DslGqCtU.js b/admin/custom/assets/localSharedImportMap-C-8wOKN2.js similarity index 93% rename from admin/custom/assets/localSharedImportMap-DslGqCtU.js rename to admin/custom/assets/localSharedImportMap-C-8wOKN2.js index 7ca1b10ce..e8e424038 100644 --- a/admin/custom/assets/localSharedImportMap-DslGqCtU.js +++ b/admin/custom/assets/localSharedImportMap-C-8wOKN2.js @@ -1 +1 @@ -import"./virtual_mf-REMOTE_ENTRY_ID_ConfigCustomJavascriptSet__customComponents_js-Oq3-1vii.js";const a={"@emotion/react":async()=>await import("./emotion-react.browser.esm-chZAeh_-.js"),"@emotion/styled":async()=>await import("./emotion-styled.browser.esm-Yi13plpH.js"),"@iobroker/adapter-react-v5":async()=>await import("./index-qs6J40Tp.js"),"@iobroker/json-config":async()=>await import("./index-ByH7ba-v.js"),"@mui/icons-material":async()=>await import("./index-17vbGv00.js"),"@mui/material":async()=>await import("./index-FTmk0JJx.js"),"@mui/x-date-pickers":async()=>await import("./index-DV76KW3-.js"),"date-fns":async()=>await import("./index-Bvwv5H7k.js"),leaflet:async()=>await import("./leaflet-src-B472P7Y1.js").then(r=>r.l),react:async()=>await import("./index-DpJ18x6R.js").then(r=>r.i),"react-dom":async()=>await import("./index-DlQbqHom.js").then(r=>r.i)},n={"@emotion/react":{name:"@emotion/react",version:"11.14.0",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n["@emotion/react"].loaded=!0;const{"@emotion/react":e}=a,t={...await e()};return Object.defineProperty(t,"__esModule",{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@emotion/styled":{name:"@emotion/styled",version:"11.14.1",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n["@emotion/styled"].loaded=!0;const{"@emotion/styled":e}=a,t={...await e()};return Object.defineProperty(t,"__esModule",{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@iobroker/adapter-react-v5":{name:"@iobroker/adapter-react-v5",version:"8.2.6",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n["@iobroker/adapter-react-v5"].loaded=!0;const{"@iobroker/adapter-react-v5":e}=a,t={...await e()};return Object.defineProperty(t,"__esModule",{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@iobroker/json-config":{name:"@iobroker/json-config",version:"8.4.3",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n["@iobroker/json-config"].loaded=!0;const{"@iobroker/json-config":e}=a,t={...await e()};return Object.defineProperty(t,"__esModule",{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@mui/icons-material":{name:"@mui/icons-material",version:"6.5.0",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n["@mui/icons-material"].loaded=!0;const{"@mui/icons-material":e}=a,t={...await e()};return Object.defineProperty(t,"__esModule",{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@mui/material":{name:"@mui/material",version:"6.5.0",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n["@mui/material"].loaded=!0;const{"@mui/material":e}=a,t={...await e()};return Object.defineProperty(t,"__esModule",{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@mui/x-date-pickers":{name:"@mui/x-date-pickers",version:"7.29.4",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n["@mui/x-date-pickers"].loaded=!0;const{"@mui/x-date-pickers":e}=a,t={...await e()};return Object.defineProperty(t,"__esModule",{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:"*"}},"date-fns":{name:"date-fns",version:"4.1.0",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n["date-fns"].loaded=!0;const{"date-fns":e}=a,t={...await e()};return Object.defineProperty(t,"__esModule",{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:"*"}},leaflet:{name:"leaflet",version:"1.9.4",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n.leaflet.loaded=!0;const{leaflet:e}=a,t={...await e()};return Object.defineProperty(t,"__esModule",{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:"*"}},react:{name:"react",version:"18.3.1",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n.react.loaded=!0;const{react:e}=a,t={...await e()};return Object.defineProperty(t,"__esModule",{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:"*"}},"react-dom":{name:"react-dom",version:"18.3.1",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n["react-dom"].loaded=!0;const{"react-dom":e}=a,t={...await e()};return Object.defineProperty(t,"__esModule",{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:"*"}}},u=[];export{u as usedRemotes,n as usedShared}; +import"./virtual_mf-REMOTE_ENTRY_ID_ConfigCustomJavascriptSet__customComponents_js-CO2hfDx_.js";const a={"@emotion/react":async()=>await import("./emotion-react.browser.esm-chZAeh_-.js"),"@emotion/styled":async()=>await import("./emotion-styled.browser.esm-Yi13plpH.js"),"@iobroker/adapter-react-v5":async()=>await import("./index-DSGXVHGh.js"),"@iobroker/json-config":async()=>await import("./index-C8_qJ4Y6.js"),"@mui/icons-material":async()=>await import("./index-17vbGv00.js"),"@mui/material":async()=>await import("./index-FTmk0JJx.js"),"@mui/x-date-pickers":async()=>await import("./index-DV76KW3-.js"),"date-fns":async()=>await import("./index-Bvwv5H7k.js"),leaflet:async()=>await import("./leaflet-src-B472P7Y1.js").then(r=>r.l),react:async()=>await import("./index-DpJ18x6R.js").then(r=>r.i),"react-dom":async()=>await import("./index-DlQbqHom.js").then(r=>r.i)},n={"@emotion/react":{name:"@emotion/react",version:"11.14.0",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n["@emotion/react"].loaded=!0;const{"@emotion/react":e}=a,t={...await e()};return Object.defineProperty(t,"__esModule",{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@emotion/styled":{name:"@emotion/styled",version:"11.14.1",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n["@emotion/styled"].loaded=!0;const{"@emotion/styled":e}=a,t={...await e()};return Object.defineProperty(t,"__esModule",{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@iobroker/adapter-react-v5":{name:"@iobroker/adapter-react-v5",version:"8.2.7",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n["@iobroker/adapter-react-v5"].loaded=!0;const{"@iobroker/adapter-react-v5":e}=a,t={...await e()};return Object.defineProperty(t,"__esModule",{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@iobroker/json-config":{name:"@iobroker/json-config",version:"8.4.7",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n["@iobroker/json-config"].loaded=!0;const{"@iobroker/json-config":e}=a,t={...await e()};return Object.defineProperty(t,"__esModule",{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@mui/icons-material":{name:"@mui/icons-material",version:"6.5.0",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n["@mui/icons-material"].loaded=!0;const{"@mui/icons-material":e}=a,t={...await e()};return Object.defineProperty(t,"__esModule",{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@mui/material":{name:"@mui/material",version:"6.5.0",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n["@mui/material"].loaded=!0;const{"@mui/material":e}=a,t={...await e()};return Object.defineProperty(t,"__esModule",{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@mui/x-date-pickers":{name:"@mui/x-date-pickers",version:"7.29.4",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n["@mui/x-date-pickers"].loaded=!0;const{"@mui/x-date-pickers":e}=a,t={...await e()};return Object.defineProperty(t,"__esModule",{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:"*"}},"date-fns":{name:"date-fns",version:"4.1.0",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n["date-fns"].loaded=!0;const{"date-fns":e}=a,t={...await e()};return Object.defineProperty(t,"__esModule",{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:"*"}},leaflet:{name:"leaflet",version:"1.9.4",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n.leaflet.loaded=!0;const{leaflet:e}=a,t={...await e()};return Object.defineProperty(t,"__esModule",{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:"*"}},react:{name:"react",version:"18.3.1",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n.react.loaded=!0;const{react:e}=a,t={...await e()};return Object.defineProperty(t,"__esModule",{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:"*"}},"react-dom":{name:"react-dom",version:"18.3.1",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n["react-dom"].loaded=!0;const{"react-dom":e}=a,t={...await e()};return Object.defineProperty(t,"__esModule",{value:!0,enumerable:!1}),function(){return t}},shareConfig:{singleton:!0,requiredVersion:"*"}}},u=[];export{u as usedRemotes,n as usedShared}; diff --git a/admin/custom/assets/virtual_mf-REMOTE_ENTRY_ID_ConfigCustomJavascriptSet__customComponents_js-Oq3-1vii.js b/admin/custom/assets/virtual_mf-REMOTE_ENTRY_ID_ConfigCustomJavascriptSet__customComponents_js-CO2hfDx_.js similarity index 99% rename from admin/custom/assets/virtual_mf-REMOTE_ENTRY_ID_ConfigCustomJavascriptSet__customComponents_js-Oq3-1vii.js rename to admin/custom/assets/virtual_mf-REMOTE_ENTRY_ID_ConfigCustomJavascriptSet__customComponents_js-CO2hfDx_.js index 830de6cd2..3460f3add 100644 --- a/admin/custom/assets/virtual_mf-REMOTE_ENTRY_ID_ConfigCustomJavascriptSet__customComponents_js-Oq3-1vii.js +++ b/admin/custom/assets/virtual_mf-REMOTE_ENTRY_ID_ConfigCustomJavascriptSet__customComponents_js-CO2hfDx_.js @@ -1,8 +1,8 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./localSharedImportMap-DslGqCtU.js","./preload-helper-BDBacUwf.js","./virtualExposes-D402kVGY.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./localSharedImportMap-C-8wOKN2.js","./preload-helper-BDBacUwf.js","./virtualExposes-D402kVGY.js"])))=>i.map(i=>d[i]); import{_ as sr}from"./preload-helper-BDBacUwf.js";var ir={},ar={},Tt={},M={},D={},P={};const ln="federation-manifest.json",cn=".json",un="FEDERATION_DEBUG",j={AT:"@",HYPHEN:"-",SLASH:"/"},De={[j.AT]:"scope_",[j.HYPHEN]:"_",[j.SLASH]:"__"},fn={[De[j.AT]]:j.AT,[De[j.HYPHEN]]:j.HYPHEN,[De[j.SLASH]]:j.SLASH},dn=":",hn="mf-manifest.json",mn="mf-stats.json",_n={NPM:"npm",APP:"app"},gn="__MF_DEVTOOLS_MODULE_INFO__",pn="ENCODE_NAME_PREFIX",yn=".federation",En={identifier:"MFDataPrefetch",globalKey:"__PREFETCH__",library:"mf-data-prefetch",exportsKey:"__PREFETCH_EXPORTS__",fileName:"bootstrap.js"};let Sn=(function(e){return e[e.UNKNOWN=1]="UNKNOWN",e[e.CALCULATED=2]="CALCULATED",e[e.NO_USE=0]="NO_USE",e})({});P.BROWSER_LOG_KEY=un;P.ENCODE_NAME_PREFIX=pn;P.EncodedNameTransformMap=fn;P.FederationModuleManifest=ln;P.MANIFEST_EXT=cn;P.MFModuleType=_n;P.MFPrefetchCommon=En;P.MODULE_DEVTOOL_IDENTIFIER=gn;P.ManifestFileName=hn;P.NameTransformMap=De;P.NameTransformSymbol=j;P.SEPARATOR=dn;P.StatsFileName=mn;P.TEMP_DIR=yn;P.TreeShakingStatus=Sn;var lr={},re={},Ot=Object.defineProperty,bn=(e,t)=>{let r={};for(var n in e)Ot(r,n,{get:e[n],enumerable:!0});return t||Ot(r,Symbol.toStringTag,{value:"Module"}),r};re.__exportAll=bn;(function(e){var r=re.__exportAll({});Object.defineProperty(e,"ContainerPlugin_exports",{enumerable:!0,get:function(){return r}})})(lr);var cr={};(function(e){var r=re.__exportAll({});Object.defineProperty(e,"ContainerReferencePlugin_exports",{enumerable:!0,get:function(){return r}})})(cr);var ur={};(function(e){var r=re.__exportAll({});Object.defineProperty(e,"ModuleFederationPlugin_exports",{enumerable:!0,get:function(){return r}})})(ur);var fr={};(function(e){var r=re.__exportAll({});Object.defineProperty(e,"SharePlugin_exports",{enumerable:!0,get:function(){return r}})})(fr);var dr={};(function(e){var r=re.__exportAll({});Object.defineProperty(e,"ConsumeSharedPlugin_exports",{enumerable:!0,get:function(){return r}})})(dr);var hr={};(function(e){var r=re.__exportAll({});Object.defineProperty(e,"ProvideSharedPlugin_exports",{enumerable:!0,get:function(){return r}})})(hr);var J={},be={};const Rn=P,mr=!0;function _r(){return mr}function Tn(){return typeof navigator<"u"&&(navigator==null?void 0:navigator.product)==="ReactNative"}function In(){try{if(_r()&&window.localStorage)return!!localStorage.getItem(Rn.BROWSER_LOG_KEY)}catch{return!1}return!1}function $n(){return typeof process<"u"&&be&&be.FEDERATION_DEBUG?!!be.FEDERATION_DEBUG:typeof FEDERATION_DEBUG<"u"&&FEDERATION_DEBUG?!0:In()}const Nn=function(){return typeof process<"u"&&be?be:{}};J.getProcessEnv=Nn;J.isBrowserEnv=_r;J.isBrowserEnvValue=mr;J.isDebugMode=$n;J.isReactNativeEnv=Tn;var H={};const S=P,dt=J,gr="[ Federation Runtime ]",Mn=(e,t,r=S.SEPARATOR)=>{const n=e.split(r),o=dt.getProcessEnv().NODE_ENV==="development"&&t,s="*",i=a=>a.startsWith("http")||a.includes(S.MANIFEST_EXT);if(n.length>=2){let[a,...c]=n;e.startsWith(r)&&(a=n.slice(0,2).join(r),c=[o||n.slice(2).join(r)]);let l=o||c.join(r);return i(l)?{name:a,entry:l}:{name:a,version:l||s}}else if(n.length===1){const[a]=n;return o&&i(o)?{name:a,entry:o}:{name:a,version:o||s}}else throw`Invalid entry value: ${e}`},Pn=function(...e){return e.length?e.reduce((t,r)=>r?t?`${t}${S.SEPARATOR}${r}`:r:t,""):""},It=function(e,t="",r=!1){try{const n=r?".js":"";return`${t}${e.replace(new RegExp(`${S.NameTransformSymbol.AT}`,"g"),S.NameTransformMap[S.NameTransformSymbol.AT]).replace(new RegExp(`${S.NameTransformSymbol.HYPHEN}`,"g"),S.NameTransformMap[S.NameTransformSymbol.HYPHEN]).replace(new RegExp(`${S.NameTransformSymbol.SLASH}`,"g"),S.NameTransformMap[S.NameTransformSymbol.SLASH])}${n}`}catch(n){throw n}},vn=function(e,t,r){try{let n=e;if(t){if(!n.startsWith(t))return n;n=n.replace(new RegExp(t,"g"),"")}return n=n.replace(new RegExp(`${S.NameTransformMap[S.NameTransformSymbol.AT]}`,"g"),S.EncodedNameTransformMap[S.NameTransformMap[S.NameTransformSymbol.AT]]).replace(new RegExp(`${S.NameTransformMap[S.NameTransformSymbol.SLASH]}`,"g"),S.EncodedNameTransformMap[S.NameTransformMap[S.NameTransformSymbol.SLASH]]).replace(new RegExp(`${S.NameTransformMap[S.NameTransformSymbol.HYPHEN]}`,"g"),S.EncodedNameTransformMap[S.NameTransformMap[S.NameTransformSymbol.HYPHEN]]),r&&(n=n.replace(".js","")),n}catch(n){throw n}},An=(e,t)=>{if(!e)return"";let r=e;return r==="."&&(r="default_export"),r.startsWith("./")&&(r=r.replace("./","")),It(r,"__federation_expose_",t)},On=(e,t)=>e?It(e,"__federation_shared_",t):"",kn=(e,t)=>{if("getPublicPath"in e){let r;return e.getPublicPath.startsWith("function")?r=new Function("return "+e.getPublicPath)()():r=new Function(e.getPublicPath)(),`${r}${t}`}else return"publicPath"in e?!dt.isBrowserEnv()&&!dt.isReactNativeEnv()&&"ssrPublicPath"in e&&typeof e.ssrPublicPath=="string"?`${e.ssrPublicPath}${t}`:`${e.publicPath}${t}`:(console.warn("Cannot get resource URL. If in debug mode, please ignore.",e,t),"")},wn=(e,t)=>{e||pr(t)},pr=e=>{throw new Error(`${gr}: ${e}`)},Fn=e=>{console.warn(`${gr}: ${e}`)};function Ln(e){try{return JSON.stringify(e,null,2)}catch{return""}}const Dn=/^([\d^=v<>~]|[*xX]$)/;function Hn(e){return Dn.test(e)}H.assert=wn;H.composeKeyWithSeparator=Pn;H.decodeName=vn;H.encodeName=It;H.error=pr;H.generateExposeFilename=An;H.generateShareFilename=On;H.getResourceUrl=kn;H.isRequiredVersion=Hn;H.parseEntry=Mn;H.safeToString=Ln;H.warn=Fn;var ue={};const ye=P,Q=(e,t)=>{if(!e)return t;const n=(o=>{if(o===".")return"";if(o.startsWith("./"))return o.replace("./","");if(o.startsWith("/")){const s=o.slice(1);return s.endsWith("/")?s.slice(0,-1):s}return o})(e);return n?n.endsWith("/")?`${n}${t}`:`${n}/${t}`:t};function yr(e){return e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")}function Cn(e,t={}){var E,I,k;const{remotes:r={},overrides:n={},version:o}=t;let s;const i=()=>"publicPath"in e.metaData?(e.metaData.publicPath==="auto"||e.metaData.publicPath==="")&&o?yr(o):e.metaData.publicPath:e.metaData.getPublicPath,a=Object.keys(n);let c={};Object.keys(r).length||(c=((E=e.remotes)==null?void 0:E.reduce((y,N)=>{let R;const v=N.federationContainerName;return a.includes(v)?R=n[v]:"version"in N?R=N.version:R=N.entry,y[v]={matchedVersion:R},y},{}))||{}),Object.keys(r).forEach(y=>c[y]={matchedVersion:a.includes(y)?n[y]:r[y]});const{remoteEntry:{path:l,name:u,type:d},types:f={path:"",name:"",zip:"",api:""},buildInfo:{buildVersion:h},globalName:m,ssrRemoteEntry:_}=e.metaData,{exposes:g}=e;let p={version:o||"",buildVersion:h,globalName:m,remoteEntry:Q(l,u),remoteEntryType:d,remoteTypes:Q(f.path,f.name),remoteTypesZip:f.zip||"",remoteTypesAPI:f.api||"",remotesInfo:c,shared:e==null?void 0:e.shared.map(y=>({assets:y.assets,sharedName:y.name,version:y.version,usedExports:y.referenceExports||[]})),modules:g==null?void 0:g.map(y=>({moduleName:y.name,modulePath:y.path,assets:y.assets}))};if((I=e.metaData)!=null&&I.prefetchInterface){const y=e.metaData.prefetchInterface;p={...p,prefetchInterface:y}}if((k=e.metaData)!=null&&k.prefetchEntry){const{path:y,name:N,type:R}=e.metaData.prefetchEntry;p={...p,prefetchEntry:Q(y,N),prefetchEntryType:R}}if("publicPath"in e.metaData?(s={...p,publicPath:i()},typeof e.metaData.ssrPublicPath=="string"&&(s.ssrPublicPath=e.metaData.ssrPublicPath)):s={...p,getPublicPath:i()},_){const y=Q(_.path,_.name);s.ssrRemoteEntry=y,s.ssrRemoteEntryType=_.type||"commonjs-module"}return s}function qn(e){return!!("remoteEntry"in e&&e.remoteEntry.includes(ye.MANIFEST_EXT))}function Gn(e){if(!e)return{statsFileName:ye.StatsFileName,manifestFileName:ye.ManifestFileName};let t=typeof e=="boolean"?"":e.filePath||"",r=typeof e=="boolean"?"":e.fileName||"";const n=".json",o=a=>a.endsWith(n)?a:`${a}${n}`,s=(a,c)=>a.replace(n,`${c}${n}`),i=r?o(r):ye.ManifestFileName;return{statsFileName:Q(t,r?s(i,"-stats"):ye.StatsFileName),manifestFileName:Q(t,i)}}ue.generateSnapshotFromManifest=Cn;ue.getManifestFileName=Gn;ue.inferAutoPublicPath=yr;ue.isManifestProvider=qn;ue.simpleJoinRemoteEntry=Q;var fe={};const kt=J,Er="[ Module Federation ]",ge=console,Un=["logger.ts","logger.js","captureStackTrace","Logger.emit","Logger.log","Logger.info","Logger.warn","Logger.error","Logger.debug"];function Wn(){try{const e=new Error().stack;if(!e)return;const[,...t]=e.split(` `),r=t.filter(n=>!Un.some(o=>n.includes(o)));return r.length?`Stack trace: ${r.slice(0,5).join(` `)}`:void 0}catch{return}}var Sr=class{constructor(e,t=ge){this.prefix=e,this.delegate=t??ge}setPrefix(e){this.prefix=e}setDelegate(e){this.delegate=e??ge}emit(e,t){const r=this.delegate,n=kt.isDebugMode()?Wn():void 0,o=n?[...t,n]:t,s=(()=>{switch(e){case"log":return["log","info"];case"info":return["info","log"];case"warn":return["warn","info","log"];case"error":return["error","warn","log"];default:return["debug","log"]}})();for(const i of s){const a=r[i];if(typeof a=="function"){a.call(r,this.prefix,...o);return}}for(const i of s){const a=ge[i];if(typeof a=="function"){a.call(ge,this.prefix,...o);return}}}log(...e){this.emit("log",e)}warn(...e){this.emit("warn",e)}error(...e){this.emit("error",e)}success(...e){this.emit("info",e)}info(...e){this.emit("info",e)}ready(...e){this.emit("info",e)}debug(...e){kt.isDebugMode()&&this.emit("debug",e)}};function br(e){return new Sr(e)}function Rr(e){const t=new Sr(e);return Object.defineProperty(t,"__mf_infrastructure_logger__",{value:!0,enumerable:!1,configurable:!1}),t}function Bn(e,t,r){if(e.__mf_infrastructure_logger__&&t!=null&&t.getInfrastructureLogger)try{const n=t.getInfrastructureLogger(r);n&&typeof n=="object"&&(typeof n.log=="function"||typeof n.info=="function"||typeof n.warn=="function"||typeof n.error=="function")&&e.setDelegate(n)}catch{e.setDelegate(void 0)}}const jn=br(Er),Vn=Rr(Er);fe.bindLoggerToCompiler=Bn;fe.createInfrastructureLogger=Rr;fe.createLogger=br;fe.infrastructureLogger=Vn;fe.logger=jn;var de={};const Xn=H;async function $t(e,t){try{return await e()}catch(r){!t&&Xn.warn(r);return}}function Ue(e,t){const r=/^(https?:)?\/\//i;return e.replace(r,"").replace(/\/$/,"")===t.replace(r,"").replace(/\/$/,"")}function Tr(e){let t=null,r=!0,n=2e4,o;const s=document.getElementsByTagName("script");for(let l=0;l{t&&(d==="async"||d==="defer"?t[d]=l[d]:t.getAttribute(d)||t.setAttribute(d,l[d]))})}let i=null;const a=typeof window<"u"?l=>{if(l.filename&&Ue(l.filename,e.url)){const u=new Error(`ScriptExecutionError: Script "${e.url}" loaded but threw a runtime error during execution: ${l.message} (${l.filename}:${l.lineno}:${l.colno})`);u.name="ScriptExecutionError",i=u}}:null;a&&window.addEventListener("error",a);const c=async(l,u)=>{clearTimeout(o),a&&window.removeEventListener("error",a);const d=()=>{if((u==null?void 0:u.type)==="error"){const f=new Error(`ScriptNetworkError: Failed to load script "${e.url}" - the script URL is unreachable or the server returned an error (network failure, 404, CORS, etc.)`);f.name="ScriptNetworkError",e!=null&&e.onErrorCallback&&(e==null||e.onErrorCallback(f))}else i?e!=null&&e.onErrorCallback&&(e==null||e.onErrorCallback(i)):e!=null&&e.cb&&(e==null||e.cb())};if(t&&(t.onerror=null,t.onload=null,$t(()=>{const{needDeleteScript:f=!0}=e;f&&t!=null&&t.parentNode&&t.parentNode.removeChild(t)}),l&&typeof l=="function")){const f=l(u);if(f instanceof Promise){const h=await f;return d(),h}return d(),f}d()};return t.onerror=c.bind(null,t.onerror),t.onload=c.bind(null,t.onload),o=setTimeout(()=>{c(null,new Error(`Remote script "${e.url}" time-outed.`))},n),{script:t,needAttach:r}}function xn(e){let t=null,r=!0;const n=document.getElementsByTagName("link");for(let s=0;s{t&&!t.getAttribute(a)&&t.setAttribute(a,i[a])})}const o=(s,i)=>{const a=()=>{(i==null?void 0:i.type)==="error"?e!=null&&e.onErrorCallback&&(e==null||e.onErrorCallback(i)):e!=null&&e.cb&&(e==null||e.cb())};if(t&&(t.onerror=null,t.onload=null,$t(()=>{const{needDeleteLink:c=!0}=e;c&&t!=null&&t.parentNode&&t.parentNode.removeChild(t)}),s)){const c=s(i);return a(),c}a()};return t.onerror=o.bind(null,t.onerror),t.onload=o.bind(null,t.onload),{link:t,needAttach:r}}function Kn(e,t){const{attrs:r={},createScriptHook:n}=t;return new Promise((o,s)=>{const{script:i,needAttach:a}=Tr({url:e,cb:o,onErrorCallback:s,attrs:{fetchpriority:"high",...r},createScriptHook:n,needDeleteScript:!0});a&&document.head.appendChild(i)})}de.createLink=xn;de.createScript=Tr;de.isStaticResourcesEqual=Ue;de.loadScript=Kn;de.safeWrapper=$t;var Nt={};const Yn=(e,t,r,n)=>{t(new Error("createScriptNode is disabled in non-Node.js environment"))},zn=(e,t)=>{throw new Error("loadScriptNode is disabled in non-Node.js environment")};Nt.createScriptNode=Yn;Nt.loadScriptNode=zn;var Ir={};function Jn(e,t,r){return function(n){if(n===!1)return!1;if(typeof n>"u")return e?t:!1;if(n===!0)return t;if(n&&typeof n=="object")return{...t,...n};throw new Error(`Unexpected type for \`${r}\`, expect boolean/undefined/object, got: ${typeof n}`)}}Ir.normalizeOptions=Jn;var $r={};const Zn=e=>e;$r.createModuleFederationConfig=Zn;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=P,r=lr,n=cr,o=ur,s=fr,i=dr,a=hr,c=J,l=H,u=ue,d=fe,f=de,h=Nt,m=Ir,_=$r;e.BROWSER_LOG_KEY=t.BROWSER_LOG_KEY,e.ENCODE_NAME_PREFIX=t.ENCODE_NAME_PREFIX,e.EncodedNameTransformMap=t.EncodedNameTransformMap,e.FederationModuleManifest=t.FederationModuleManifest,e.MANIFEST_EXT=t.MANIFEST_EXT,e.MFModuleType=t.MFModuleType,e.MFPrefetchCommon=t.MFPrefetchCommon,e.MODULE_DEVTOOL_IDENTIFIER=t.MODULE_DEVTOOL_IDENTIFIER,e.ManifestFileName=t.ManifestFileName,e.NameTransformMap=t.NameTransformMap,e.NameTransformSymbol=t.NameTransformSymbol,e.SEPARATOR=t.SEPARATOR,e.StatsFileName=t.StatsFileName,e.TEMP_DIR=t.TEMP_DIR,e.TreeShakingStatus=t.TreeShakingStatus,e.assert=l.assert,e.bindLoggerToCompiler=d.bindLoggerToCompiler,e.composeKeyWithSeparator=l.composeKeyWithSeparator,Object.defineProperty(e,"consumeSharedPlugin",{enumerable:!0,get:function(){return i.ConsumeSharedPlugin_exports}}),Object.defineProperty(e,"containerPlugin",{enumerable:!0,get:function(){return r.ContainerPlugin_exports}}),Object.defineProperty(e,"containerReferencePlugin",{enumerable:!0,get:function(){return n.ContainerReferencePlugin_exports}}),e.createInfrastructureLogger=d.createInfrastructureLogger,e.createLink=f.createLink,e.createLogger=d.createLogger,e.createModuleFederationConfig=_.createModuleFederationConfig,e.createScript=f.createScript,e.createScriptNode=h.createScriptNode,e.decodeName=l.decodeName,e.encodeName=l.encodeName,e.error=l.error,e.generateExposeFilename=l.generateExposeFilename,e.generateShareFilename=l.generateShareFilename,e.generateSnapshotFromManifest=u.generateSnapshotFromManifest,e.getManifestFileName=u.getManifestFileName,e.getProcessEnv=c.getProcessEnv,e.getResourceUrl=l.getResourceUrl,e.inferAutoPublicPath=u.inferAutoPublicPath,e.infrastructureLogger=d.infrastructureLogger,e.isBrowserEnv=c.isBrowserEnv,e.isBrowserEnvValue=c.isBrowserEnvValue,e.isDebugMode=c.isDebugMode,e.isManifestProvider=u.isManifestProvider,e.isReactNativeEnv=c.isReactNativeEnv,e.isRequiredVersion=l.isRequiredVersion,e.isStaticResourcesEqual=f.isStaticResourcesEqual,e.loadScript=f.loadScript,e.loadScriptNode=h.loadScriptNode,e.logger=d.logger,Object.defineProperty(e,"moduleFederationPlugin",{enumerable:!0,get:function(){return o.ModuleFederationPlugin_exports}}),e.normalizeOptions=m.normalizeOptions,e.parseEntry=l.parseEntry,Object.defineProperty(e,"provideSharedPlugin",{enumerable:!0,get:function(){return a.ProvideSharedPlugin_exports}}),e.safeToString=l.safeToString,e.safeWrapper=f.safeWrapper,Object.defineProperty(e,"sharePlugin",{enumerable:!0,get:function(){return s.SharePlugin_exports}}),e.simpleJoinRemoteEntry=u.simpleJoinRemoteEntry,e.warn=l.warn})(D);var Nr={},Mt={};const Qn=e=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}#${e.toLowerCase()}`,eo=(e,t,r,n)=>{const o=[`${[t[e]]} #${e}`];return r&&o.push(`args: ${JSON.stringify(r)}`),o.push(Qn(e)),n&&o.push(`Original Error Message: ${n}`),o.join(` `)};Mt.getShortErrorMsg=eo;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Mt;function r(n,o,s,i,a,c){return i(t.getShortErrorMsg(n,o,s,a))}e.logAndReport=r})(Nr);let to=D,ro=Nr;const ee="[ Federation Runtime ]",ht=(0,to.createLogger)(ee);function no(e,t,r,n,o){e||(r!==void 0?mt(t,r,n,void 0,o):mt(t))}function mt(e,t,r,n,o){if(t!==void 0)return(0,ro.logAndReport)(e,t,r??{},i=>{throw new Error(`${ee}: ${i}`)},n,o);const s=e;throw s instanceof Error?(s.message.startsWith(ee)||(s.message=`${ee}: ${s.message}`),s):new Error(`${ee}: ${s}`)}function oo(e){e instanceof Error&&(e.message.startsWith(ee)||(e.message=`${ee}: ${e.message}`)),ht.warn(e)}M.assert=no;M.error=mt;M.logger=ht;M.warn=oo;var $={};const so=M;let wt=D;function io(e,t){return e.findIndex(r=>r===t)===-1&&e.push(t),e}function ao(e){return"version"in e&&e.version?`${e.name}:${e.version}`:"entry"in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function lo(e){return typeof e.entry<"u"}function co(e){return!e.entry.includes(".json")}async function uo(e,t){try{return await e()}catch(r){!t&&so.warn(r);return}}function fo(e){return e&&typeof e=="object"}const Mr=Object.prototype.toString;function ho(e){return Mr.call(e)==="[object Object]"}function mo(e,t){const r=/^(https?:)?\/\//i;return e.replace(r,"").replace(/\/$/,"")===t.replace(r,"").replace(/\/$/,"")}function _o(e){return Array.isArray(e)?e:[e]}function go(e){const t={url:"",type:"global",globalName:""};return wt.isBrowserEnvValue||(0,wt.isReactNativeEnv)()||!("ssrRemoteEntry"in e)?"remoteEntry"in e?{url:e.remoteEntry,type:e.remoteEntryType,globalName:e.globalName}:t:"ssrRemoteEntry"in e?{url:e.ssrRemoteEntry||t.url,type:e.ssrRemoteEntryType||t.type,globalName:e.globalName}:t}const po=(e,t)=>{let r;return e.endsWith("/")?r=e.slice(0,-1):r=e,t.startsWith(".")&&(t=t.slice(1)),r=r+t,r};$.addUniqueItem=io;$.arrayOptions=_o;$.getFMId=ao;$.getRemoteEntryInfoFromSnapshot=go;$.isObject=fo;$.isPlainObject=ho;$.isPureRemoteEntry=co;$.isRemoteInfoWithEntry=lo;$.isStaticResourcesEqual=mo;$.objectToString=Mr;$.processModuleAlias=po;$.safeWrapper=uo;var b={};const Pr=M,_t=$;let yo=D;const O=typeof globalThis=="object"?globalThis:window,C=(()=>{try{return document.defaultView}catch{return O}})(),Eo=C;function He(e,t,r){Object.defineProperty(e,t,{value:r,configurable:!1,writable:!0})}function Ce(e,t){return Object.hasOwnProperty.call(e,t)}Ce(O,"__GLOBAL_LOADING_REMOTE_ENTRY__")||He(O,"__GLOBAL_LOADING_REMOTE_ENTRY__",{});const gt=O.__GLOBAL_LOADING_REMOTE_ENTRY__;function vr(e){Ce(e,"__VMOK__")&&!Ce(e,"__FEDERATION__")&&He(e,"__FEDERATION__",e.__VMOK__),Ce(e,"__FEDERATION__")||(He(e,"__FEDERATION__",{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),He(e,"__VMOK__",e.__FEDERATION__)),e.__FEDERATION__.__GLOBAL_PLUGIN__??=[],e.__FEDERATION__.__INSTANCES__??=[],e.__FEDERATION__.moduleInfo??={},e.__FEDERATION__.__SHARE__??={},e.__FEDERATION__.__MANIFEST_LOADING__??={},e.__FEDERATION__.__PRELOADED_MAP__??=new Map}vr(O);vr(C);function So(){O.__FEDERATION__.__GLOBAL_PLUGIN__=[],O.__FEDERATION__.__INSTANCES__=[],O.__FEDERATION__.moduleInfo={},O.__FEDERATION__.__SHARE__={},O.__FEDERATION__.__MANIFEST_LOADING__={},Object.keys(gt).forEach(e=>{delete gt[e]})}function bo(e){O.__FEDERATION__.__INSTANCES__.push(e)}function Ro(){return O.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function To(e,t=(0,yo.isDebugMode)()){t&&(O.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,O.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__="2.2.2")}function pt(e,t){if(typeof t=="string"){if(e[t])return{value:e[t],key:t};{const r=Object.keys(e);for(const n of r){const[o,s]=n.split(":"),i=`${o}:${t}`,a=e[i];if(a)return{value:a,key:i}}return{value:void 0,key:t}}}else Pr.error(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`)}const Io=()=>C.__FEDERATION__.moduleInfo,Ar=(e,t)=>{const r=pt(t,_t.getFMId(e)).value;if(r&&!r.version&&"version"in e&&e.version&&(r.version=e.version),r)return r;if("version"in e&&e.version){const{version:n,...o}=e,s=_t.getFMId(o),i=pt(C.__FEDERATION__.moduleInfo,s).value;if((i==null?void 0:i.version)===n)return i}},$o=e=>Ar(e,C.__FEDERATION__.moduleInfo),No=(e,t)=>{const r=_t.getFMId(e);return C.__FEDERATION__.moduleInfo[r]=t,C.__FEDERATION__.moduleInfo},Mo=e=>(C.__FEDERATION__.moduleInfo={...C.__FEDERATION__.moduleInfo,...e},()=>{const t=Object.keys(e);for(const r of t)delete C.__FEDERATION__.moduleInfo[r]}),Po=(e,t)=>{const r=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:r,entryExports:O[r]}},vo=e=>{const{__GLOBAL_PLUGIN__:t}=C.__FEDERATION__;e.forEach(r=>{t.findIndex(n=>n.name===r.name)===-1?t.push(r):Pr.warn(`The plugin ${r.name} has been registered.`)})},Ao=()=>C.__FEDERATION__.__GLOBAL_PLUGIN__,Oo=e=>O.__FEDERATION__.__PRELOADED_MAP__.get(e),ko=e=>O.__FEDERATION__.__PRELOADED_MAP__.set(e,!0);b.CurrentGlobal=O;b.Global=Eo;b.addGlobalSnapshot=Mo;b.getGlobalFederationConstructor=Ro;b.getGlobalHostPlugins=Ao;b.getGlobalSnapshot=Io;b.getGlobalSnapshotInfoByModuleInfo=$o;b.getInfoWithoutType=pt;b.getPreloaded=Oo;b.getRemoteEntryExports=Po;b.getTargetSnapshotInfoByModuleInfo=Ar;b.globalLoading=gt;b.nativeGlobal=C;b.registerGlobalPlugins=vo;b.resetFederationGlobalInfo=So;b.setGlobalFederationConstructor=To;b.setGlobalFederationInstance=bo;b.setGlobalSnapshotInfoByModuleInfo=No;b.setPreloaded=ko;var Pt={},ne={},W={};const Ft="[0-9A-Za-z-]+",vt=`(?:\\+(${Ft}(?:\\.${Ft})*))`,Re="0|[1-9]\\d*",qe="[0-9]+",Or="\\d*[a-zA-Z-][a-zA-Z0-9-]*",Lt=`(?:${qe}|${Or})`,wo=`(?:-?(${Lt}(?:\\.${Lt})*))`,Dt=`(?:${Re}|${Or})`,kr=`(?:-(${Dt}(?:\\.${Dt})*))`,ze=`${Re}|x|X|\\*`,ce=`[v=\\s]*(${ze})(?:\\.(${ze})(?:\\.(${ze})(?:${kr})?${vt}?)?)?`,Fo=`^\\s*(${ce})\\s+-\\s+(${ce})\\s*$`,Lo=`[v=\\s]*${`(${qe})\\.(${qe})\\.(${qe})`}${wo}?${vt}?`,At="((?:<|>)?=?)",Do=`(\\s*)${At}\\s*(${Lo}|${ce})`,wr="(?:~>?)",Ho=`(\\s*)${wr}\\s+`,Fr="(?:\\^)",Co=`(\\s*)${Fr}\\s+`,qo="(<|>)?=?\\s*\\*",Go=`^${Fr}${ce}$`,Uo=`v?${`(${Re})\\.(${Re})\\.(${Re})`}${kr}?${vt}?`,Wo=`^${wr}${ce}$`,Bo=`^${At}\\s*${ce}$`,jo=`^${At}\\s*(${Uo})$|^$`,Vo="^\\s*>=\\s*0.0.0\\s*$";W.caret=Go;W.caretTrim=Co;W.comparator=jo;W.comparatorTrim=Do;W.gte0=Vo;W.hyphenRange=Fo;W.star=qo;W.tilde=Wo;W.tildeTrim=Ho;W.xRange=Bo;const Xo=W;function Lr(e){return new RegExp(e)}function xo(e){return!e||e.toLowerCase()==="x"||e==="*"}function Ko(...e){return t=>e.reduce((r,n)=>n(r),t)}function Yo(e){return e.match(Lr(Xo.comparator))}function zo(e,t,r,n){const o=`${e}.${t}.${r}`;return n?`${o}-${n}`:o}ne.combineVersion=zo;ne.extractComparator=Yo;ne.isXVersion=xo;ne.parseRegex=Lr;ne.pipe=Ko;var V={};const x=W,T=ne;function Jo(e){return e.replace(T.parseRegex(x.hyphenRange),(t,r,n,o,s,i,a,c,l,u,d,f)=>(T.isXVersion(n)?r="":T.isXVersion(o)?r=`>=${n}.0.0`:T.isXVersion(s)?r=`>=${n}.${o}.0`:r=`>=${r}`,T.isXVersion(l)?c="":T.isXVersion(u)?c=`<${Number(l)+1}.0.0-0`:T.isXVersion(d)?c=`<${l}.${Number(u)+1}.0-0`:f?c=`<=${l}.${u}.${d}-${f}`:c=`<=${c}`,`${r} ${c}`.trim()))}function Zo(e){return e.replace(T.parseRegex(x.comparatorTrim),"$1$2$3")}function Qo(e){return e.replace(T.parseRegex(x.tildeTrim),"$1~")}function es(e){return e.replace(T.parseRegex(x.caretTrim),"$1^")}function ts(e){return e.trim().split(/\s+/).map(t=>t.replace(T.parseRegex(x.caret),(r,n,o,s,i)=>T.isXVersion(n)?"":T.isXVersion(o)?`>=${n}.0.0 <${Number(n)+1}.0.0-0`:T.isXVersion(s)?n==="0"?`>=${n}.${o}.0 <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.0 <${Number(n)+1}.0.0-0`:i?n==="0"?o==="0"?`>=${n}.${o}.${s}-${i} <${n}.${o}.${Number(s)+1}-0`:`>=${n}.${o}.${s}-${i} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${s}-${i} <${Number(n)+1}.0.0-0`:n==="0"?o==="0"?`>=${n}.${o}.${s} <${n}.${o}.${Number(s)+1}-0`:`>=${n}.${o}.${s} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${s} <${Number(n)+1}.0.0-0`)).join(" ")}function rs(e){return e.trim().split(/\s+/).map(t=>t.replace(T.parseRegex(x.tilde),(r,n,o,s,i)=>T.isXVersion(n)?"":T.isXVersion(o)?`>=${n}.0.0 <${Number(n)+1}.0.0-0`:T.isXVersion(s)?`>=${n}.${o}.0 <${n}.${Number(o)+1}.0-0`:i?`>=${n}.${o}.${s}-${i} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${s} <${n}.${Number(o)+1}.0-0`)).join(" ")}function ns(e){return e.split(/\s+/).map(t=>t.trim().replace(T.parseRegex(x.xRange),(r,n,o,s,i,a)=>{const c=T.isXVersion(o),l=c||T.isXVersion(s),u=l||T.isXVersion(i);return n==="="&&u&&(n=""),a="",c?n===">"||n==="<"?"<0.0.0-0":"*":n&&u?(l&&(s=0),i=0,n===">"?(n=">=",l?(o=Number(o)+1,s=0,i=0):(s=Number(s)+1,i=0)):n==="<="&&(n="<",l?o=Number(o)+1:s=Number(s)+1),n==="<"&&(a="-0"),`${n+o}.${s}.${i}${a}`):l?`>=${o}.0.0${a} <${Number(o)+1}.0.0-0`:u?`>=${o}.${s}.0${a} <${o}.${Number(s)+1}.0-0`:r})).join(" ")}function os(e){return e.trim().replace(T.parseRegex(x.star),"")}function ss(e){return e.trim().replace(T.parseRegex(x.gte0),"")}V.parseCaretTrim=es;V.parseCarets=ts;V.parseComparatorTrim=Zo;V.parseGTE0=ss;V.parseHyphen=Jo;V.parseStar=os;V.parseTildeTrim=Qo;V.parseTildes=rs;V.parseXRanges=ns;var Dr={};function Ge(e,t){return e=Number(e)||e,t=Number(t)||t,e>t?1:e===t?0:-1}function is(e,t){const{preRelease:r}=e,{preRelease:n}=t;if(r===void 0&&n)return 1;if(r&&n===void 0)return-1;if(r===void 0&&n===void 0)return 0;for(let o=0,s=r.length;o<=s;o++){const i=r[o],a=n[o];if(i!==a)return i===void 0&&a===void 0?0:i?a?Ge(i,a):-1:1}return 0}function ke(e,t){return Ge(e.major,t.major)||Ge(e.minor,t.minor)||Ge(e.patch,t.patch)||is(e,t)}function Je(e,t){return e.version===t.version}function as(e,t){switch(e.operator){case"":case"=":return Je(e,t);case">":return ke(e,t)<0;case">=":return Je(e,t)||ke(e,t)<0;case"<":return ke(e,t)>0;case"<=":return Je(e,t)||ke(e,t)>0;case void 0:return!0;default:return!1}}Dr.compare=as;const ae=ne,X=V,ls=Dr;function cs(e){return ae.pipe(X.parseCarets,X.parseTildes,X.parseXRanges,X.parseStar)(e)}function us(e){return ae.pipe(X.parseHyphen,X.parseComparatorTrim,X.parseTildeTrim,X.parseCaretTrim)(e.trim()).split(/\s+/).join(" ")}function fs(e,t){if(!e)return!1;const r=ae.extractComparator(e);if(!r)return!1;const[,n,,o,s,i,a]=r,c={operator:n,version:ae.combineVersion(o,s,i,a),major:o,minor:s,patch:i,preRelease:a==null?void 0:a.split(".")},l=t.split("||");for(const u of l){const d=u.trim();if(!d||d==="*"||d==="x")return!0;try{const f=us(d);if(!f.trim())return!0;const h=f.split(" ").map(g=>cs(g)).join(" ");if(!h.trim())return!0;const m=h.split(/\s+/).map(g=>X.parseGTE0(g)).filter(Boolean);if(m.length===0)continue;let _=!0;for(const g of m){const p=ae.extractComparator(g);if(!p){_=!1;break}const[,E,,I,k,y,N]=p;if(!ls.compare({operator:E,version:ae.combineVersion(I,k,y,N),major:I,minor:k,patch:y,preRelease:N==null?void 0:N.split(".")},c)){_=!1;break}}if(_)return!0}catch(f){console.error(`[semver] Error processing range part "${d}":`,f);continue}}return!1}Pt.satisfy=fs;var q={},oe={};const ds="default",hs="global";oe.DEFAULT_REMOTE_TYPE=hs;oe.DEFAULT_SCOPE=ds;const We=M,Hr=$,Cr=b,ms=oe,Ee=Pt;let yt=D;function _s(e,t,r,n){var s,i;let o;return"get"in e?o=e.get:"lib"in e?o=()=>Promise.resolve(e.lib):o=()=>Promise.resolve(()=>{We.error(`Cannot get shared "${r}" from "${t}": neither "get" nor "lib" is provided in the share config.`)}),(s=e.shareConfig)!=null&&s.eager&&((i=e.treeShaking)!=null&&i.mode)&&We.error(`Invalid shared config for "${r}" from "${t}": cannot use both "eager: true" and "treeShaking.mode" simultaneously. Choose one strategy.`),{deps:[],useIn:[],from:t,loading:null,...e,shareConfig:{requiredVersion:`^${e.version}`,singleton:!1,eager:!1,strictVersion:!1,...e.shareConfig},get:o,loaded:e!=null&&e.loaded||"lib"in e?!0:void 0,version:e.version??"0",scope:Array.isArray(e.scope)?e.scope:[e.scope??"default"],strategy:(e.strategy??n)||"version-first",treeShaking:e.treeShaking?{...e.treeShaking,mode:e.treeShaking.mode??"server-calc",status:e.treeShaking.status??yt.TreeShakingStatus.UNKNOWN,useIn:[]}:void 0}}function gs(e,t){const r=t.shared||{},n=t.name,o=Object.keys(r).reduce((i,a)=>{const c=Hr.arrayOptions(r[a]);return i[a]=i[a]||[],c.forEach(l=>{i[a].push(_s(l,n,a,t.shareStrategy))}),i},{}),s={...e.shared};return Object.keys(o).forEach(i=>{s[i]?o[i].forEach(a=>{s[i].find(c=>c.version===a.version)||s[i].push(a)}):s[i]=o[i]}),{allShareInfos:s,newShareInfos:o}}function Te(e,t){if(!e)return!1;const{status:r,mode:n}=e;return r===yt.TreeShakingStatus.NO_USE?!1:r===yt.TreeShakingStatus.CALCULATED?!0:n==="runtime-infer"?t?ys(e,t):!0:!1}function te(e,t){const r=n=>{if(!Number.isNaN(Number(n))){const o=n.split(".");let s=n;for(let i=0;i<3-o.length;i++)s+=".0";return s}return n};return!!Ee.satisfy(r(e),`<=${r(t)}`)}const Ie=(e,t)=>{const r=t||function(n,o){return te(n,o)};return Object.keys(e).reduce((n,o)=>!n||r(n,o)||n==="0"?o:n,0)},Be=e=>!!e.loaded||typeof e.lib=="function",ps=e=>!!e.loading,ys=(e,t)=>{if(!e||!t)return!1;const{usedExports:r}=e;return r?!!t.every(n=>r.includes(n)):!1};function Es(e,t,r,n){const o=e[t][r];let s="",i=Te(n);const a=function(c,l){return i?o[c].treeShaking?o[l].treeShaking?!Be(o[c].treeShaking)&&te(c,l):!1:!0:!Be(o[c])&&te(c,l)};if(i){if(s=Ie(e[t][r],a),s)return{version:s,useTreesShaking:i};i=!1}return{version:Ie(e[t][r],a),useTreesShaking:i}}const se=e=>Be(e)||ps(e);function Ss(e,t,r,n){const o=e[t][r];let s="",i=Te(n);const a=function(c,l){if(i){if(!o[c].treeShaking)return!0;if(!o[l].treeShaking)return!1;if(se(o[l].treeShaking))return se(o[c].treeShaking)?!!te(c,l):!0;if(se(o[c].treeShaking))return!1}return se(o[l])?se(o[c])?!!te(c,l):!0:se(o[c])?!1:te(c,l)};if(i){if(s=Ie(e[t][r],a),s)return{version:s,useTreesShaking:i};i=!1}return{version:Ie(e[t][r],a),useTreesShaking:i}}function bs(e){return e==="loaded-first"?Ss:Es}function Rs(e,t,r,n){if(!e)return;const{shareConfig:o,scope:s=ms.DEFAULT_SCOPE,strategy:i,treeShaking:a}=r,c=Array.isArray(s)?s:[s];for(const l of c)if(o&&e[l]&&e[l][t]){const{requiredVersion:u}=o,{version:d,useTreesShaking:f}=bs(i)(e,l,t,a),h=()=>{const _=e[l][t][d];if(o.singleton){if(typeof u=="string"&&!Ee.satisfy(d,u)){const g=`Version ${d} from ${d&&_.from} of shared singleton module ${t} does not satisfy the requirement of ${r.from} which needs ${u})`;o.strictVersion?We.error(g):We.warn(g)}return{shared:_,useTreesShaking:f}}else{if(u===!1||u==="*")return{shared:_,useTreesShaking:f};if(Ee.satisfy(d,u))return{shared:_,useTreesShaking:f};const g=Te(a);if(g){for(const[p,E]of Object.entries(e[l][t]))if(Te(E.treeShaking,a==null?void 0:a.usedExports)&&Ee.satisfy(p,u))return{shared:E,useTreesShaking:g}}for(const[p,E]of Object.entries(e[l][t]))if(Ee.satisfy(p,u))return{shared:E,useTreesShaking:!1}}},m={shareScopeMap:e,scope:l,pkgName:t,version:d,GlobalFederation:Cr.Global.__FEDERATION__,shareInfo:r,resolver:h};return(n.emit(m)||m).resolver()}}function Ts(){return Cr.Global.__FEDERATION__.__SHARE__}function Is(e){const{pkgName:t,extraOptions:r,shareInfos:n}=e,o=c=>{if(!c)return;const l={};return c.forEach(d=>{l[d.version]=d}),l[Ie(l,function(d,f){return!Be(l[d])&&te(d,f)})]},s=(r==null?void 0:r.resolver)??o,i=c=>c!==null&&typeof c=="object"&&!Array.isArray(c),a=(...c)=>{const l={};for(const u of c)if(u)for(const[d,f]of Object.entries(u)){const h=l[d];i(h)&&i(f)?l[d]=a(h,f):f!==void 0&&(l[d]=f)}return l};return a(s(n[t]),r==null?void 0:r.customShareInfo)}const $s=(e,t)=>{e.useIn||(e.useIn=[]),Hr.addUniqueItem(e.useIn,t)};function Ns(e,t){return t&&e.treeShaking?e.treeShaking:e}q.addUseIn=$s;q.directShare=Ns;q.formatShareConfigs=gs;q.getGlobalShareScope=Ts;q.getRegisteredShare=Rs;q.getTargetSharedOptions=Is;q.shouldUseTreeShaking=Te;var he={};function Ms(e,t){for(const r of e){const n=t.startsWith(r.name);let o=t.replace(r.name,"");if(n){if(o.startsWith("/")){const a=r.name;return o=`.${o}`,{pkgNameOrAlias:a,expose:o,remote:r}}else if(o==="")return{pkgNameOrAlias:r.name,expose:".",remote:r}}const s=r.alias&&t.startsWith(r.alias);let i=r.alias&&t.replace(r.alias,"");if(r.alias&&s){if(i&&i.startsWith("/")){const a=r.alias;return i=`.${i}`,{pkgNameOrAlias:a,expose:i,remote:r}}else if(i==="")return{pkgNameOrAlias:r.alias,expose:".",remote:r}}}}function Ps(e,t){for(const r of e)if(t===r.name||r.alias&&t===r.alias)return r}he.matchRemote=Ps;he.matchRemoteWithNameAndExpose=Ms;var K={},Y={},F={};const vs="RUNTIME-001",As="RUNTIME-002",Os="RUNTIME-003",ks="RUNTIME-004",ws="RUNTIME-005",Fs="RUNTIME-006",Ls="RUNTIME-007",Ds="RUNTIME-008",Hs="RUNTIME-009",Cs="RUNTIME-010",qs="RUNTIME-011",Gs="TYPE-001",Us="BUILD-001",Ws="BUILD-002";F.BUILD_001=Us;F.BUILD_002=Ws;F.RUNTIME_001=vs;F.RUNTIME_002=As;F.RUNTIME_003=Os;F.RUNTIME_004=ks;F.RUNTIME_005=ws;F.RUNTIME_006=Fs;F.RUNTIME_007=Ls;F.RUNTIME_008=Ds;F.RUNTIME_009=Hs;F.RUNTIME_010=Cs;F.RUNTIME_011=qs;F.TYPE_001=Gs;var Me={};const L=F,qr={[L.RUNTIME_001]:"Failed to get remoteEntry exports.",[L.RUNTIME_002]:'The remote entry interface does not contain "init"',[L.RUNTIME_003]:"Failed to get manifest.",[L.RUNTIME_004]:"Failed to locate remote.",[L.RUNTIME_005]:"Invalid loadShareSync function call from bundler runtime",[L.RUNTIME_006]:"Invalid loadShareSync function call from runtime",[L.RUNTIME_007]:"Failed to get remote snapshot.",[L.RUNTIME_008]:"Failed to load script resources.",[L.RUNTIME_009]:"Please call createInstance first.",[L.RUNTIME_010]:'The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.',[L.RUNTIME_011]:"The remoteEntry URL is missing from the remote snapshot."},Gr={[L.TYPE_001]:"Failed to generate type declaration. Execute the below cmd to reproduce and fix the error."},Ur={[L.BUILD_001]:"Failed to find expose module.",[L.BUILD_002]:"PublicPath is required in prod mode."},Bs={...qr,...Gr,...Ur};Me.buildDescMap=Ur;Me.errorDescMap=Bs;Me.runtimeDescMap=qr;Me.typeDescMap=Gr;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=F,r=Mt,n=Me;e.BUILD_001=t.BUILD_001,e.BUILD_002=t.BUILD_002,e.RUNTIME_001=t.RUNTIME_001,e.RUNTIME_002=t.RUNTIME_002,e.RUNTIME_003=t.RUNTIME_003,e.RUNTIME_004=t.RUNTIME_004,e.RUNTIME_005=t.RUNTIME_005,e.RUNTIME_006=t.RUNTIME_006,e.RUNTIME_007=t.RUNTIME_007,e.RUNTIME_008=t.RUNTIME_008,e.RUNTIME_009=t.RUNTIME_009,e.RUNTIME_010=t.RUNTIME_010,e.RUNTIME_011=t.RUNTIME_011,e.TYPE_001=t.TYPE_001,e.buildDescMap=n.buildDescMap,e.errorDescMap=n.errorDescMap,e.getShortErrorMsg=r.getShortErrorMsg,e.runtimeDescMap=n.runtimeDescMap,e.typeDescMap=n.typeDescMap})(Y);const Ve=M,le=b,Ht=oe;let Wr=D,$e=Y;const Br=".then(callbacks[0]).catch(callbacks[1])";async function js({entry:e,remoteEntryExports:t}){return new Promise((r,n)=>{try{t?r(t):typeof FEDERATION_ALLOW_NEW_FUNCTION<"u"?new Function("callbacks",`import("${e}")${Br}`)([r,n]):import(e).then(r).catch(n)}catch(o){Ve.error(`Failed to load ESM entry from "${e}". ${o instanceof Error?o.message:String(o)}`)}})}async function Vs({entry:e,remoteEntryExports:t}){return new Promise((r,n)=>{try{t?r(t):typeof __system_context__>"u"?System.import(e).then(r).catch(n):new Function("callbacks",`System.import("${e}")${Br}`)([r,n])}catch(o){Ve.error(`Failed to load SystemJS entry from "${e}". ${o instanceof Error?o.message:String(o)}`)}})}function Xs(e,t,r){const{remoteEntryKey:n,entryExports:o}=le.getRemoteEntryExports(e,t);return o||Ve.error($e.RUNTIME_001,$e.runtimeDescMap,{remoteName:e,remoteEntryUrl:r,remoteEntryKey:n}),o}async function xs({name:e,globalName:t,entry:r,loaderHook:n,getEntryUrl:o}){const{entryExports:s}=le.getRemoteEntryExports(e,t);if(s)return s;const i=o?o(r):r;return(0,Wr.loadScript)(i,{attrs:{},createScriptHook:(a,c)=>{const l=n.lifecycle.createScript.emit({url:a,attrs:c});if(l&&(l instanceof HTMLScriptElement||"script"in l||"timeout"in l))return l}}).then(()=>Xs(e,t,r),a=>{const c=a instanceof Error?a.message:String(a);Ve.error($e.RUNTIME_008,$e.runtimeDescMap,{remoteName:e,resourceUrl:i},c)})}async function Ks({remoteInfo:e,remoteEntryExports:t,loaderHook:r,getEntryUrl:n}){const{entry:o,entryGlobalName:s,name:i,type:a}=e;switch(a){case"esm":case"module":return js({entry:o,remoteEntryExports:t});case"system":return Vs({entry:o,remoteEntryExports:t});default:return xs({entry:o,globalName:s,name:i,loaderHook:r,getEntryUrl:n})}}function Et(e){const{entry:t,name:r}=e;return(0,Wr.composeKeyWithSeparator)(r,t)}async function jr(e){const{origin:t,remoteEntryExports:r,remoteInfo:n,getEntryUrl:o,_inErrorHandling:s=!1}=e,i=Et(n);if(r)return r;if(!le.globalLoading[i]){const a=t.remoteHandler.hooks.lifecycle.loadEntry,c=t.loaderHook;le.globalLoading[i]=a.emit({loaderHook:c,remoteInfo:n,remoteEntryExports:r}).then(l=>l||Ks({remoteInfo:n,remoteEntryExports:r,loaderHook:c,getEntryUrl:o})).catch(async l=>{const u=Et(n),d=l instanceof Error&&l.message.includes("ScriptExecutionError");if(l instanceof Error&&l.message.includes($e.RUNTIME_008)&&!d&&!s){const f=m=>jr({...m,_inErrorHandling:!0}),h=await t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:f,origin:t,remoteInfo:n,remoteEntryExports:r,globalLoading:le.globalLoading,uniqueKey:u});if(h)return h}throw l})}return le.globalLoading[i]}function Ys(e){return{...e,entry:"entry"in e?e.entry:"",type:e.type||Ht.DEFAULT_REMOTE_TYPE,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||Ht.DEFAULT_SCOPE}}K.getRemoteEntry=jr;K.getRemoteEntryUniqueKey=Et;K.getRemoteInfo=Ys;var Vr={};function zs(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}Vr.getBuilderId=zs;var Xr={};const Js=b;function Zs(e,t){const r=Js.getGlobalHostPlugins(),n=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return r.length>0&&r.forEach(o=>{e!=null&&e.find(s=>s.name!==o.name)&&e.push(o)}),e&&e.length>0&&e.forEach(o=>{n.forEach(s=>{s.applyPlugin(o,t)})}),e}Xr.registerPlugins=Zs;var Pe={};function Qs(e){return{name:e.name,alias:e.alias,entry:"entry"in e?e.entry:void 0,version:"version"in e?e.version:void 0,type:e.type,entryGlobalName:e.entryGlobalName,shareScope:e.shareScope}}function ei(e){var r,n,o,s,i,a;const t={};for(const[c,l]of Object.entries(e.shared)){const u=l[0];u&&(t[c]={version:u.version,singleton:(r=u.shareConfig)==null?void 0:r.singleton,requiredVersion:((n=u.shareConfig)==null?void 0:n.requiredVersion)===!1?!1:(o=u.shareConfig)==null?void 0:o.requiredVersion,eager:u.eager,strictVersion:(s=u.shareConfig)==null?void 0:s.strictVersion})}return{project:{name:e.name,mfRole:((i=e.remotes)==null?void 0:i.length)>0?"host":"unknown"},mfConfig:{name:e.name,remotes:((a=e.remotes)==null?void 0:a.map(Qs))??[],shared:t}}}Pe.optionsToMFContext=ei;var xr={},Z={};const ti=M,ri=he,Ct=K;let Se=D;function Kr(e){return{resourceCategory:"sync",share:!0,depsRemote:!0,prefetchInterface:!1,...e}}function ni(e,t){return t.map(r=>{const n=ri.matchRemote(e,r.nameOrAlias);return ti.assert(n,`Unable to preload ${r.nameOrAlias} as it is not included in ${!n&&(0,Se.safeToString)({remoteInfo:n,remotes:e})}`),{remote:n,preloadConfig:Kr(r)}})}function oi(e){return e?e.map(t=>t==="."?t:t.startsWith("./")?t.replace("./",""):t):[]}function si(e,t,r,n=!0){const{cssAssets:o,jsAssetsWithoutEntry:s,entryAssets:i}=r;if(t.options.inBrowser){if(i.forEach(a=>{const{moduleInfo:c}=a,l=t.moduleCache.get(e.name);l?Ct.getRemoteEntry({origin:t,remoteInfo:c,remoteEntryExports:l.remoteEntryExports}):Ct.getRemoteEntry({origin:t,remoteInfo:c,remoteEntryExports:void 0})}),n){const a={rel:"preload",as:"style"};o.forEach(c=>{const{link:l,needAttach:u}=(0,Se.createLink)({url:c,cb:()=>{},attrs:a,createLinkHook:(d,f)=>{const h=t.loaderHook.lifecycle.createLink.emit({url:d,attrs:f});if(h instanceof HTMLLinkElement)return h}});u&&document.head.appendChild(l)})}else{const a={rel:"stylesheet",type:"text/css"};o.forEach(c=>{const{link:l,needAttach:u}=(0,Se.createLink)({url:c,cb:()=>{},attrs:a,createLinkHook:(d,f)=>{const h=t.loaderHook.lifecycle.createLink.emit({url:d,attrs:f});if(h instanceof HTMLLinkElement)return h},needDeleteLink:!1});u&&document.head.appendChild(l)})}if(n){const a={rel:"preload",as:"script"};s.forEach(c=>{const{link:l,needAttach:u}=(0,Se.createLink)({url:c,cb:()=>{},attrs:a,createLinkHook:(d,f)=>{const h=t.loaderHook.lifecycle.createLink.emit({url:d,attrs:f});if(h instanceof HTMLLinkElement)return h}});u&&document.head.appendChild(l)})}else{const a={fetchpriority:"high",type:(e==null?void 0:e.type)==="module"?"module":"text/javascript"};s.forEach(c=>{const{script:l,needAttach:u}=(0,Se.createScript)({url:c,cb:()=>{},attrs:a,createScriptHook:(d,f)=>{const h=t.loaderHook.lifecycle.createScript.emit({url:d,attrs:f});if(h instanceof HTMLScriptElement)return h},needDeleteScript:!0});u&&document.head.appendChild(l)})}}}Z.defaultPreloadArgs=Kr;Z.formatPreloadArgs=ni;Z.normalizePreloadExposes=oi;Z.preloadAssets=si;const w=b,qt=q,ii=he,ai=K,li=Z,ci={getRegisteredShare:qt.getRegisteredShare,getGlobalShareScope:qt.getGlobalShareScope},ui={Global:w.Global,nativeGlobal:w.nativeGlobal,resetFederationGlobalInfo:w.resetFederationGlobalInfo,setGlobalFederationInstance:w.setGlobalFederationInstance,getGlobalFederationConstructor:w.getGlobalFederationConstructor,setGlobalFederationConstructor:w.setGlobalFederationConstructor,getInfoWithoutType:w.getInfoWithoutType,getGlobalSnapshot:w.getGlobalSnapshot,getTargetSnapshotInfoByModuleInfo:w.getTargetSnapshotInfoByModuleInfo,getGlobalSnapshotInfoByModuleInfo:w.getGlobalSnapshotInfoByModuleInfo,setGlobalSnapshotInfoByModuleInfo:w.setGlobalSnapshotInfoByModuleInfo,addGlobalSnapshot:w.addGlobalSnapshot,getRemoteEntryExports:w.getRemoteEntryExports,registerGlobalPlugins:w.registerGlobalPlugins,getGlobalHostPlugins:w.getGlobalHostPlugins,getPreloaded:w.getPreloaded,setPreloaded:w.setPreloaded};var fi={global:ui,share:ci,utils:{matchRemoteWithNameAndExpose:ii.matchRemoteWithNameAndExpose,preloadAssets:li.preloadAssets,getRemoteInfo:ai.getRemoteInfo}};xr.default=fi;var Xe={};const Ze=M,Gt=$,di=K,hi=Pe;let mi=D,Ut=Y;function _i(e,t,r){const n=t,o=Array.isArray(e.shareScope)?e.shareScope:[e.shareScope];o.length||o.push("default"),o.forEach(i=>{n[i]||(n[i]={})});const s={version:e.version||"",shareScopeKeys:Array.isArray(e.shareScope)?o:e.shareScope||"default"};return Object.defineProperty(s,"shareScopeMap",{value:n,enumerable:!1}),{remoteEntryInitOptions:s,shareScope:n[o[0]],initScope:r??[]}}var gi=class{constructor({remoteInfo:e,host:t}){this.inited=!1,this.initing=!1,this.lib=void 0,this.remoteInfo=e,this.host=t}async getEntry(){if(this.remoteEntryExports)return this.remoteEntryExports;const e=await di.getRemoteEntry({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports});return Ze.assert(e,`remoteEntryExports is undefined - ${(0,mi.safeToString)(this.remoteInfo)}`),this.remoteEntryExports=e,this.remoteEntryExports}async init(e,t,r){const n=await this.getEntry();if(this.inited)return n;if(this.initPromise)return await this.initPromise,n;this.initing=!0,this.initPromise=(async()=>{const{remoteEntryInitOptions:o,shareScope:s,initScope:i}=_i(this.remoteInfo,this.host.shareScopeMap,r),a=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:s,remoteEntryInitOptions:o,initScope:i,remoteInfo:this.remoteInfo,origin:this.host});typeof(n==null?void 0:n.init)>"u"&&Ze.error(Ut.RUNTIME_002,Ut.runtimeDescMap,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName},void 0,hi.optionsToMFContext(this.host.options)),await n.init(a.shareScope,a.initScope,a.remoteEntryInitOptions),await this.host.hooks.lifecycle.initContainer.emit({...a,id:e,remoteSnapshot:t,remoteEntryExports:n}),this.inited=!0})();try{await this.initPromise}finally{this.initing=!1,this.initPromise=void 0}return n}async get(e,t,r,n){const{loadFactory:o=!0}=r||{loadFactory:!0},s=await this.init(e,n);this.lib=s;let i;i=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:s,expose:t,moduleInfo:this.remoteInfo}),i||(i=await s.get(t)),Ze.assert(i,`${Gt.getFMId(this.remoteInfo)} remote don't export ${t}.`);const a=Gt.processModuleAlias(this.remoteInfo.name,t),c=this.wraperFactory(i,a);return o?await c():c}wraperFactory(e,t){function r(n,o){n&&typeof n=="object"&&Object.isExtensible(n)&&!Object.getOwnPropertyDescriptor(n,Symbol.for("mf_module_id"))&&Object.defineProperty(n,Symbol.for("mf_module_id"),{value:o,enumerable:!1})}return e instanceof Promise?async()=>{const n=await e();return r(n,t),n}:()=>{const n=e();return r(n,t),n}}};Xe.Module=gi;var Yr={},me={},pi=class{constructor(e){this.type="",this.listeners=new Set,e&&(this.type=e)}on(e){typeof e=="function"&&this.listeners.add(e)}once(e){const t=this;this.on(function r(...n){return t.remove(r),e.apply(null,n)})}emit(...e){let t;return this.listeners.size>0&&this.listeners.forEach(r=>{t=r(...e)}),t}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}};me.SyncHook=pi;var ve={};const yi=me;var Ei=class extends yi.SyncHook{emit(...e){let t;const r=Array.from(this.listeners);if(r.length>0){let n=0;const o=s=>s===!1?!1:n0){let r=0;const n=s=>(et.warn(s),this.onerror(s),e),o=s=>{if(Ii.checkReturnData(e,s)){if(e=s,r{const s=e[o];s&&this.lifecycle[o].on(s)}))}removePlugin(e){we.assert(e,"A name is required.");const t=this.registerPlugins[e];we.assert(t,`The plugin "${e}" is not registered.`),Object.keys(t).forEach(r=>{r!=="name"&&this.lifecycle[r].remove(t[r])})}};Oe.PluginSystem=Mi;var xe={};const Pi=M,St=$,vi=Z;let Wt=D,Bt=Y;function Zr(e,t){const r=St.getRemoteEntryInfoFromSnapshot(t);r.url||Pi.error(Bt.RUNTIME_011,Bt.runtimeDescMap,{remoteName:e.name});let n=(0,Wt.getResourceUrl)(t,r.url);!Wt.isBrowserEnvValue&&!n.startsWith("http")&&(n=`https:${n}`),e.type=r.type,e.entryGlobalName=r.globalName,e.entry=n,e.version=t.version,e.buildVersion=t.buildVersion}function Ai(){return{name:"snapshot-plugin",async afterResolve(e){const{remote:t,pkgNameOrAlias:r,expose:n,origin:o,remoteInfo:s,id:i}=e;if(!St.isRemoteInfoWithEntry(t)||!St.isPureRemoteEntry(t)){const{remoteSnapshot:a,globalSnapshot:c}=await o.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:i});Zr(s,a);const l={remote:t,preloadConfig:{nameOrAlias:r,exposes:[n],resourceCategory:"sync",share:!1,depsRemote:!1}},u=await o.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:o,preloadOptions:l,remoteInfo:s,remote:t,remoteSnapshot:a,globalSnapshot:c});return u&&vi.preloadAssets(s,o,u,!1),{...e,remoteSnapshot:a}}return e}}}xe.assignRemoteInfo=Zr;xe.snapshotPlugin=Ai;var Qr={};const Ne=$,bt=b,Oi=q,jt=Z,ki=xe;let je=D;function wi(e){const t=e.split(":");return t.length===1?{name:t[0],version:void 0}:t.length===2?{name:t[0],version:t[1]}:{name:t[1],version:t[2]}}function en(e,t,r,n,o={},s){const{value:i}=bt.getInfoWithoutType(e,Ne.getFMId(t)),a=s||i;if(a&&!(0,je.isManifestProvider)(a)&&(r(a,t,n),a.remotesInfo)){const c=Object.keys(a.remotesInfo);for(const l of c){if(o[l])continue;o[l]=!0;const u=wi(l),d=a.remotesInfo[l];en(e,{name:u.name,version:d.matchedVersion},r,!1,o,void 0)}}}const tt=(e,t)=>document.querySelector(`${e}[${e==="link"?"href":"src"}="${t}"]`);function Fi(e,t,r,n,o){const s=[],i=[],a=[],c=new Set,l=new Set,{options:u}=e,{preloadConfig:d}=t,{depsRemote:f}=d;if(en(n,r,(m,_,g)=>{var N;let p;if(g)p=d;else if(Array.isArray(f)){const R=f.find(v=>v.nameOrAlias===_.name||v.nameOrAlias===_.alias);if(!R)return;p=jt.defaultPreloadArgs(R)}else if(f===!0)p=d;else return;const E=(0,je.getResourceUrl)(m,Ne.getRemoteEntryInfoFromSnapshot(m).url);E&&a.push({name:_.name,moduleInfo:{name:_.name,entry:E,type:"remoteEntryType"in m?m.remoteEntryType:"global",entryGlobalName:"globalName"in m?m.globalName:_.name,shareScope:"",version:"version"in m?m.version:void 0},url:E});let I="modules"in m?m.modules:[];const k=jt.normalizePreloadExposes(p.exposes);k.length&&"modules"in m&&(I=(N=m==null?void 0:m.modules)==null?void 0:N.reduce((R,v)=>((k==null?void 0:k.indexOf(v.moduleName))!==-1&&R.push(v),R),[]));function y(R){const v=R.map(B=>(0,je.getResourceUrl)(m,B));return p.filter?v.filter(p.filter):v}if(I){const R=I.length;for(let v=0;v0){const m=(_,g)=>{const{shared:p}=Oi.getRegisteredShare(e.shareScopeMap,g.sharedName,_,e.sharedHandler.hooks.lifecycle.resolveShare)||{};p&&typeof p.lib=="function"&&(g.assets.js.sync.forEach(E=>{c.add(E)}),g.assets.css.sync.forEach(E=>{l.add(E)}))};o.shared.forEach(_=>{var E;const g=(E=u.shared)==null?void 0:E[_.sharedName];if(!g)return;const p=_.version?g.find(I=>I.version===_.version):g;p&&Ne.arrayOptions(p).forEach(I=>{m(I,_)})})}const h=i.filter(m=>!c.has(m)&&!tt("script",m));return{cssAssets:s.filter(m=>!l.has(m)&&!tt("link",m)),jsAssetsWithoutEntry:h,entryAssets:a.filter(m=>!tt("script",m.url))}}const Li=function(){return{name:"generate-preload-assets-plugin",async generatePreloadAssets(e){const{origin:t,preloadOptions:r,remoteInfo:n,remote:o,globalSnapshot:s,remoteSnapshot:i}=e;return je.isBrowserEnvValue?Ne.isRemoteInfoWithEntry(o)&&Ne.isPureRemoteEntry(o)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:o.name,url:o.entry,moduleInfo:{name:n.name,entry:o.entry,type:n.type||"global",entryGlobalName:"",shareScope:""}}]}:(ki.assignRemoteInfo(n,i),Fi(t,r,n,s,i)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}}}};Qr.generatePreloadAssetsPlugin=Li;var Ke={};const rt=M,Di=$,U=b,Vt=Pe,Hi=ve,nt=Ae,Ci=Oe;let ot=D,Fe=Y;function tn(e,t){const r=U.getGlobalSnapshotInfoByModuleInfo({name:t.name,version:t.options.version}),n=r&&"remotesInfo"in r&&r.remotesInfo&&U.getInfoWithoutType(r.remotesInfo,e.name).value;return n&&n.matchedVersion?{hostGlobalSnapshot:r,globalSnapshot:U.getGlobalSnapshot(),remoteSnapshot:U.getGlobalSnapshotInfoByModuleInfo({name:e.name,version:n.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:U.getGlobalSnapshot(),remoteSnapshot:U.getGlobalSnapshotInfoByModuleInfo({name:e.name,version:"version"in e?e.version:void 0})}}var qi=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new Ci.PluginSystem({beforeLoadRemoteSnapshot:new Hi.AsyncHook("beforeLoadRemoteSnapshot"),loadSnapshot:new nt.AsyncWaterfallHook("loadGlobalSnapshot"),loadRemoteSnapshot:new nt.AsyncWaterfallHook("loadRemoteSnapshot"),afterLoadSnapshot:new nt.AsyncWaterfallHook("afterLoadSnapshot")}),this.manifestLoading=U.Global.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:t,expose:r}){const{options:n}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:n,moduleInfo:e});let o=U.getGlobalSnapshotInfoByModuleInfo({name:this.HostInstance.options.name,version:this.HostInstance.options.version});o||(o={version:this.HostInstance.options.version||"",remoteEntry:"",remotesInfo:{}},U.addGlobalSnapshot({[this.HostInstance.options.name]:o})),o&&"remotesInfo"in o&&!U.getInfoWithoutType(o.remotesInfo,e.name).value&&("version"in e||"entry"in e)&&(o.remotesInfo={...o==null?void 0:o.remotesInfo,[e.name]:{matchedVersion:"version"in e?e.version:e.entry}});const{hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:a}=this.getGlobalRemoteInfo(e),{remoteSnapshot:c,globalSnapshot:l}=await this.hooks.lifecycle.loadSnapshot.emit({options:n,moduleInfo:e,hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:a});let u,d;if(c)if((0,ot.isManifestProvider)(c)){const f=ot.isBrowserEnvValue?c.remoteEntry:c.ssrRemoteEntry||c.remoteEntry||"",h=await this.getManifestJson(f,e,{}),m=U.setGlobalSnapshotInfoByModuleInfo({...e,entry:f},h);u=h,d=m}else{const{remoteSnapshot:f}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:c,from:"global"});u=f,d=l}else if(Di.isRemoteInfoWithEntry(e)){const f=await this.getManifestJson(e.entry,e,{}),h=U.setGlobalSnapshotInfoByModuleInfo(e,f),{remoteSnapshot:m}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:f,from:"global"});u=m,d=h}else rt.error(Fe.RUNTIME_007,Fe.runtimeDescMap,{remoteName:e.name,remoteVersion:e.version,hostName:this.HostInstance.options.name,globalSnapshot:JSON.stringify(l)},void 0,Vt.optionsToMFContext(this.HostInstance.options));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:n,moduleInfo:e,remoteSnapshot:u}),{remoteSnapshot:u,globalSnapshot:d}}getGlobalRemoteInfo(e){return tn(e,this.HostInstance)}async getManifestJson(e,t,r){const n=async()=>{let s=this.manifestCache.get(e);if(s)return s;try{let i=await this.loaderHook.lifecycle.fetch.emit(e,{});(!i||!(i instanceof Response))&&(i=await fetch(e,{})),s=await i.json()}catch(i){s=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:i,from:"runtime",lifecycle:"afterResolve",origin:this.HostInstance}),s||(delete this.manifestLoading[e],rt.error(Fe.RUNTIME_003,Fe.runtimeDescMap,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${i}`,Vt.optionsToMFContext(this.HostInstance.options)))}return rt.assert(s.metaData&&s.exposes&&s.shared,`"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${[!s.metaData&&"metaData",!s.exposes&&"exposes",!s.shared&&"shared"].filter(Boolean).join(", ")}.`),this.manifestCache.set(e,s),s},o=async()=>{const s=await n(),i=(0,ot.generateSnapshotFromManifest)(s,{version:e}),{remoteSnapshot:a}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:s,remoteSnapshot:i,manifestUrl:e,from:"manifest"});return a};return this.manifestLoading[e]||(this.manifestLoading[e]=o().then(s=>s)),this.manifestLoading[e]}};Ke.SnapshotHandler=qi;Ke.getGlobalRemoteInfo=tn;var rn={};const st=M,Gi=oe,A=q,Xt=Pe,Ui=ve,it=_e,xt=Ae,Wi=Oe;let pe=Y;var Bi=class{constructor(e){this.hooks=new Wi.PluginSystem({beforeRegisterShare:new it.SyncWaterfallHook("beforeRegisterShare"),afterResolve:new xt.AsyncWaterfallHook("afterResolve"),beforeLoadShare:new xt.AsyncWaterfallHook("beforeLoadShare"),loadShare:new Ui.AsyncHook,resolveShare:new it.SyncWaterfallHook("resolveShare"),initContainerShareScopeMap:new it.SyncWaterfallHook("initContainerShareScopeMap")}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}registerShared(e,t){const{newShareInfos:r,allShareInfos:n}=A.formatShareConfigs(e,t);return Object.keys(r).forEach(o=>{r[o].forEach(s=>{s.scope.forEach(i=>{var a;this.hooks.lifecycle.beforeRegisterShare.emit({origin:this.host,pkgName:o,shared:s}),(a=this.shareScopeMap[i])!=null&&a[o]||this.setShared({pkgName:o,lib:s.lib,get:s.get,loaded:s.loaded||!!s.lib,shared:s,from:t.name})})})}),{newShareInfos:r,allShareInfos:n}}async loadShare(e,t){const{host:r}=this,n=A.getTargetSharedOptions({pkgName:e,extraOptions:t,shareInfos:r.options.shared});n!=null&&n.scope&&await Promise.all(n.scope.map(async a=>{await Promise.all(this.initializeSharing(a,{strategy:n.strategy}))}));const{shareInfo:o}=await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:n,shared:r.options.shared,origin:r});st.assert(o,`Cannot find shared "${e}" in host "${r.options.name}". Ensure the shared config for "${e}" is declared in the federation plugin options and the host has been initialized before loading shares.`);const{shared:s,useTreesShaking:i}=A.getRegisteredShare(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare)||{};if(s){const a=A.directShare(s,i);if(a.lib)return A.addUseIn(a,r.options.name),a.lib;if(a.loading&&!a.loaded){const c=await a.loading;return a.loaded=!0,a.lib||(a.lib=c),A.addUseIn(a,r.options.name),c}else{const l=(async()=>{const u=await a.get();return A.addUseIn(a,r.options.name),a.loaded=!0,a.lib=u,u})();return this.setShared({pkgName:e,loaded:!1,shared:s,from:r.options.name,lib:null,loading:l,treeShaking:i?a:void 0}),l}}else{if(t!=null&&t.customShareInfo)return!1;const a=A.shouldUseTreeShaking(o.treeShaking),c=A.directShare(o,a),u=(async()=>{const d=await c.get();c.lib=d,c.loaded=!0,A.addUseIn(c,r.options.name);const{shared:f,useTreesShaking:h}=A.getRegisteredShare(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare)||{};if(f){const m=A.directShare(f,h);m.lib=d,m.loaded=!0,f.from=o.from}return d})();return this.setShared({pkgName:e,loaded:!1,shared:o,from:r.options.name,lib:null,loading:u,treeShaking:a?c:void 0}),u}}initializeSharing(e=Gi.DEFAULT_SCOPE,t){const{host:r}=this,n=t==null?void 0:t.from,o=t==null?void 0:t.strategy;let s=t==null?void 0:t.initScope;const i=[];if(n!=="build"){const{initTokens:f}=this;s||(s=[]);let h=f[e];if(h||(h=f[e]={from:this.host.name}),s.indexOf(h)>=0)return i;s.push(h)}const a=this.shareScopeMap,c=r.options.name;a[e]||(a[e]={});const l=a[e],u=(f,h)=>{var I;const{version:m,eager:_}=h;l[f]=l[f]||{};const g=l[f],p=g[m]&&A.directShare(g[m]),E=!!(p&&("eager"in p&&p.eager||"shareConfig"in p&&((I=p.shareConfig)!=null&&I.eager)));(!p||p.strategy!=="loaded-first"&&!p.loaded&&(!_!=!E?_:c>g[m].from))&&(g[m]=h)},d=async f=>{const{module:h}=await r.remoteHandler.getRemoteModuleAndOptions({id:f});let m;try{m=await h.getEntry()}catch(_){if(m=await r.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:f,error:_,from:"runtime",lifecycle:"beforeLoadShare",origin:r}),!m)return}finally{m!=null&&m.init&&!h.initing&&(h.remoteEntryExports=m,await h.init(void 0,void 0,s))}};return Object.keys(r.options.shared).forEach(f=>{r.options.shared[f].forEach(h=>{h.scope.includes(e)&&u(f,h)})}),(r.options.shareStrategy==="version-first"||o==="version-first")&&r.options.remotes.forEach(f=>{f.shareScope===e&&i.push(d(f.name))}),i}loadShareSync(e,t){const{host:r}=this,n=A.getTargetSharedOptions({pkgName:e,extraOptions:t,shareInfos:r.options.shared});n!=null&&n.scope&&n.scope.forEach(i=>{this.initializeSharing(i,{strategy:n.strategy})});const{shared:o,useTreesShaking:s}=A.getRegisteredShare(this.shareScopeMap,e,n,this.hooks.lifecycle.resolveShare)||{};if(o){if(typeof o.lib=="function")return A.addUseIn(o,r.options.name),o.loaded||(o.loaded=!0,o.from===r.options.name&&(n.loaded=!0)),o.lib;if(typeof o.get=="function"){const i=o.get();if(!(i instanceof Promise))return A.addUseIn(o,r.options.name),this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:i,shared:o}),i}}if(n.lib)return n.loaded||(n.loaded=!0),n.lib;if(n.get){const i=n.get();return i instanceof Promise&&st.error((t==null?void 0:t.from)==="build"?pe.RUNTIME_005:pe.RUNTIME_006,pe.runtimeDescMap,{hostName:r.options.name,sharedPkgName:e},void 0,Xt.optionsToMFContext(r.options)),n.lib=i,this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:n.lib,shared:n}),n.lib}st.error(pe.RUNTIME_006,pe.runtimeDescMap,{hostName:r.options.name,sharedPkgName:e},void 0,Xt.optionsToMFContext(r.options))}initShareScopeMap(e,t,r={}){const{host:n}=this;this.shareScopeMap[e]=t,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:t,options:n.options,origin:n,scopeName:e,hostShareScopeMap:r.hostShareScopeMap})}setShared({pkgName:e,shared:t,from:r,lib:n,loading:o,loaded:s,get:i,treeShaking:a}){const{version:c,scope:l="default",...u}=t,d=Array.isArray(l)?l:[l],f=h=>{const m=(g,p,E)=>{E&&!g[p]&&(g[p]=E)},_=a?h.treeShaking:h;m(_,"loaded",s),m(_,"loading",o),m(_,"get",i)};d.forEach(h=>{this.shareScopeMap[h]||(this.shareScopeMap[h]={}),this.shareScopeMap[h][e]||(this.shareScopeMap[h][e]={}),this.shareScopeMap[h][e][c]||(this.shareScopeMap[h][e][c]={version:c,scope:[h],...u,lib:n});const m=this.shareScopeMap[h][e][c];f(m),r&&m.from!==r&&(m.from=r)})}_setGlobalShareScopeMap(e){const t=A.getGlobalShareScope(),r=e.id||e.name;r&&!t[r]&&(t[r]=this.shareScopeMap)}};rn.SharedHandler=Bi;var nn={};const Le=M,G=b,Kt=oe,ji=q,Vi=he,at=K,Xi=Pe,Yt=Z,xi=Xe,Ki=me,ie=ve,zt=_e,Yi=Ae,zi=Oe,Ji=Ke;let lt=D,Jt=Y;var Zi=class{constructor(e){this.hooks=new zi.PluginSystem({beforeRegisterRemote:new zt.SyncWaterfallHook("beforeRegisterRemote"),registerRemote:new zt.SyncWaterfallHook("registerRemote"),beforeRequest:new Yi.AsyncWaterfallHook("beforeRequest"),onLoad:new ie.AsyncHook("onLoad"),handlePreloadModule:new Ki.SyncHook("handlePreloadModule"),errorLoadRemote:new ie.AsyncHook("errorLoadRemote"),beforePreloadRemote:new ie.AsyncHook("beforePreloadRemote"),generatePreloadAssets:new ie.AsyncHook("generatePreloadAssets"),afterPreloadRemote:new ie.AsyncHook,loadEntry:new ie.AsyncHook}),this.host=e,this.idToRemoteMap={}}formatAndRegisterRemote(e,t){return(t.remotes||[]).reduce((r,n)=>(this.registerRemote(n,r,{force:!1}),r),e.remotes)}setIdToRemoteMap(e,t){const{remote:r,expose:n}=t,{name:o,alias:s}=r;if(this.idToRemoteMap[e]={name:r.name,expose:n},s&&e.startsWith(o)){const i=e.replace(o,s);this.idToRemoteMap[i]={name:r.name,expose:n};return}if(s&&e.startsWith(s)){const i=e.replace(s,o);this.idToRemoteMap[i]={name:r.name,expose:n}}}async loadRemote(e,t){const{host:r}=this;try{const{loadFactory:n=!0}=t||{loadFactory:!0},{module:o,moduleOptions:s,remoteMatchInfo:i}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:a,remote:c,expose:l,id:u,remoteSnapshot:d}=i,f=await o.get(u,l,t,d),h=await this.hooks.lifecycle.onLoad.emit({id:u,pkgNameOrAlias:a,expose:l,exposeModule:n?f:void 0,exposeModuleFactory:n?void 0:f,remote:c,options:s,moduleInstance:o,origin:r});return this.setIdToRemoteMap(e,i),typeof h=="function"?h:f}catch(n){const{from:o="runtime"}=t||{from:"runtime"},s=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:n,from:o,lifecycle:"onLoad",origin:r});if(!s)throw n;return s}}async preloadRemote(e){const{host:t}=this;await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});const r=Yt.formatPreloadArgs(t.options.remotes,e);await Promise.all(r.map(async n=>{const{remote:o}=n,s=at.getRemoteInfo(o),{globalSnapshot:i,remoteSnapshot:a}=await t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:o}),c=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:n,remote:o,remoteInfo:s,globalSnapshot:i,remoteSnapshot:a});c&&Yt.preloadAssets(s,t,c)}))}registerRemotes(e,t){const{host:r}=this;e.forEach(n=>{this.registerRemote(n,r.options.remotes,{force:t==null?void 0:t.force})})}async getRemoteModuleAndOptions(e){const{host:t}=this,{id:r}=e;let n;try{n=await this.hooks.lifecycle.beforeRequest.emit({id:r,options:t.options,origin:t})}catch(h){if(n=await this.hooks.lifecycle.errorLoadRemote.emit({id:r,options:t.options,origin:t,from:"runtime",error:h,lifecycle:"beforeRequest"}),!n)throw h}const{id:o}=n,s=Vi.matchRemoteWithNameAndExpose(t.options.remotes,o);s||Le.error(Jt.RUNTIME_004,Jt.runtimeDescMap,{hostName:t.options.name,requestId:o},void 0,Xi.optionsToMFContext(t.options));const{remote:i}=s,a=at.getRemoteInfo(i),c=await t.sharedHandler.hooks.lifecycle.afterResolve.emit({id:o,...s,options:t.options,origin:t,remoteInfo:a}),{remote:l,expose:u}=c;Le.assert(l&&u,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${o}.`);let d=t.moduleCache.get(l.name);const f={host:t,remoteInfo:a};return d||(d=new xi.Module(f),t.moduleCache.set(l.name,d)),{module:d,moduleOptions:f,remoteMatchInfo:c}}registerRemote(e,t,r){const{host:n}=this,o=()=>{if(e.alias){const i=t.find(a=>{var c;return e.alias&&(a.name.startsWith(e.alias)||((c=a.alias)==null?void 0:c.startsWith(e.alias)))});Le.assert(!i,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${i&&i.name} name or alias`)}"entry"in e&<.isBrowserEnvValue&&typeof window<"u"&&!e.entry.startsWith("http")&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||(e.shareScope=Kt.DEFAULT_SCOPE),e.type||(e.type=Kt.DEFAULT_REMOTE_TYPE)};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:n});const s=t.find(i=>i.name===e.name);if(!s)o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n});else{const i=[`The remote "${e.name}" is already registered.`,"Please note that overriding it may cause unexpected errors."];r!=null&&r.force&&(this.removeRemote(s),o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n}),(0,lt.warn)(i.join(" ")))}}removeRemote(e){var t;try{const{host:r}=this,{name:n}=e,o=r.options.remotes.findIndex(i=>i.name===n);o!==-1&&r.options.remotes.splice(o,1);const s=r.moduleCache.get(e.name);if(s){const i=s.remoteInfo,a=i.entryGlobalName;G.CurrentGlobal[a]&&((t=Object.getOwnPropertyDescriptor(G.CurrentGlobal,a))!=null&&t.configurable?delete G.CurrentGlobal[a]:G.CurrentGlobal[a]=void 0);const c=at.getRemoteEntryUniqueKey(s.remoteInfo);G.globalLoading[c]&&delete G.globalLoading[c],r.snapshotHandler.manifestCache.delete(i.entry);let l=i.buildVersion?(0,lt.composeKeyWithSeparator)(i.name,i.buildVersion):i.name;const u=G.CurrentGlobal.__FEDERATION__.__INSTANCES__.findIndex(f=>i.buildVersion?f.options.id===l:f.name===l);if(u!==-1){const f=G.CurrentGlobal.__FEDERATION__.__INSTANCES__[u];l=f.options.id||l;const h=ji.getGlobalShareScope();let m=!0;const _=[];Object.keys(h).forEach(g=>{const p=h[g];p&&Object.keys(p).forEach(E=>{const I=p[E];I&&Object.keys(I).forEach(k=>{const y=I[k];y&&Object.keys(y).forEach(N=>{const R=y[N];R&&typeof R=="object"&&R.from===i.name&&(R.loaded||R.loading?(R.useIn=R.useIn.filter(v=>v!==i.name),R.useIn.length?m=!1:_.push([g,E,k,N])):_.push([g,E,k,N]))})})})}),m&&(f.shareScopeMap={},delete h[l]),_.forEach(([g,p,E,I])=>{var k,y,N;(N=(y=(k=h[g])==null?void 0:k[p])==null?void 0:y[E])==null||delete N[I]}),G.CurrentGlobal.__FEDERATION__.__INSTANCES__.splice(u,1)}const{hostGlobalSnapshot:d}=Ji.getGlobalRemoteInfo(e,r);if(d){const f=d&&"remotesInfo"in d&&d.remotesInfo&&G.getInfoWithoutType(d.remotesInfo,e.name).key;f&&(delete d.remotesInfo[f],G.Global.__FEDERATION__.__MANIFEST_LOADING__[f]&&delete G.Global.__FEDERATION__.__MANIFEST_LOADING__[f])}r.moduleCache.delete(e.name)}}catch(r){Le.logger.error(`removeRemote failed: ${r instanceof Error?r.message:String(r)}`)}}};nn.RemoteHandler=Zi;const Qi=M,ea=oe,ta=q,ra=Vr,na=Xr,oa=K,sa=Xe,z=me,ct=ve,ia=_e,Zt=Ae,ut=Oe,aa=xe,la=Qr,ca=Ke,ua=rn,fa=nn;let da=D,ft=Y;const ha=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN=="boolean"?!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN:!0;var ma=class{constructor(e){this.hooks=new ut.PluginSystem({beforeInit:new ia.SyncWaterfallHook("beforeInit"),init:new z.SyncHook,beforeInitContainer:new Zt.AsyncWaterfallHook("beforeInitContainer"),initContainer:new Zt.AsyncWaterfallHook("initContainer")}),this.version="2.2.2",this.moduleCache=new Map,this.loaderHook=new ut.PluginSystem({getModuleInfo:new z.SyncHook,createScript:new z.SyncHook,createLink:new z.SyncHook,fetch:new ct.AsyncHook,loadEntryError:new ct.AsyncHook,getModuleFactory:new ct.AsyncHook}),this.bridgeHook=new ut.PluginSystem({beforeBridgeRender:new z.SyncHook,afterBridgeRender:new z.SyncHook,beforeBridgeDestroy:new z.SyncHook,afterBridgeDestroy:new z.SyncHook});const t=ha?[aa.snapshotPlugin(),la.generatePreloadAssetsPlugin()]:[],r={id:ra.getBuilderId(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:da.isBrowserEnvValue};this.name=e.name,this.options=r,this.snapshotHandler=new ca.SnapshotHandler(this),this.sharedHandler=new ua.SharedHandler(this),this.remoteHandler=new fa.RemoteHandler(this),this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...r.plugins,...e.plugins||[]]),this.options=this.formatOptions(r,e)}initOptions(e){e.name&&e.name!==this.options.name&&Qi.error((0,ft.getShortErrorMsg)(ft.RUNTIME_010,ft.runtimeDescMap)),this.registerPlugins(e.plugins);const t=this.formatOptions(this.options,e);return this.options=t,t}async loadShare(e,t){return this.sharedHandler.loadShare(e,t)}loadShareSync(e,t){return this.sharedHandler.loadShareSync(e,t)}initializeSharing(e=ea.DEFAULT_SCOPE,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,r){const n=oa.getRemoteInfo({name:e,entry:t}),o=new sa.Module({host:this,remoteInfo:n});return o.remoteEntryExports=r,this.moduleCache.set(e,o),o}async loadRemote(e,t){return this.remoteHandler.loadRemote(e,t)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,t,r={}){this.sharedHandler.initShareScopeMap(e,t,r)}formatOptions(e,t){const{allShareInfos:r}=ta.formatShareConfigs(e,t),{userOptions:n,options:o}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:r}),s=this.remoteHandler.formatAndRegisterRemote(o,n),{allShareInfos:i}=this.sharedHandler.registerShared(o,n),a=[...o.plugins];n.plugins&&n.plugins.forEach(l=>{a.includes(l)||a.push(l)});const c={...e,...t,plugins:a,remotes:s,shared:i};return this.hooks.lifecycle.init.emit({origin:this,options:c}),c}registerPlugins(e){const t=na.registerPlugins(e,this);this.options.plugins=this.options.plugins.reduce((r,n)=>(n&&r&&!r.find(o=>o.name===n.name)&&r.push(n),r),t||[])}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}};Yr.ModuleFederation=ma;var on={},sn={},Qt=Object.defineProperty,_a=(e,t)=>{let r={};for(var n in e)Qt(r,n,{get:e[n],enumerable:!0});return t||Qt(r,Symbol.toStringTag,{value:"Module"}),r};sn.__exportAll=_a;(function(e){var r=sn.__exportAll({});Object.defineProperty(e,"type_exports",{enumerable:!0,get:function(){return r}})})(on);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=M,r=$,n=b,o=Pt,s=q,i=he,a=K,c=xr,l=Xe,u=Yr,d=on;let f=D;const h=c.default;e.CurrentGlobal=n.CurrentGlobal,e.Global=n.Global,e.Module=l.Module,e.ModuleFederation=u.ModuleFederation,e.addGlobalSnapshot=n.addGlobalSnapshot,e.assert=t.assert,e.error=t.error,e.getGlobalFederationConstructor=n.getGlobalFederationConstructor,e.getGlobalSnapshot=n.getGlobalSnapshot,e.getInfoWithoutType=n.getInfoWithoutType,e.getRegisteredShare=s.getRegisteredShare,e.getRemoteEntry=a.getRemoteEntry,e.getRemoteInfo=a.getRemoteInfo,e.helpers=h,e.isStaticResourcesEqual=r.isStaticResourcesEqual,Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return f.loadScript}}),Object.defineProperty(e,"loadScriptNode",{enumerable:!0,get:function(){return f.loadScriptNode}}),e.matchRemoteWithNameAndExpose=i.matchRemoteWithNameAndExpose,e.registerGlobalPlugins=n.registerGlobalPlugins,e.resetFederationGlobalInfo=n.resetFederationGlobalInfo,e.safeWrapper=r.safeWrapper,e.satisfy=o.satisfy,e.setGlobalFederationConstructor=n.setGlobalFederationConstructor,e.setGlobalFederationInstance=n.setGlobalFederationInstance,Object.defineProperty(e,"types",{enumerable:!0,get:function(){return d.type_exports}})})(Tt);let ga=Tt;function pa(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function ya(e,t){const r=pa();return ga.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(n=>!!(r&&n.options.id===r||n.options.name===e&&!n.options.version&&!t||n.options.name===e&&t&&n.options.version===t))}ar.getGlobalFederationInstance=ya;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ar;let r=Tt,n=Y;function o(_){const g=new((0,r.getGlobalFederationConstructor)()||r.ModuleFederation)(_);return(0,r.setGlobalFederationInstance)(g),g}let s=null;function i(_){const g=t.getGlobalFederationInstance(_.name,_.version);return g?(g.initOptions(_),s||(s=g),g):(s=o(_),s)}function a(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.loadRemote.apply(s,_)}function c(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.loadShare.apply(s,_)}function l(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.loadShareSync.apply(s,_)}function u(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.preloadRemote.apply(s,_)}function d(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.registerRemotes.apply(s,_)}function f(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.registerPlugins.apply(s,_)}function h(){return s}function m(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.registerShared.apply(s,_)}(0,r.setGlobalFederationConstructor)(r.ModuleFederation),Object.defineProperty(e,"Module",{enumerable:!0,get:function(){return r.Module}}),e.ModuleFederation=r.ModuleFederation,e.createInstance=o,e.getInstance=h,Object.defineProperty(e,"getRemoteEntry",{enumerable:!0,get:function(){return r.getRemoteEntry}}),Object.defineProperty(e,"getRemoteInfo",{enumerable:!0,get:function(){return r.getRemoteInfo}}),e.init=i,e.loadRemote=a,Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return r.loadScript}}),Object.defineProperty(e,"loadScriptNode",{enumerable:!0,get:function(){return r.loadScriptNode}}),e.loadShare=c,e.loadShareSync=l,e.preloadRemote=u,Object.defineProperty(e,"registerGlobalPlugins",{enumerable:!0,get:function(){return r.registerGlobalPlugins}}),e.registerPlugins=f,e.registerRemotes=d,e.registerShared=m})(ir);const an="__mf_init____mf__virtual/ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__.js__";let Rt=globalThis[an];if(!Rt){let e,t;const r=new Promise((n,o)=>{e=n,t=o});Rt=globalThis[an]={initPromise:r,initResolve:e,initReject:t},typeof window>"u"&&e({loadRemote:function(){return Promise.resolve(void 0)},loadShare:function(){return Promise.resolve(void 0)}})}const Ea=Rt.initResolve,er={},tr="default",rr="ConfigCustomJavascriptSet";let nr,or;async function Sa(){return nr??=sr(()=>import("./localSharedImportMap-DslGqCtU.js"),__vite__mapDeps([0,1]),import.meta.url),nr}async function ba(){return or??=sr(()=>import("./virtualExposes-D402kVGY.js"),__vite__mapDeps([2,1]),import.meta.url).then(e=>e.default??e),or}async function Ta(e={},t=[]){const{usedShared:r,usedRemotes:n}=await Sa(),o=ir.init({name:rr,remotes:n,shared:r,plugins:[],shareStrategy:"version-first"});var s=er[tr];if(s||(s=er[tr]={from:rr}),!(t.indexOf(s)>=0)){t.push(s),o.initShareScopeMap("default",e),Ea(o);try{await Promise.all(await o.initializeSharing("default",{strategy:"version-first",from:"build",initScope:t}))}catch(i){console.error(i)}return o}}async function Ia(e){const t=await ba();if(!(e in t))throw new Error(`Module ${e} does not exist in container.`);return t[e]().then(r=>()=>r)}export{ir as d,Ia as g,Ta as i}; + ${(0,mi.safeToString)(this.remoteInfo)}`),this.remoteEntryExports=e,this.remoteEntryExports}async init(e,t,r){const n=await this.getEntry();if(this.inited)return n;if(this.initPromise)return await this.initPromise,n;this.initing=!0,this.initPromise=(async()=>{const{remoteEntryInitOptions:o,shareScope:s,initScope:i}=_i(this.remoteInfo,this.host.shareScopeMap,r),a=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:s,remoteEntryInitOptions:o,initScope:i,remoteInfo:this.remoteInfo,origin:this.host});typeof(n==null?void 0:n.init)>"u"&&Ze.error(Ut.RUNTIME_002,Ut.runtimeDescMap,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName},void 0,hi.optionsToMFContext(this.host.options)),await n.init(a.shareScope,a.initScope,a.remoteEntryInitOptions),await this.host.hooks.lifecycle.initContainer.emit({...a,id:e,remoteSnapshot:t,remoteEntryExports:n}),this.inited=!0})();try{await this.initPromise}finally{this.initing=!1,this.initPromise=void 0}return n}async get(e,t,r,n){const{loadFactory:o=!0}=r||{loadFactory:!0},s=await this.init(e,n);this.lib=s;let i;i=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:s,expose:t,moduleInfo:this.remoteInfo}),i||(i=await s.get(t)),Ze.assert(i,`${Gt.getFMId(this.remoteInfo)} remote don't export ${t}.`);const a=Gt.processModuleAlias(this.remoteInfo.name,t),c=this.wraperFactory(i,a);return o?await c():c}wraperFactory(e,t){function r(n,o){n&&typeof n=="object"&&Object.isExtensible(n)&&!Object.getOwnPropertyDescriptor(n,Symbol.for("mf_module_id"))&&Object.defineProperty(n,Symbol.for("mf_module_id"),{value:o,enumerable:!1})}return e instanceof Promise?async()=>{const n=await e();return r(n,t),n}:()=>{const n=e();return r(n,t),n}}};Xe.Module=gi;var Yr={},me={},pi=class{constructor(e){this.type="",this.listeners=new Set,e&&(this.type=e)}on(e){typeof e=="function"&&this.listeners.add(e)}once(e){const t=this;this.on(function r(...n){return t.remove(r),e.apply(null,n)})}emit(...e){let t;return this.listeners.size>0&&this.listeners.forEach(r=>{t=r(...e)}),t}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}};me.SyncHook=pi;var ve={};const yi=me;var Ei=class extends yi.SyncHook{emit(...e){let t;const r=Array.from(this.listeners);if(r.length>0){let n=0;const o=s=>s===!1?!1:n0){let r=0;const n=s=>(et.warn(s),this.onerror(s),e),o=s=>{if(Ii.checkReturnData(e,s)){if(e=s,r{const s=e[o];s&&this.lifecycle[o].on(s)}))}removePlugin(e){we.assert(e,"A name is required.");const t=this.registerPlugins[e];we.assert(t,`The plugin "${e}" is not registered.`),Object.keys(t).forEach(r=>{r!=="name"&&this.lifecycle[r].remove(t[r])})}};Oe.PluginSystem=Mi;var xe={};const Pi=M,St=$,vi=Z;let Wt=D,Bt=Y;function Zr(e,t){const r=St.getRemoteEntryInfoFromSnapshot(t);r.url||Pi.error(Bt.RUNTIME_011,Bt.runtimeDescMap,{remoteName:e.name});let n=(0,Wt.getResourceUrl)(t,r.url);!Wt.isBrowserEnvValue&&!n.startsWith("http")&&(n=`https:${n}`),e.type=r.type,e.entryGlobalName=r.globalName,e.entry=n,e.version=t.version,e.buildVersion=t.buildVersion}function Ai(){return{name:"snapshot-plugin",async afterResolve(e){const{remote:t,pkgNameOrAlias:r,expose:n,origin:o,remoteInfo:s,id:i}=e;if(!St.isRemoteInfoWithEntry(t)||!St.isPureRemoteEntry(t)){const{remoteSnapshot:a,globalSnapshot:c}=await o.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:i});Zr(s,a);const l={remote:t,preloadConfig:{nameOrAlias:r,exposes:[n],resourceCategory:"sync",share:!1,depsRemote:!1}},u=await o.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:o,preloadOptions:l,remoteInfo:s,remote:t,remoteSnapshot:a,globalSnapshot:c});return u&&vi.preloadAssets(s,o,u,!1),{...e,remoteSnapshot:a}}return e}}}xe.assignRemoteInfo=Zr;xe.snapshotPlugin=Ai;var Qr={};const Ne=$,bt=b,Oi=q,jt=Z,ki=xe;let je=D;function wi(e){const t=e.split(":");return t.length===1?{name:t[0],version:void 0}:t.length===2?{name:t[0],version:t[1]}:{name:t[1],version:t[2]}}function en(e,t,r,n,o={},s){const{value:i}=bt.getInfoWithoutType(e,Ne.getFMId(t)),a=s||i;if(a&&!(0,je.isManifestProvider)(a)&&(r(a,t,n),a.remotesInfo)){const c=Object.keys(a.remotesInfo);for(const l of c){if(o[l])continue;o[l]=!0;const u=wi(l),d=a.remotesInfo[l];en(e,{name:u.name,version:d.matchedVersion},r,!1,o,void 0)}}}const tt=(e,t)=>document.querySelector(`${e}[${e==="link"?"href":"src"}="${t}"]`);function Fi(e,t,r,n,o){const s=[],i=[],a=[],c=new Set,l=new Set,{options:u}=e,{preloadConfig:d}=t,{depsRemote:f}=d;if(en(n,r,(m,_,g)=>{var N;let p;if(g)p=d;else if(Array.isArray(f)){const R=f.find(v=>v.nameOrAlias===_.name||v.nameOrAlias===_.alias);if(!R)return;p=jt.defaultPreloadArgs(R)}else if(f===!0)p=d;else return;const E=(0,je.getResourceUrl)(m,Ne.getRemoteEntryInfoFromSnapshot(m).url);E&&a.push({name:_.name,moduleInfo:{name:_.name,entry:E,type:"remoteEntryType"in m?m.remoteEntryType:"global",entryGlobalName:"globalName"in m?m.globalName:_.name,shareScope:"",version:"version"in m?m.version:void 0},url:E});let I="modules"in m?m.modules:[];const k=jt.normalizePreloadExposes(p.exposes);k.length&&"modules"in m&&(I=(N=m==null?void 0:m.modules)==null?void 0:N.reduce((R,v)=>((k==null?void 0:k.indexOf(v.moduleName))!==-1&&R.push(v),R),[]));function y(R){const v=R.map(B=>(0,je.getResourceUrl)(m,B));return p.filter?v.filter(p.filter):v}if(I){const R=I.length;for(let v=0;v0){const m=(_,g)=>{const{shared:p}=Oi.getRegisteredShare(e.shareScopeMap,g.sharedName,_,e.sharedHandler.hooks.lifecycle.resolveShare)||{};p&&typeof p.lib=="function"&&(g.assets.js.sync.forEach(E=>{c.add(E)}),g.assets.css.sync.forEach(E=>{l.add(E)}))};o.shared.forEach(_=>{var E;const g=(E=u.shared)==null?void 0:E[_.sharedName];if(!g)return;const p=_.version?g.find(I=>I.version===_.version):g;p&&Ne.arrayOptions(p).forEach(I=>{m(I,_)})})}const h=i.filter(m=>!c.has(m)&&!tt("script",m));return{cssAssets:s.filter(m=>!l.has(m)&&!tt("link",m)),jsAssetsWithoutEntry:h,entryAssets:a.filter(m=>!tt("script",m.url))}}const Li=function(){return{name:"generate-preload-assets-plugin",async generatePreloadAssets(e){const{origin:t,preloadOptions:r,remoteInfo:n,remote:o,globalSnapshot:s,remoteSnapshot:i}=e;return je.isBrowserEnvValue?Ne.isRemoteInfoWithEntry(o)&&Ne.isPureRemoteEntry(o)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:o.name,url:o.entry,moduleInfo:{name:n.name,entry:o.entry,type:n.type||"global",entryGlobalName:"",shareScope:""}}]}:(ki.assignRemoteInfo(n,i),Fi(t,r,n,s,i)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}}}};Qr.generatePreloadAssetsPlugin=Li;var Ke={};const rt=M,Di=$,U=b,Vt=Pe,Hi=ve,nt=Ae,Ci=Oe;let ot=D,Fe=Y;function tn(e,t){const r=U.getGlobalSnapshotInfoByModuleInfo({name:t.name,version:t.options.version}),n=r&&"remotesInfo"in r&&r.remotesInfo&&U.getInfoWithoutType(r.remotesInfo,e.name).value;return n&&n.matchedVersion?{hostGlobalSnapshot:r,globalSnapshot:U.getGlobalSnapshot(),remoteSnapshot:U.getGlobalSnapshotInfoByModuleInfo({name:e.name,version:n.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:U.getGlobalSnapshot(),remoteSnapshot:U.getGlobalSnapshotInfoByModuleInfo({name:e.name,version:"version"in e?e.version:void 0})}}var qi=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new Ci.PluginSystem({beforeLoadRemoteSnapshot:new Hi.AsyncHook("beforeLoadRemoteSnapshot"),loadSnapshot:new nt.AsyncWaterfallHook("loadGlobalSnapshot"),loadRemoteSnapshot:new nt.AsyncWaterfallHook("loadRemoteSnapshot"),afterLoadSnapshot:new nt.AsyncWaterfallHook("afterLoadSnapshot")}),this.manifestLoading=U.Global.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:t,expose:r}){const{options:n}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:n,moduleInfo:e});let o=U.getGlobalSnapshotInfoByModuleInfo({name:this.HostInstance.options.name,version:this.HostInstance.options.version});o||(o={version:this.HostInstance.options.version||"",remoteEntry:"",remotesInfo:{}},U.addGlobalSnapshot({[this.HostInstance.options.name]:o})),o&&"remotesInfo"in o&&!U.getInfoWithoutType(o.remotesInfo,e.name).value&&("version"in e||"entry"in e)&&(o.remotesInfo={...o==null?void 0:o.remotesInfo,[e.name]:{matchedVersion:"version"in e?e.version:e.entry}});const{hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:a}=this.getGlobalRemoteInfo(e),{remoteSnapshot:c,globalSnapshot:l}=await this.hooks.lifecycle.loadSnapshot.emit({options:n,moduleInfo:e,hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:a});let u,d;if(c)if((0,ot.isManifestProvider)(c)){const f=ot.isBrowserEnvValue?c.remoteEntry:c.ssrRemoteEntry||c.remoteEntry||"",h=await this.getManifestJson(f,e,{}),m=U.setGlobalSnapshotInfoByModuleInfo({...e,entry:f},h);u=h,d=m}else{const{remoteSnapshot:f}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:c,from:"global"});u=f,d=l}else if(Di.isRemoteInfoWithEntry(e)){const f=await this.getManifestJson(e.entry,e,{}),h=U.setGlobalSnapshotInfoByModuleInfo(e,f),{remoteSnapshot:m}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:f,from:"global"});u=m,d=h}else rt.error(Fe.RUNTIME_007,Fe.runtimeDescMap,{remoteName:e.name,remoteVersion:e.version,hostName:this.HostInstance.options.name,globalSnapshot:JSON.stringify(l)},void 0,Vt.optionsToMFContext(this.HostInstance.options));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:n,moduleInfo:e,remoteSnapshot:u}),{remoteSnapshot:u,globalSnapshot:d}}getGlobalRemoteInfo(e){return tn(e,this.HostInstance)}async getManifestJson(e,t,r){const n=async()=>{let s=this.manifestCache.get(e);if(s)return s;try{let i=await this.loaderHook.lifecycle.fetch.emit(e,{});(!i||!(i instanceof Response))&&(i=await fetch(e,{})),s=await i.json()}catch(i){s=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:i,from:"runtime",lifecycle:"afterResolve",origin:this.HostInstance}),s||(delete this.manifestLoading[e],rt.error(Fe.RUNTIME_003,Fe.runtimeDescMap,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${i}`,Vt.optionsToMFContext(this.HostInstance.options)))}return rt.assert(s.metaData&&s.exposes&&s.shared,`"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${[!s.metaData&&"metaData",!s.exposes&&"exposes",!s.shared&&"shared"].filter(Boolean).join(", ")}.`),this.manifestCache.set(e,s),s},o=async()=>{const s=await n(),i=(0,ot.generateSnapshotFromManifest)(s,{version:e}),{remoteSnapshot:a}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:s,remoteSnapshot:i,manifestUrl:e,from:"manifest"});return a};return this.manifestLoading[e]||(this.manifestLoading[e]=o().then(s=>s)),this.manifestLoading[e]}};Ke.SnapshotHandler=qi;Ke.getGlobalRemoteInfo=tn;var rn={};const st=M,Gi=oe,A=q,Xt=Pe,Ui=ve,it=_e,xt=Ae,Wi=Oe;let pe=Y;var Bi=class{constructor(e){this.hooks=new Wi.PluginSystem({beforeRegisterShare:new it.SyncWaterfallHook("beforeRegisterShare"),afterResolve:new xt.AsyncWaterfallHook("afterResolve"),beforeLoadShare:new xt.AsyncWaterfallHook("beforeLoadShare"),loadShare:new Ui.AsyncHook,resolveShare:new it.SyncWaterfallHook("resolveShare"),initContainerShareScopeMap:new it.SyncWaterfallHook("initContainerShareScopeMap")}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}registerShared(e,t){const{newShareInfos:r,allShareInfos:n}=A.formatShareConfigs(e,t);return Object.keys(r).forEach(o=>{r[o].forEach(s=>{s.scope.forEach(i=>{var a;this.hooks.lifecycle.beforeRegisterShare.emit({origin:this.host,pkgName:o,shared:s}),(a=this.shareScopeMap[i])!=null&&a[o]||this.setShared({pkgName:o,lib:s.lib,get:s.get,loaded:s.loaded||!!s.lib,shared:s,from:t.name})})})}),{newShareInfos:r,allShareInfos:n}}async loadShare(e,t){const{host:r}=this,n=A.getTargetSharedOptions({pkgName:e,extraOptions:t,shareInfos:r.options.shared});n!=null&&n.scope&&await Promise.all(n.scope.map(async a=>{await Promise.all(this.initializeSharing(a,{strategy:n.strategy}))}));const{shareInfo:o}=await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:n,shared:r.options.shared,origin:r});st.assert(o,`Cannot find shared "${e}" in host "${r.options.name}". Ensure the shared config for "${e}" is declared in the federation plugin options and the host has been initialized before loading shares.`);const{shared:s,useTreesShaking:i}=A.getRegisteredShare(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare)||{};if(s){const a=A.directShare(s,i);if(a.lib)return A.addUseIn(a,r.options.name),a.lib;if(a.loading&&!a.loaded){const c=await a.loading;return a.loaded=!0,a.lib||(a.lib=c),A.addUseIn(a,r.options.name),c}else{const l=(async()=>{const u=await a.get();return A.addUseIn(a,r.options.name),a.loaded=!0,a.lib=u,u})();return this.setShared({pkgName:e,loaded:!1,shared:s,from:r.options.name,lib:null,loading:l,treeShaking:i?a:void 0}),l}}else{if(t!=null&&t.customShareInfo)return!1;const a=A.shouldUseTreeShaking(o.treeShaking),c=A.directShare(o,a),u=(async()=>{const d=await c.get();c.lib=d,c.loaded=!0,A.addUseIn(c,r.options.name);const{shared:f,useTreesShaking:h}=A.getRegisteredShare(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare)||{};if(f){const m=A.directShare(f,h);m.lib=d,m.loaded=!0,f.from=o.from}return d})();return this.setShared({pkgName:e,loaded:!1,shared:o,from:r.options.name,lib:null,loading:u,treeShaking:a?c:void 0}),u}}initializeSharing(e=Gi.DEFAULT_SCOPE,t){const{host:r}=this,n=t==null?void 0:t.from,o=t==null?void 0:t.strategy;let s=t==null?void 0:t.initScope;const i=[];if(n!=="build"){const{initTokens:f}=this;s||(s=[]);let h=f[e];if(h||(h=f[e]={from:this.host.name}),s.indexOf(h)>=0)return i;s.push(h)}const a=this.shareScopeMap,c=r.options.name;a[e]||(a[e]={});const l=a[e],u=(f,h)=>{var I;const{version:m,eager:_}=h;l[f]=l[f]||{};const g=l[f],p=g[m]&&A.directShare(g[m]),E=!!(p&&("eager"in p&&p.eager||"shareConfig"in p&&((I=p.shareConfig)!=null&&I.eager)));(!p||p.strategy!=="loaded-first"&&!p.loaded&&(!_!=!E?_:c>g[m].from))&&(g[m]=h)},d=async f=>{const{module:h}=await r.remoteHandler.getRemoteModuleAndOptions({id:f});let m;try{m=await h.getEntry()}catch(_){if(m=await r.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:f,error:_,from:"runtime",lifecycle:"beforeLoadShare",origin:r}),!m)return}finally{m!=null&&m.init&&!h.initing&&(h.remoteEntryExports=m,await h.init(void 0,void 0,s))}};return Object.keys(r.options.shared).forEach(f=>{r.options.shared[f].forEach(h=>{h.scope.includes(e)&&u(f,h)})}),(r.options.shareStrategy==="version-first"||o==="version-first")&&r.options.remotes.forEach(f=>{f.shareScope===e&&i.push(d(f.name))}),i}loadShareSync(e,t){const{host:r}=this,n=A.getTargetSharedOptions({pkgName:e,extraOptions:t,shareInfos:r.options.shared});n!=null&&n.scope&&n.scope.forEach(i=>{this.initializeSharing(i,{strategy:n.strategy})});const{shared:o,useTreesShaking:s}=A.getRegisteredShare(this.shareScopeMap,e,n,this.hooks.lifecycle.resolveShare)||{};if(o){if(typeof o.lib=="function")return A.addUseIn(o,r.options.name),o.loaded||(o.loaded=!0,o.from===r.options.name&&(n.loaded=!0)),o.lib;if(typeof o.get=="function"){const i=o.get();if(!(i instanceof Promise))return A.addUseIn(o,r.options.name),this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:i,shared:o}),i}}if(n.lib)return n.loaded||(n.loaded=!0),n.lib;if(n.get){const i=n.get();return i instanceof Promise&&st.error((t==null?void 0:t.from)==="build"?pe.RUNTIME_005:pe.RUNTIME_006,pe.runtimeDescMap,{hostName:r.options.name,sharedPkgName:e},void 0,Xt.optionsToMFContext(r.options)),n.lib=i,this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:n.lib,shared:n}),n.lib}st.error(pe.RUNTIME_006,pe.runtimeDescMap,{hostName:r.options.name,sharedPkgName:e},void 0,Xt.optionsToMFContext(r.options))}initShareScopeMap(e,t,r={}){const{host:n}=this;this.shareScopeMap[e]=t,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:t,options:n.options,origin:n,scopeName:e,hostShareScopeMap:r.hostShareScopeMap})}setShared({pkgName:e,shared:t,from:r,lib:n,loading:o,loaded:s,get:i,treeShaking:a}){const{version:c,scope:l="default",...u}=t,d=Array.isArray(l)?l:[l],f=h=>{const m=(g,p,E)=>{E&&!g[p]&&(g[p]=E)},_=a?h.treeShaking:h;m(_,"loaded",s),m(_,"loading",o),m(_,"get",i)};d.forEach(h=>{this.shareScopeMap[h]||(this.shareScopeMap[h]={}),this.shareScopeMap[h][e]||(this.shareScopeMap[h][e]={}),this.shareScopeMap[h][e][c]||(this.shareScopeMap[h][e][c]={version:c,scope:[h],...u,lib:n});const m=this.shareScopeMap[h][e][c];f(m),r&&m.from!==r&&(m.from=r)})}_setGlobalShareScopeMap(e){const t=A.getGlobalShareScope(),r=e.id||e.name;r&&!t[r]&&(t[r]=this.shareScopeMap)}};rn.SharedHandler=Bi;var nn={};const Le=M,G=b,Kt=oe,ji=q,Vi=he,at=K,Xi=Pe,Yt=Z,xi=Xe,Ki=me,ie=ve,zt=_e,Yi=Ae,zi=Oe,Ji=Ke;let lt=D,Jt=Y;var Zi=class{constructor(e){this.hooks=new zi.PluginSystem({beforeRegisterRemote:new zt.SyncWaterfallHook("beforeRegisterRemote"),registerRemote:new zt.SyncWaterfallHook("registerRemote"),beforeRequest:new Yi.AsyncWaterfallHook("beforeRequest"),onLoad:new ie.AsyncHook("onLoad"),handlePreloadModule:new Ki.SyncHook("handlePreloadModule"),errorLoadRemote:new ie.AsyncHook("errorLoadRemote"),beforePreloadRemote:new ie.AsyncHook("beforePreloadRemote"),generatePreloadAssets:new ie.AsyncHook("generatePreloadAssets"),afterPreloadRemote:new ie.AsyncHook,loadEntry:new ie.AsyncHook}),this.host=e,this.idToRemoteMap={}}formatAndRegisterRemote(e,t){return(t.remotes||[]).reduce((r,n)=>(this.registerRemote(n,r,{force:!1}),r),e.remotes)}setIdToRemoteMap(e,t){const{remote:r,expose:n}=t,{name:o,alias:s}=r;if(this.idToRemoteMap[e]={name:r.name,expose:n},s&&e.startsWith(o)){const i=e.replace(o,s);this.idToRemoteMap[i]={name:r.name,expose:n};return}if(s&&e.startsWith(s)){const i=e.replace(s,o);this.idToRemoteMap[i]={name:r.name,expose:n}}}async loadRemote(e,t){const{host:r}=this;try{const{loadFactory:n=!0}=t||{loadFactory:!0},{module:o,moduleOptions:s,remoteMatchInfo:i}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:a,remote:c,expose:l,id:u,remoteSnapshot:d}=i,f=await o.get(u,l,t,d),h=await this.hooks.lifecycle.onLoad.emit({id:u,pkgNameOrAlias:a,expose:l,exposeModule:n?f:void 0,exposeModuleFactory:n?void 0:f,remote:c,options:s,moduleInstance:o,origin:r});return this.setIdToRemoteMap(e,i),typeof h=="function"?h:f}catch(n){const{from:o="runtime"}=t||{from:"runtime"},s=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:n,from:o,lifecycle:"onLoad",origin:r});if(!s)throw n;return s}}async preloadRemote(e){const{host:t}=this;await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});const r=Yt.formatPreloadArgs(t.options.remotes,e);await Promise.all(r.map(async n=>{const{remote:o}=n,s=at.getRemoteInfo(o),{globalSnapshot:i,remoteSnapshot:a}=await t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:o}),c=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:n,remote:o,remoteInfo:s,globalSnapshot:i,remoteSnapshot:a});c&&Yt.preloadAssets(s,t,c)}))}registerRemotes(e,t){const{host:r}=this;e.forEach(n=>{this.registerRemote(n,r.options.remotes,{force:t==null?void 0:t.force})})}async getRemoteModuleAndOptions(e){const{host:t}=this,{id:r}=e;let n;try{n=await this.hooks.lifecycle.beforeRequest.emit({id:r,options:t.options,origin:t})}catch(h){if(n=await this.hooks.lifecycle.errorLoadRemote.emit({id:r,options:t.options,origin:t,from:"runtime",error:h,lifecycle:"beforeRequest"}),!n)throw h}const{id:o}=n,s=Vi.matchRemoteWithNameAndExpose(t.options.remotes,o);s||Le.error(Jt.RUNTIME_004,Jt.runtimeDescMap,{hostName:t.options.name,requestId:o},void 0,Xi.optionsToMFContext(t.options));const{remote:i}=s,a=at.getRemoteInfo(i),c=await t.sharedHandler.hooks.lifecycle.afterResolve.emit({id:o,...s,options:t.options,origin:t,remoteInfo:a}),{remote:l,expose:u}=c;Le.assert(l&&u,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${o}.`);let d=t.moduleCache.get(l.name);const f={host:t,remoteInfo:a};return d||(d=new xi.Module(f),t.moduleCache.set(l.name,d)),{module:d,moduleOptions:f,remoteMatchInfo:c}}registerRemote(e,t,r){const{host:n}=this,o=()=>{if(e.alias){const i=t.find(a=>{var c;return e.alias&&(a.name.startsWith(e.alias)||((c=a.alias)==null?void 0:c.startsWith(e.alias)))});Le.assert(!i,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${i&&i.name} name or alias`)}"entry"in e&<.isBrowserEnvValue&&typeof window<"u"&&!e.entry.startsWith("http")&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||(e.shareScope=Kt.DEFAULT_SCOPE),e.type||(e.type=Kt.DEFAULT_REMOTE_TYPE)};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:n});const s=t.find(i=>i.name===e.name);if(!s)o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n});else{const i=[`The remote "${e.name}" is already registered.`,"Please note that overriding it may cause unexpected errors."];r!=null&&r.force&&(this.removeRemote(s),o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n}),(0,lt.warn)(i.join(" ")))}}removeRemote(e){var t;try{const{host:r}=this,{name:n}=e,o=r.options.remotes.findIndex(i=>i.name===n);o!==-1&&r.options.remotes.splice(o,1);const s=r.moduleCache.get(e.name);if(s){const i=s.remoteInfo,a=i.entryGlobalName;G.CurrentGlobal[a]&&((t=Object.getOwnPropertyDescriptor(G.CurrentGlobal,a))!=null&&t.configurable?delete G.CurrentGlobal[a]:G.CurrentGlobal[a]=void 0);const c=at.getRemoteEntryUniqueKey(s.remoteInfo);G.globalLoading[c]&&delete G.globalLoading[c],r.snapshotHandler.manifestCache.delete(i.entry);let l=i.buildVersion?(0,lt.composeKeyWithSeparator)(i.name,i.buildVersion):i.name;const u=G.CurrentGlobal.__FEDERATION__.__INSTANCES__.findIndex(f=>i.buildVersion?f.options.id===l:f.name===l);if(u!==-1){const f=G.CurrentGlobal.__FEDERATION__.__INSTANCES__[u];l=f.options.id||l;const h=ji.getGlobalShareScope();let m=!0;const _=[];Object.keys(h).forEach(g=>{const p=h[g];p&&Object.keys(p).forEach(E=>{const I=p[E];I&&Object.keys(I).forEach(k=>{const y=I[k];y&&Object.keys(y).forEach(N=>{const R=y[N];R&&typeof R=="object"&&R.from===i.name&&(R.loaded||R.loading?(R.useIn=R.useIn.filter(v=>v!==i.name),R.useIn.length?m=!1:_.push([g,E,k,N])):_.push([g,E,k,N]))})})})}),m&&(f.shareScopeMap={},delete h[l]),_.forEach(([g,p,E,I])=>{var k,y,N;(N=(y=(k=h[g])==null?void 0:k[p])==null?void 0:y[E])==null||delete N[I]}),G.CurrentGlobal.__FEDERATION__.__INSTANCES__.splice(u,1)}const{hostGlobalSnapshot:d}=Ji.getGlobalRemoteInfo(e,r);if(d){const f=d&&"remotesInfo"in d&&d.remotesInfo&&G.getInfoWithoutType(d.remotesInfo,e.name).key;f&&(delete d.remotesInfo[f],G.Global.__FEDERATION__.__MANIFEST_LOADING__[f]&&delete G.Global.__FEDERATION__.__MANIFEST_LOADING__[f])}r.moduleCache.delete(e.name)}}catch(r){Le.logger.error(`removeRemote failed: ${r instanceof Error?r.message:String(r)}`)}}};nn.RemoteHandler=Zi;const Qi=M,ea=oe,ta=q,ra=Vr,na=Xr,oa=K,sa=Xe,z=me,ct=ve,ia=_e,Zt=Ae,ut=Oe,aa=xe,la=Qr,ca=Ke,ua=rn,fa=nn;let da=D,ft=Y;const ha=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN=="boolean"?!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN:!0;var ma=class{constructor(e){this.hooks=new ut.PluginSystem({beforeInit:new ia.SyncWaterfallHook("beforeInit"),init:new z.SyncHook,beforeInitContainer:new Zt.AsyncWaterfallHook("beforeInitContainer"),initContainer:new Zt.AsyncWaterfallHook("initContainer")}),this.version="2.2.2",this.moduleCache=new Map,this.loaderHook=new ut.PluginSystem({getModuleInfo:new z.SyncHook,createScript:new z.SyncHook,createLink:new z.SyncHook,fetch:new ct.AsyncHook,loadEntryError:new ct.AsyncHook,getModuleFactory:new ct.AsyncHook}),this.bridgeHook=new ut.PluginSystem({beforeBridgeRender:new z.SyncHook,afterBridgeRender:new z.SyncHook,beforeBridgeDestroy:new z.SyncHook,afterBridgeDestroy:new z.SyncHook});const t=ha?[aa.snapshotPlugin(),la.generatePreloadAssetsPlugin()]:[],r={id:ra.getBuilderId(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:da.isBrowserEnvValue};this.name=e.name,this.options=r,this.snapshotHandler=new ca.SnapshotHandler(this),this.sharedHandler=new ua.SharedHandler(this),this.remoteHandler=new fa.RemoteHandler(this),this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...r.plugins,...e.plugins||[]]),this.options=this.formatOptions(r,e)}initOptions(e){e.name&&e.name!==this.options.name&&Qi.error((0,ft.getShortErrorMsg)(ft.RUNTIME_010,ft.runtimeDescMap)),this.registerPlugins(e.plugins);const t=this.formatOptions(this.options,e);return this.options=t,t}async loadShare(e,t){return this.sharedHandler.loadShare(e,t)}loadShareSync(e,t){return this.sharedHandler.loadShareSync(e,t)}initializeSharing(e=ea.DEFAULT_SCOPE,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,r){const n=oa.getRemoteInfo({name:e,entry:t}),o=new sa.Module({host:this,remoteInfo:n});return o.remoteEntryExports=r,this.moduleCache.set(e,o),o}async loadRemote(e,t){return this.remoteHandler.loadRemote(e,t)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,t,r={}){this.sharedHandler.initShareScopeMap(e,t,r)}formatOptions(e,t){const{allShareInfos:r}=ta.formatShareConfigs(e,t),{userOptions:n,options:o}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:r}),s=this.remoteHandler.formatAndRegisterRemote(o,n),{allShareInfos:i}=this.sharedHandler.registerShared(o,n),a=[...o.plugins];n.plugins&&n.plugins.forEach(l=>{a.includes(l)||a.push(l)});const c={...e,...t,plugins:a,remotes:s,shared:i};return this.hooks.lifecycle.init.emit({origin:this,options:c}),c}registerPlugins(e){const t=na.registerPlugins(e,this);this.options.plugins=this.options.plugins.reduce((r,n)=>(n&&r&&!r.find(o=>o.name===n.name)&&r.push(n),r),t||[])}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}};Yr.ModuleFederation=ma;var on={},sn={},Qt=Object.defineProperty,_a=(e,t)=>{let r={};for(var n in e)Qt(r,n,{get:e[n],enumerable:!0});return t||Qt(r,Symbol.toStringTag,{value:"Module"}),r};sn.__exportAll=_a;(function(e){var r=sn.__exportAll({});Object.defineProperty(e,"type_exports",{enumerable:!0,get:function(){return r}})})(on);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=M,r=$,n=b,o=Pt,s=q,i=he,a=K,c=xr,l=Xe,u=Yr,d=on;let f=D;const h=c.default;e.CurrentGlobal=n.CurrentGlobal,e.Global=n.Global,e.Module=l.Module,e.ModuleFederation=u.ModuleFederation,e.addGlobalSnapshot=n.addGlobalSnapshot,e.assert=t.assert,e.error=t.error,e.getGlobalFederationConstructor=n.getGlobalFederationConstructor,e.getGlobalSnapshot=n.getGlobalSnapshot,e.getInfoWithoutType=n.getInfoWithoutType,e.getRegisteredShare=s.getRegisteredShare,e.getRemoteEntry=a.getRemoteEntry,e.getRemoteInfo=a.getRemoteInfo,e.helpers=h,e.isStaticResourcesEqual=r.isStaticResourcesEqual,Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return f.loadScript}}),Object.defineProperty(e,"loadScriptNode",{enumerable:!0,get:function(){return f.loadScriptNode}}),e.matchRemoteWithNameAndExpose=i.matchRemoteWithNameAndExpose,e.registerGlobalPlugins=n.registerGlobalPlugins,e.resetFederationGlobalInfo=n.resetFederationGlobalInfo,e.safeWrapper=r.safeWrapper,e.satisfy=o.satisfy,e.setGlobalFederationConstructor=n.setGlobalFederationConstructor,e.setGlobalFederationInstance=n.setGlobalFederationInstance,Object.defineProperty(e,"types",{enumerable:!0,get:function(){return d.type_exports}})})(Tt);let ga=Tt;function pa(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function ya(e,t){const r=pa();return ga.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(n=>!!(r&&n.options.id===r||n.options.name===e&&!n.options.version&&!t||n.options.name===e&&t&&n.options.version===t))}ar.getGlobalFederationInstance=ya;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ar;let r=Tt,n=Y;function o(_){const g=new((0,r.getGlobalFederationConstructor)()||r.ModuleFederation)(_);return(0,r.setGlobalFederationInstance)(g),g}let s=null;function i(_){const g=t.getGlobalFederationInstance(_.name,_.version);return g?(g.initOptions(_),s||(s=g),g):(s=o(_),s)}function a(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.loadRemote.apply(s,_)}function c(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.loadShare.apply(s,_)}function l(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.loadShareSync.apply(s,_)}function u(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.preloadRemote.apply(s,_)}function d(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.registerRemotes.apply(s,_)}function f(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.registerPlugins.apply(s,_)}function h(){return s}function m(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.registerShared.apply(s,_)}(0,r.setGlobalFederationConstructor)(r.ModuleFederation),Object.defineProperty(e,"Module",{enumerable:!0,get:function(){return r.Module}}),e.ModuleFederation=r.ModuleFederation,e.createInstance=o,e.getInstance=h,Object.defineProperty(e,"getRemoteEntry",{enumerable:!0,get:function(){return r.getRemoteEntry}}),Object.defineProperty(e,"getRemoteInfo",{enumerable:!0,get:function(){return r.getRemoteInfo}}),e.init=i,e.loadRemote=a,Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return r.loadScript}}),Object.defineProperty(e,"loadScriptNode",{enumerable:!0,get:function(){return r.loadScriptNode}}),e.loadShare=c,e.loadShareSync=l,e.preloadRemote=u,Object.defineProperty(e,"registerGlobalPlugins",{enumerable:!0,get:function(){return r.registerGlobalPlugins}}),e.registerPlugins=f,e.registerRemotes=d,e.registerShared=m})(ir);const an="__mf_init____mf__virtual/ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__.js__";let Rt=globalThis[an];if(!Rt){let e,t;const r=new Promise((n,o)=>{e=n,t=o});Rt=globalThis[an]={initPromise:r,initResolve:e,initReject:t},typeof window>"u"&&e({loadRemote:function(){return Promise.resolve(void 0)},loadShare:function(){return Promise.resolve(void 0)}})}const Ea=Rt.initResolve,er={},tr="default",rr="ConfigCustomJavascriptSet";let nr,or;async function Sa(){return nr??=sr(()=>import("./localSharedImportMap-C-8wOKN2.js"),__vite__mapDeps([0,1]),import.meta.url),nr}async function ba(){return or??=sr(()=>import("./virtualExposes-D402kVGY.js"),__vite__mapDeps([2,1]),import.meta.url).then(e=>e.default??e),or}async function Ta(e={},t=[]){const{usedShared:r,usedRemotes:n}=await Sa(),o=ir.init({name:rr,remotes:n,shared:r,plugins:[],shareStrategy:"version-first"});var s=er[tr];if(s||(s=er[tr]={from:rr}),!(t.indexOf(s)>=0)){t.push(s),o.initShareScopeMap("default",e),Ea(o);try{await Promise.all(await o.initializeSharing("default",{strategy:"version-first",from:"build",initScope:t}))}catch(i){console.error(i)}return o}}async function Ia(e){const t=await ba();if(!(e in t))throw new Error(`Module ${e} does not exist in container.`);return t[e]().then(r=>()=>r)}export{ir as d,Ia as g,Ta as i}; diff --git a/admin/custom/customComponents.js b/admin/custom/customComponents.js index 752abfee5..244ac7eb0 100644 --- a/admin/custom/customComponents.js +++ b/admin/custom/customComponents.js @@ -1 +1 @@ -import"./assets/preload-helper-BDBacUwf.js";import{g as r,i as a}from"./assets/virtual_mf-REMOTE_ENTRY_ID_ConfigCustomJavascriptSet__customComponents_js-Oq3-1vii.js";export{r as get,a as init}; +import"./assets/preload-helper-BDBacUwf.js";import{g as r,i as a}from"./assets/virtual_mf-REMOTE_ENTRY_ID_ConfigCustomJavascriptSet__customComponents_js-CO2hfDx_.js";export{r as get,a as init}; diff --git a/admin/i18n/de.json b/admin/i18n/de.json index 578ba86d1..25f5fff25 100644 --- a/admin/i18n/de.json +++ b/admin/i18n/de.json @@ -71,6 +71,14 @@ "Custom API key help": "Nur nötig wenn der Anbieter Authentifizierung erfordert", "AI settings": "KI-Einstellungen", "AI settings description": "Wenn Sie die KI-Codegenerierung nutzen möchten, können Sie hier die API-Schlüssel für die entsprechenden Anbieter hinterlegen. Es wird nur der Schlüssel für den verwendeten Anbieter benötigt.", + "Credentials type": "Anmeldedaten-Typ", + "System credentials": "Systemanmeldedaten", + "Manual": "Manuell", + "ChatGPT credential": "ChatGPT-Anmeldedaten", + "Anthropic credential": "Anthropic-Anmeldedaten", + "Gemini credential": "Gemini-Anmeldedaten", + "DeepSeek credential": "DeepSeek-Anmeldedaten", + "Custom API credential": "Benutzerdefinierte API-Anmeldedaten", "ChatGPT API key": "ChatGPT API-Schlüssel", "Anthropic API key": "Anthropic API-Schlüssel", "Gemini API key": "Gemini API-Schlüssel", diff --git a/admin/i18n/en.json b/admin/i18n/en.json index 91a567213..9449a5131 100644 --- a/admin/i18n/en.json +++ b/admin/i18n/en.json @@ -71,6 +71,14 @@ "Custom API key help": "Only needed if your provider requires authentication", "AI settings": "AI settings", "AI settings description": "If you want to use AI code generation, you can define API keys for the corresponding providers here. Only the key for the provider you use is required.", + "Credentials type": "Credentials type", + "System credentials": "System credentials", + "Manual": "Manual", + "ChatGPT credential": "ChatGPT credential", + "Anthropic credential": "Anthropic credential", + "Gemini credential": "Gemini credential", + "DeepSeek credential": "DeepSeek credential", + "Custom API credential": "Custom API credential", "ChatGPT API key": "ChatGPT API key", "Anthropic API key": "Anthropic API key", "Gemini API key": "Gemini API key", diff --git a/admin/jsonConfig.json b/admin/jsonConfig.json index c2d23f454..746f5762f 100644 --- a/admin/jsonConfig.json +++ b/admin/jsonConfig.json @@ -144,23 +144,45 @@ "marginBottom": 16 } }, + "credentialType": { + "newLine": true, + "type": "select", + "options": [ + { "label": "System credentials", "value": "manager" }, + { "label": "Manual", "value": "manual" } + ], + "label": "Credentials type", + "default": "manual", + "xs": 12, + "sm": 6 + }, "gptKey": { "newLine": true, "type": "password", "label": "ChatGPT API key", + "hidden": "data.credentialType === 'manager'", "xs": 12, "sm": 9, "help": "platform.openai.com", "helpLink": "https://platform.openai.com/api-keys" }, + "credentialIdGptKey": { + "newLine": true, + "type": "credential", + "credentialType": "ai", + "label": "ChatGPT credential", + "hidden": "data.credentialType !== 'manager'", + "xs": 12, + "sm": 9 + }, "_testOpenAi": { "type": "sendTo", "label": "Test OpenAI", "icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJjdXJyZW50Q29sb3IiPjxwYXRoIGQ9Ik0xMiAyQzYuNDggMiAyIDUuNTggMiAxMGMwIDIuMjQgMS4xMiA0LjI3IDIuOTMgNS43Mkw0IDIwbDQuMzUtMi4xOEM5LjUgMTguMjcgMTAuNzIgMTguNSAxMiAxOC41YzUuNTIgMCAxMC0zLjU4IDEwLThTMTcuNTIgMiAxMiAyem0tMSAxMUg4di0yaDNWOGgydjNoM3YyaC0zdjNoLTJ2LTN6Ii8+PC9zdmc+", "command": "testApiConnection", - "jsonData": "{\"apiKey\": \"${data.gptKey}\", \"provider\": \"openai\"}", + "jsonData": "{\"apiKey\": \"${data.gptKey}\", \"provider\": \"openai\", \"credentialType\": \"${data.credentialType}\", \"credentialId\": \"${data.credentialIdGptKey}\"}", "variant": "outlined", - "disabled": "!data.gptKey", + "disabled": "data.credentialType === 'manager' ? !data.credentialIdGptKey : !data.gptKey", "xs": 12, "sm": 3, "showProcess": true @@ -169,19 +191,29 @@ "newLine": true, "type": "password", "label": "Anthropic API key", + "hidden": "data.credentialType === 'manager'", "xs": 12, "sm": 9, "help": "console.anthropic.com", "helpLink": "https://console.anthropic.com/settings/keys" }, + "credentialIdClaudeKey": { + "newLine": true, + "type": "credential", + "credentialType": "ai", + "label": "Anthropic credential", + "hidden": "data.credentialType !== 'manager'", + "xs": 12, + "sm": 9 + }, "_testClaude": { "type": "sendTo", "label": "Test Anthropic", "icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJjdXJyZW50Q29sb3IiPjxwYXRoIGQ9Ik0xMiAyTDMgMjBoNGwxLjUtNGg3bDEuNSA0aDRMMTIgMnptMCA2bDIuNSA3aC01TDEyIDh6Ii8+PC9zdmc+", "command": "testApiConnection", - "jsonData": "{\"apiKey\": \"${data.claudeKey}\", \"provider\": \"anthropic\"}", + "jsonData": "{\"apiKey\": \"${data.claudeKey}\", \"provider\": \"anthropic\", \"credentialType\": \"${data.credentialType}\", \"credentialId\": \"${data.credentialIdClaudeKey}\"}", "variant": "outlined", - "disabled": "!data.claudeKey", + "disabled": "data.credentialType === 'manager' ? !data.credentialIdClaudeKey : !data.claudeKey", "xs": 12, "sm": 3, "showProcess": true @@ -190,19 +222,29 @@ "newLine": true, "type": "password", "label": "Gemini API key", + "hidden": "data.credentialType === 'manager'", "xs": 12, "sm": 9, "help": "aistudio.google.com", "helpLink": "https://aistudio.google.com/apikey" }, + "credentialIdGeminiKey": { + "newLine": true, + "type": "credential", + "credentialType": "ai", + "label": "Gemini credential", + "hidden": "data.credentialType !== 'manager'", + "xs": 12, + "sm": 9 + }, "_testGemini": { "type": "sendTo", "label": "Test Gemini", "icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJjdXJyZW50Q29sb3IiPjxwYXRoIGQ9Ik0xMiAxbDMgN2g3bC01LjUgNC41TDE4LjUgMjAgMTIgMTUuNSA1LjUgMjBsMi03LjVMMiA4aDd6Ii8+PC9zdmc+", "command": "testApiConnection", - "jsonData": "{\"apiKey\": \"${data.geminiKey}\", \"provider\": \"gemini\"}", + "jsonData": "{\"apiKey\": \"${data.geminiKey}\", \"provider\": \"gemini\", \"credentialType\": \"${data.credentialType}\", \"credentialId\": \"${data.credentialIdGeminiKey}\"}", "variant": "outlined", - "disabled": "!data.geminiKey", + "disabled": "data.credentialType === 'manager' ? !data.credentialIdGeminiKey : !data.geminiKey", "xs": 12, "sm": 3, "showProcess": true @@ -211,19 +253,29 @@ "newLine": true, "type": "password", "label": "DeepSeek API key", + "hidden": "data.credentialType === 'manager'", "xs": 12, "sm": 9, "help": "platform.deepseek.com", "helpLink": "https://platform.deepseek.com/api_keys" }, + "credentialIdDeepseekKey": { + "newLine": true, + "type": "credential", + "credentialType": "ai", + "label": "DeepSeek credential", + "hidden": "data.credentialType !== 'manager'", + "xs": 12, + "sm": 9 + }, "_testDeepseek": { "type": "sendTo", "label": "Test DeepSeek", "icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJjdXJyZW50Q29sb3IiPjxwYXRoIGQ9Ik0xMCAyYTggOCAwIDAgMSA2LjMyIDEyLjkxbDQuMzkgNC4zOC0xLjQyIDEuNDItNC4zOC00LjM5QTggOCAwIDEgMSAxMCAyem0wIDJhNiA2IDAgMSAwIDAgMTIgNiA2IDAgMCAwIDAtMTJ6Ii8+PC9zdmc+", "command": "testApiConnection", - "jsonData": "{\"apiKey\": \"${data.deepseekKey}\", \"provider\": \"deepseek\"}", + "jsonData": "{\"apiKey\": \"${data.deepseekKey}\", \"provider\": \"deepseek\", \"credentialType\": \"${data.credentialType}\", \"credentialId\": \"${data.credentialIdDeepseekKey}\"}", "variant": "outlined", - "disabled": "!data.deepseekKey", + "disabled": "data.credentialType === 'manager' ? !data.credentialIdDeepseekKey : !data.deepseekKey", "xs": 12, "sm": 3, "showProcess": true @@ -240,17 +292,26 @@ "gptBaseUrlKey": { "type": "text", "label": "Custom API key", + "hidden": "data.credentialType === 'manager'", "xs": 12, "sm": 4, "help": "Custom API key help", "placeholder": "optional" }, + "credentialIdGptBaseUrlKey": { + "type": "credential", + "credentialType": "ai", + "label": "Custom API credential", + "hidden": "data.credentialType !== 'manager'", + "xs": 12, + "sm": 4 + }, "_testCustom": { "type": "sendTo", "label": "Test Custom API", "icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJjdXJyZW50Q29sb3IiPjxwYXRoIGQ9Ik00IDFoMTZ2NUg0VjF6bTEgMXYzaDE0VjJINXptLTEgNmgxNnY1SDRWOHptMSAxdjNoMTRWOUg1em0tMSA2aDE2djVINHYtNXptMSAxdjNoMTR2LTNINXptMi0xMmgydjFIN1Yzem0wIDZoMnYxSDdWOXptMCA2aDJ2MUg3di0xeiIvPjwvc3ZnPg==", "command": "testApiConnection", - "jsonData": "{\"apiKey\": \"${data.gptBaseUrlKey}\", \"baseUrl\": \"${data.gptBaseUrl}\", \"provider\": \"openai\"}", + "jsonData": "{\"apiKey\": \"${data.gptBaseUrlKey}\", \"baseUrl\": \"${data.gptBaseUrl}\", \"provider\": \"openai\", \"credentialType\": \"${data.credentialType}\", \"credentialId\": \"${data.credentialIdGptBaseUrlKey}\"}", "variant": "outlined", "disabled": "!data.gptBaseUrl", "xs": 12, diff --git a/admin/mf-manifest.json b/admin/mf-manifest.json index fb7a7bb4f..68ac8f099 100644 --- a/admin/mf-manifest.json +++ b/admin/mf-manifest.json @@ -1 +1 @@ -{"id":"iobroker_javascript","name":"iobroker_javascript","metaData":{"name":"iobroker_javascript","type":"app","buildInfo":{"buildVersion":"1.0.0","buildName":"iobroker_javascript"},"remoteEntry":{"name":"remoteEntry.js","path":"","type":"module"},"ssrRemoteEntry":{"name":"remoteEntry.js","path":"","type":"module"},"types":{"path":"","name":""},"globalName":"iobroker_javascript","pluginVersion":"0.2.5","publicPath":"./"},"shared":[{"id":"iobroker_javascript:react","name":"react","version":"18.3.1","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-Dsh1HfIY.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:react-dom","name":"react-dom","version":"18.3.1","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-BkyLyaYT.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:@mui/material","name":"@mui/material","version":"6.5.0","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-dN73sbyQ.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:prop-types","name":"prop-types","version":"15.8.1","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-CVZSzCXy.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:@iobroker/adapter-react-v5","name":"@iobroker/adapter-react-v5","version":"8.2.6","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-AOxv_cZq.js"]},"css":{"async":[],"sync":[]}}}],"remotes":[],"exposes":[]} \ No newline at end of file +{"id":"iobroker_javascript","name":"iobroker_javascript","metaData":{"name":"iobroker_javascript","type":"app","buildInfo":{"buildVersion":"1.0.0","buildName":"iobroker_javascript"},"remoteEntry":{"name":"remoteEntry.js","path":"","type":"module"},"ssrRemoteEntry":{"name":"remoteEntry.js","path":"","type":"module"},"types":{"path":"","name":""},"globalName":"iobroker_javascript","pluginVersion":"0.2.5","publicPath":"./"},"shared":[{"id":"iobroker_javascript:react","name":"react","version":"18.3.1","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-Dsh1HfIY.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:react-dom","name":"react-dom","version":"18.3.1","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-BkyLyaYT.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:@mui/material","name":"@mui/material","version":"6.5.0","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-dN73sbyQ.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:prop-types","name":"prop-types","version":"15.8.1","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-CVZSzCXy.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:@iobroker/adapter-react-v5","name":"@iobroker/adapter-react-v5","version":"8.2.7","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-Be9Zg6aF.js"]},"css":{"async":[],"sync":[]}}}],"remotes":[],"exposes":[]} \ No newline at end of file diff --git a/admin/remoteEntry.js b/admin/remoteEntry.js index cf4dd65d7..042ea084d 100644 --- a/admin/remoteEntry.js +++ b/admin/remoteEntry.js @@ -1 +1 @@ -import"./assets/preload-helper-BDBacUwf.js";import{g as r,i as a}from"./assets/virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-DiXVqr03.js";export{r as get,a as init}; +import"./assets/preload-helper-BDBacUwf.js";import{g as r,i as a}from"./assets/virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-Dus28I2g.js";export{r as get,a as init}; diff --git a/admin/tab.html b/admin/tab.html index 1de597674..ce2d30007 100644 --- a/admin/tab.html +++ b/admin/tab.html @@ -115,9 +115,9 @@ type="text/javascript" src="google-blockly/own/blocks_object.js" > - + - + diff --git a/build/lib/aiProviderResolver.js b/build/lib/aiProviderResolver.js index 4dab2d802..6165d1c02 100644 --- a/build/lib/aiProviderResolver.js +++ b/build/lib/aiProviderResolver.js @@ -10,7 +10,8 @@ * These functions are extracted so they can be unit-tested in isolation. */ Object.defineProperty(exports, "__esModule", { value: true }); -exports.PROVIDER_KEY_FIELD = void 0; +exports.PROVIDER_CREDENTIAL_ID_FIELD = exports.PROVIDER_KEY_FIELD = void 0; +exports.getProviderCredentialId = getProviderCredentialId; exports.resolveProviderCredentials = resolveProviderCredentials; exports.resolveTestCredentials = resolveTestCredentials; exports.listAvailableProviders = listAvailableProviders; @@ -22,6 +23,26 @@ exports.PROVIDER_KEY_FIELD = { deepseek: 'deepseekKey', custom: 'gptBaseUrlKey', }; +/** + * Maps each provider to the adapter-config field holding the ID of its credential + * in the central credential store (used in `manager` mode). + */ +exports.PROVIDER_CREDENTIAL_ID_FIELD = { + openai: 'credentialIdGptKey', + anthropic: 'credentialIdClaudeKey', + gemini: 'credentialIdGeminiKey', + deepseek: 'credentialIdDeepseekKey', + custom: 'credentialIdGptBaseUrlKey', +}; +/** + * Returns the configured credential ID (e.g. `system.credentials.anthropic`) for a provider + * in `manager` mode, or an empty string if none/unknown provider. + */ +function getProviderCredentialId(config, provider) { + const cfg = config || {}; + const field = exports.PROVIDER_CREDENTIAL_ID_FIELD[provider]; + return field ? (cfg[field] || '').toString().trim() : ''; +} /** * Resolve API key and base URL for a provider from adapter config. * Optional `messageBaseUrl` takes precedence over the stored `gptBaseUrl` @@ -60,18 +81,24 @@ function resolveTestCredentials(config, provider, messageApiKey, messageBaseUrl) function listAvailableProviders(config) { const cfg = config || {}; const providers = []; - if ((cfg.gptKey || '').trim()) { + const manager = cfg.credentialType === 'manager'; + // A key-based provider is "available" if it has a stored key (manual mode) + // or a selected credential ID (manager mode). + const has = (provider, key) => manager ? !!getProviderCredentialId(cfg, provider) : !!(key || '').trim(); + if (has('openai', cfg.gptKey)) { providers.push({ provider: 'openai' }); } - if ((cfg.claudeKey || '').trim()) { + if (has('anthropic', cfg.claudeKey)) { providers.push({ provider: 'anthropic' }); } - if ((cfg.geminiKey || '').trim()) { + if (has('gemini', cfg.geminiKey)) { providers.push({ provider: 'gemini' }); } - if ((cfg.deepseekKey || '').trim()) { + if (has('deepseek', cfg.deepseekKey)) { providers.push({ provider: 'deepseek' }); } + // The custom/OpenAI-compatible endpoint is identified by its base URL (the key is optional, + // e.g. local Ollama), so its availability does not depend on the credential mode. if ((cfg.gptBaseUrl || '').trim()) { providers.push({ provider: 'custom', baseUrl: cfg.gptBaseUrl }); } diff --git a/build/lib/aiProviderResolver.js.map b/build/lib/aiProviderResolver.js.map index 63c6dce08..4c018692e 100644 --- a/build/lib/aiProviderResolver.js.map +++ b/build/lib/aiProviderResolver.js.map @@ -1 +1 @@ -{"version":3,"file":"aiProviderResolver.js","sourceRoot":"","sources":["../../src/lib/aiProviderResolver.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AA6BH,gEAgBC;AAMD,wDAYC;AAOD,wDAqBC;AA7ED,0EAA0E;AAC7D,QAAA,kBAAkB,GAA4C;IACvE,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,WAAW;IACnB,QAAQ,EAAE,aAAa;IACvB,MAAM,EAAE,eAAe;CAC1B,CAAC;AAEF;;;;;GAKG;AACH,SAAgB,0BAA0B,CACtC,MAAwC,EACxC,QAAgB,EAChB,cAAuB;IAEvB,MAAM,GAAG,GAAG,MAAM,IAAI,EAAE,CAAC;IACzB,MAAM,QAAQ,GAAG,0BAAkB,CAAC,QAAsB,CAAC,CAAC;IAC5D,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACvE,2FAA2F;IAC3F,kGAAkG;IAClG,4FAA4F;IAC5F,MAAM,OAAO,GACT,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,QAAQ;QAC1C,CAAC,CAAC,CAAC,cAAc,IAAI,GAAG,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE;QAC5D,CAAC,CAAC,EAAE,CAAC;IACb,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;AAC/B,CAAC;AAED;;;GAGG;AACH,SAAgB,sBAAsB,CAClC,MAAwC,EACxC,Q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E,CAAC;QAChC,SAAS,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC;IACpE,CAAC;IACD,OAAO,SAAS,CAAC;AACrB,CAAC","sourcesContent":["/**\n * Helpers for resolving AI provider credentials in sendTo handlers.\n *\n * Keys are stored as `encryptedNative` + `protectedNative` in io-package.json —\n * they are never sent from the frontend. The backend looks them up in `this.config`\n * based on the `provider` name sent along with each `chatCompletion` or\n * `testApiConnection` request.\n *\n * These functions are extracted so they can be unit-tested in isolation.\n */\n\n/** Configuration subset that carries AI credentials. */\nexport interface AiConfigSlice {\n gptKey?: string;\n gptBaseUrl?: string;\n gptBaseUrlKey?: string;\n claudeKey?: string;\n geminiKey?: string;\n deepseekKey?: string;\n}\n\nexport type AiProvider = 'openai' | 'anthropic' | 'gemini' | 'deepseek' | 'custom';\n\n/** Maps each provider to the adapter-config field holding its API key. */\nexport const PROVIDER_KEY_FIELD: Record = {\n openai: 'gptKey',\n anthropic: 'claudeKey',\n gemini: 'geminiKey',\n deepseek: 'deepseekKey',\n custom: 'gptBaseUrlKey',\n};\n\n/**\n * Resolve API key and base URL for a provider from adapter config.\n * Optional `messageBaseUrl` takes precedence over the stored `gptBaseUrl`\n * (used by the settings-dialog Test button where the user's form value\n * should win over the persisted value).\n */\nexport function resolveProviderCredentials(\n config: AiConfigSlice | undefined | null,\n provider: string,\n messageBaseUrl?: string,\n): { apiKey: string; baseUrl: string } {\n const cfg = config || {};\n const keyField = PROVIDER_KEY_FIELD[provider as AiProvider];\n const apiKey = keyField ? (cfg[keyField] || '').toString().trim() : '';\n // baseUrl only applies to openai-compatible providers (custom / openai endpoint override).\n // An empty/whitespace messageBaseUrl counts as \"not provided\" and falls back to the stored value,\n // so the frontend can safely send `baseUrl: ''` without overriding a configured custom URL.\n const baseUrl =\n provider === 'custom' || provider === 'openai'\n ? (messageBaseUrl || cfg.gptBaseUrl || '').toString().trim()\n : '';\n return { apiKey, baseUrl };\n}\n\n/**\n * For the testApiConnection sendTo command: if the caller supplied an apiKey\n * (settings-dialog form value), use it; otherwise fall back to the stored key.\n */\nexport function resolveTestCredentials(\n config: AiConfigSlice | undefined | null,\n provider: string,\n messageApiKey?: string,\n messageBaseUrl?: string,\n): { apiKey: string; baseUrl: string } {\n const fallback = resolveProviderCredentials(config, provider, messageBaseUrl);\n const explicitKey = (messageApiKey || '').toString().trim();\n return {\n apiKey: explicitKey || fallback.apiKey,\n baseUrl: fallback.baseUrl,\n };\n}\n\n/**\n * List of providers that have credentials configured in this.config.\n * Used by the `getAvailableAiProviders` sendTo command so the frontend\n * knows which provider icons/models to show without ever seeing a key.\n */\nexport function listAvailableProviders(\n config: AiConfigSlice | undefined | null,\n): { provider: AiProvider; baseUrl?: string }[] {\n const cfg = config || {};\n const providers: { provider: AiProvider; baseUrl?: string }[] = [];\n if ((cfg.gptKey || '').trim()) {\n providers.push({ provider: 'openai' });\n }\n if ((cfg.claudeKey || '').trim()) {\n providers.push({ provider: 'anthropic' });\n }\n if ((cfg.geminiKey || '').trim()) {\n providers.push({ provider: 'gemini' });\n }\n if ((cfg.deepseekKey || '').trim()) {\n providers.push({ provider: 'deepseek' });\n }\n if ((cfg.gptBaseUrl || '').trim()) {\n providers.push({ provider: 'custom', baseUrl: cfg.gptBaseUrl });\n }\n return providers;\n}\n"]} \ No newline at end of file +{"version":3,"file":"aiProviderResolver.js","sourceRoot":"","sources":["../../src/lib/aiProviderResolver.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAmDH,0DAIC;AAQD,gEAgBC;AAMD,wDAYC;AAOD,wDA4BC;AA1GD,0EAA0E;AAC7D,QAAA,kBAAkB,GAA4C;IACvE,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,WAAW;IACnB,QAAQ,EAAE,aAAa;IACvB,MAAM,EAAE,eAAe;CAC1B,CAAC;AAEF;;;GAGG;AACU,QAAA,4BAA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,CAAC,CAAC;IAC3C,CAAC;IACD,IAAI,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC;QACnC,SAAS,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,CAAC;IAC7C,CAAC;IACD,4FAA4F;IAC5F,kFAAkF;IAClF,IAAI,CAAC,GAAG,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;QAChC,SAAS,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC;IACpE,CAAC;IACD,OAAO,SAAS,CAAC;AACrB,CAAC","sourcesContent":["/**\n * Helpers for resolving AI provider credentials in sendTo handlers.\n *\n * Keys are stored as `encryptedNative` + `protectedNative` in io-package.json —\n * they are never sent from the frontend. The backend looks them up in `this.config`\n * based on the `provider` name sent along with each `chatCompletion` or\n * `testApiConnection` request.\n *\n * These functions are extracted so they can be unit-tested in isolation.\n */\n\n/** Configuration subset that carries AI credentials. */\nexport interface AiConfigSlice {\n gptKey?: string;\n gptBaseUrl?: string;\n gptBaseUrlKey?: string;\n claudeKey?: string;\n geminiKey?: string;\n deepseekKey?: string;\n /**\n * Where the API keys come from:\n * - `manual`: keys are stored directly in the adapter config (encryptedNative)\n * - `manager`: the config only stores the ID of a credential in the central\n * ioBroker credential store (`system.credentials.*`), resolved at runtime\n */\n credentialType?: 'manual' | 'manager';\n credentialIdGptKey?: string;\n credentialIdClaudeKey?: string;\n credentialIdGeminiKey?: string;\n credentialIdDeepseekKey?: string;\n credentialIdGptBaseUrlKey?: string;\n}\n\nexport type AiProvider = 'openai' | 'anthropic' | 'gemini' | 'deepseek' | 'custom';\n\n/** Maps each provider to the adapter-config field holding its API key. */\nexport const PROVIDER_KEY_FIELD: Record = {\n openai: 'gptKey',\n anthropic: 'claudeKey',\n gemini: 'geminiKey',\n deepseek: 'deepseekKey',\n custom: 'gptBaseUrlKey',\n};\n\n/**\n * Maps each provider to the adapter-config field holding the ID of its credential\n * in the central credential store (used in `manager` mode).\n */\nexport const PROVIDER_CREDENTIAL_ID_FIELD: Record = {\n openai: 'credentialIdGptKey',\n anthropic: 'credentialIdClaudeKey',\n gemini: 'credentialIdGeminiKey',\n deepseek: 'credentialIdDeepseekKey',\n custom: 'credentialIdGptBaseUrlKey',\n};\n\n/**\n * Returns the configured credential ID (e.g. `system.credentials.anthropic`) for a provider\n * in `manager` mode, or an empty string if none/unknown provider.\n */\nexport function getProviderCredentialId(config: AiConfigSlice | undefined | null, provider: string): string {\n const cfg = config || {};\n const field = PROVIDER_CREDENTIAL_ID_FIELD[provider as AiProvider];\n return field ? (cfg[field] || '').toString().trim() : '';\n}\n\n/**\n * Resolve API key and base URL for a provider from adapter config.\n * Optional `messageBaseUrl` takes precedence over the stored `gptBaseUrl`\n * (used by the settings-dialog Test button where the user's form value\n * should win over the persisted value).\n */\nexport function resolveProviderCredentials(\n config: AiConfigSlice | undefined | null,\n provider: string,\n messageBaseUrl?: string,\n): { apiKey: string; baseUrl: string } {\n const cfg = config || {};\n const keyField = PROVIDER_KEY_FIELD[provider as AiProvider];\n const apiKey = keyField ? (cfg[keyField] || '').toString().trim() : '';\n // baseUrl only applies to openai-compatible providers (custom / openai endpoint override).\n // An empty/whitespace messageBaseUrl counts as \"not provided\" and falls back to the stored value,\n // so the frontend can safely send `baseUrl: ''` without overriding a configured custom URL.\n const baseUrl =\n provider === 'custom' || provider === 'openai'\n ? (messageBaseUrl || cfg.gptBaseUrl || '').toString().trim()\n : '';\n return { apiKey, baseUrl };\n}\n\n/**\n * For the testApiConnection sendTo command: if the caller supplied an apiKey\n * (settings-dialog form value), use it; otherwise fall back to the stored key.\n */\nexport function resolveTestCredentials(\n config: AiConfigSlice | undefined | null,\n provider: string,\n messageApiKey?: string,\n messageBaseUrl?: string,\n): { apiKey: string; baseUrl: string } {\n const fallback = resolveProviderCredentials(config, provider, messageBaseUrl);\n const explicitKey = (messageApiKey || '').toString().trim();\n return {\n apiKey: explicitKey || fallback.apiKey,\n baseUrl: fallback.baseUrl,\n };\n}\n\n/**\n * List of providers that have credentials configured in this.config.\n * Used by the `getAvailableAiProviders` sendTo command so the frontend\n * knows which provider icons/models to show without ever seeing a key.\n */\nexport function listAvailableProviders(\n config: AiConfigSlice | undefined | null,\n): { provider: AiProvider; baseUrl?: string }[] {\n const cfg = config || {};\n const providers: { provider: AiProvider; baseUrl?: string }[] = [];\n const manager = cfg.credentialType === 'manager';\n // A key-based provider is \"available\" if it has a stored key (manual mode)\n // or a selected credential ID (manager mode).\n const has = (provider: AiProvider, key: string | undefined | null): boolean =>\n manager ? !!getProviderCredentialId(cfg, provider) : !!(key || '').trim();\n if (has('openai', cfg.gptKey)) {\n providers.push({ provider: 'openai' });\n }\n if (has('anthropic', cfg.claudeKey)) {\n providers.push({ provider: 'anthropic' });\n }\n if (has('gemini', cfg.geminiKey)) {\n providers.push({ provider: 'gemini' });\n }\n if (has('deepseek', cfg.deepseekKey)) {\n providers.push({ provider: 'deepseek' });\n }\n // The custom/OpenAI-compatible endpoint is identified by its base URL (the key is optional,\n // e.g. local Ollama), so its availability does not depend on the credential mode.\n if ((cfg.gptBaseUrl || '').trim()) {\n providers.push({ provider: 'custom', baseUrl: cfg.gptBaseUrl });\n }\n return providers;\n}\n"]} \ No newline at end of file diff --git a/build/main.js b/build/main.js index a96650c84..57701e319 100644 --- a/build/main.js +++ b/build/main.js @@ -316,6 +316,14 @@ class JavaScript extends adapter_core_1.Adapter { mirror; stopCounters = {}; setStateCountCheckInterval = null; + /** + * Decrypted AI API keys cached from the central credential store (manager mode), + * keyed by credential ID (e.g. `system.credentials.anthropic`). Kept fresh by the + * subscriptions set up in `subscribeAiCredentials`. + */ + aiCredentialCache = new Map(); + /** Unsubscribe callbacks for the AI credential subscriptions (manager mode). */ + aiCredentialUnsubscribers = []; globalScript = ''; /** Generated declarations for global TypeScripts */ globalDeclarations = ''; @@ -323,6 +331,8 @@ class JavaScript extends adapter_core_1.Adapter { // have access to, because it depends on the compilation order knownGlobalDeclarationsByScript = {}; globalScriptLines = 0; + /** Running counter to build unique names for ad-hoc scripts started via the "execute" message */ + executeCounter = 0; // compiler instance for typescript tsServer; ignoreObjectChange = new Set(); @@ -761,6 +771,7 @@ class JavaScript extends adapter_core_1.Adapter { clearInterval(this.setStateCountCheckInterval); this.setStateCountCheckInterval = null; } + await this.unsubscribeAiCredentials(); await this.stopAllScripts(); } catch (err) { @@ -810,6 +821,108 @@ class JavaScript extends adapter_core_1.Adapter { } await this.main(); } + /** Read and decrypt a single AI credential's key from the central store; returns '' (and logs) on error. */ + async readAiCredentialKey(id) { + try { + const cred = await adapter_core_1.Credentials.getCredentials(this, id); + return (cred?.values?.key || '').trim(); + } + catch (e) { + this.log.warn(`Cannot read AI credential "${id}": ${e instanceof Error ? e.message : String(e)}`); + return ''; + } + } + /** + * Resolve the API key (and base URL) for an AI provider. + * + * In `manual` mode the key comes from the encryptedNative adapter config. + * In `manager` mode the config only stores the ID of a credential in the central + * ioBroker credential store (`system.credentials.*`); the actual key is taken from the + * `aiCredentialCache` (kept fresh by `subscribeAiCredentials`) or, for credentials we are + * not subscribed to (e.g. a not-yet-saved selection in the settings dialog), read directly. + * + * The settings-dialog Test button may pass form values that are not saved yet + * (`messageApiKey` / `messageCredentialId` / `credentialType`); those win over the stored config. + */ + async resolveAiCredentials(provider, opts = {}) { + const mode = opts.credentialType || this.config.credentialType || 'manual'; + if (mode === 'manager') { + // The base URL is not a secret and is resolved the same way in both modes. + const { baseUrl } = (0, aiProviderResolver_1.resolveProviderCredentials)(this.config, provider, opts.messageBaseUrl); + const id = (opts.messageCredentialId || (0, aiProviderResolver_1.getProviderCredentialId)(this.config, provider)).trim(); + if (!id) { + return { apiKey: '', baseUrl }; + } + // Prefer the cached value kept fresh by the credential subscription. + const cached = this.aiCredentialCache.get(id); + const apiKey = cached !== undefined ? cached : await this.readAiCredentialKey(id); + return { apiKey, baseUrl }; + } + // Manual mode. The Test button sends the current form key (maybe empty) — let it win. + if (opts.messageApiKey !== undefined) { + return (0, aiProviderResolver_1.resolveTestCredentials)(this.config, provider, opts.messageApiKey, opts.messageBaseUrl); + } + return (0, aiProviderResolver_1.resolveProviderCredentials)(this.config, provider, opts.messageBaseUrl); + } + /** + * In `manager` mode, subscribe to all configured AI credentials so that edits made in the + * admin credential manager (Settings → Credentials) are picked up live, without restarting + * the adapter (the `system.credentials.*` objects are global, not part of the instance config). + * The decrypted keys are cached and kept fresh by the subscription handlers. + */ + async subscribeAiCredentials() { + // Always start from a clean state (idempotent — also used to re-subscribe). + await this.unsubscribeAiCredentials(); + if (this.config.credentialType !== 'manager') { + return; + } + // Collect the distinct credential IDs configured across all AI providers. + const ids = new Set(); + for (const provider of ['openai', 'anthropic', 'gemini', 'deepseek', 'custom']) { + const id = (0, aiProviderResolver_1.getProviderCredentialId)(this.config, provider); + if (id) { + ids.add(id); + } + } + for (const id of ids) { + try { + const unsubscribe = await adapter_core_1.Credentials.subscribeCredentials(this, id, (changedId, cred) => { + if (cred) { + this.aiCredentialCache.set(changedId, (cred.values?.key || '').trim()); + this.log.debug(`AI credential "${changedId}" updated`); + } + else { + // The credential was deleted + this.aiCredentialCache.delete(changedId); + this.log.debug(`AI credential "${changedId}" was deleted`); + } + }); + this.aiCredentialUnsubscribers.push(unsubscribe); + // Prime the cache with the current value (the handler may only fire on later changes). + this.aiCredentialCache.set(id, await this.readAiCredentialKey(id)); + } + catch (e) { + this.log.warn(`Cannot subscribe to AI credential "${id}": ${e instanceof Error ? e.message : String(e)}`); + } + } + if (this.aiCredentialUnsubscribers.length) { + this.log.debug(`Subscribed to ${this.aiCredentialUnsubscribers.length} AI credential(s)`); + } + } + /** Tear down all AI credential subscriptions and clear the cache. */ + async unsubscribeAiCredentials() { + const unsubscribers = this.aiCredentialUnsubscribers; + this.aiCredentialUnsubscribers = []; + this.aiCredentialCache.clear(); + for (const unsubscribe of unsubscribers) { + try { + await unsubscribe(); + } + catch (e) { + this.log.warn(`Cannot unsubscribe from AI credential: ${e instanceof Error ? e.message : String(e)}`); + } + } + } onMessage(obj) { switch (obj?.command) { // process messageTo commands @@ -999,23 +1112,28 @@ class JavaScript extends adapter_core_1.Adapter { } case 'chatCompletion': { // Proxy chat completion requests to an OpenAI-compatible API endpoint. - // API keys are resolved server-side from encryptedNative config — they never - // leave the adapter (frontend only sends `provider`, not the key). - if (obj.callback) { + // API keys are resolved server-side from the encryptedNative config or the central + // credentials manager — they never leave the adapter (frontend only sends `provider`). + void (async () => { + if (!obj.callback) { + return; + } const chatModel = (obj.message?.model || '').trim(); const messages = obj.message?.messages; const tools = obj.message?.tools; const provider = (obj.message?.provider || 'openai').trim(); - const { apiKey, baseUrl } = (0, aiProviderResolver_1.resolveProviderCredentials)(this.config, provider, obj.message?.baseUrl); + const { apiKey, baseUrl } = await this.resolveAiCredentials(provider, { + messageBaseUrl: obj.message?.baseUrl, + }); // Anthropic, Gemini, and DeepSeek always require an API key; OpenAI-compatible allows empty key with custom base URL if (!apiKey && (provider === 'anthropic' || provider === 'gemini' || provider === 'deepseek' || !baseUrl)) { this.sendTo(obj.from, obj.command, { error: 'No API key provided' }, obj.callback); - break; + return; } if (!chatModel || !messages) { this.sendTo(obj.from, obj.command, { error: 'Model and messages are required' }, obj.callback); - break; + return; } let url; const chatHeaders = { @@ -1070,7 +1188,7 @@ class JavaScript extends adapter_core_1.Adapter { const resolved = resolveRequestModule(url); if (!resolved) { this.sendTo(obj.from, obj.command, { error: `Invalid API URL: ${url}` }, obj.callback); - break; + return; } const { module: requestModule, isHttps } = resolved; try { @@ -1143,21 +1261,29 @@ class JavaScript extends adapter_core_1.Adapter { catch (error) { this.sendTo(obj.from, obj.command, { error: `Connection failed: ${error.toString()}` }, obj.callback); } - } + })(); break; } case 'testApiConnection': { // Test connection to an OpenAI-compatible API endpoint. // The settings-dialog Test button sends the current form value as `apiKey` // (so users can test before saving); otherwise we fall back to the stored key. - if (obj.callback) { + void (async () => { + if (!obj.callback) { + return; + } const provider = (obj.message?.provider || 'openai').trim(); - const { apiKey, baseUrl } = (0, aiProviderResolver_1.resolveTestCredentials)(this.config, provider, obj.message?.apiKey, obj.message?.baseUrl); + const { apiKey, baseUrl } = await this.resolveAiCredentials(provider, { + messageApiKey: obj.message?.apiKey, + messageBaseUrl: obj.message?.baseUrl, + messageCredentialId: obj.message?.credentialId, + credentialType: obj.message?.credentialType, + }); // Anthropic, Gemini, and DeepSeek always require an API key; OpenAI-compatible allows empty key with custom base URL if (!apiKey && (provider === 'anthropic' || provider === 'gemini' || provider === 'deepseek' || !baseUrl)) { this.sendTo(obj.from, obj.command, { error: 'No API key provided' }, obj.callback); - break; + return; } let url; const testHeaders = { @@ -1187,7 +1313,7 @@ class JavaScript extends adapter_core_1.Adapter { const resolved = resolveRequestModule(url); if (!resolved) { this.sendTo(obj.from, obj.command, { error: `Invalid API URL: ${url}` }, obj.callback); - break; + return; } const { module: requestModule, isHttps } = resolved; try { @@ -1248,7 +1374,7 @@ class JavaScript extends adapter_core_1.Adapter { catch (error) { this.sendTo(obj.from, obj.command, { error: `Connection failed: ${error.toString()}` }, obj.callback); } - } + })(); break; } case 'getAvailableAiProviders': { @@ -1301,6 +1427,19 @@ class JavaScript extends adapter_core_1.Adapter { } break; } + case 'execute': { + if (obj.callback) { + void this.executeScript(obj.message) + .then(result => this.sendTo(obj.from, obj.command, result, obj.callback)) + .catch(err => this.sendTo(obj.from, obj.command, { + ok: false, + error: `Internal error: ${err}`, + logs: [], + output: '', + }, obj.callback)); + } + break; + } } } onLog(msg) { @@ -1419,6 +1558,9 @@ class JavaScript extends adapter_core_1.Adapter { // Store allowSelfSignedCerts on the context, so sandbox HTTP functions can use it // without setting the global process.env.NODE_TLS_REJECT_UNAUTHORIZED (which affects all adapters in compact mode) this.context.allowSelfSignedCerts = this.config.allowSelfSignedCerts; + // In `manager` credential mode, subscribe to the configured AI credentials so changes in the + // central credential store are picked up live (the keys are cached for the AI sendTo handlers). + await this.subscribeAiCredentials(); const doc = await this.getObjectViewAsync('script', 'javascript', {}); if (doc?.rows?.length) { // sort global scripts if configured @@ -2194,7 +2336,14 @@ class JavaScript extends adapter_core_1.Adapter { return false; } } - execute(script, name, engineType, verbose, debug) { + execute(script, name, engineType, verbose, debug, + /** + * Optional sink for the "execute" message API. When provided, the script runs in an + * ephemeral diagnostic mode: every log line (the script's own `log()`/`console.*` output + * AND all verbose internal operations) is forwarded to this collector instead of the + * adapter log, and no `scriptProblem` state is written. + */ + logCollector) { script.intervals = new Set(); script.timeouts = new Set(); script.schedules = []; @@ -2206,12 +2355,26 @@ class JavaScript extends adapter_core_1.Adapter { script.subscribesFile = {}; script.setStatePerMinuteCounter = 0; script.setStatePerMinuteProblemCounter = 0; - void this.setState(`scriptProblem.${name.substring(SCRIPT_CODE_MARKER.length)}`, { - val: false, - ack: true, - expire: 1000, - }); + if (!logCollector) { + void this.setState(`scriptProblem.${name.substring(SCRIPT_CODE_MARKER.length)}`, { + val: false, + ack: true, + expire: 1000, + }); + } const sandbox = (0, sandbox_1.sandBox)(script, name, verbose, debug, this.context); + // Redirect every log line into the collector. As `console.*`, the global `log()` and all + // `sandbox.verbose && sandbox.log(...)` calls go through `sandbox.log`, this captures the + // full picture for the caller while keeping the adapter log clean. + if (logCollector) { + sandbox.log = (msg, severity) => { + let text = msg; + if (text && typeof text !== 'string') { + text = util.format(text); + } + logCollector(severity || 'info', text); + }; + } try { script.script.runInNewContext(sandbox, { filename: name, @@ -2220,14 +2383,125 @@ class JavaScript extends adapter_core_1.Adapter { }); } catch (err) { - void this.setState(`scriptProblem.${name.substring(SCRIPT_CODE_MARKER.length)}`, { - val: true, - ack: true, - c: 'execute', - }); - this.logError(name, 'Error by run:', err); + if (logCollector) { + const e = err; + const stack = (e?.stack ? e.stack.toString() : String(err)) + .split('\n') + .map(line => this.fixLineNo(line)) + .join('\n'); + logCollector('error', `Error by run: ${stack}`); + } + else { + void this.setState(`scriptProblem.${name.substring(SCRIPT_CODE_MARKER.length)}`, { + val: true, + ack: true, + c: 'execute', + }); + this.logError(name, 'Error by run:', err); + } } } + /** + * Run an ad-hoc script sent via the `execute` message and return everything it logged. + * + * The script is compiled (JavaScript or TypeScript), executed with the same sandbox API as a + * regular script (verbose by default, so internal operations like setState/subscribe are logged + * too), left running for `timeout` ms to collect asynchronous output, and afterwards stopped and + * fully cleaned up (timers, subscriptions, schedules). It is ephemeral: no script object or + * states are created. + * + * Expected `message`: + * - `source` / `code` (string, required) – the script source + * - `engineType` (string, optional) – `TypeScript/ts` to compile as TypeScript, otherwise JavaScript + * - `verbose` (boolean, optional, default `true`) – log internal sandbox operations + * - `logLevel` (silly|debug|info|warn|error, optional, default `silly`) – minimum severity to return + * - `timeout` (number ms, optional, default 5000, clamped to 0…60000) – collection window + * - `maxLogs` (number, optional, default 5000) – cap on returned log lines + */ + async executeScript(message) { + const LEVELS = ['silly', 'debug', 'info', 'warn', 'error']; + const source = message?.source ?? message?.code; + const engineTypeStr = (message?.engineType || '').toString().toLowerCase(); + const isTypeScript = engineTypeStr.startsWith('typescript') || engineTypeStr === 'ts'; + const engineType = isTypeScript ? 'TypeScript/ts' : 'Javascript/js'; + const empty = (error) => ({ ok: false, error, engineType, runtime: 0, truncated: false, logs: [], output: '' }); + if (typeof source !== 'string' || !source.trim()) { + return empty('No source code provided'); + } + if (this.context.debugMode) { + return empty('Cannot execute a script while a debug session is active'); + } + let timeout = parseInt(message?.timeout, 10); + if (isNaN(timeout)) { + timeout = 5000; + } + timeout = Math.max(0, Math.min(timeout, 60000)); + const verbose = message?.verbose !== false; + const minLevel = message?.logLevel + ? LEVELS.includes(message?.logLevel) + ? message.logLevel + : 'silly' + : 'silly'; + let maxLogs = parseInt(message?.maxLogs, 10); + if (isNaN(maxLogs) || maxLogs <= 0) { + maxLogs = 5000; + } + const name = `${SCRIPT_CODE_MARKER}__execute_${++this.executeCounter}`; + // Compile the source the same way regular scripts are compiled + let createdScript; + if (isTypeScript) { + const transformedSource = (0, typescriptTools_1.transformScriptBeforeCompilation)(source, false); + const filename = (0, typescriptTools_1.scriptIdToTSFilename)(name); + let tsCompiled; + try { + tsCompiled = this.tsServer.compile(filename, transformedSource); + } + catch (err) { + return empty(`TypeScript compilation failed: ${err}`); + } + if (!tsCompiled.success) { + const errors = tsCompiled.diagnostics.map(diag => diag.annotatedSource).join('\n'); + return empty(`TypeScript compilation failed:\n${errors}`); + } + createdScript = this.createVM(`${this.globalScript}\n${tsCompiled.result || ''}`, name, false); + } + else { + createdScript = this.createVM(`${this.globalScript}\n${source}`, name, true); + } + if (!createdScript) { + return empty('Compilation failed'); + } + const logs = []; + let truncated = false; + const collector = (severity, msg) => { + if (logs.length >= maxLogs) { + truncated = true; + return; + } + logs.push({ ts: Date.now(), severity, message: msg }); + }; + this.scripts[name] = createdScript; + this.execute(createdScript, name, engineType, verbose, false, collector); + // Let asynchronous output (timeouts, awaited code, triggered subscriptions) accumulate + if (timeout) { + await new Promise(resolve => setTimeout(resolve, timeout)); + } + // Stop and clean up the ephemeral script (timers, subscriptions, schedules, …) + await this.stopScript(name, true); + const minIdx = LEVELS.indexOf(minLevel); + const filtered = logs.filter(entry => { + const idx = LEVELS.indexOf(entry.severity); + return idx < 0 || idx >= minIdx; + }); + return { + ok: true, + engineType, + runtime: timeout, + truncated, + logs: filtered, + output: filtered.map(entry => `[${entry.severity}] ${entry.message}`).join('\n'), + }; + } /** * Finds the index of `id` in a sorted array using binary search – O(log n). * Returns -1 if not found. Used instead of Array.indexOf on stateIds. @@ -2325,12 +2599,16 @@ class JavaScript extends adapter_core_1.Adapter { } } } - async stopScript(name) { + async stopScript(name, silent) { if (!this.scripts[name]) { return false; } - this.log.info(`${name}: Stopping script`); - await this.setState(`scriptEnabled.${name.substring(SCRIPT_CODE_MARKER.length)}`, false, true); + // `silent` is used for ephemeral scripts started via the "execute" message – they have no + // `scriptEnabled` state and should not appear in the adapter log. + if (!silent) { + this.log.info(`${name}: Stopping script`); + await this.setState(`scriptEnabled.${name.substring(SCRIPT_CODE_MARKER.length)}`, false, true); + } if (this.messageBusHandlers[name]) { delete this.messageBusHandlers[name]; } diff --git a/build/main.js.map b/build/main.js.map index 651b309dd..2c3bfea72 100644 --- a/build/main.js.map +++ b/build/main.js.map @@ -1 +1 @@ -{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,qCAAqD;AACrD,qCAAwF;AACxF,yCAAiD;AACjD,2DAA4D;AAC5D,6CAAkE;AAClE,yCAA8C;AAC9C,wDAAgC;AAEhC,kDAAoC;AACpC,oDAAsC;AACtC,8CAAgC;AAChC,oDAAsC;AACtC,gDAAkC;AAClC,kDAAoC;AACpC,kDAAoC;AACpC,8CAAgC;AAChC,4CAA8B;AAC9B,gDAAkC;AAClC,gDAAkC;AAClC,kEAAoD;AACpD,oDAAsC;AACtC,gDAAkC;AAElC,sCAAsC;AACtC,kDAAoC;AACpC,6CAA+B;AAC/B,sCAAsC;AACtC,yDAA2C;AAC3C,4DAA8C;AAE9C,yDAA6G;AAK7G,yCAAsC;AACtC,gEAAwC;AACxC,uCAAuD;AACvD,2CAAiE;AACjE,uEAAqE;AACrE,iEAAsH;AACtH,6DAIgC;AAChC,6CAAkE;AAClE,+CAAiE;AACjE,iEAAwG;AACxG,uCAAyC;AACzC,2DAM+B;AAe/B,yCAA2C;AAyB3C;;;;GAIG;AACH,MAAM,wBAAwB,GAAa;IACvC,gBAAgB;IAChB,OAAO;IACP,UAAU;IACV,YAAY;IACZ,iBAAiB;IACjB,QAAQ;CACX,CAAC;AAEF,MAAM,WAAW,GAAwB,IAAI,CAAC,KAAK,CAAC,IAAA,sBAAY,EAAC,GAAG,SAAS,kBAAkB,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC7G,MAAM,kBAAkB,GAAG,YAAY,CAAC;AAExC,IAAI,aAAiC,CAAC;AAEtC,MAAM,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AI,CAAC,CAAC,wCAAwC;QACzD,CAAC;IACL,CAAC;IACD,mDAAmD;IACnD,OAAO,KAAK,KAAK,KAAK,CAAC;AAC3B,CAAC;AAED,uEAAuE;AACvE,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;IAC1B,yCAAyC;IACzC,MAAM,CAAC,OAAO,GAAG,CAAC,OAA4C,EAAE,EAAE,CAAC,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC;AAC/F,CAAC;KAAM,CAAC;IACJ,wCAAwC;IACxC,CAAC,GAAG,EAAE,CAAC,IAAI,UAAU,EAAE,CAAC,EAAE,CAAC;AAC/B,CAAC","sourcesContent":["/*\n * Javascript adapter\n *\n * The MIT License (MIT)\n *\n * Copyright (c) 2014-2024 bluefox ,\n *\n * Copyright (c) 2014 hobbyquaker\n */\n\nimport { Script, type ScriptOptions } from 'node:vm';\nimport { readFileSync, existsSync, statSync, writeFileSync, type Stats } from 'node:fs';\nimport { join, sep, normalize } from 'node:path';\nimport { fork, type ForkOptions } from 'node:child_process';\nimport { setTypeScriptResolveOptions, Server } from 'virtual-tsc';\nimport { isDeepStrictEqual } from 'node:util';\nimport prettier from 'prettier';\n\nimport * as dgram from 'node:dgram';\nimport * as crypto from 'node:crypto';\nimport * as dns from 'node:dns';\nimport * as events from 'node:events';\nimport * as http from 'node:http';\nimport * as https from 'node:https';\nimport * as http2 from 'node:http2';\nimport * as net from 'node:net';\nimport * as os from 'node:os';\nimport * as path from 'node:path';\nimport * as util from 'node:util';\nimport * as child_process from 'node:child_process';\nimport * as stream from 'node:stream';\nimport * as zlib from 'node:zlib';\n\n// @ts-expect-error no types available\nimport * as suncalc from 'suncalc2';\nimport * as axios from 'axios';\n// @ts-expect-error no types available\nimport * as wake_on_lan from 'wake_on_lan';\nimport * as nodeSchedule from 'node-schedule';\n\nimport { getAbsoluteDefaultDataDir, Adapter, EXIT_CODES, type AdapterOptions } from '@iobroker/adapter-core';\nimport type SentryPlugin from '@iobroker/plugin-sentry';\nimport type { GetTimesResult } from 'suncalc';\nimport type { CompileResult } from 'virtual-tsc/build/util';\n\nimport { Mirror } from './lib/mirror';\nimport ProtectFs from './lib/protectFs';\nimport { setLanguage, getLanguage } from './lib/words';\nimport { sandBox, removeFromDispatchIndex } from './lib/sandbox';\nimport { requestModuleNameByUrl } from './lib/nodeModulesManagement';\nimport { resolveProviderCredentials, resolveTestCredentials, listAvailableProviders } from './lib/aiProviderResolver';\nimport {\n translateToolsToAnthropic,\n translateMessagesToAnthropic,\n translateAnthropicResponseToOpenAI,\n} from './lib/anthropicAdapter';\nimport { createEventObject, type EventObj } from './lib/eventObj';\nimport { type AstroEventName, Scheduler } from './lib/scheduler';\nimport { targetTsLib, tsCompilerOptions, jsDeclarationCompilerOptions } from './lib/typescriptSettings';\nimport { hashSource } from './lib/tools';\nimport {\n resolveTypescriptLibs,\n resolveTypings,\n scriptIdToTSFilename,\n transformScriptBeforeCompilation,\n transformGlobalDeclarations,\n} from './lib/typescriptTools';\nimport type {\n FileSubscriptionResult,\n JavascriptContext,\n JavaScriptAdapterConfig,\n JsScript,\n ScriptType,\n SubscriptionResult,\n SubscribeObject,\n JavascriptTimer,\n SandboxType,\n LogMessage,\n DebugState,\n} from './types';\nimport type { PatternEventCompareFunction } from './lib/patternCompareFunctions';\nimport { decryptText } from './lib/crypto';\n\ntype MODULES = {\n fs: ProtectFs;\n 'fs/promises': ProtectFs['promises'];\n dgram: typeof dgram;\n crypto: typeof crypto;\n dns: typeof dns;\n events: typeof events;\n http: typeof http;\n https: typeof https;\n http2: typeof http2;\n net: typeof net;\n os: typeof os;\n path: typeof path;\n util: typeof util;\n child_process: typeof child_process;\n stream: typeof stream;\n zlib: typeof zlib;\n suncalc: typeof suncalc;\n axios: typeof axios;\n wake_on_lan: typeof wake_on_lan;\n nodeSchedule: typeof nodeSchedule;\n};\n\n/**\n * List of forbidden Locations for a mirror directory\n * relative to the default data directory\n * ATTENTION: the same list is also located in index_m.html!!\n */\nconst forbiddenMirrorLocations: string[] = [\n 'backup-objects',\n 'files',\n 'backitup',\n '../backups',\n '../node_modules',\n '../log',\n];\n\nconst packageJson: Record = JSON.parse(readFileSync(`${__dirname}/../package.json`).toString());\nconst SCRIPT_CODE_MARKER = 'script.js.';\n\nlet webstormDebug: string | undefined;\n\nconst isCI = !!process.env.CI;\n\n// ambient declarations for typescript\nlet tsAmbient: Record;\n\n// TypeScript's scripts are only recompiled if their source hash changes.\n// If an adapter update fixes the compilation bugs, a user won't notice until the changes and re-save the script.\n// To avoid that, we also include the\n// adapter version and TypeScript version in the hash\nconst tsSourceHashBase = `versions:adapter=${packageJson.version},typescript=${packageJson.dependencies.typescript}`;\n\n// taken from here: https://stackoverflow.com/questions/11887934/how-to-check-if-dst-daylight-saving-time-is-in-effect-and-if-so-the-offset\nfunction dstOffsetAtDate(dateInput: Date): number {\n const fullYear: number = dateInput.getFullYear() | 0;\n // \"Leap Years are any year that can be exactly divided by 4 (2012, 2016, etc.)\n // except if it can be exactly divided by 100, then it isn't (2100, 2200, etc.)\n // except if it can be exactly divided by 400, then it is (2000, 2400)\"\n // (https://www.mathsisfun.com/leap-years.html).\n const isLeapYear: 1 | 0 = ((fullYear & 3) | ((fullYear / 100) & 3)) === 0 ? 1 : 0;\n // (fullYear & 3) = (fullYear % 4), but faster\n //Alternative:var isLeapYear=(new Date(currentYear,1,29,12)).getDate()===29?1:0\n const fullMonth: number = dateInput.getMonth() | 0;\n return (\n // 1. We know what the time since the Epoch really is\n +dateInput - // same as the dateInput.getTime() method\n // 2. We know what the time since the Epoch at the start of the year is\n +new Date(fullYear, 0) - // day defaults to 1 if not explicitly zeroed\n // 3. Now, subtract what we would expect the time to be if daylight savings\n // did not exist. This yields the time-offset due to daylight savings.\n // Calculate the day of the year in the Gregorian calendar\n // The code below works based upon the facts of signed right shifts\n // • (x) >> n: shifts n and fills in the n highest bits with 0s\n // • (-x) >> n: shifts n and fills in the n highest bits with 1s\n // (This assumes that x is a positive integer)\n ((((-1 + // the first day in the year is day 1\n (31 & (-fullMonth >> 4)) + // January // (-11)>>4 = -1\n ((28 + isLeapYear) & ((1 - fullMonth) >> 4)) + // February\n (31 & ((2 - fullMonth) >> 4)) + // March\n (30 & ((3 - fullMonth) >> 4)) + // April\n (31 & ((4 - fullMonth) >> 4)) + // May\n (30 & ((5 - fullMonth) >> 4)) + // June\n (31 & ((6 - fullMonth) >> 4)) + // July\n (31 & ((7 - fullMonth) >> 4)) + // August\n (30 & ((8 - fullMonth) >> 4)) + // September\n (31 & ((9 - fullMonth) >> 4)) + // October\n (30 & ((10 - fullMonth) >> 4)) + // November\n // There are no months past December: the year rolls into the next.\n // Thus, \"fullMonth\" is 0-based, so it will never be 12 in JavaScript\n\n (dateInput.getDate() | 0)) & // get day of the month\n 0xffff) *\n 24 *\n 60 + // 24 hours in a day, 60 minutes in an hour\n (dateInput.getHours() & 0xff) * 60 + // 60 minutes in an hour\n (dateInput.getMinutes() & 0xff)) |\n 0) *\n 60 *\n 1000 - // 60 seconds in a minute * 1000 milliseconds in a second\n (dateInput.getSeconds() & 0xff) * 1000 - // 1000 milliseconds in a second\n dateInput.getMilliseconds()\n );\n}\n\nconst regExGlobalOld = /_global$/;\nconst regExGlobalNew = /script\\.js\\.global\\./;\n\nfunction checkIsGlobal(obj: ioBroker.ScriptObject): boolean {\n return obj?.common && (regExGlobalOld.test(obj.common.name) || regExGlobalNew.test(obj._id));\n}\n\nfunction fileMatching(sub: FileSubscriptionResult, id: string, fileName: string): boolean {\n if (sub.idRegEx) {\n if (!sub.idRegEx.test(id)) {\n return false;\n }\n } else {\n if (sub.id !== id) {\n return false;\n }\n }\n if (sub.fileRegEx) {\n if (!sub.fileRegEx.test(fileName)) {\n return false;\n }\n } else {\n if (sub.fileNamePattern !== fileName) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction getNextTimeEvent(time: string, useNextDay?: boolean): Date {\n const now: Date = getAstroStartOfDay();\n const [timeHours, timeMinutes] = time.split(':');\n const nTimeHours = parseInt(timeHours, 10);\n const nTimeMinutes = parseInt(timeMinutes, 10);\n if (\n useNextDay &&\n (now.getHours() > nTimeHours || (now.getHours() === nTimeHours && now.getMinutes() > nTimeMinutes))\n ) {\n now.setDate(now.getDate() + 1);\n }\n\n now.setHours(nTimeHours);\n now.setMinutes(nTimeMinutes);\n\n return now;\n}\n\nfunction getAstroStartOfDay(): Date {\n const d = new Date();\n d.setMinutes(0);\n d.setSeconds(0);\n d.setMilliseconds(0);\n d.setTime(d.getTime() - d.getTimezoneOffset() * 60 * 1000);\n d.setUTCHours(0);\n\n return d;\n}\n\nfunction formatHoursMinutesSeconds(date: Date): string {\n const h = String(date.getHours());\n const m = String(date.getMinutes());\n const s = String(date.getSeconds());\n\n return `${h.padStart(2, '0')}:${m.padStart(2, '0')}:${s.padStart(2, '0')}`;\n}\n\n// Due to a npm bug, virtual-tsc may be hoisted to the top level node_modules, but\n// TypeScript may still be in the adapter level (https://npm.community/t/packages-with-peerdependencies-are-incorrectly-hoisted/4794),\n// so we need to tell virtual-tsc where TypeScript is\nsetTypeScriptResolveOptions({\n paths: [require.resolve('typescript')],\n});\n\n// compiler instance for global JS declarations\nconst jsDeclarationServer: Server = new Server(jsDeclarationCompilerOptions, isCI ? false : undefined);\n/**\n * Stores the IDs of script objects whose change should be ignored because\n * the compiled source was just updated\n */\n\nconst HTTP_STATUS_TEXTS: Record = {\n 400: 'Bad Request',\n 401: 'Unauthorized',\n 403: 'Forbidden',\n 404: 'Not Found',\n 429: 'Too Many Requests / Rate Limit',\n 500: 'Internal Server Error',\n 502: 'Bad Gateway',\n 503: 'Service Unavailable',\n};\n\nfunction httpStatusText(code: number): string {\n return HTTP_STATUS_TEXTS[code] ?? `Error ${code}`;\n}\n\n/**\n * Resolves the correct http/https module based on the URL string.\n * Returns null if the URL is invalid.\n */\nfunction resolveRequestModule(url: string): { module: typeof https | typeof http; isHttps: boolean } | null {\n try {\n const { protocol } = new URL(url);\n const isHttps = protocol === 'https:';\n return { module: isHttps ? https : http, isHttps };\n } catch {\n return null;\n }\n}\n\nclass JavaScript extends Adapter {\n declare public config: JavaScriptAdapterConfig;\n\n private readonly context: JavascriptContext;\n\n private errorLogFunction: {\n error: (msg: string) => void;\n warn: (msg: string) => void;\n info: (msg: string) => void;\n debug: (msg: string) => void;\n silly: (msg: string) => void;\n } = {\n error: (msg: string) => console.error(msg),\n warn: (msg: string) => console.warn(msg),\n info: (msg: string) => console.log(msg),\n debug: (msg: string) => console.debug(msg),\n silly: (msg: string) => console.debug(msg),\n };\n\n private readonly mods: MODULES;\n\n private objectsInitDone = false;\n private statesInitDone = false;\n\n private objects: Record = {};\n private states: Record = {};\n private readonly interimStateValues: Record = {};\n private readonly stateIds: string[] = [];\n /** Fast O(1) lookup set – always kept in sync with stateIds */\n private readonly stateIdSet: Set = new Set();\n\n private readonly subscriptions: SubscriptionResult[] = [];\n /**\n * O(1) dispatch map for subscriptions with exact (non-wildcard) string IDs.\n * Always kept in sync with `subscriptions`.\n */\n private readonly subscriptionsMap: Map = new Map();\n /**\n * Subscriptions whose pattern.id is a RegExp, contains wildcards (*,?), or is undefined.\n * These must still be checked linearly on every state change.\n */\n private readonly subscriptionsWildcard: SubscriptionResult[] = [];\n private readonly subscriptionsFile: FileSubscriptionResult[] = [];\n private readonly subscriptionsObject: SubscribeObject[] = [];\n /** O(1) dispatch map for subscriptionsObject – pattern → subscribers */\n private readonly subscriptionsObjectMap: Map = new Map();\n /** IO-9: Cache for sendTo broadcast – adapterName → instance list, invalidated on object change */\n private readonly sendToInstanceCache: Map = new Map();\n private readonly subscribedPatterns: Record = {};\n private readonly subscribedPatternsFile: Record = {};\n private readonly adapterSubs: Record> = {};\n private readonly timers: { [scriptName: string]: JavascriptTimer[] } = {};\n /** Reverse-index: scriptName → Set of stateIds that have timers for this script – O(1) cleanup */\n private readonly timersByScript: Map> = new Map();\n /** O(1) Set for enum-id lookups – replaces sorted string[] array */\n private readonly _enums: Set = new Set();\n private readonly names: { [name: string]: string | string[] } = {}; // name: id\n /** Reverse map: id → name for O(1) getName() lookups */\n private readonly nameById: Map = new Map();\n private readonly scripts: Record = {};\n private password: string = '';\n private readonly messageBusHandlers: Record<\n string,\n Record void }[]>\n > = {};\n private readonly logSubscriptions: Record<\n string,\n {\n sandbox: SandboxType;\n cb: (info: LogMessage) => void;\n id: number;\n severity: ioBroker.LogLevel | '*';\n }[]\n > = {};\n private readonly tempDirectories: { [scriptName: string]: string } = {}; // name: path\n private readonly folderCreationVerifiedObjects: Record = {};\n\n /** if logs are subscribed or not */\n private logSubscribed = false;\n\n private timeSettings: {\n format12: boolean;\n leadingZeros: boolean;\n } = { format12: false, leadingZeros: true };\n\n private dayScheduleTimer: NodeJS.Timeout | null = null; // schedule for astrological day\n private sunScheduleTimer: NodeJS.Timeout | null = null; // schedule for sun moment times\n private timeScheduleTimer: NodeJS.Timeout | null = null; // schedule for astrological day\n\n private activeStr = ''; // enabled state prefix\n\n private mirror: Mirror | undefined;\n\n private stopCounters: Record = {};\n\n private setStateCountCheckInterval: NodeJS.Timeout | null = null;\n\n private globalScript = '';\n /** Generated declarations for global TypeScripts */\n private globalDeclarations = '';\n // Remember which definitions the global scripts\n // have access to, because it depends on the compilation order\n private knownGlobalDeclarationsByScript: Record = {};\n private globalScriptLines = 0;\n // compiler instance for typescript\n private tsServer: Server;\n\n private readonly ignoreObjectChange: Set = new Set();\n\n private debugState: DebugState = {\n scriptName: '',\n child: null,\n promiseOnEnd: null,\n paused: false,\n started: 0,\n running: false,\n };\n\n constructor(options: Partial = {}) {\n options = {\n ...options,\n name: 'javascript', // adapter name\n useFormatDate: true,\n /**\n * If the JS-Controller catches an unhandled error, this will be called,\n * so we have a chance to handle it ourselves.\n */\n error: (err: Error): boolean => {\n // Identify unhandled errors originating from callbacks in scripts\n // These are not caught by wrapping the execution code in try-catch\n if (err && typeof err.stack === 'string') {\n const scriptCodeMarkerIndex = err.stack.indexOf(SCRIPT_CODE_MARKER);\n if (scriptCodeMarkerIndex > -1) {\n // This is a script error\n let scriptName = err.stack.substring(scriptCodeMarkerIndex);\n scriptName = scriptName.substring(0, scriptName.indexOf(':'));\n this.logError(scriptName, 'Error:', err);\n\n // Leave the script running for now\n // signal to the JS-Controller that we handled the error ourselves\n return true;\n }\n // check if a path contains adaptername but not own node_module\n // this regex matched \"iobroker.javascript/\" if NOT followed by \"node_modules\"\n if (!err.stack.match(/iobroker\\.javascript[/\\\\](?!.*node_modules).*/g)) {\n // This is an error without any info on origin (mostly async errors like connection errors)\n // also consider it as being from a script\n this.log.error(\n 'An error happened which is most likely from one of your scripts, but the originating script could not be detected.',\n );\n this.log.error(`Error: ${err.message}`);\n this.log.error(err.stack);\n\n // signal to the JS-Controller that we handled the error ourselves\n return true;\n }\n }\n\n return false;\n },\n };\n\n super(options as AdapterOptions);\n\n this.on('objectChange', this.onObjectChange.bind(this));\n this.on('stateChange', this.onStateChange.bind(this));\n this.on('ready', this.onReady.bind(this));\n this.on('message', this.onMessage.bind(this));\n this.on('unload', this.onUnload.bind(this));\n this.on('fileChange', this.onFileChange.bind(this));\n this.on('log', this.onLog.bind(this));\n\n this.mods = {\n fs: {} as ProtectFs,\n 'fs/promises': {} as ProtectFs['promises'],\n dgram,\n crypto,\n dns,\n events,\n http,\n https,\n http2,\n net,\n os,\n path,\n util,\n child_process,\n stream,\n zlib,\n\n suncalc,\n axios,\n wake_on_lan,\n nodeSchedule,\n };\n\n // check the webstorm debug and just debug modes\n let debugMode: string | undefined;\n if (process.argv) {\n for (let a = 1; a < process.argv.length; a++) {\n if (process.argv[a].startsWith('--webstorm')) {\n webstormDebug = process.argv[a].replace(/^(.*?=\\s*)/, '');\n }\n if (process.argv[a] === '--debugScript') {\n if (!process.argv[a + 1]) {\n console.log('No script name provided');\n process.exit(300);\n } else {\n debugMode = process.argv[a + 1];\n }\n }\n }\n }\n\n this.context = {\n mods: this.mods,\n objects: this.objects,\n states: this.states,\n interimStateValues: this.interimStateValues,\n stateIds: this.stateIds,\n errorLogFunction: this.errorLogFunction,\n subscriptions: this.subscriptions,\n subscriptionsMap: this.subscriptionsMap,\n subscriptionsWildcard: this.subscriptionsWildcard,\n subscriptionsFile: this.subscriptionsFile,\n subscriptionsObject: this.subscriptionsObject,\n subscriptionsObjectMap: this.subscriptionsObjectMap,\n sendToInstanceCache: this.sendToInstanceCache,\n subscribedPatterns: this.subscribedPatterns,\n subscribedPatternsFile: this.subscribedPatternsFile,\n adapterSubs: this.adapterSubs,\n cacheObjectEnums: {},\n timers: this.timers,\n timersByScript: this.timersByScript,\n enums: this._enums,\n names: this.names,\n scripts: this.scripts,\n messageBusHandlers: this.messageBusHandlers,\n logSubscriptions: this.logSubscriptions,\n tempDirectories: this.tempDirectories,\n folderCreationVerifiedObjects: this.folderCreationVerifiedObjects,\n\n isEnums: false, // If some subscription wants enum\n channels: null,\n devices: null,\n logWithLineInfo: this.logWithLineInfo.bind(this),\n scheduler: null,\n timerId: 0,\n rulesOpened: null, // opened rules\n language: this.language || 'en',\n\n updateLogSubscriptions: this.updateLogSubscriptions.bind(this),\n convertBackStringifiedValues: this.convertBackStringifiedValues.bind(this),\n updateObjectContext: this.updateObjectContext.bind(this),\n prepareStateObject: this.prepareStateObject.bind(this),\n debugMode,\n getAbsoluteDefaultDataDir,\n adapter: this as unknown as ioBroker.Adapter,\n logError: this.logError.bind(this),\n allowSelfSignedCerts: false,\n };\n\n this.tsServer = new Server(tsCompilerOptions, this.tsLog);\n }\n\n async onObjectChange(id: string, obj?: ioBroker.Object | null): Promise {\n // Check if we should ignore this change (once!) because we just updated the compiled sources\n if (this.ignoreObjectChange.has(id)) {\n // Update the cached script object and do nothing more\n this.objects[id] = obj as ioBroker.Object;\n this.ignoreObjectChange.delete(id);\n return;\n }\n\n // When still in initializing: already remember current values,\n // but data structures are initialized elsewhere\n if (!this.objectsInitDone) {\n if (obj) {\n this.objects[id] = obj;\n }\n return;\n }\n\n if (id.startsWith('enum.')) {\n // clear cache\n this.context.cacheObjectEnums = {};\n\n // update this._enums Set\n if (obj) {\n this._enums.add(id);\n } else {\n this._enums.delete(id);\n }\n }\n\n // IO-9: Invalidate sendTo instance-cache when adapter instances change\n if (id.startsWith('system.adapter.')) {\n const parts = id.split('.');\n if (parts.length >= 3) {\n const adapterName = parts[2]; // e.g. \"zigbee\" from \"system.adapter.zigbee.0\"\n this.sendToInstanceCache.delete(adapterName);\n }\n }\n\n if (id === 'system.config' && obj?.common?.language) {\n // set language for debug messages\n setLanguage(obj.common.language);\n this.language = obj.common.language;\n this.context.language = this.language as ioBroker.Languages;\n }\n\n // update stored time format for variables.dayTime\n if (id === `${this.namespace}.variables.dayTime` && obj?.native) {\n this.timeSettings.format12 = obj.native.format12 || false;\n this.timeSettings.leadingZeros = obj.native.leadingZeros === undefined ? true : obj.native.leadingZeros;\n }\n\n // send changes to the disk mirror\n this.mirror?.onObjectChange(id, obj as ioBroker.ScriptObject | null);\n\n const formerObj = this.objects[id];\n\n this.updateObjectContext(id, obj); // Update all Meta object data\n\n // for the alias object changes on the state objects, we need to manually update the\n // state cache value, because the new value is only published on the next change\n if (obj?.type === 'state' && id.startsWith('alias.0.')) {\n // execute async for speed\n this.getForeignStateAsync(id)\n .then(state => {\n if (state) {\n this.states[id] = state;\n } else if (this.states[id] !== undefined) {\n delete this.states[id];\n }\n })\n .catch(() => {\n /* ignore */\n });\n }\n\n // O(1) dispatch via pattern map instead of O(n) forEach\n const objSubs = this.subscriptionsObjectMap.get(id);\n if (objSubs) {\n for (const sub of objSubs) {\n try {\n sub.callback(id, obj);\n } catch (err: any) {\n this.log.error(`Error in callback: ${err.toString()}`);\n }\n }\n }\n\n // handle Script object updates\n if (!obj && formerObj?.type === 'script') {\n // Object Deleted just now\n if (checkIsGlobal(formerObj)) {\n // it was a global Script, and it was enabled and is now deleted => restart adapter\n if (formerObj.common.enabled) {\n this.log.info(`Active global Script ${id} deleted. Restart instance.`);\n this.restart();\n }\n } else if (formerObj.common?.engine === `system.adapter.${this.namespace}`) {\n // It was a non-global Script and deleted => stop and remove it\n await this.stopScript(id);\n\n // delete scriptEnabled.blabla variable\n const idActive = `scriptEnabled.${id.substring(SCRIPT_CODE_MARKER.length)}`;\n await this.delStateAsync(idActive);\n await this.delObjectAsync(idActive);\n\n // delete scriptProblem.blabla variable\n const idProblem = `scriptProblem.${id.substring(SCRIPT_CODE_MARKER.length)}`;\n await this.delStateAsync(idProblem);\n await this.delObjectAsync(idProblem);\n }\n } else if (!formerObj && obj?.type === 'script') {\n // New script that does not exist before\n if (checkIsGlobal(obj)) {\n // new global script added => restart adapter\n if (obj.common.enabled) {\n this.log.info(`Active global Script ${id} created. Restart instance.`);\n this.restart();\n }\n } else if (obj.common?.engine === `system.adapter.${this.namespace}`) {\n // new non-global script - create states for scripts\n await this.createActiveObject(id, !!obj.common.enabled);\n await this.createProblemObject(id);\n if (obj.common.enabled) {\n // if enabled => Start a script\n await this.loadScriptById(id);\n }\n }\n } else if (obj?.type === 'script' && formerObj?.common) {\n // Script changed ...\n if (checkIsGlobal(obj)) {\n if (obj.common.enabled || formerObj.common.enabled) {\n this.log.info(`Global Script ${id} updated. Restart instance.`);\n this.restart();\n }\n } else {\n // No global script\n if (obj.common?.engine === `system.adapter.${this.namespace}`) {\n // create states for scripts\n await this.createActiveObject(id, !!obj.common.enabled);\n await this.createProblemObject(id);\n }\n\n if (\n (formerObj.common.enabled && !obj.common.enabled) ||\n (formerObj.common.engine === `system.adapter.${this.namespace}` &&\n obj.common.engine !== `system.adapter.${this.namespace}`)\n ) {\n // Script disabled\n if (formerObj.common.enabled && formerObj.common.engine === `system.adapter.${this.namespace}`) {\n // Remove it from executing\n await this.stopScript(id);\n }\n } else if (\n (!formerObj.common.enabled && obj.common.enabled) ||\n (formerObj.common.engine !== `system.adapter.${this.namespace}` &&\n obj.common.engine === `system.adapter.${this.namespace}`)\n ) {\n // Script enabled\n\n if (obj.common.enabled && obj.common.engine === `system.adapter.${this.namespace}`) {\n // Start script\n await this.loadScriptById(id);\n }\n } else if (\n obj.common.engine === `system.adapter.${this.namespace}` ||\n formerObj.common.engine === `system.adapter.${this.namespace}`\n ) {\n // Source changed => restart the script (only on the relevant instance)\n this.stopCounters[id] = this.stopCounters[id] ? this.stopCounters[id] + 1 : 1;\n void this.stopScript(id).then(() => {\n // only start again after stop when \"last\" object change to prevent problems on\n // multiple changes in fast frequency\n if (!--this.stopCounters[id]) {\n void this.loadScriptById(id);\n }\n });\n }\n }\n }\n }\n\n onStateChange(id: string, state?: ioBroker.State | null): void {\n if (this.interimStateValues[id] !== undefined) {\n // any update invalidates the remembered interim value\n delete this.interimStateValues[id];\n }\n if (!id || id.startsWith('messagebox.') || id.startsWith('log.')) {\n return;\n }\n\n if (id === `${this.namespace}.debug.to` && state && !state.ack) {\n if (!this.context.debugMode) {\n this.debugSendToInspector(state.val);\n }\n return;\n }\n\n // When still in initializing: already remember current values,\n // but data structures are initialized elsewhere\n if (!this.statesInitDone) {\n if (state) {\n this.states[id] = state;\n }\n return;\n }\n\n const oldState: ioBroker.State | null | undefined = this.states[id];\n if (state) {\n if (oldState) {\n // enable or disable script\n if (!state.ack && id.startsWith(this.activeStr) && this.objects[id]?.native?.script) {\n void this.extendForeignObject(this.objects[id].native.script, {\n common: { enabled: state.val },\n });\n }\n\n // monitor if the adapter is alive and send all subscriptions once more, after the adapter goes online\n if (/*oldState && */ oldState.val === false && state.val && id.endsWith('.alive')) {\n if (this.adapterSubs[id]) {\n const parts = id.split('.');\n const a = `${parts[2]}.${parts[3]}`;\n for (const sub of this.adapterSubs[id]) {\n this.log.info(`Detected coming adapter \"${a}\". Send subscribe: ${sub}`);\n this.sendTo(a, 'subscribe', sub);\n }\n }\n }\n } else if (/*!oldState && */ !this.stateIdSet.has(id)) {\n this.sortedInsert(id);\n this.stateIdSet.add(id);\n }\n this.states[id] = state;\n } else {\n if (oldState) {\n delete this.states[id];\n }\n state = {} as ioBroker.State;\n const pos = this.binaryIndexOf(this.stateIds, id);\n if (pos !== -1) {\n this.stateIds.splice(pos, 1);\n this.stateIdSet.delete(id);\n }\n }\n\n // Collect matching subscriptions:\n // 1. O(1) exact-id map lookup – only buckets for this specific state id\n // 2. Linear scan over wildcard/regex subscriptions (unavoidable)\n // EventObj is created lazily – only when at least one subscription must be dispatched.\n const exactSubs = this.subscriptionsMap.get(id);\n const wildcardSubs = this.subscriptionsWildcard;\n const hasWork = (exactSubs && exactSubs.length > 0) || wildcardSubs.length > 0;\n\n if (!hasWork) {\n return;\n }\n\n let _eventObj: EventObj | null = null;\n const getEvent = (): EventObj => {\n if (!_eventObj) {\n _eventObj = createEventObject(\n this.context,\n id,\n this.convertBackStringifiedValues(id, state),\n this.convertBackStringifiedValues(id, oldState),\n );\n }\n return _eventObj;\n };\n\n if (exactSubs) {\n for (let i = 0, l = exactSubs.length; i < l; i++) {\n const sub = exactSubs[i];\n if (sub?.patternCompareFunctions && patternMatching(getEvent(), sub.patternCompareFunctions)) {\n try {\n sub.callback(getEvent());\n } catch (err: any) {\n this.log.error(`Error in callback: ${err.toString()}`);\n }\n }\n }\n }\n\n // if this state matches any subscriptions\n for (let i = 0, l = wildcardSubs.length; i < l; i++) {\n const sub = wildcardSubs[i];\n if (sub?.patternCompareFunctions && patternMatching(getEvent(), sub.patternCompareFunctions)) {\n try {\n sub.callback(getEvent());\n } catch (err: any) {\n this.log.error(`Error in callback: ${err.toString()}`);\n }\n }\n }\n }\n\n onFileChange(id: string, fileName: string, size: number | null): void {\n // if this file matches any subscriptions\n for (let i = 0, l = this.subscriptionsFile.length; i < l; i++) {\n const sub = this.subscriptionsFile[i];\n if (sub && fileMatching(sub, id, fileName)) {\n try {\n sub.callback(id, fileName, size, sub.withFile);\n } catch (err: any) {\n this.log.error(`Error in callback: ${err.toString()}`);\n }\n }\n }\n }\n\n async onUnload(callback: () => void): Promise {\n try {\n await this.debugStop();\n this.stopTimeSchedules();\n if (this.setStateCountCheckInterval) {\n clearInterval(this.setStateCountCheckInterval);\n this.setStateCountCheckInterval = null;\n }\n await this.stopAllScripts();\n } catch (err: unknown) {\n this.log.error(`Error during unload: ${(err as Error).message}`);\n } finally {\n if (typeof callback === 'function') {\n callback();\n }\n }\n }\n\n async onReady(): Promise {\n this.errorLogFunction = this.log;\n this.context.errorLogFunction = this.log;\n this.config.maxSetStatePerMinute = parseInt(this.config.maxSetStatePerMinute as unknown as string, 10) || 1000;\n this.config.maxTriggersPerScript = parseInt(this.config.maxTriggersPerScript as unknown as string, 10) || 100;\n\n if (this.supportsFeature?.('PLUGINS')) {\n const sentryInstance: InstanceType = this.getPluginInstance('sentry') as InstanceType<\n typeof SentryPlugin\n >;\n if (sentryInstance) {\n const Sentry = sentryInstance.getSentryObject();\n Sentry?.withScope(scope => {\n scope.addEventProcessor((event, _hint) => {\n if (event.exception?.values?.[0]) {\n const eventData = event.exception.values[0];\n if (\n eventData.stacktrace?.frames &&\n Array.isArray(eventData.stacktrace.frames) &&\n eventData.stacktrace.frames.length\n ) {\n // Exclude event if script Marker is included\n if (\n eventData.stacktrace.frames.find(frame =>\n frame.filename?.includes(SCRIPT_CODE_MARKER),\n )\n ) {\n return null;\n }\n // Exclude event if own directory is included but not inside own node_modules\n const ownNodeModulesDir = join(__dirname, 'node_modules');\n if (\n !eventData.stacktrace.frames.find(\n frame =>\n frame.filename?.includes(__dirname) &&\n !frame.filename.includes(ownNodeModulesDir),\n )\n ) {\n return null;\n }\n // We have exception data and did not sort it out, so report it\n return event;\n }\n }\n\n // No exception in it ... do not report\n return null;\n });\n });\n }\n }\n\n await this.main();\n }\n\n onMessage(obj: ioBroker.Message): void {\n switch (obj?.command) {\n // process messageTo commands\n case 'toScript':\n case 'jsMessageBus':\n if (\n obj.message &&\n (obj.message.instance === null ||\n obj.message.instance === undefined ||\n `javascript.${obj.message.instance}` === this.namespace ||\n obj.message.instance === this.namespace)\n ) {\n Object.keys(this.messageBusHandlers).forEach(name => {\n // the script name could be script.js.xxx or only xxx\n if (\n (!obj.message.script || obj.message.script === name) &&\n this.messageBusHandlers[name][obj.message.message]\n ) {\n this.messageBusHandlers[name][obj.message.message].forEach(handler => {\n const sandbox = handler.sandbox;\n\n sandbox.verbose && sandbox.log(`onMessage: ${JSON.stringify(obj.message)}`, 'info');\n\n try {\n if (obj.callback) {\n handler.cb.call(sandbox, obj.message.data, (result: any) => {\n if (sandbox.verbose) {\n sandbox.log(`onMessage result: ${JSON.stringify(result)}`, 'info');\n }\n\n this.sendTo(obj.from, obj.command, result, obj.callback);\n });\n } else {\n handler.cb.call(sandbox, obj.message.data, (result: any) => {\n sandbox.verbose &&\n sandbox.log(`onMessage result: ${JSON.stringify(result)}`, 'info');\n });\n }\n } catch (err: unknown) {\n void this.setState(\n `scriptProblem.${name.substring(SCRIPT_CODE_MARKER.length)}`,\n true,\n true,\n );\n this.logError(name, 'Error in callback:', err as Error);\n }\n });\n }\n });\n }\n break;\n\n case 'loadTypings': {\n // Load typings for the editor\n const typings: Record = {};\n\n // try to load TypeScript lib files from disk\n try {\n const typescriptLibs = resolveTypescriptLibs(targetTsLib);\n Object.assign(typings, typescriptLibs);\n } catch {\n /* ok, no lib then */\n }\n\n // provide the already-loaded ioBroker typings and global script declarations\n Object.assign(typings, tsAmbient);\n\n // also provide the known global declarations for each global script\n for (const globalScriptPaths of Object.keys(this.knownGlobalDeclarationsByScript)) {\n typings[`${globalScriptPaths}.d.ts`] = this.knownGlobalDeclarationsByScript[globalScriptPaths];\n }\n\n if (obj.callback) {\n this.sendTo(obj.from, obj.command, { typings }, obj.callback);\n }\n break;\n }\n\n case 'calcAstroAll': {\n if (obj.message) {\n const sunriseOffset =\n parseInt(\n obj.message.sunriseOffset === undefined\n ? this.config.sunriseOffset\n : obj.message.sunriseOffset,\n 10,\n ) || 0;\n const sunsetOffset =\n parseInt(\n obj.message.sunsetOffset === undefined\n ? this.config.sunsetOffset\n : obj.message.sunsetOffset,\n 10,\n ) || 0;\n const longitude =\n parseFloat(\n obj.message.longitude === undefined ? this.config.longitude : obj.message.longitude,\n ) || 0;\n const latitude =\n parseFloat(obj.message.latitude === undefined ? this.config.latitude : obj.message.latitude) ||\n 0;\n const today = getAstroStartOfDay();\n let astroEvents: GetTimesResult & { nextSunrise: Date; nextSunset: Date } = {} as GetTimesResult & {\n nextSunrise: Date;\n nextSunset: Date;\n };\n try {\n astroEvents = this.mods.suncalc.getTimes(today, latitude, longitude);\n } catch (err: unknown) {\n this.log.error(`Cannot calculate astro data: ${err as Error}`);\n }\n if (astroEvents) {\n try {\n astroEvents.nextSunrise = this.getAstroEvent(\n today,\n obj.message.sunriseEvent || this.config.sunriseEvent,\n obj.message.sunriseLimitStart || this.config.sunriseLimitStart,\n obj.message.sunriseLimitEnd || this.config.sunriseLimitEnd,\n sunriseOffset,\n false,\n latitude,\n longitude,\n true,\n );\n astroEvents.nextSunset = this.getAstroEvent(\n today,\n obj.message.sunsetEvent || this.config.sunsetEvent,\n obj.message.sunsetLimitStart || this.config.sunsetLimitStart,\n obj.message.sunsetLimitEnd || this.config.sunsetLimitEnd,\n sunsetOffset,\n true,\n latitude,\n longitude,\n true,\n );\n } catch (err: unknown) {\n this.log.error(`Cannot calculate astro data: ${err as Error}`);\n }\n }\n\n const result: Record = {};\n const keys = Object.keys(astroEvents).sort(\n (a, b) =>\n (astroEvents as unknown as Record)[a] -\n (astroEvents as unknown as Record)[b],\n );\n keys.forEach(key => {\n const validDate =\n (astroEvents as unknown as Record)[key] !== null &&\n !isNaN((astroEvents as unknown as Record)[key].getTime());\n\n result[key] = {\n isValidDate: validDate,\n serverTime: validDate\n ? formatHoursMinutesSeconds((astroEvents as unknown as Record)[key])\n : 'n/a',\n date: validDate\n ? (astroEvents as unknown as Record)[key].toISOString()\n : 'n/a',\n };\n });\n\n if (obj.callback) {\n this.sendTo(obj.from, obj.command, result, obj.callback);\n }\n }\n break;\n }\n\n case 'calcAstro': {\n if (obj.message) {\n const longitude =\n parseFloat(\n obj.message.longitude === undefined ? this.config.longitude : obj.message.longitude,\n ) || 0;\n const latitude =\n parseFloat(obj.message.latitude === undefined ? this.config.latitude : obj.message.latitude) ||\n 0;\n const today = getAstroStartOfDay();\n\n const sunriseEvent = obj.message?.sunriseEvent || this.config.sunriseEvent;\n const sunriseLimitStart = obj.message?.sunriseLimitStart || this.config.sunriseLimitStart;\n const sunriseLimitEnd = obj.message?.sunriseLimitEnd || this.config.sunriseLimitEnd;\n const sunriseOffset =\n parseInt(\n obj.message.sunriseOffset === undefined\n ? this.config.sunriseOffset\n : obj.message.sunriseOffset,\n 10,\n ) || 0;\n const nextSunrise = this.getAstroEvent(\n today,\n sunriseEvent,\n sunriseLimitStart,\n sunriseLimitEnd,\n sunriseOffset,\n false,\n latitude,\n longitude,\n true,\n );\n\n const sunsetEvent = obj.message?.sunsetEvent || this.config.sunsetEvent;\n const sunsetLimitStart = obj.message?.sunsetLimitStart || this.config.sunsetLimitStart;\n const sunsetLimitEnd = obj.message?.sunsetLimitEnd || this.config.sunsetLimitEnd;\n const sunsetOffset =\n parseInt(\n obj.message.sunsetOffset === undefined\n ? this.config.sunsetOffset\n : obj.message.sunsetOffset,\n 10,\n ) || 0;\n const nextSunset = this.getAstroEvent(\n today,\n sunsetEvent,\n sunsetLimitStart,\n sunsetLimitEnd,\n sunsetOffset,\n true,\n latitude,\n longitude,\n true,\n );\n\n const validDateSunrise = nextSunrise !== null && !isNaN(nextSunrise.getTime());\n const validDateSunset = nextSunset !== null && !isNaN(nextSunset.getTime());\n\n this.log.debug(\n `calcAstro sunrise: ${sunriseEvent} -> start ${sunriseLimitStart}, end: ${sunriseLimitEnd}, offset: ${sunriseOffset} - ${validDateSunrise ? nextSunrise.toISOString() : 'n/a'}`,\n );\n this.log.debug(\n `calcAstro sunset: ${sunsetEvent} -> start ${sunsetLimitStart}, end: ${sunsetLimitEnd}, offset: ${sunsetOffset} - ${validDateSunset ? nextSunset.toISOString() : 'n/a'}`,\n );\n\n if (obj.callback) {\n this.sendTo(\n obj.from,\n obj.command,\n {\n nextSunrise: {\n isValidDate: validDateSunrise,\n serverTime: validDateSunrise ? formatHoursMinutesSeconds(nextSunrise) : 'n/a',\n date: nextSunrise.toISOString(),\n },\n nextSunset: {\n isValidDate: validDateSunset,\n serverTime: validDateSunset ? formatHoursMinutesSeconds(nextSunset) : 'n/a',\n date: nextSunset.toISOString(),\n },\n },\n obj.callback,\n );\n }\n }\n break;\n }\n\n case 'debug': {\n if (!this.context.debugMode) {\n this.debugStart(obj.message);\n }\n break;\n }\n\n case 'debugStop': {\n if (!this.context.debugMode) {\n void this.debugStop().then(() => console.log('stopped'));\n }\n break;\n }\n\n case 'rulesOn': {\n this.context.rulesOpened = obj.message;\n console.log(`Enable messaging for ${this.context.rulesOpened}`);\n break;\n }\n\n case 'rulesOff': {\n // maybe if (context.rulesOpened === obj.message)\n console.log(`Disable messaging for ${this.context.rulesOpened}`);\n this.context.rulesOpened = null;\n break;\n }\n\n case 'getIoBrokerDataDir': {\n if (obj.callback) {\n this.sendTo(\n obj.from,\n obj.command,\n {\n dataDir: getAbsoluteDefaultDataDir(),\n sep,\n },\n obj.callback,\n );\n }\n break;\n }\n\n case 'chatCompletion': {\n // Proxy chat completion requests to an OpenAI-compatible API endpoint.\n // API keys are resolved server-side from encryptedNative config — they never\n // leave the adapter (frontend only sends `provider`, not the key).\n if (obj.callback) {\n const chatModel = (obj.message?.model || '').trim();\n const messages = obj.message?.messages;\n const tools = obj.message?.tools;\n const provider = (obj.message?.provider || 'openai').trim();\n const { apiKey, baseUrl } = resolveProviderCredentials(this.config, provider, obj.message?.baseUrl);\n // Anthropic, Gemini, and DeepSeek always require an API key; OpenAI-compatible allows empty key with custom base URL\n if (\n !apiKey &&\n (provider === 'anthropic' || provider === 'gemini' || provider === 'deepseek' || !baseUrl)\n ) {\n this.sendTo(obj.from, obj.command, { error: 'No API key provided' }, obj.callback);\n break;\n }\n if (!chatModel || !messages) {\n this.sendTo(obj.from, obj.command, { error: 'Model and messages are required' }, obj.callback);\n break;\n }\n\n let url: string;\n const chatHeaders: Record = {\n 'Content-Type': 'application/json',\n };\n let bodyObj: Record;\n\n if (provider === 'anthropic') {\n url = 'https://api.anthropic.com/v1/messages';\n chatHeaders['x-api-key'] = apiKey;\n chatHeaders['anthropic-version'] = '2023-06-01';\n // Translate OpenAI-format messages/tools into Anthropic's content-block format.\n const { system: systemText, messages: anthropicMessages } =\n translateMessagesToAnthropic(messages);\n const anthropicTools = tools?.length ? translateToolsToAnthropic(tools) : [];\n bodyObj = {\n model: chatModel,\n max_tokens: 8192,\n stream: false,\n ...(systemText ? { system: systemText } : {}),\n messages: anthropicMessages,\n ...(anthropicTools.length ? { tools: anthropicTools } : {}),\n };\n } else if (provider === 'gemini') {\n url = 'https://generativelanguage.googleapis.com/v1beta/openai/chat/completions';\n if (apiKey) {\n chatHeaders.Authorization = `Bearer ${apiKey}`;\n }\n bodyObj = { model: chatModel, messages, stream: false, ...(tools?.length ? { tools } : {}) };\n } else if (provider === 'deepseek') {\n url = 'https://api.deepseek.com/chat/completions';\n chatHeaders.Authorization = `Bearer ${apiKey}`;\n bodyObj = { model: chatModel, messages, stream: false, ...(tools?.length ? { tools } : {}) };\n } else {\n url = `${baseUrl || 'https://api.openai.com/v1'}/chat/completions`;\n if (apiKey) {\n chatHeaders.Authorization = `Bearer ${apiKey}`;\n }\n bodyObj = {\n model: chatModel,\n messages,\n stream: false,\n ...(tools?.length ? { tools } : {}),\n // Disable thinking/reasoning for local models to save context and speed\n ...(baseUrl ? { reasoning_effort: 'none' } : {}),\n };\n }\n\n const body = JSON.stringify(bodyObj);\n const bodyBuffer = Buffer.from(body, 'utf8');\n chatHeaders['Content-Length'] = bodyBuffer.length;\n\n const resolved = resolveRequestModule(url);\n if (!resolved) {\n this.sendTo(obj.from, obj.command, { error: `Invalid API URL: ${url}` }, obj.callback);\n break;\n }\n const { module: requestModule, isHttps } = resolved;\n\n try {\n const req = requestModule.request(\n url,\n {\n method: 'POST',\n headers: chatHeaders,\n timeout: 600000,\n ...(isHttps && this.config.allowSelfSignedCerts ? { rejectUnauthorized: false } : {}),\n },\n res => {\n let data = '';\n res.on('data', (chunk: Buffer) => {\n data += chunk.toString();\n });\n res.on('end', () => {\n if (res.statusCode === 200) {\n try {\n const parsed = JSON.parse(data);\n let content: string;\n let tool_calls: unknown;\n if (provider === 'anthropic') {\n const translated = translateAnthropicResponseToOpenAI(parsed);\n content = translated.content;\n tool_calls = translated.tool_calls;\n } else {\n const message = parsed.choices?.[0]?.message;\n content = message?.content || '';\n tool_calls = message?.tool_calls;\n }\n if (!content && !(tool_calls as unknown[] | undefined)?.length) {\n this.sendTo(\n obj.from,\n obj.command,\n { error: 'Empty response from API' },\n obj.callback,\n );\n } else {\n this.sendTo(\n obj.from,\n obj.command,\n {\n success: true,\n content,\n ...(tool_calls ? { tool_calls } : {}),\n },\n obj.callback,\n );\n }\n } catch {\n this.sendTo(\n obj.from,\n obj.command,\n { error: 'Invalid JSON response from API' },\n obj.callback,\n );\n }\n } else {\n let detail = '';\n try {\n const errParsed = JSON.parse(data);\n detail = errParsed.error?.message || data.substring(0, 200);\n } catch {\n detail = data.substring(0, 200);\n }\n this.sendTo(\n obj.from,\n obj.command,\n {\n error: `${detail || httpStatusText(res.statusCode || 0)} (${res.statusCode})`,\n },\n obj.callback,\n );\n }\n });\n },\n );\n\n req.on('error', (err: Error) => {\n this.sendTo(\n obj.from,\n obj.command,\n { error: `Connection failed: ${err.message}` },\n obj.callback,\n );\n });\n\n req.on('timeout', () => {\n req.destroy();\n this.sendTo(obj.from, obj.command, { error: 'Connection timeout (600s)' }, obj.callback);\n });\n\n req.write(bodyBuffer);\n req.end();\n } catch (error) {\n this.sendTo(\n obj.from,\n obj.command,\n { error: `Connection failed: ${(error as Error).toString()}` },\n obj.callback,\n );\n }\n }\n break;\n }\n\n case 'testApiConnection': {\n // Test connection to an OpenAI-compatible API endpoint.\n // The settings-dialog Test button sends the current form value as `apiKey`\n // (so users can test before saving); otherwise we fall back to the stored key.\n if (obj.callback) {\n const provider = (obj.message?.provider || 'openai').trim();\n const { apiKey, baseUrl } = resolveTestCredentials(\n this.config,\n provider,\n obj.message?.apiKey,\n obj.message?.baseUrl,\n );\n // Anthropic, Gemini, and DeepSeek always require an API key; OpenAI-compatible allows empty key with custom base URL\n if (\n !apiKey &&\n (provider === 'anthropic' || provider === 'gemini' || provider === 'deepseek' || !baseUrl)\n ) {\n this.sendTo(obj.from, obj.command, { error: 'No API key provided' }, obj.callback);\n break;\n }\n\n let url: string;\n const testHeaders: Record = {\n 'Content-Type': 'application/json',\n };\n\n if (provider === 'anthropic') {\n url = 'https://api.anthropic.com/v1/models';\n testHeaders['x-api-key'] = apiKey;\n testHeaders['anthropic-version'] = '2023-06-01';\n } else if (provider === 'gemini') {\n url = 'https://generativelanguage.googleapis.com/v1beta/openai/models';\n if (apiKey) {\n testHeaders.Authorization = `Bearer ${apiKey}`;\n }\n } else if (provider === 'deepseek') {\n url = 'https://api.deepseek.com/models';\n testHeaders.Authorization = `Bearer ${apiKey}`;\n } else {\n url = `${baseUrl || 'https://api.openai.com/v1'}/models`;\n if (apiKey) {\n testHeaders.Authorization = `Bearer ${apiKey}`;\n }\n }\n\n const resolved = resolveRequestModule(url);\n if (!resolved) {\n this.sendTo(obj.from, obj.command, { error: `Invalid API URL: ${url}` }, obj.callback);\n break;\n }\n const { module: requestModule, isHttps } = resolved;\n\n try {\n const req = requestModule.request(\n url,\n {\n method: 'GET',\n headers: testHeaders,\n timeout: 10000,\n ...(isHttps && this.config.allowSelfSignedCerts ? { rejectUnauthorized: false } : {}),\n },\n res => {\n let data = '';\n res.on('data', (chunk: Buffer) => {\n data += chunk.toString();\n });\n res.on('end', () => {\n if (res.statusCode === 200) {\n try {\n const parsed = JSON.parse(data);\n const models: string[] = (parsed.data || [])\n .map((m: { id: string }) =>\n m.id.startsWith('models/') ? m.id.substring(7) : m.id,\n )\n .sort();\n this.sendTo(\n obj.from,\n obj.command,\n { success: true, models, count: models.length },\n obj.callback,\n );\n } catch {\n this.sendTo(\n obj.from,\n obj.command,\n { error: 'Invalid JSON response from API' },\n obj.callback,\n );\n }\n } else if (res.statusCode === 401) {\n this.sendTo(\n obj.from,\n obj.command,\n { error: 'Invalid API key (401)' },\n obj.callback,\n );\n } else if (res.statusCode === 403) {\n this.sendTo(\n obj.from,\n obj.command,\n { error: 'Access denied (403)' },\n obj.callback,\n );\n } else {\n // Include response body for debugging\n let detail = '';\n try {\n const errParsed = JSON.parse(data);\n detail = errParsed.error?.message || data.substring(0, 200);\n } catch {\n detail = data.substring(0, 200);\n }\n this.sendTo(\n obj.from,\n obj.command,\n {\n error: `${detail || httpStatusText(res.statusCode || 0)} (${res.statusCode})`,\n },\n obj.callback,\n );\n }\n });\n },\n );\n\n req.on('error', (err: Error) => {\n this.sendTo(\n obj.from,\n obj.command,\n { error: `Connection failed: ${err.message}` },\n obj.callback,\n );\n });\n\n req.on('timeout', () => {\n req.destroy();\n this.sendTo(obj.from, obj.command, { error: 'Connection timeout (10s)' }, obj.callback);\n });\n\n req.end();\n } catch (error) {\n this.sendTo(\n obj.from,\n obj.command,\n { error: `Connection failed: ${(error as Error).toString()}` },\n obj.callback,\n );\n }\n }\n break;\n }\n\n case 'getAvailableAiProviders': {\n // Reports which AI providers have stored credentials (keys never leave the backend).\n if (obj.callback) {\n const providers = listAvailableProviders(this.config);\n this.sendTo(obj.from, obj.command, { providers }, obj.callback);\n }\n break;\n }\n\n case 'prettier': {\n // Format the code with Prettier\n if (obj.message && typeof obj.message.code === 'string') {\n try {\n prettier\n .format(obj.message.code, {\n parser: obj.message.type === 'typescript' ? 'babel-ts' : 'babel',\n printWidth: 120,\n semi: true,\n tabWidth: 4,\n useTabs: false,\n trailingComma: 'all',\n singleQuote: true,\n singleAttributePerLine: true,\n endOfLine: 'lf',\n bracketSpacing: true,\n arrowParens: 'avoid',\n quoteProps: 'as-needed',\n })\n .then(formattedCode => {\n if (obj.callback) {\n this.sendTo(obj.from, obj.command, { code: formattedCode }, obj.callback);\n } else {\n this.logWithLineInfo(`Formatted code:\\n${formattedCode}`);\n }\n })\n .catch(e => {\n this.logError('Prettier', 'Error formatting code:', e as Error);\n this.sendTo(obj.from, obj.command, { error: (e as Error).toString() }, obj.callback);\n });\n } catch (e) {\n this.logError('Prettier', 'Error formatting code:', e as Error);\n this.sendTo(obj.from, obj.command, { error: (e as Error).toString() }, obj.callback);\n }\n } else {\n this.sendTo(obj.from, obj.command, { error: 'No code provided' }, obj.callback);\n }\n break;\n }\n }\n }\n\n onLog(msg: any): void {\n for (const name of Object.keys(this.logSubscriptions)) {\n for (const handler of this.logSubscriptions[name]) {\n if (\n typeof handler.cb === 'function' &&\n (handler.severity === '*' || handler.severity === msg.severity)\n ) {\n handler.sandbox.logHandler = handler.severity || '*';\n handler.cb.call(handler.sandbox, msg);\n handler.sandbox.logHandler = undefined;\n }\n }\n }\n }\n\n logError(scriptName: string, msg: string, e: Error, offs?: number): void {\n const stack = e.stack ? e.stack.toString().split('\\n') : e ? e.toString() : '';\n if (!msg.includes('\\n')) {\n msg = msg.replace(/[: ]*$/, ': ');\n }\n if (!msg.endsWith(' ')) {\n msg += ':';\n }\n if (!scriptName.startsWith(SCRIPT_CODE_MARKER)) {\n scriptName = SCRIPT_CODE_MARKER + scriptName;\n }\n\n this.errorLogFunction.error(`${scriptName}: ${msg}${this.fixLineNo(stack[0])}`);\n for (let i = offs || 1; i < stack.length; i++) {\n if (!stack[i]) {\n continue;\n }\n if (stack[i].match(/runInNewContext|javascript\\.js:/)) {\n break;\n }\n this.errorLogFunction.error(`${scriptName}: ${this.fixLineNo(stack[i])}`);\n }\n }\n\n logWithLineInfo(msg: string): void {\n this.errorLogFunction.warn(msg);\n\n // get current error stack\n const stack = new Error().stack?.split('\\n');\n\n if (stack) {\n for (let i = 3; i < stack.length; i++) {\n if (!stack[i]) {\n continue;\n }\n if (stack[i].match(/runInContext|runInNewContext|javascript\\.js:/)) {\n break;\n }\n this.errorLogFunction.warn(this.fixLineNo(stack[i]));\n }\n }\n }\n\n async main(): Promise {\n // Patch the font as it sometimes is wrong\n if (!this.context.debugMode) {\n if (await this.patchFont()) {\n this.log.debug('Font patched');\n }\n }\n\n this.log.debug(`config.subscribe (Do not subscribe all states on start): ${this.config.subscribe}`);\n\n // correct jsonConfig for admin\n const instObj: ioBroker.InstanceObject | null | undefined = await this.getForeignObjectAsync(\n `system.adapter.${this.namespace}`,\n );\n if (instObj?.common) {\n if (instObj.common.adminUI?.config !== 'json') {\n if (instObj.common.adminUI) {\n instObj.common.adminUI.config = 'json';\n } else {\n instObj.common.adminUI = { config: 'json' };\n }\n void this.setForeignObject(instObj._id, instObj);\n }\n }\n\n if (webstormDebug) {\n this.errorLogFunction = {\n error: console.error,\n warn: console.warn,\n info: console.info,\n debug: console.log,\n silly: console.log,\n };\n this.context.errorLogFunction = this.errorLogFunction;\n }\n this.activeStr = `${this.namespace}.scriptEnabled.`;\n\n this.mods.fs = new ProtectFs(this.log, getAbsoluteDefaultDataDir());\n this.mods['fs/promises'] = this.mods.fs.promises; // to avoid require('fs/promises');\n\n // try to read TS declarations\n try {\n tsAmbient = {\n 'javascript.d.ts': readFileSync(this.mods.path.join(__dirname, 'lib/javascript.d.ts'), 'utf8'),\n };\n this.tsServer.provideAmbientDeclarations(tsAmbient);\n jsDeclarationServer.provideAmbientDeclarations(tsAmbient);\n } catch (err: unknown) {\n this.log.warn(`Could not read TypeScript ambient declarations: ${err as Error}`);\n // This should not happen, so send an error report to Sentry\n if (this.supportsFeature && this.supportsFeature('PLUGINS')) {\n const sentryInstance = this.getPluginInstance('sentry');\n if (sentryInstance) {\n const sentryObject = sentryInstance.getSentryObject();\n sentryObject?.captureException(err as Error);\n }\n }\n // Keep the adapter from crashing when the included typings cannot be read\n tsAmbient = {};\n }\n\n await this.installLibraries();\n // Load the TS declarations for Node.js and all 3rd party modules\n this.loadTypeScriptDeclarations();\n\n await this.getData();\n this.context.scheduler = new Scheduler(\n this.log,\n Date,\n this.mods.suncalc,\n this.config.latitude,\n this.config.longitude,\n );\n await this.dayTimeSchedules();\n await this.sunTimeSchedules();\n await this.timeSchedule();\n\n // Store allowSelfSignedCerts on the context, so sandbox HTTP functions can use it\n // without setting the global process.env.NODE_TLS_REJECT_UNAUTHORIZED (which affects all adapters in compact mode)\n this.context.allowSelfSignedCerts = this.config.allowSelfSignedCerts;\n\n const doc = await this.getObjectViewAsync('script', 'javascript', {});\n if (doc?.rows?.length) {\n // sort global scripts if configured\n if (this.config.sortGlobalScriptsAlphabetically) {\n doc.rows.sort((a, b) => a.value._id.localeCompare(b.value._id));\n }\n // assemble global script\n for (let g = 0; g < doc.rows.length; g++) {\n const obj = doc.rows[g].value;\n if (checkIsGlobal(obj)) {\n if (obj && obj.common) {\n const engineType = (obj.common.engineType || '').toLowerCase();\n\n if (obj.common.enabled) {\n if (engineType.startsWith('typescript')) {\n // TypeScript\n this.log.info(`${obj._id}: compiling TypeScript source...`);\n // In order to compile global TypeScript, we need to do some transformations\n // 1. For top-level-await, some statements must be wrapped in an immediately-invoked async function\n // 2. If any global script uses `import`, the declarations are no longer visible if they are not exported with `declare global`\n const transformedSource = transformScriptBeforeCompilation(obj.common.source, true);\n // The source code must be transformed in order to support top level await\n // Global scripts must not be treated as a module, otherwise their methods\n // cannot be found by the normal scripts\n // We need to hash both global declarations that are known until now\n // AND the script source, because changing either can change the compilation output\n const sourceHash: string = hashSource(\n tsSourceHashBase + this.globalDeclarations + transformedSource,\n );\n\n let compiled: string | undefined;\n let declarations: string | undefined;\n // If we already stored the compiled source code and the original source hash,\n // use the hash to check whether we can rely on the compiled source code or\n // if we need to compile it again\n if (\n typeof obj.common.compiled === 'string' &&\n typeof obj.common.sourceHash === 'string' &&\n sourceHash === obj.common.sourceHash\n ) {\n // We can reuse the stored source\n compiled = obj.common.compiled;\n declarations = obj.common.declarations;\n this.log.info(\n `${obj._id}: source code did not change, using cached compilation result...`,\n );\n } else {\n // We don't have a hashed source code, or the original source changed, compile it\n const filename = scriptIdToTSFilename(obj._id);\n let tsCompiled: CompileResult;\n try {\n tsCompiled = this.tsServer.compile(filename, transformedSource);\n } catch (err: unknown) {\n this.log.error(`${obj._id}: TypeScript compilation failed:\\n${err as Error}`);\n continue;\n }\n\n const errors = tsCompiled.diagnostics\n .map(diag => `${diag.annotatedSource}\\n`)\n .join('\\n');\n\n if (tsCompiled.success) {\n if (errors.length > 0) {\n this.log.warn(\n `${obj._id}: TypeScript compilation completed with errors:\\n${errors}`,\n );\n } else {\n this.log.info(`${obj._id}: TypeScript compilation successful`);\n }\n compiled = tsCompiled.result;\n // Global scripts that have been transformed to support `import` need to have their declarations transformed aswell\n declarations = transformGlobalDeclarations(tsCompiled.declarations || '');\n\n const newCommon: {\n compiled: string | undefined;\n declarations?: string;\n sourceHash: string;\n } = {\n sourceHash,\n compiled,\n };\n if (declarations) {\n newCommon.declarations = declarations;\n }\n\n // Store the compiled source and the original source hash, so we don't need to do the work again next time\n this.ignoreObjectChange.add(obj._id); // ignore the next change and don't restart scripts\n void this.extendForeignObject(obj._id, {\n common: newCommon,\n });\n } else {\n this.log.error(`${obj._id}: TypeScript compilation failed:\\n${errors}`);\n continue;\n }\n }\n this.globalScript += `${compiled}\\n`;\n // if declarations were generated, remember them\n if (declarations != null) {\n this.provideDeclarationsForGlobalScript(obj._id, declarations);\n }\n } else {\n // javascript\n const sourceCode = obj.common.source;\n this.globalScript += `${sourceCode}\\n`;\n\n // try to compile the declarations so TypeScripts can use\n // functions defined in global JavaScripts\n const filename = scriptIdToTSFilename(obj._id);\n let tsCompiled: CompileResult;\n try {\n tsCompiled = jsDeclarationServer.compile(filename, sourceCode);\n } catch (err: unknown) {\n this.log.warn(\n `${obj._id}: Error while generating type declarations, skipping:\\n${err as Error}`,\n );\n continue;\n }\n // if declarations were generated, remember them\n if (tsCompiled.success && tsCompiled.declarations != null) {\n this.provideDeclarationsForGlobalScript(obj._id, tsCompiled.declarations);\n }\n }\n }\n }\n }\n }\n }\n\n this.globalScript = this.globalScript.replace(/\\r\\n/g, '\\n');\n this.globalScriptLines = this.globalScript.split(/\\n/g).length - 1;\n\n if (doc?.rows?.length) {\n // load all scripts\n for (let i = 0; i < doc.rows.length; i++) {\n if (!checkIsGlobal(doc.rows[i].value)) {\n void this.loadScript(doc.rows[i].value);\n }\n }\n }\n\n if (this.config.mirrorPath?.trim()) {\n this.config.mirrorInstance = parseInt(this.config.mirrorInstance as unknown as string, 10) || 0;\n if (this.instance === this.config.mirrorInstance) {\n const ioBDataDir = getAbsoluteDefaultDataDir() + sep;\n this.config.mirrorPath = normalize(this.config.mirrorPath);\n let mirrorForbidden = false;\n for (let dir of forbiddenMirrorLocations) {\n dir = join(ioBDataDir, dir) + sep;\n if (dir.includes(this.config.mirrorPath) || this.config.mirrorPath.startsWith(dir)) {\n this.log.error(`The Mirror directory is not allowed to be a central ioBroker directory!`);\n this.log.error(`Directory ${this.config.mirrorPath} is not allowed to mirror files!`);\n mirrorForbidden = true;\n break;\n }\n }\n if (!mirrorForbidden) {\n this.mirror = new Mirror({\n adapter: this,\n log: this.log,\n diskRoot: this.config.mirrorPath,\n });\n }\n }\n }\n\n // Check setState counter per minute and stop a script if too high\n this.setStateCountCheckInterval = setInterval(() => {\n for (const id of Object.keys(this.scripts)) {\n if (!this.scripts[id]) {\n continue;\n }\n const currentSetStatePerMinuteCounter = this.scripts[id].setStatePerMinuteCounter;\n this.scripts[id].setStatePerMinuteCounter = 0;\n if (currentSetStatePerMinuteCounter > this.config.maxSetStatePerMinute) {\n this.scripts[id].setStatePerMinuteProblemCounter++;\n this.log.debug(\n `${id}: Script has reached the maximum of ${this.config.maxSetStatePerMinute} setState calls per minute in ${this.scripts[id].setStatePerMinuteProblemCounter} consecutive minutes`,\n );\n // Allow \"too high counters\" for 1 minute for script starts or such and only\n // stop the script when lasts longer\n if (this.scripts[id].setStatePerMinuteProblemCounter > 1) {\n this.log.error(\n `${id}: Script is calling setState more than ${this.config.maxSetStatePerMinute} times per minute! Stopping Script now! Please check your script!`,\n );\n void this.stopScript(id);\n }\n } else if (this.scripts[id].setStatePerMinuteProblemCounter > 0) {\n this.scripts[id].setStatePerMinuteProblemCounter--;\n this.log.debug(\n `Script ${id} has NOT reached the maximum of ${this.config.maxSetStatePerMinute} setState calls per minute. Decrease problem counter to ${this.scripts[id].setStatePerMinuteProblemCounter}`,\n );\n }\n }\n }, 60_000).unref();\n }\n\n private loadTypeScriptDeclarations(): void {\n // try to load the typings on disk for all 3rd party modules\n const packages = [\n 'node', // this provides auto-completion for most builtins\n '@iobroker/types', // this provides auto-completion for most builtins\n ];\n // Also include user-selected libraries (but only those that are also installed)\n if (typeof this.config?.libraries === 'string' && typeof this.config.libraryTypings === 'string') {\n const installedLibs = this.config.libraries\n .split(/[,;\\s]+/)\n .map(s => s.trim().split('@')[0])\n .filter(s => !!s);\n\n const wantsTypings = this.config.libraryTypings\n .split(/[,;\\s]+/)\n .map(s => s.trim())\n .filter(s => !!s);\n\n // O(1) lookups – avoids O(n²) Array.includes inside loops\n const installedSet = new Set(installedLibs);\n const wantsSet = new Set(wantsTypings);\n const packagesSet = new Set(packages);\n\n // Add all installed libraries the user has requested typings for to the list of packages\n for (const lib of installedLibs) {\n if (wantsSet.has(lib) && !packagesSet.has(lib)) {\n packages.push(lib);\n packagesSet.add(lib);\n }\n }\n // Some packages have submodules (e.g., rxjs/operators) that are not exposed through the main entry point\n // If typings are requested for them, also add them if the base module is installed\n for (const lib of wantsTypings) {\n // Extract the package name and check if we need to add it\n if (!lib.includes('/')) {\n continue;\n }\n const pkgName = lib.substring(0, lib.indexOf('/'));\n\n if (installedSet.has(pkgName) && !packagesSet.has(lib)) {\n packages.push(lib);\n packagesSet.add(lib);\n }\n }\n }\n for (const pkg of packages) {\n let pkgTypings = resolveTypings(\n pkg,\n this.getAdapterScopedPackageIdentifier ? this.getAdapterScopedPackageIdentifier(pkg) : pkg,\n // node needs ambient typings, so we don't wrap it in declare module\n pkg !== 'node',\n );\n if (!pkgTypings) {\n // Create the empty dummy declarations so users don't get the \"not found\" error\n // for installed packages\n if (pkg.includes('/')) {\n pkgTypings = {\n [`node_modules/${pkg}/index.d.ts`]: `declare module \"${pkg}\";`,\n };\n } else {\n pkgTypings = {\n [`node_modules/@types/${pkg}/index.d.ts`]: `declare module \"${pkg}\";`,\n };\n }\n }\n this.log.debug(`Loaded TypeScript definitions for \"${pkg}\": ${JSON.stringify(Object.keys(pkgTypings))}`);\n // remember the declarations for the editor\n Object.assign(tsAmbient, pkgTypings);\n // and give the language servers access to them\n this.tsServer.provideAmbientDeclarations(pkgTypings);\n jsDeclarationServer.provideAmbientDeclarations(pkgTypings);\n }\n }\n\n updateObjectContext(id: string, obj: ioBroker.Object | null | undefined): void {\n if (obj) {\n // add state to state ID's list\n if (obj.type === 'state') {\n if (!this.stateIdSet.has(id)) {\n this.sortedInsert(id);\n this.stateIdSet.add(id);\n }\n if (this.context.devices && this.context.channels) {\n const parts = id.split('.');\n parts.pop();\n const chn = parts.join('.');\n this.context.channels[chn] ||= new Set();\n this.context.channels[chn].add(id);\n\n parts.pop();\n const dev = parts.join('.');\n this.context.devices[dev] ||= new Set();\n this.context.devices[dev].add(id);\n }\n }\n } else {\n // delete object from state ID's list\n const pos = this.binaryIndexOf(this.stateIds, id);\n if (pos !== -1) {\n this.stateIds.splice(pos, 1);\n this.stateIdSet.delete(id);\n }\n if (this.context.devices && this.context.channels) {\n const parts = id.split('.');\n parts.pop();\n const chn = parts.join('.');\n this.context.channels[chn]?.delete(id);\n\n parts.pop();\n const dev = parts.join('.');\n this.context.devices[dev]?.delete(id);\n }\n\n delete this.folderCreationVerifiedObjects[id];\n }\n\n if (!obj && this.objects[id]) {\n // objects were deleted\n this.removeFromNames(id);\n delete this.objects[id];\n } else if (obj && !this.objects[id]) {\n // object was added\n this.objects[id] = obj;\n this.addToNames(obj);\n } else if (obj && this.objects[id].common) {\n // Object just changed\n this.objects[id] = obj;\n\n const n = this.getName(id);\n let nn = this.objects[id].common ? this.objects[id].common.name : '';\n\n if (nn && typeof nn === 'object') {\n nn = nn[getLanguage()] || nn.en;\n }\n\n if (n !== nn) {\n if (n) {\n this.removeFromNames(id);\n }\n if (nn) {\n this.addToNames(obj);\n }\n }\n }\n }\n\n async stopAllScripts(): Promise {\n const scripts = Object.keys(this.scripts);\n const promises: Promise[] = [];\n for (let i = 0; i < scripts.length; i++) {\n promises.push(this.stopScript(scripts[i]));\n }\n return Promise.all(promises).then(() => {});\n }\n\n convertBackStringifiedValues(\n id: string,\n state: ioBroker.State | null | undefined,\n ): ioBroker.State | null | undefined {\n if (\n state &&\n typeof state.val === 'string' &&\n this.objects[id]?.common &&\n (this.objects[id].common.type === 'array' || this.objects[id].common.type === 'object')\n ) {\n try {\n state.val = JSON.parse(state.val);\n } catch (err: any) {\n if (id.startsWith('javascript.') || id.startsWith('0_userdata.0')) {\n this.log.info(\n `Could not parse value for id \"${id}\" into ${this.objects[id].common.type}: ${err.toString()}`,\n );\n } else {\n this.log.debug(\n `Could not parse value for id \"${id}\" into ${this.objects[id].common.type}: ${err.toString()}`,\n );\n }\n }\n }\n return state;\n }\n\n prepareStateObjectSimple(id: string, state: ioBroker.StateValue, isAck: boolean): ioBroker.State {\n // otherwise, assume that the given state is the value to be set\n const oState: ioBroker.State = { val: state, ack: isAck } as ioBroker.State;\n\n return this.prepareStateObject(id, oState);\n }\n\n prepareStateObject(id: string, state: ioBroker.SettableState | null): ioBroker.State {\n let oState: ioBroker.State;\n\n if (state && typeof state === 'object') {\n oState = state as ioBroker.State;\n } else {\n oState = { val: null } as ioBroker.State;\n }\n\n if (this.config.subscribe) {\n return oState;\n }\n // set other values to have a full state object\n // mirrors logic from statesInRedis\n if (oState.ts === undefined) {\n oState.ts = Date.now();\n }\n\n if (oState.q === undefined) {\n oState.q = 0;\n }\n\n oState.from =\n typeof oState.from === 'string' && oState.from !== '' ? oState.from : `system.adapter.${this.namespace}`;\n\n if (oState.lc === undefined) {\n const formerStateValue = this.interimStateValues[id] || this.states[id];\n if (!formerStateValue) {\n oState.lc = oState.ts;\n } else {\n // isDeepStrictEqual works on objects and primitive values\n const hasChanged = !isDeepStrictEqual(formerStateValue.val, oState.val);\n if (!formerStateValue.lc || hasChanged) {\n oState.lc = oState.ts;\n } else {\n oState.lc = formerStateValue.lc;\n }\n }\n }\n\n return oState;\n }\n\n async getData(): Promise {\n await this.subscribeForeignObjectsAsync('*');\n\n if (!this.config.subscribe) {\n await this.subscribeForeignStatesAsync('*');\n } else {\n await this.subscribeStatesAsync('debug.to');\n await this.subscribeStatesAsync('scriptEnabled.*');\n }\n\n this.log.info('requesting all states');\n\n const statesPromise = this.getForeignStatesAsync('*')\n .then(res => {\n if (!res) {\n this.log.error(`Could not initialize states: no result`);\n this.terminate(EXIT_CODES.START_IMMEDIATELY_AFTER_STOP);\n return;\n }\n if (!this.config.subscribe) {\n this.states = Object.assign(res, this.states);\n this.context.states = this.states;\n\n this.addGetProperty(this.states);\n }\n\n // remember all IDs – sort once to guarantee the sorted invariant\n // required by binaryIndexOf() / sortedInsert() used later\n const keys = Object.keys(res).sort();\n for (const id of keys) {\n this.stateIds.push(id);\n this.stateIdSet.add(id);\n }\n this.statesInitDone = true;\n this.log.info('received all states');\n })\n .catch((err: any) => {\n this.log.error(`Could not initialize states: ${err?.message || 'no result'}`);\n this.terminate(EXIT_CODES.START_IMMEDIATELY_AFTER_STOP);\n });\n\n this.log.info('requesting all objects');\n\n const objectsPromise = this.getObjectListAsync({ include_docs: true })\n .then(res => {\n if (!res?.rows) {\n this.log.error(`Could not initialize objects: no result`);\n this.terminate(EXIT_CODES.START_IMMEDIATELY_AFTER_STOP);\n return;\n }\n this.objects = {};\n this.context.objects = this.objects;\n for (let i = 0; i < res.rows.length; i++) {\n const doc = res.rows[i]?.doc;\n if (!doc) {\n this.log.debug(`Got empty object for index ${i} (${res.rows[i].id})`);\n continue;\n }\n if (this.objects[doc._id] === undefined) {\n // If was already there, ignore\n this.objects[doc._id] = doc;\n }\n doc.type === 'enum' && this._enums.add(doc._id);\n\n // Collect all names\n this.addToNames(this.objects[doc._id]);\n }\n this.addGetProperty(this.objects);\n\n const systemConfig = this.objects['system.config'];\n this.password = systemConfig?.native?.javascriptPassword\n ? this.decrypt(systemConfig?.native.javascriptPassword)\n : '';\n\n // set language for debug messages\n if (systemConfig?.common?.language) {\n setLanguage(systemConfig.common.language);\n this.language = systemConfig.common.language;\n this.context.language = this.language as ioBroker.Languages;\n } else if (this.language) {\n setLanguage(this.language);\n this.context.language = this.language;\n }\n\n // try to use system coordinates\n if (this.config.useSystemGPS) {\n if (systemConfig?.common?.latitude || systemConfig?.common?.longitude) {\n this.config.latitude = systemConfig.common.latitude;\n this.config.longitude = systemConfig.common.longitude;\n } else if (this.latitude && this.longitude) {\n this.config.latitude = this.latitude;\n this.config.longitude = this.longitude;\n }\n }\n this.config.latitude = parseFloat(this.config.latitude as unknown as string);\n this.config.longitude = parseFloat(this.config.longitude as unknown as string);\n\n if (isNaN(this.config.latitude)) {\n this.log.warn(`Configured latitude is not a number - check (instance/system) configuration`);\n } else if (this.config.latitude < -90 || this.config.latitude > 90) {\n this.log.warn(\n `Configured latitude \"${this.config.latitude}\" is invalid - check (instance/system) configuration`,\n );\n }\n\n if (isNaN(this.config.longitude)) {\n this.log.warn(`Configured longitude is not a number - check (instance/system) configuration`);\n } else if (this.config.longitude < -180 || this.config.longitude > 180) {\n this.log.warn(\n `Configured longitude \"${this.config.longitude}\" is invalid - check (instance/system) configuration`,\n );\n }\n\n this.config.sunriseEvent ||= 'nightEnd';\n this.config.sunriseOffset ||= 0;\n this.config.sunriseLimitStart ||= '06:00';\n this.config.sunriseLimitEnd ||= '12:00';\n\n this.config.sunsetEvent ||= 'dusk';\n this.config.sunsetOffset ||= 0;\n this.config.sunsetLimitStart ||= '18:00';\n this.config.sunsetLimitEnd ||= '23:00';\n\n this.objectsInitDone = true;\n this.log.info('received all objects');\n })\n .catch((err: any) => {\n this.log.error(`Could not initialize objects: ${err?.message || 'no result'}`);\n this.terminate(EXIT_CODES.START_IMMEDIATELY_AFTER_STOP);\n });\n\n return Promise.all([statesPromise, objectsPromise]).then(() => {});\n }\n\n async createActiveObject(id: string, enabled: boolean): Promise {\n const idActive = `${this.namespace}.scriptEnabled.${id.substring(SCRIPT_CODE_MARKER.length)}`;\n\n if (!this.objects[idActive]) {\n this.objects[idActive] = {\n _id: idActive,\n common: {\n name: `scriptEnabled.${id.substring(SCRIPT_CODE_MARKER.length)}`,\n desc: 'controls script activity',\n type: 'boolean',\n write: true,\n read: true,\n role: 'switch.active',\n },\n native: {\n script: id,\n },\n type: 'state',\n };\n try {\n await this.setForeignObjectAsync(idActive, this.objects[idActive]);\n const intermediateStateValue = this.prepareStateObjectSimple(idActive, enabled, true);\n await this.setForeignStateAsync(idActive, enabled, true);\n if (enabled && !this.config.subscribe) {\n this.interimStateValues[idActive] = intermediateStateValue;\n }\n } catch {\n // ignore\n }\n } else {\n const state = await this.getForeignStateAsync(idActive);\n if (state && state.val !== enabled) {\n const intermediateStateValue = this.prepareStateObjectSimple(idActive, enabled, true);\n await this.setForeignStateAsync(idActive, enabled, true);\n if (enabled && !this.config.subscribe) {\n this.interimStateValues[idActive] = intermediateStateValue;\n }\n }\n }\n }\n\n async createProblemObject(id: string): Promise {\n const idProblem = `${this.namespace}.scriptProblem.${id.substring(SCRIPT_CODE_MARKER.length)}`;\n\n if (!this.objects[idProblem]) {\n this.objects[idProblem] = {\n _id: idProblem,\n common: {\n name: `scriptProblem.${id.substring(SCRIPT_CODE_MARKER.length)}`,\n desc: 'Script has a problem',\n type: 'boolean',\n expert: true,\n write: false,\n read: true,\n role: 'indicator.error',\n },\n native: {\n script: id,\n },\n type: 'state',\n };\n try {\n await this.setForeignObjectAsync(idProblem, this.objects[idProblem]);\n await this.setForeignStateAsync(idProblem, false, true);\n } catch {\n // ignore\n }\n } else {\n const state = await this.getForeignStateAsync(idProblem);\n if (state && state.val !== false) {\n await this.setForeignStateAsync(idProblem, false, true);\n }\n }\n }\n\n addToNames(obj: ioBroker.Object): void {\n const id = obj._id;\n\n if (obj.common?.name) {\n let name = obj.common.name;\n if (name && typeof name === 'object') {\n name = name[getLanguage()] || name.en;\n }\n if (!name || typeof name !== 'string') {\n // TODO, take name in current language\n return;\n }\n\n if (!this.names[name]) {\n this.names[name] = id;\n } else {\n // convert to array\n if (!Array.isArray(this.names[name])) {\n this.names[name] = [this.names[name] as string];\n }\n\n (this.names[name] as string[]).push(id);\n }\n\n // keep reverse-map up to date for O(1) getName()\n this.nameById.set(id, name);\n }\n }\n\n removeFromNames(id: string): void {\n const n = this.getName(id);\n\n if (n) {\n if (Array.isArray(this.names[n])) {\n const arr = this.names[n];\n const pos = arr.indexOf(id);\n if (pos > -1) {\n arr.splice(pos, 1);\n if (arr.length === 1) {\n this.names[n] = arr[0];\n }\n }\n } else {\n delete this.names[n];\n }\n\n // keep reverse-map up to date for O(1) getName()\n this.nameById.delete(id);\n }\n }\n\n getName(id: string): string | null {\n return this.nameById.get(id) ?? null;\n }\n\n async installNpm(npmLib: string): Promise {\n return new Promise((resolve, reject) => {\n const path = __dirname;\n\n // Also, set the working directory (cwd) of the process instead of using --prefix\n // because that has ugly bugs on Windows\n const cmd = `npm install ${npmLib} --omit=dev`;\n this.log.info(`Installing ${npmLib} into ${__dirname} - cmd: ${cmd}`);\n\n // System call used for update of js-controller itself,\n // because during the installation the npm packet will be deleted too, but some files must be loaded even during the installation process.\n const child = this.mods.child_process.exec(cmd, {\n windowsHide: true,\n cwd: path,\n timeout: 120_000, // 2 minutes max – prevents infinite blocking\n });\n\n child.stdout?.on('data', buf => this.log.info(buf.toString('utf8')));\n\n child.stderr?.on('data', buf => this.log.error(buf.toString('utf8')));\n\n child.on('err', err => {\n this.log.error(`Cannot install ${npmLib}: ${err}`);\n reject(new Error(`Cannot install ${npmLib}: ${err}`));\n });\n child.on('error', err => {\n this.log.error(`Cannot install ${npmLib}: ${err}`);\n reject(new Error(`Cannot install ${npmLib}: ${err}`));\n });\n\n child.on('exit', (code: number /* , signal */) => {\n if (code) {\n this.log.error(`Cannot install ${npmLib}: ${code}`);\n reject(new Error(`Cannot install ${npmLib}: ${code}`));\n }\n // command succeeded\n resolve(code);\n });\n });\n }\n\n async installLibraries(): Promise {\n if (typeof this.config?.libraries !== 'string') {\n this.config.libraries = '';\n }\n\n const libraries: string[] = this.config.libraries\n .split(/[,;\\s]+/)\n .map(d => d.trim())\n .filter(d => d);\n\n this.log.debug(`Custom libraries in config: \"${this.config.libraries}\": ${JSON.stringify(libraries)}`);\n\n let installedNodeModules: string[] = [];\n const keepModules: string[] = [];\n\n // js-controller >= 6.x\n if (typeof this.listInstalledNodeModules === 'function') {\n installedNodeModules = await this.listInstalledNodeModules();\n\n this.log.debug(`Found installed libraries: ${JSON.stringify(installedNodeModules)}`);\n }\n\n for (const lib of libraries) {\n let depName = lib;\n let version = 'latest';\n\n if (depName.includes('@') && depName.lastIndexOf('@') > 0) {\n const parts = depName.split('@');\n version = parts.pop() ?? 'latest';\n depName = parts.join('@');\n }\n\n /** The real module name, because the dependency can be a URL too */\n let moduleName = depName;\n\n if (URL.canParse(depName)) {\n moduleName = await requestModuleNameByUrl(depName);\n\n this.log.debug(`Found custom library in config: \"${moduleName}@${version}\" (from ${depName})`);\n } else {\n this.log.debug(`Found custom library in config: \"${moduleName}@${version}\"`);\n }\n\n keepModules.push(moduleName);\n\n // js-controller >= 6.x\n if (typeof this.installNodeModule === 'function') {\n try {\n const result = await this.installNodeModule(depName, { version });\n if (result.success) {\n this.log.debug(`Installed custom library: \"${moduleName}@${version}\"`);\n\n const importedModule: any = await this.importNodeModule(moduleName);\n (this.mods as Record)[moduleName] = importedModule.default ?? importedModule;\n } else {\n this.log.warn(`Cannot install custom npm package \"${moduleName}@${version}\"`);\n }\n } catch (err: unknown) {\n this.log.warn(`Cannot install custom npm package \"${moduleName}@${version}\": ${err as Error}`);\n }\n } else if (!existsSync(`${__dirname}/node_modules/${depName}/package.json`)) {\n // js-controller < 6.x\n this.log.info(`Installing custom library (legacy mode): \"${lib}\"`);\n\n try {\n await this.installNpm(lib);\n this.log.info(`Installed custom npm package (legacy mode): \"${lib}\"`);\n } catch (err: any) {\n this.log.warn(`Cannot install custom npm package \"${lib}\" (legacy mode): ${err.toString()}`);\n }\n }\n }\n\n // js-controller >= 6.x\n if (typeof this.uninstallNodeModule === 'function') {\n for (const installedNodeModule of installedNodeModules) {\n if (!keepModules.includes(installedNodeModule)) {\n try {\n await this.uninstallNodeModule(installedNodeModule);\n\n this.log.info(`Removed custom npm package: \"${installedNodeModule}\"`);\n } catch (err: any) {\n this.log.warn(`Cannot remove custom npm package ${installedNodeModule}: ${err.toString()}`);\n }\n }\n }\n }\n }\n\n createVM(source: string, name: string, wrapAsync: boolean): false | JsScript {\n if (this.context.debugMode && name !== this.context.debugMode) {\n return false;\n }\n\n if (!this.context.debugMode) {\n const logSubscriptionsText =\n \"\\n;\\nlog(`registered ${__engine.__subscriptions} subscription${__engine.__subscriptions === 1 ? '' : 's'},\" +\n \" ${__engine.__schedules} schedule${__engine.__schedules === 1 ? '' : 's'},\" +\n \" ${__engine.__subscriptionsMessage} message${__engine.__subscriptionsMessage === 1 ? '' : 's'},\" +\n \" ${__engine.__subscriptionsLog} log${__engine.__subscriptionsLog === 1 ? '' : 's'}\" +\n \" and ${__engine.__subscriptionsFile} file subscription${__engine.__subscriptionsFile === 1 ? '' : 's'}`);\\n\";\n\n if (wrapAsync) {\n source = `(async () => {\\n${source}\\n${logSubscriptionsText}\\n})();`;\n } else {\n if (source.endsWith('export {};\\n')) {\n // If the source ends with \"export {};\" place the log subscriptions before it\n source = source.slice(0, -11); // remove \"export {};\\n\"\n source = `${source}\\n${logSubscriptionsText}\\nexport {};\\n`;\n } else {\n source = `${source}\\n${logSubscriptionsText}`;\n }\n }\n } else {\n if (wrapAsync) {\n source = `(async () => {debugger;\\n${source}\\n})();`;\n } else {\n source = `debugger;${source}`;\n }\n }\n\n try {\n const options: ScriptOptions = {\n filename: name,\n // displayErrors: true,\n // lineOffset: this.globalScriptLines\n };\n return {\n script: new Script(source, options),\n } as JsScript;\n } catch (err: unknown) {\n this.logError(name, `compile failed at`, err as Error);\n return false;\n }\n }\n\n execute(script: JsScript, name: string, engineType: ScriptType, verbose: boolean, debug: boolean): void {\n script.intervals = new Set();\n script.timeouts = new Set();\n script.schedules = [];\n script.wizards = [];\n script.name = name;\n script.engineType = engineType;\n script._id = Math.floor(Math.random() * 0xffffffff);\n script.subscribes = {};\n script.subscribesFile = {};\n script.setStatePerMinuteCounter = 0;\n script.setStatePerMinuteProblemCounter = 0;\n void this.setState(`scriptProblem.${name.substring(SCRIPT_CODE_MARKER.length)}`, {\n val: false,\n ack: true,\n expire: 1000,\n });\n\n const sandbox = sandBox(script, name, verbose, debug, this.context);\n\n try {\n script.script.runInNewContext(sandbox, {\n filename: name,\n displayErrors: true,\n // lineOffset: this.globalScriptLines\n });\n } catch (err: unknown) {\n void this.setState(`scriptProblem.${name.substring(SCRIPT_CODE_MARKER.length)}`, {\n val: true,\n ack: true,\n c: 'execute',\n });\n this.logError(name, 'Error by run:', err as Error);\n }\n }\n\n /**\n * Finds the index of `id` in a sorted array using binary search – O(log n).\n * Returns -1 if not found. Used instead of Array.indexOf on stateIds.\n */\n private binaryIndexOf(arr: string[], id: string): number {\n let lo = 0;\n let hi = arr.length - 1;\n while (lo <= hi) {\n const mid = (lo + hi) >>> 1;\n if (arr[mid] === id) {\n return mid;\n } else if (arr[mid] < id) {\n lo = mid + 1;\n } else {\n hi = mid - 1;\n }\n }\n return -1;\n }\n\n /**\n * Inserts `id` into the sorted `stateIds` array using binary search – O(log n).\n * Much faster than push() + sort() which is O(n log n) on every insertion.\n */\n private sortedInsert(id: string): void {\n let lo = 0;\n let hi = this.stateIds.length;\n while (lo < hi) {\n const mid = (lo + hi) >>> 1;\n if (this.stateIds[mid] < id) {\n lo = mid + 1;\n } else {\n hi = mid;\n }\n }\n if (this.stateIds[lo] !== id) {\n this.stateIds.splice(lo, 0, id);\n }\n }\n\n unsubscribe(id: string | RegExp | string[]): void {\n if (!id) {\n this.log.warn('unsubscribe: empty name');\n return;\n }\n\n if (Array.isArray(id)) {\n id.forEach(sub => this.unsubscribe(sub));\n return;\n }\n\n if (id.constructor && id.constructor.name === 'RegExp') {\n // adapter.log.warn('unsubscribe: todo - process regexp');\n return;\n }\n\n if (typeof id !== 'string') {\n this.log.error(`unsubscribe: invalid type of id - ${typeof id}`);\n return;\n }\n const parts = id.split('.');\n const _adapter = `system.adapter.${parts[0]}.${parts[1]}`;\n if (this.objects[_adapter]?.common?.subscribable) {\n const a = `${parts[0]}.${parts[1]}`;\n const alive = `system.adapter.${a}.alive`;\n if (this.adapterSubs[alive]) {\n this.adapterSubs[alive].delete(id);\n if (!this.adapterSubs[alive].size) {\n delete this.adapterSubs[alive];\n }\n }\n this.sendTo(a, 'unsubscribe', id);\n }\n }\n\n // Analyze if logs are still required or not\n updateLogSubscriptions(): void {\n let found = false;\n // go through all scripts and check if some script still requires logs\n Object.keys(this.logSubscriptions).forEach(scriptName => {\n if (!this.logSubscriptions?.[scriptName] || !this.logSubscriptions[scriptName].length) {\n delete this.logSubscriptions[scriptName];\n } else {\n found = true;\n }\n });\n\n if (this.requireLog) {\n if (found && !this.logSubscribed) {\n this.logSubscribed = true;\n void this.requireLog(this.logSubscribed);\n this.log.info(`Subscribed to log messages (found logSubscriptions)`);\n } else if (!found && this.logSubscribed) {\n this.logSubscribed = false;\n void this.requireLog(this.logSubscribed);\n this.log.info(`Unsubscribed from log messages (not found logSubscriptions)`);\n }\n }\n }\n\n async stopScript(name: string): Promise {\n if (!this.scripts[name]) {\n return false;\n }\n\n this.log.info(`${name}: Stopping script`);\n\n await this.setState(`scriptEnabled.${name.substring(SCRIPT_CODE_MARKER.length)}`, false, true);\n\n if (this.messageBusHandlers[name]) {\n delete this.messageBusHandlers[name];\n }\n\n if (this.tempDirectories[name]) {\n try {\n this.mods.fs.rmSync(this.tempDirectories[name], { recursive: true });\n\n this.log.debug(`${name}: Removed temp directory: ${this.tempDirectories[name]}`);\n } catch {\n this.log.warn(`${name}: Unable to remove temp directory: ${this.tempDirectories[name]}`);\n }\n\n delete this.tempDirectories[name];\n }\n\n if (this.logSubscriptions[name]) {\n delete this.logSubscriptions[name];\n this.updateLogSubscriptions();\n }\n\n if (this.scripts[name]) {\n // Remove from subscriptions\n this.context.isEnums = false;\n if (this.config.subscribe) {\n // check all subscribed IDs\n Object.keys(this.scripts[name].subscribes).forEach(id => {\n if (this.subscribedPatterns[id]) {\n this.subscribedPatterns[id] -= this.scripts[name].subscribes[id];\n if (this.subscribedPatterns[id] <= 0) {\n this.unsubscribeForeignStates(id);\n delete this.subscribedPatterns[id];\n if (this.states[id]) {\n delete this.states[id];\n }\n }\n }\n });\n }\n\n for (let i = this.subscriptions.length - 1; i >= 0; i--) {\n if (this.subscriptions[i].name === name) {\n const sub = this.subscriptions.splice(i, 1)[0];\n // Also remove from the O(1) dispatch structures – shared helper to keep the\n // exact-id classification identical to the subscribe side in sandbox.ts\n if (sub) {\n removeFromDispatchIndex(this.context, sub);\n }\n if (sub?.pattern.id) {\n this.unsubscribe(sub.pattern.id);\n }\n } else {\n if (\n (!this.context.isEnums && this.subscriptions[i].pattern.enumName) ||\n this.subscriptions[i].pattern.enumId\n ) {\n this.context.isEnums = true;\n }\n }\n }\n\n // check all subscribed files\n Object.keys(this.scripts[name].subscribesFile).forEach(key => {\n if (this.subscribedPatternsFile[key]) {\n this.subscribedPatternsFile[key] -= this.scripts[name].subscribesFile[key];\n if (this.subscribedPatternsFile[key] <= 0) {\n const [id, file] = key.split('$%$');\n void this.unsubscribeForeignFiles(id, file);\n delete this.subscribedPatternsFile[key];\n }\n }\n });\n for (let i = this.subscriptionsFile.length - 1; i >= 0; i--) {\n if (this.subscriptionsFile[i].name === name) {\n this.subscriptionsFile.splice(i, 1);\n }\n }\n\n for (let i = this.subscriptionsObject.length - 1; i >= 0; i--) {\n if (this.subscriptionsObject[i].name === name) {\n const sub = this.subscriptionsObject.splice(i, 1)[0];\n if (sub) {\n // Remove from O(1) dispatch map\n const mapSubs = this.subscriptionsObjectMap.get(sub.pattern);\n if (mapSubs) {\n const pos = mapSubs.indexOf(sub);\n if (pos !== -1) {\n mapSubs.splice(pos, 1);\n }\n if (!mapSubs.length) {\n this.subscriptionsObjectMap.delete(sub.pattern);\n }\n }\n this.unsubscribeForeignObjects(sub.pattern);\n }\n }\n }\n\n // Stop all timeouts\n for (const t of this.scripts[name].timeouts) {\n clearTimeout(t);\n }\n // Stop all intervals\n for (const t of this.scripts[name].intervals) {\n clearInterval(t);\n }\n // Stop all delayed states (setStateDelayed timers) – O(1) via reverse-index\n const scriptStateIds = this.timersByScript.get(name);\n if (scriptStateIds) {\n for (const stateId of scriptStateIds) {\n if (this.timers[stateId]) {\n for (let i = this.timers[stateId].length - 1; i >= 0; i--) {\n if (this.timers[stateId][i].scriptName === name) {\n clearTimeout(this.timers[stateId][i].t);\n this.timers[stateId].splice(i, 1);\n }\n }\n if (!this.timers[stateId].length) {\n delete this.timers[stateId];\n }\n }\n }\n this.timersByScript.delete(name);\n }\n // Stop all scheduled jobs\n for (let i = 0; i < this.scripts[name].schedules.length; i++) {\n if (this.scripts[name].schedules[i]) {\n const _name = this.scripts[name].schedules[i].name;\n if (!this.mods.nodeSchedule.cancelJob(this.scripts[name].schedules[i])) {\n this.log.error(`${name}: Error by canceling scheduled job \"${_name}\"`);\n }\n }\n }\n\n // Stop all time wizards jobs\n if (this.context.scheduler) {\n for (let i = 0; i < this.scripts[name].wizards.length; i++) {\n if (this.scripts[name].wizards[i]) {\n this.context.scheduler.remove(this.scripts[name].wizards[i]);\n }\n }\n }\n\n // if callback for on stop\n if (typeof this.scripts[name].onStopCb === 'function') {\n this.scripts[name].onStopTimeout =\n parseInt(this.scripts[name].onStopTimeout as unknown as string, 10) || 1000;\n\n await new Promise(resolve => {\n let timeout: NodeJS.Timeout | null = setTimeout(() => {\n if (timeout) {\n timeout = null;\n resolve(true);\n }\n }, this.scripts[name].onStopTimeout);\n\n try {\n this.scripts[name].onStopCb(() => {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n resolve(true);\n }\n });\n } catch (err: unknown) {\n this.log.error(`${name}: error in onStop callback: ${err as Error}`);\n }\n });\n }\n\n delete this.scripts[name];\n return true;\n }\n return false;\n }\n\n async prepareScript(obj: ioBroker.ScriptObject): Promise {\n if (obj?.common?.enabled && this.debugState.scriptName === obj._id) {\n const id = obj._id;\n await this.debugStop();\n this.log.info(`${id}: Debugging was stopped, because started in normal mode`);\n return this.prepareScript(obj);\n }\n\n if (\n obj?.common?.source &&\n (obj.common.enabled || this.context.debugMode === obj._id) &&\n obj.common.engine === `system.adapter.${this.namespace}`\n ) {\n const name = obj._id;\n\n if (this.password && obj.native?.protected) {\n obj.common.source = decryptText(this.password, obj.common.source);\n }\n\n const nameId = name.substring(SCRIPT_CODE_MARKER.length);\n if (!nameId.length || nameId.endsWith('.')) {\n this.log.error(`${name}: Script name \"${name}\" is invalid!`);\n return false;\n }\n const idActive = `scriptEnabled.${nameId}`;\n if (!this.config.subscribe) {\n this.interimStateValues[idActive] = this.prepareStateObjectSimple(\n `${this.namespace}.${idActive}`,\n true,\n true,\n );\n }\n await this.setState(idActive, true, true);\n obj.common.engineType ||= '' as 'TypeScript/ts' | 'Blockly' | 'Rules' | 'Javascript/js';\n\n if (\n (obj.common.engineType as ScriptType).toLowerCase().startsWith('javascript') ||\n (obj.common.engineType as ScriptType) === 'Blockly' ||\n (obj.common.engineType as ScriptType) === 'Rules'\n ) {\n // Javascript\n this.log.info(`${name}: start JavaScript (${obj.common.engineType})`);\n\n let sourceFn = name;\n if (webstormDebug) {\n const fn = name.replace(/^script\\.js\\./, '').replace(/\\./g, '/');\n sourceFn = this.mods.path.join(webstormDebug, `${fn}.js`);\n }\n const createdScript = this.createVM(`${this.globalScript}\\n${obj.common.source}`, sourceFn, true);\n if (!createdScript) {\n return false;\n }\n this.scripts[name] = createdScript;\n this.execute(\n this.scripts[name],\n sourceFn,\n obj.common.engineType as ScriptType,\n obj.common.verbose,\n obj.common.debug,\n );\n return true;\n }\n\n if (obj.common.engineType.toLowerCase().startsWith('typescript')) {\n // TypeScript\n this.log.info(`${name}: Compiling TypeScript source`);\n // The source code must be transformed in order to support top level await\n // and to force TypeScript to compile the code as a module\n const transformedSource = transformScriptBeforeCompilation(obj.common.source, false);\n // We need to hash both global declarations that are known until now\n // AND the script source, because changing either can change the compilation output\n const sourceHash = hashSource(tsSourceHashBase + this.globalDeclarations + transformedSource);\n\n let compiled: string;\n // If we already stored the compiled source code and the original source hash,\n // use the hash to check whether we can rely on the compiled source code or\n // if we need to compile it again\n if (\n typeof obj.common.compiled === 'string' &&\n typeof obj.common.sourceHash === 'string' &&\n sourceHash === obj.common.sourceHash\n ) {\n // We can reuse the stored source\n compiled = obj.common.compiled;\n this.log.info(`${name}: source code did not change, using cached compilation result...`);\n } else {\n // We don't have a hashed source code, or the original source changed, compile it\n const filename = scriptIdToTSFilename(name);\n let tsCompiled: CompileResult;\n try {\n tsCompiled = this.tsServer.compile(filename, transformedSource);\n } catch (err: unknown) {\n this.log.error(`${obj._id}: TypeScript compilation failed:\\n${err as Error}`);\n return false;\n }\n\n const errors = tsCompiled.diagnostics.map(diag => `${diag.annotatedSource}\\n`).join('\\n');\n\n if (tsCompiled.success) {\n if (errors.length > 0) {\n this.log.warn(`${name}: TypeScript compilation had errors:\\n${errors}`);\n } else {\n this.log.info(`${name}: TypeScript compilation successful`);\n }\n compiled = tsCompiled.result || '';\n\n // Store the compiled source and the original source hash, so we don't need to do the work again next time\n this.ignoreObjectChange.add(name); // ignore the next change and don't restart scripts\n await this.extendForeignObjectAsync(name, {\n common: {\n sourceHash,\n compiled,\n },\n });\n } else {\n this.log.error(`${name}: TypeScript compilation failed:\\n${errors}`);\n return false;\n }\n }\n const createdScript: JsScript | false = this.createVM(`${this.globalScript}\\n${compiled}`, name, false);\n if (!createdScript) {\n return false;\n }\n this.scripts[name] = createdScript;\n this.execute(\n this.scripts[name],\n name,\n obj.common.engineType as ScriptType,\n obj.common.verbose,\n obj.common.debug,\n );\n return true;\n }\n\n this.log.warn(`${obj._id}: Unknown engine type: ${obj.common.engineType}`);\n return false;\n }\n\n let _name: string;\n if (obj?._id) {\n _name = obj._id;\n const scriptIdName = _name.substring(SCRIPT_CODE_MARKER.length);\n\n if (!scriptIdName.length || scriptIdName.endsWith('.')) {\n this.log.error(`${obj._id}: Script name \"${_name}\" is invalid!`);\n return false;\n }\n await this.setState(`scriptEnabled.${scriptIdName}`, false, true);\n }\n if (!obj) {\n this.log.error('Invalid script');\n }\n return false;\n }\n\n async loadScriptById(id: string): Promise {\n let obj: ioBroker.ScriptObject | null | undefined;\n try {\n obj = (await this.getForeignObjectAsync(id)) as ioBroker.ScriptObject | null | undefined;\n } catch (err: any) {\n this.log.error(`${id}: Invalid script: ${err}`);\n }\n if (!obj) {\n return false;\n }\n return this.loadScript(obj);\n }\n\n async loadScript(nameOrObject: ioBroker.ScriptObject): Promise {\n // create states for scripts\n await this.createActiveObject(nameOrObject._id, !!nameOrObject?.common?.enabled);\n await this.createProblemObject(nameOrObject._id);\n return this.prepareScript(nameOrObject);\n }\n\n getAstroEvent(\n date: Date,\n astroEvent: AstroEventName,\n start: string,\n end: string,\n offsetMinutes: number | string,\n isDayEnd: boolean,\n latitude: number,\n longitude: number,\n useNextDay?: boolean,\n ): Date {\n let ts: Date = this.mods.suncalc.getTimes(date, latitude, longitude)[astroEvent];\n\n if (!ts || ts.getTime().toString() === 'NaN') {\n ts = isDayEnd ? getNextTimeEvent(end, useNextDay) : getNextTimeEvent(start, useNextDay);\n }\n ts.setMilliseconds(0);\n ts.setMinutes(ts.getMinutes() + (parseInt(offsetMinutes as unknown as string, 10) || 0));\n\n const [timeHoursStart, timeMinutesStart] = start.split(':');\n const nTimeHoursStart = parseInt(timeHoursStart, 10);\n const nTimeMinutesStart = parseInt(timeMinutesStart, 10) || 0;\n\n if (\n ts.getHours() < nTimeHoursStart ||\n (ts.getHours() === nTimeHoursStart && ts.getMinutes() < nTimeMinutesStart)\n ) {\n ts = getNextTimeEvent(start, useNextDay);\n ts.setSeconds(0);\n }\n\n const [timeHoursEnd, timeMinutesEnd] = end.split(':');\n const nTimeHoursEnd = parseInt(timeHoursEnd, 10);\n const nTimeMinutesEnd = parseInt(timeMinutesEnd, 10) || 0;\n\n if (ts.getHours() > nTimeHoursEnd || (ts.getHours() === nTimeHoursEnd && ts.getMinutes() > nTimeMinutesEnd)) {\n ts = getNextTimeEvent(end, useNextDay);\n ts.setSeconds(0);\n }\n\n // if event in the past\n if (date > ts && useNextDay) {\n // take the next day\n ts.setDate(ts.getDate() + 1);\n }\n return ts;\n }\n\n async timeSchedule(): Promise {\n const now = new Date();\n let hours = now.getHours();\n const minutes = now.getMinutes();\n if (this.timeSettings.format12) {\n if (hours > 12) {\n hours -= 12;\n }\n }\n let sHours: string;\n if (this.timeSettings.leadingZeros) {\n sHours = hours.toString().padStart(2, '0');\n } else {\n sHours = hours.toString();\n }\n\n await this.setState('variables.dayTime', {\n val: `${sHours}:${minutes.toString().padStart(2, '0')}`,\n ack: true,\n });\n\n now.setMinutes(now.getMinutes() + 1);\n now.setSeconds(0);\n now.setMilliseconds(0);\n const interval = now.getTime() - Date.now();\n this.timeScheduleTimer = setTimeout(() => this.timeSchedule(), interval);\n }\n\n async dayTimeSchedules(): Promise {\n // Always clear any existing timer to prevent memory leaks on rapid re-scheduling\n if (this.dayScheduleTimer) {\n clearTimeout(this.dayScheduleTimer);\n this.dayScheduleTimer = null;\n }\n\n // get astrological event\n if (\n this.config.latitude === undefined ||\n this.config.longitude === undefined ||\n (this.config.latitude as unknown as string) === '' ||\n (this.config.longitude as unknown as string) === '' ||\n this.config.latitude === null ||\n this.config.longitude === null\n ) {\n this.log.error('Longitude or latitude does not set. Cannot use astro.');\n return;\n }\n\n // Calculate the next event today\n const todayDate = getAstroStartOfDay();\n const nowDate = new Date();\n\n const todaySunrise = this.getAstroEvent(\n todayDate,\n this.config.sunriseEvent,\n this.config.sunriseLimitStart,\n this.config.sunriseLimitEnd,\n this.config.sunriseOffset,\n false,\n this.config.latitude,\n this.config.longitude,\n );\n const todaySunset = this.getAstroEvent(\n todayDate,\n this.config.sunsetEvent,\n this.config.sunsetLimitStart,\n this.config.sunsetLimitEnd,\n this.config.sunsetOffset,\n true,\n this.config.latitude,\n this.config.longitude,\n );\n\n // Sunrise\n let sunriseTimeout = todaySunrise.getTime() - nowDate.getTime();\n if (sunriseTimeout < 0 || sunriseTimeout > 3600000) {\n sunriseTimeout = 3600000;\n }\n\n // Sunset\n let sunsetTimeout = todaySunset.getTime() - nowDate.getTime();\n if (sunsetTimeout < 0 || sunsetTimeout > 3600000) {\n sunsetTimeout = 3600000;\n }\n\n const isDayTime: ioBroker.State | null | undefined = await this.getStateAsync('variables.isDayTime');\n let isDay: boolean;\n if (sunriseTimeout < 5000) {\n isDay = true;\n } else if (sunsetTimeout < 5000) {\n isDay = false;\n } else {\n // check if in between\n isDay = nowDate.getTime() > todaySunrise.getTime() - 60000 && nowDate <= todaySunset;\n }\n\n const valDayTime = isDayTime ? !!isDayTime.val : false;\n if (valDayTime !== isDay || isDayTime === null) {\n await this.setState('variables.isDayTime', isDay, true);\n }\n\n const dayLightSaving: ioBroker.State | null | undefined =\n await this.getStateAsync('variables.isDaylightSaving');\n const isDayLightSaving = dstOffsetAtDate(nowDate) !== 0;\n const val = dayLightSaving ? !!dayLightSaving.val : false;\n\n if (val !== isDayLightSaving || dayLightSaving === null) {\n await this.setState('variables.isDaylightSaving', isDayLightSaving, true);\n }\n\n let nextTimeout = sunriseTimeout;\n if (sunriseTimeout > sunsetTimeout) {\n nextTimeout = sunsetTimeout;\n }\n nextTimeout = nextTimeout - 3000;\n if (nextTimeout < 3000) {\n nextTimeout = 3000;\n }\n\n this.dayScheduleTimer = setTimeout(() => this.dayTimeSchedules(), nextTimeout);\n }\n\n stopTimeSchedules(): void {\n if (this.dayScheduleTimer) {\n clearTimeout(this.dayScheduleTimer);\n this.dayScheduleTimer = null;\n }\n if (this.sunScheduleTimer) {\n clearTimeout(this.sunScheduleTimer);\n this.sunScheduleTimer = null;\n }\n if (this.timeScheduleTimer) {\n clearTimeout(this.timeScheduleTimer);\n this.timeScheduleTimer = null;\n }\n }\n\n async patchFont(): Promise {\n let stat: Stats | undefined;\n let dbFile: Buffer | undefined;\n let fileName = `${__dirname}/../admin/vs/base/browser/ui/codicons/codicon/codicon.ttf`;\n let jsonFileName = `${__dirname}/../admin/vsFont/codicon.json`;\n try {\n if (existsSync(fileName)) {\n stat = statSync(fileName);\n }\n if (!stat) {\n jsonFileName = `${__dirname}/admin/vsFont/codicon.json`;\n fileName = `${__dirname}/admin/vs/base/browser/ui/codicons/codicon/codicon.ttf`;\n if (existsSync(fileName)) {\n stat = statSync(fileName);\n }\n }\n const _dbFile = await this.readFileAsync(\n 'javascript.admin',\n `vs/base/browser/ui/codicons/codicon/codicon.ttf`,\n );\n if (_dbFile?.file) {\n dbFile = _dbFile.file as Buffer;\n }\n } catch {\n // ignore\n }\n\n if (stat?.size !== 73452 || dbFile?.byteLength !== 73452) {\n try {\n const buffer = Buffer.from(JSON.parse(readFileSync(jsonFileName).toString()), 'base64');\n\n const jszip = await import('jszip');\n const zip = await jszip.loadAsync(buffer);\n let data: ArrayBuffer | undefined;\n if (zip) {\n data = await zip.file('codicon.ttf')?.async('arraybuffer');\n if (data?.byteLength !== 73452) {\n this.log.error(`Cannot patch font: invalid font file!`);\n return false;\n }\n } else {\n this.log.error(`Cannot patch font: invalid font file!`);\n return false;\n }\n writeFileSync(fileName, Buffer.from(data));\n // upload this file\n await this.writeFileAsync(\n 'javascript.admin',\n 'vs/base/browser/ui/codicons/codicon/codicon.ttf',\n Buffer.from(data),\n );\n return true;\n } catch (err: unknown) {\n this.log.error(`Cannot patch font: ${err as Error}`);\n return false;\n }\n }\n return false;\n }\n\n async sunTimeSchedules(): Promise {\n if (this.config.createAstroStates) {\n if (!isNaN(this.config.longitude) && !isNaN(this.config.longitude)) {\n const calcDate = getAstroStartOfDay();\n\n const times = this.mods.suncalc.getTimes(calcDate, this.config.latitude, this.config.longitude);\n\n this.log.debug(`[sunTimeSchedules] Times: ${JSON.stringify(times)}`);\n\n for (const t in times) {\n try {\n const objId = `variables.astro.${t}`;\n\n await this.setObjectNotExistsAsync(objId, {\n type: 'state',\n common: {\n name: `Astro ${t}`,\n type: 'string',\n role: 'value',\n read: true,\n write: false,\n },\n native: {},\n });\n\n if (times[t] !== null && !isNaN(times[t].getTime())) {\n const timeFormatted = formatHoursMinutesSeconds(times[t]);\n await this.setState(objId, {\n val: timeFormatted,\n c: times[t].toISOString(),\n ack: true,\n });\n } else {\n await this.setState(objId, { val: null, c: 'n/a', ack: true, q: 0x01 });\n }\n } catch (err: unknown) {\n this.log.error(\n `[sunTimeSchedules] Unable to set state for astro time \"${t}\" (${times[t].getTime()}): ${err as Error}`,\n );\n }\n }\n\n const todayDate = new Date();\n todayDate.setHours(0);\n todayDate.setMinutes(0);\n todayDate.setSeconds(1);\n todayDate.setMilliseconds(0);\n todayDate.setDate(todayDate.getDate() + 1);\n\n this.log.debug(`[sunTimeSchedules] Next: ${todayDate.toISOString()}`);\n this.sunScheduleTimer = setTimeout(() => this.sunTimeSchedules(), todayDate.getTime() - Date.now());\n }\n } else {\n // remove astro states if disabled\n this.delObject('variables.astro', { recursive: true });\n }\n }\n\n /**\n * Redirects the virtual-tsc log output to the ioBroker log\n */\n tsLog = (message: string, severity?: ioBroker.LogLevel): void => {\n // shift the severities around, we don't care about the small details\n if (!severity || severity === 'info') {\n severity = 'debug';\n } else if (severity === 'debug') {\n // Don't spam build logs on Travis\n if (isCI) {\n return;\n }\n severity = 'silly';\n }\n\n if (this?.log) {\n this.log[severity](message);\n } else {\n console.log(`[${severity.toUpperCase()}] ${message}`);\n }\n };\n\n addGetProperty(object: Record): void {\n try {\n Object.defineProperty(object, 'get', {\n value: function (id: string): any {\n return this[id] || this[`${this.namespace}.${id}`];\n },\n enumerable: false,\n });\n } catch {\n console.error('Cannot install get property');\n }\n }\n\n /**\n * Add declarations for global scripts\n *\n * @param scriptID - The current script the declarations were generated from\n * @param declarations - Declarations from a script\n */\n provideDeclarationsForGlobalScript(scriptID: string, declarations: string): void {\n // Remember which declarations this global script had access to;\n // we need this so the editor doesn't show a duplicate identifier error\n if (this.globalDeclarations != null && this.globalDeclarations !== '') {\n this.knownGlobalDeclarationsByScript[scriptID] = this.globalDeclarations;\n }\n // and concatenate the global declarations for the next scripts\n this.globalDeclarations += `${declarations}\\n`;\n // remember all previously generated global declarations,\n // so global scripts can reference each other\n const globalDeclarationPath = 'global.d.ts';\n tsAmbient[globalDeclarationPath] = this.globalDeclarations;\n // make sure the next script compilation has access to the updated declarations\n this.tsServer.provideAmbientDeclarations({\n [globalDeclarationPath]: this.globalDeclarations,\n });\n jsDeclarationServer.provideAmbientDeclarations({\n [globalDeclarationPath]: this.globalDeclarations,\n });\n }\n\n fixLineNo(line: string): string {\n if (line.includes('javascript.js:')) {\n return line;\n }\n if (!/scripts?\\.js[.\\\\/]/.test(line)) {\n return line;\n }\n if (/:(\\d+):/.test(line)) {\n line = line.replace(\n /:(\\d+):/,\n (_$0, $1) => `:${$1 > this.globalScriptLines + 1 ? $1 - this.globalScriptLines - 1 : $1}:`,\n ); // one line for 'async function ()'\n } else {\n line = line.replace(\n /:(\\d+)$/,\n (_$0, $1) => `:${$1 > this.globalScriptLines + 1 ? $1 - this.globalScriptLines - 1 : $1}`,\n ); // one line for 'async function ()'\n }\n return line;\n }\n\n async debugStop(): Promise {\n if (this.debugState.child) {\n this.debugSendToInspector({ cmd: 'end' });\n this.debugState.endTimeout = setTimeout(() => {\n this.debugState.endTimeout = null;\n this.debugState.child?.kill('SIGTERM');\n }, 500);\n this.debugState.promiseOnEnd ||= Promise.resolve(0);\n } else {\n this.debugState.promiseOnEnd = Promise.resolve(0);\n }\n\n await this.debugState.promiseOnEnd;\n\n this.debugState.child = null;\n this.debugState.running = false;\n this.debugState.scriptName = '';\n if (this.debugState.endTimeout) {\n clearTimeout(this.debugState.endTimeout);\n this.debugState.endTimeout = null;\n }\n }\n\n async debugDisableScript(id: string | undefined): Promise {\n if (id) {\n const obj = this.objects[id];\n if (obj?.common?.enabled) {\n await this.extendForeignObjectAsync(obj._id, { common: { enabled: false } });\n }\n }\n }\n\n debugSendToInspector(message: any): void {\n if (this.debugState.child) {\n try {\n this.log.info(`send to debugger: ${message}`);\n this.debugState.child.send(message);\n } catch {\n void this.debugStop().then(() =>\n this.log.info(\n `${this.debugState.scriptName}: Debugging was stopped, because started in normal mode`,\n ),\n );\n }\n } else {\n this.log.error(`${this.debugState.scriptName}: Cannot send command to terminated inspector`);\n void this.setState(\n 'debug.from',\n JSON.stringify({ cmd: 'error', error: `Cannot send command to terminated inspector`, id: 1 }),\n true,\n );\n }\n }\n\n debugStart(data: { breakOnStart?: boolean; scriptName?: string; adapter?: string }): void {\n if (Date.now() - this.debugState.started < 1000) {\n console.log('Start ignored');\n return;\n }\n\n this.debugState.started = Date.now();\n // stop the script if it's running\n void this.debugDisableScript(data.scriptName)\n .then(() => this.debugStop())\n .then(() => {\n if (data.adapter) {\n this.debugState.adapterInstance = data.adapter;\n this.debugState.scriptName = '';\n } else {\n this.debugState.adapterInstance = '';\n this.debugState.scriptName = data.scriptName as string;\n }\n\n this.debugState.breakOnStart = data.breakOnStart;\n\n this.debugState.promiseOnEnd = new Promise(resolve => {\n const options: ForkOptions = {\n stdio: ['ignore', 'inherit', 'inherit', 'ipc'],\n //stdio: ['pipe', 'pipe', 'pipe', 'ipc']\n };\n const args: string[] = [];\n if (this.debugState.adapterInstance) {\n args.push('--breakOnStart');\n }\n\n this.debugState.child = fork(`${__dirname}/lib/inspect.js`, args, options);\n\n /*debugState.child.stdout.setEncoding('utf8');\n debugState.child.stderr.setEncoding('utf8');\n debugState.child.stdout.on('data', childPrint);\n debugState.child.stderr.on('data', childPrint);*/\n\n this.debugState.child?.on(\n 'message',\n (\n message:\n | string\n | {\n cmd: 'ready' | 'watched' | 'paused' | 'resumed' | 'log' | 'readyToDebug';\n severity?: string;\n text?: string;\n scriptId?: string;\n script?: string;\n },\n ) => {\n let oMessage: {\n cmd: 'ready' | 'watched' | 'paused' | 'resumed' | 'log' | 'readyToDebug';\n severity?: string;\n text?: string;\n scriptId?: string;\n script?: string;\n };\n if (typeof message === 'string') {\n try {\n oMessage = JSON.parse(message);\n } catch {\n return this.log.error(`Cannot parse message from inspector: ${message}`);\n }\n } else {\n oMessage = message;\n }\n\n if (oMessage.cmd !== 'ready') {\n void this.setState('debug.from', JSON.stringify(oMessage), true);\n }\n\n switch (oMessage.cmd) {\n case 'ready': {\n this.debugSendToInspector({\n cmd: 'start',\n scriptName: this.debugState.scriptName,\n adapterInstance: this.debugState.adapterInstance,\n instance: this.instance,\n });\n break;\n }\n\n case 'watched': {\n //console.log(`WATCHED: ${JSON.stringify(oMessage)}`);\n break;\n }\n\n case 'paused': {\n this.debugState.paused = true;\n console.log(`host: PAUSED`);\n break;\n }\n\n case 'resumed': {\n this.debugState.paused = false;\n //console.log(`STARTED`);\n break;\n }\n\n case 'log': {\n console.log(`[${oMessage.severity}] ${oMessage.text}`);\n break;\n }\n\n case 'readyToDebug': {\n console.log(\n `host: readyToDebug (set breakpoints): [${oMessage.scriptId}] ${oMessage.script}`,\n );\n break;\n }\n }\n },\n );\n this.debugState.child?.on('error', error => {\n this.log.error(`Cannot start inspector: ${error}`);\n void this.setState('debug.from', JSON.stringify({ cmd: 'error', error }), true);\n });\n\n this.debugState.child?.on('exit', async (code: number): Promise => {\n if (code) {\n await this.setState(\n 'debug.from',\n JSON.stringify({ cmd: 'error', error: `invalid response code: ${code}` }),\n true,\n );\n }\n await this.setState('debug.from', JSON.stringify({ cmd: 'debugStopped', code }), true);\n this.debugState.child = null;\n resolve(code);\n });\n });\n });\n }\n}\n\nfunction patternMatching(\n event: EventObj,\n patternFunctions: PatternEventCompareFunction[] & { logic?: 'and' | 'or' },\n): boolean {\n const logic = patternFunctions.logic ?? 'and';\n for (let i = 0, len = patternFunctions.length; i < len; i++) {\n const result = patternFunctions[i](event);\n if (logic === 'and' && !result) {\n return false; // short-circuit AND – one false is enough\n }\n if (logic === 'or' && result) {\n return true; // short-circuit OR – one true is enough\n }\n }\n // AND: all passed → true; OR: none matched → false\n return logic === 'and';\n}\n\n// If started as allInOne mode => return function to create an instance\nif (require.main !== module) {\n // Export the constructor in compact mode\n module.exports = (options: Partial | undefined) => new JavaScript(options);\n} else {\n // otherwise start the instance directly\n (() => new JavaScript())();\n}\n"]} \ No newline at end of file +{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,qCAAqD;AACrD,qCAAwF;AACxF,yCAAiD;AACjD,2DAA4D;AAC5D,6CAAkE;AAClE,yCAA8C;AAC9C,wDAAgC;AAEhC,kDAAoC;AACpC,oDAAsC;AACtC,8CAAgC;AAChC,oDAAsC;AACtC,gDAAkC;AAClC,kDAAoC;AACpC,kDAAoC;AACpC,8CAAgC;AAChC,4CAA8B;AAC9B,gDAAkC;AAClC,gDAAkC;AAClC,kEAAoD;AACpD,oDAAsC;AACtC,gDAAkC;AAElC,sCAAsC;AACtC,kDAAoC;AACpC,6CAA+B;AAC/B,sCAAsC;AACtC,yDAA2C;AAC3C,4DAA8C;AAE9C,yDAMgC;AAKhC,yCAAsC;AACtC,gEAAwC;AACxC,uCAAuD;AACvD,2CAAiE;AACjE,uEAAqE;AACrE,iEAKkC;AAClC,6DAIgC;AAChC,6CAAkE;AAClE,+CAAiE;AACjE,iEAAwG;AACxG,uCAAyC;AACzC,2DAM+B;AAe/B,yCAA2C;AAyB3C;;;;GAIG;AACH,MAAM,wBAAwB,GAAa;IACvC,gBAAgB;IAChB,OAAO;IACP,UAAU;IACV,YAAY;IACZ,iBAAiB;IACjB,QAAQ;CACX,CAAC;AAEF,MAAM,WAAW,GAAwB,IAAI,CAAC,KAAK,CAAC,IAAA,sBAAY,EAAC,GAAG,SAAS,kBAAkB,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC7G,MAAM,kBAAkB,GAAG,YAAY,CAAC;AAExC,IAAI,aAAiC,CAAC;AAEtC,MAAM,IAAI,GAAG,CAAC,CAAC,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(c) 2014-2024 bluefox ,\n *\n * Copyright (c) 2014 hobbyquaker\n */\n\nimport { Script, type ScriptOptions } from 'node:vm';\nimport { readFileSync, existsSync, statSync, writeFileSync, type Stats } from 'node:fs';\nimport { join, sep, normalize } from 'node:path';\nimport { fork, type ForkOptions } from 'node:child_process';\nimport { setTypeScriptResolveOptions, Server } from 'virtual-tsc';\nimport { isDeepStrictEqual } from 'node:util';\nimport prettier from 'prettier';\n\nimport * as dgram from 'node:dgram';\nimport * as crypto from 'node:crypto';\nimport * as dns from 'node:dns';\nimport * as events from 'node:events';\nimport * as http from 'node:http';\nimport * as https from 'node:https';\nimport * as http2 from 'node:http2';\nimport * as net from 'node:net';\nimport * as os from 'node:os';\nimport * as path from 'node:path';\nimport * as util from 'node:util';\nimport * as child_process from 'node:child_process';\nimport * as stream from 'node:stream';\nimport * as zlib from 'node:zlib';\n\n// @ts-expect-error no types available\nimport * as suncalc from 'suncalc2';\nimport * as axios from 'axios';\n// @ts-expect-error no types available\nimport * as wake_on_lan from 'wake_on_lan';\nimport * as nodeSchedule from 'node-schedule';\n\nimport {\n getAbsoluteDefaultDataDir,\n Adapter,\n Credentials,\n EXIT_CODES,\n type AdapterOptions,\n} from '@iobroker/adapter-core';\nimport type SentryPlugin from '@iobroker/plugin-sentry';\nimport type { GetTimesResult } from 'suncalc';\nimport type { CompileResult } from 'virtual-tsc/build/util';\n\nimport { Mirror } from './lib/mirror';\nimport ProtectFs from './lib/protectFs';\nimport { setLanguage, getLanguage } from './lib/words';\nimport { sandBox, removeFromDispatchIndex } from './lib/sandbox';\nimport { requestModuleNameByUrl } from './lib/nodeModulesManagement';\nimport {\n resolveProviderCredentials,\n resolveTestCredentials,\n listAvailableProviders,\n getProviderCredentialId,\n} from './lib/aiProviderResolver';\nimport {\n translateToolsToAnthropic,\n translateMessagesToAnthropic,\n translateAnthropicResponseToOpenAI,\n} from './lib/anthropicAdapter';\nimport { createEventObject, type EventObj } from './lib/eventObj';\nimport { type AstroEventName, Scheduler } from './lib/scheduler';\nimport { targetTsLib, tsCompilerOptions, jsDeclarationCompilerOptions } from './lib/typescriptSettings';\nimport { hashSource } from './lib/tools';\nimport {\n resolveTypescriptLibs,\n resolveTypings,\n scriptIdToTSFilename,\n transformScriptBeforeCompilation,\n transformGlobalDeclarations,\n} from './lib/typescriptTools';\nimport type {\n FileSubscriptionResult,\n JavascriptContext,\n JavaScriptAdapterConfig,\n JsScript,\n ScriptType,\n SubscriptionResult,\n SubscribeObject,\n JavascriptTimer,\n SandboxType,\n LogMessage,\n DebugState,\n} from './types';\nimport type { PatternEventCompareFunction } from './lib/patternCompareFunctions';\nimport { decryptText } from './lib/crypto';\n\ntype MODULES = {\n fs: ProtectFs;\n 'fs/promises': ProtectFs['promises'];\n dgram: typeof dgram;\n crypto: typeof crypto;\n dns: typeof dns;\n events: typeof events;\n http: typeof http;\n https: typeof https;\n http2: typeof http2;\n net: typeof net;\n os: typeof os;\n path: typeof path;\n util: typeof util;\n child_process: typeof child_process;\n stream: typeof stream;\n zlib: typeof zlib;\n suncalc: typeof suncalc;\n axios: typeof axios;\n wake_on_lan: typeof wake_on_lan;\n nodeSchedule: typeof nodeSchedule;\n};\n\n/**\n * List of forbidden Locations for a mirror directory\n * relative to the default data directory\n * ATTENTION: the same list is also located in index_m.html!!\n */\nconst forbiddenMirrorLocations: string[] = [\n 'backup-objects',\n 'files',\n 'backitup',\n '../backups',\n '../node_modules',\n '../log',\n];\n\nconst packageJson: Record = JSON.parse(readFileSync(`${__dirname}/../package.json`).toString());\nconst SCRIPT_CODE_MARKER = 'script.js.';\n\nlet webstormDebug: string | undefined;\n\nconst isCI = !!process.env.CI;\n\n// ambient declarations for typescript\nlet tsAmbient: Record;\n\n// TypeScript's scripts are only recompiled if their source hash changes.\n// If an adapter update fixes the compilation bugs, a user won't notice until the changes and re-save the script.\n// To avoid that, we also include the\n// adapter version and TypeScript version in the hash\nconst tsSourceHashBase = `versions:adapter=${packageJson.version},typescript=${packageJson.dependencies.typescript}`;\n\n// taken from here: https://stackoverflow.com/questions/11887934/how-to-check-if-dst-daylight-saving-time-is-in-effect-and-if-so-the-offset\nfunction dstOffsetAtDate(dateInput: Date): number {\n const fullYear: number = dateInput.getFullYear() | 0;\n // \"Leap Years are any year that can be exactly divided by 4 (2012, 2016, etc.)\n // except if it can be exactly divided by 100, then it isn't (2100, 2200, etc.)\n // except if it can be exactly divided by 400, then it is (2000, 2400)\"\n // (https://www.mathsisfun.com/leap-years.html).\n const isLeapYear: 1 | 0 = ((fullYear & 3) | ((fullYear / 100) & 3)) === 0 ? 1 : 0;\n // (fullYear & 3) = (fullYear % 4), but faster\n //Alternative:var isLeapYear=(new Date(currentYear,1,29,12)).getDate()===29?1:0\n const fullMonth: number = dateInput.getMonth() | 0;\n return (\n // 1. We know what the time since the Epoch really is\n +dateInput - // same as the dateInput.getTime() method\n // 2. We know what the time since the Epoch at the start of the year is\n +new Date(fullYear, 0) - // day defaults to 1 if not explicitly zeroed\n // 3. Now, subtract what we would expect the time to be if daylight savings\n // did not exist. This yields the time-offset due to daylight savings.\n // Calculate the day of the year in the Gregorian calendar\n // The code below works based upon the facts of signed right shifts\n // • (x) >> n: shifts n and fills in the n highest bits with 0s\n // • (-x) >> n: shifts n and fills in the n highest bits with 1s\n // (This assumes that x is a positive integer)\n ((((-1 + // the first day in the year is day 1\n (31 & (-fullMonth >> 4)) + // January // (-11)>>4 = -1\n ((28 + isLeapYear) & ((1 - fullMonth) >> 4)) + // February\n (31 & ((2 - fullMonth) >> 4)) + // March\n (30 & ((3 - fullMonth) >> 4)) + // April\n (31 & ((4 - fullMonth) >> 4)) + // May\n (30 & ((5 - fullMonth) >> 4)) + // June\n (31 & ((6 - fullMonth) >> 4)) + // July\n (31 & ((7 - fullMonth) >> 4)) + // August\n (30 & ((8 - fullMonth) >> 4)) + // September\n (31 & ((9 - fullMonth) >> 4)) + // October\n (30 & ((10 - fullMonth) >> 4)) + // November\n // There are no months past December: the year rolls into the next.\n // Thus, \"fullMonth\" is 0-based, so it will never be 12 in JavaScript\n\n (dateInput.getDate() | 0)) & // get day of the month\n 0xffff) *\n 24 *\n 60 + // 24 hours in a day, 60 minutes in an hour\n (dateInput.getHours() & 0xff) * 60 + // 60 minutes in an hour\n (dateInput.getMinutes() & 0xff)) |\n 0) *\n 60 *\n 1000 - // 60 seconds in a minute * 1000 milliseconds in a second\n (dateInput.getSeconds() & 0xff) * 1000 - // 1000 milliseconds in a second\n dateInput.getMilliseconds()\n );\n}\n\nconst regExGlobalOld = /_global$/;\nconst regExGlobalNew = /script\\.js\\.global\\./;\n\nfunction checkIsGlobal(obj: ioBroker.ScriptObject): boolean {\n return obj?.common && (regExGlobalOld.test(obj.common.name) || regExGlobalNew.test(obj._id));\n}\n\nfunction fileMatching(sub: FileSubscriptionResult, id: string, fileName: string): boolean {\n if (sub.idRegEx) {\n if (!sub.idRegEx.test(id)) {\n return false;\n }\n } else {\n if (sub.id !== id) {\n return false;\n }\n }\n if (sub.fileRegEx) {\n if (!sub.fileRegEx.test(fileName)) {\n return false;\n }\n } else {\n if (sub.fileNamePattern !== fileName) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction getNextTimeEvent(time: string, useNextDay?: boolean): Date {\n const now: Date = getAstroStartOfDay();\n const [timeHours, timeMinutes] = time.split(':');\n const nTimeHours = parseInt(timeHours, 10);\n const nTimeMinutes = parseInt(timeMinutes, 10);\n if (\n useNextDay &&\n (now.getHours() > nTimeHours || (now.getHours() === nTimeHours && now.getMinutes() > nTimeMinutes))\n ) {\n now.setDate(now.getDate() + 1);\n }\n\n now.setHours(nTimeHours);\n now.setMinutes(nTimeMinutes);\n\n return now;\n}\n\nfunction getAstroStartOfDay(): Date {\n const d = new Date();\n d.setMinutes(0);\n d.setSeconds(0);\n d.setMilliseconds(0);\n d.setTime(d.getTime() - d.getTimezoneOffset() * 60 * 1000);\n d.setUTCHours(0);\n\n return d;\n}\n\nfunction formatHoursMinutesSeconds(date: Date): string {\n const h = String(date.getHours());\n const m = String(date.getMinutes());\n const s = String(date.getSeconds());\n\n return `${h.padStart(2, '0')}:${m.padStart(2, '0')}:${s.padStart(2, '0')}`;\n}\n\n// Due to a npm bug, virtual-tsc may be hoisted to the top level node_modules, but\n// TypeScript may still be in the adapter level (https://npm.community/t/packages-with-peerdependencies-are-incorrectly-hoisted/4794),\n// so we need to tell virtual-tsc where TypeScript is\nsetTypeScriptResolveOptions({\n paths: [require.resolve('typescript')],\n});\n\n// compiler instance for global JS declarations\nconst jsDeclarationServer: Server = new Server(jsDeclarationCompilerOptions, isCI ? false : undefined);\n/**\n * Stores the IDs of script objects whose change should be ignored because\n * the compiled source was just updated\n */\n\nconst HTTP_STATUS_TEXTS: Record = {\n 400: 'Bad Request',\n 401: 'Unauthorized',\n 403: 'Forbidden',\n 404: 'Not Found',\n 429: 'Too Many Requests / Rate Limit',\n 500: 'Internal Server Error',\n 502: 'Bad Gateway',\n 503: 'Service Unavailable',\n};\n\nfunction httpStatusText(code: number): string {\n return HTTP_STATUS_TEXTS[code] ?? `Error ${code}`;\n}\n\n/**\n * Resolves the correct http/https module based on the URL string.\n * Returns null if the URL is invalid.\n */\nfunction resolveRequestModule(url: string): { module: typeof https | typeof http; isHttps: boolean } | null {\n try {\n const { protocol } = new URL(url);\n const isHttps = protocol === 'https:';\n return { module: isHttps ? https : http, isHttps };\n } catch {\n return null;\n }\n}\n\nclass JavaScript extends Adapter {\n declare public config: JavaScriptAdapterConfig;\n\n private readonly context: JavascriptContext;\n\n private errorLogFunction: {\n error: (msg: string) => void;\n warn: (msg: string) => void;\n info: (msg: string) => void;\n debug: (msg: string) => void;\n silly: (msg: string) => void;\n } = {\n error: (msg: string) => console.error(msg),\n warn: (msg: string) => console.warn(msg),\n info: (msg: string) => console.log(msg),\n debug: (msg: string) => console.debug(msg),\n silly: (msg: string) => console.debug(msg),\n };\n\n private readonly mods: MODULES;\n\n private objectsInitDone = false;\n private statesInitDone = false;\n\n private objects: Record = {};\n private states: Record = {};\n private readonly interimStateValues: Record = {};\n private readonly stateIds: string[] = [];\n /** Fast O(1) lookup set – always kept in sync with stateIds */\n private readonly stateIdSet: Set = new Set();\n\n private readonly subscriptions: SubscriptionResult[] = [];\n /**\n * O(1) dispatch map for subscriptions with exact (non-wildcard) string IDs.\n * Always kept in sync with `subscriptions`.\n */\n private readonly subscriptionsMap: Map = new Map();\n /**\n * Subscriptions whose pattern.id is a RegExp, contains wildcards (*,?), or is undefined.\n * These must still be checked linearly on every state change.\n */\n private readonly subscriptionsWildcard: SubscriptionResult[] = [];\n private readonly subscriptionsFile: FileSubscriptionResult[] = [];\n private readonly subscriptionsObject: SubscribeObject[] = [];\n /** O(1) dispatch map for subscriptionsObject – pattern → subscribers */\n private readonly subscriptionsObjectMap: Map = new Map();\n /** IO-9: Cache for sendTo broadcast – adapterName → instance list, invalidated on object change */\n private readonly sendToInstanceCache: Map = new Map();\n private readonly subscribedPatterns: Record = {};\n private readonly subscribedPatternsFile: Record = {};\n private readonly adapterSubs: Record> = {};\n private readonly timers: { [scriptName: string]: JavascriptTimer[] } = {};\n /** Reverse-index: scriptName → Set of stateIds that have timers for this script – O(1) cleanup */\n private readonly timersByScript: Map> = new Map();\n /** O(1) Set for enum-id lookups – replaces sorted string[] array */\n private readonly _enums: Set = new Set();\n private readonly names: { [name: string]: string | string[] } = {}; // name: id\n /** Reverse map: id → name for O(1) getName() lookups */\n private readonly nameById: Map = new Map();\n private readonly scripts: Record = {};\n private password: string = '';\n private readonly messageBusHandlers: Record<\n string,\n Record void }[]>\n > = {};\n private readonly logSubscriptions: Record<\n string,\n {\n sandbox: SandboxType;\n cb: (info: LogMessage) => void;\n id: number;\n severity: ioBroker.LogLevel | '*';\n }[]\n > = {};\n private readonly tempDirectories: { [scriptName: string]: string } = {}; // name: path\n private readonly folderCreationVerifiedObjects: Record = {};\n\n /** if logs are subscribed or not */\n private logSubscribed = false;\n\n private timeSettings: {\n format12: boolean;\n leadingZeros: boolean;\n } = { format12: false, leadingZeros: true };\n\n private dayScheduleTimer: NodeJS.Timeout | null = null; // schedule for astrological day\n private sunScheduleTimer: NodeJS.Timeout | null = null; // schedule for sun moment times\n private timeScheduleTimer: NodeJS.Timeout | null = null; // schedule for astrological day\n\n private activeStr = ''; // enabled state prefix\n\n private mirror: Mirror | undefined;\n\n private stopCounters: Record = {};\n\n private setStateCountCheckInterval: NodeJS.Timeout | null = null;\n\n /**\n * Decrypted AI API keys cached from the central credential store (manager mode),\n * keyed by credential ID (e.g. `system.credentials.anthropic`). Kept fresh by the\n * subscriptions set up in `subscribeAiCredentials`.\n */\n private readonly aiCredentialCache: Map = new Map();\n /** Unsubscribe callbacks for the AI credential subscriptions (manager mode). */\n private aiCredentialUnsubscribers: (() => Promise)[] = [];\n\n private globalScript = '';\n /** Generated declarations for global TypeScripts */\n private globalDeclarations = '';\n // Remember which definitions the global scripts\n // have access to, because it depends on the compilation order\n private knownGlobalDeclarationsByScript: Record = {};\n private globalScriptLines = 0;\n /** Running counter to build unique names for ad-hoc scripts started via the \"execute\" message */\n private executeCounter = 0;\n // compiler instance for typescript\n private tsServer: Server;\n\n private readonly ignoreObjectChange: Set = new Set();\n\n private debugState: DebugState = {\n scriptName: '',\n child: null,\n promiseOnEnd: null,\n paused: false,\n started: 0,\n running: false,\n };\n\n constructor(options: Partial = {}) {\n options = {\n ...options,\n name: 'javascript', // adapter name\n useFormatDate: true,\n /**\n * If the JS-Controller catches an unhandled error, this will be called,\n * so we have a chance to handle it ourselves.\n */\n error: (err: Error): boolean => {\n // Identify unhandled errors originating from callbacks in scripts\n // These are not caught by wrapping the execution code in try-catch\n if (err && typeof err.stack === 'string') {\n const scriptCodeMarkerIndex = err.stack.indexOf(SCRIPT_CODE_MARKER);\n if (scriptCodeMarkerIndex > -1) {\n // This is a script error\n let scriptName = err.stack.substring(scriptCodeMarkerIndex);\n scriptName = scriptName.substring(0, scriptName.indexOf(':'));\n this.logError(scriptName, 'Error:', err);\n\n // Leave the script running for now\n // signal to the JS-Controller that we handled the error ourselves\n return true;\n }\n // check if a path contains adaptername but not own node_module\n // this regex matched \"iobroker.javascript/\" if NOT followed by \"node_modules\"\n if (!err.stack.match(/iobroker\\.javascript[/\\\\](?!.*node_modules).*/g)) {\n // This is an error without any info on origin (mostly async errors like connection errors)\n // also consider it as being from a script\n this.log.error(\n 'An error happened which is most likely from one of your scripts, but the originating script could not be detected.',\n );\n this.log.error(`Error: ${err.message}`);\n this.log.error(err.stack);\n\n // signal to the JS-Controller that we handled the error ourselves\n return true;\n }\n }\n\n return false;\n },\n };\n\n super(options as AdapterOptions);\n\n this.on('objectChange', this.onObjectChange.bind(this));\n this.on('stateChange', this.onStateChange.bind(this));\n this.on('ready', this.onReady.bind(this));\n this.on('message', this.onMessage.bind(this));\n this.on('unload', this.onUnload.bind(this));\n this.on('fileChange', this.onFileChange.bind(this));\n this.on('log', this.onLog.bind(this));\n\n this.mods = {\n fs: {} as ProtectFs,\n 'fs/promises': {} as ProtectFs['promises'],\n dgram,\n crypto,\n dns,\n events,\n http,\n https,\n http2,\n net,\n os,\n path,\n util,\n child_process,\n stream,\n zlib,\n\n suncalc,\n axios,\n wake_on_lan,\n nodeSchedule,\n };\n\n // check the webstorm debug and just debug modes\n let debugMode: string | undefined;\n if (process.argv) {\n for (let a = 1; a < process.argv.length; a++) {\n if (process.argv[a].startsWith('--webstorm')) {\n webstormDebug = process.argv[a].replace(/^(.*?=\\s*)/, '');\n }\n if (process.argv[a] === '--debugScript') {\n if (!process.argv[a + 1]) {\n console.log('No script name provided');\n process.exit(300);\n } else {\n debugMode = process.argv[a + 1];\n }\n }\n }\n }\n\n this.context = {\n mods: this.mods,\n objects: this.objects,\n states: this.states,\n interimStateValues: this.interimStateValues,\n stateIds: this.stateIds,\n errorLogFunction: this.errorLogFunction,\n subscriptions: this.subscriptions,\n subscriptionsMap: this.subscriptionsMap,\n subscriptionsWildcard: this.subscriptionsWildcard,\n subscriptionsFile: this.subscriptionsFile,\n subscriptionsObject: this.subscriptionsObject,\n subscriptionsObjectMap: this.subscriptionsObjectMap,\n sendToInstanceCache: this.sendToInstanceCache,\n subscribedPatterns: this.subscribedPatterns,\n subscribedPatternsFile: this.subscribedPatternsFile,\n adapterSubs: this.adapterSubs,\n cacheObjectEnums: {},\n timers: this.timers,\n timersByScript: this.timersByScript,\n enums: this._enums,\n names: this.names,\n scripts: this.scripts,\n messageBusHandlers: this.messageBusHandlers,\n logSubscriptions: this.logSubscriptions,\n tempDirectories: this.tempDirectories,\n folderCreationVerifiedObjects: this.folderCreationVerifiedObjects,\n\n isEnums: false, // If some subscription wants enum\n channels: null,\n devices: null,\n logWithLineInfo: this.logWithLineInfo.bind(this),\n scheduler: null,\n timerId: 0,\n rulesOpened: null, // opened rules\n language: this.language || 'en',\n\n updateLogSubscriptions: this.updateLogSubscriptions.bind(this),\n convertBackStringifiedValues: this.convertBackStringifiedValues.bind(this),\n updateObjectContext: this.updateObjectContext.bind(this),\n prepareStateObject: this.prepareStateObject.bind(this),\n debugMode,\n getAbsoluteDefaultDataDir,\n adapter: this as unknown as ioBroker.Adapter,\n logError: this.logError.bind(this),\n allowSelfSignedCerts: false,\n };\n\n this.tsServer = new Server(tsCompilerOptions, this.tsLog);\n }\n\n async onObjectChange(id: string, obj?: ioBroker.Object | null): Promise {\n // Check if we should ignore this change (once!) because we just updated the compiled sources\n if (this.ignoreObjectChange.has(id)) {\n // Update the cached script object and do nothing more\n this.objects[id] = obj as ioBroker.Object;\n this.ignoreObjectChange.delete(id);\n return;\n }\n\n // When still in initializing: already remember current values,\n // but data structures are initialized elsewhere\n if (!this.objectsInitDone) {\n if (obj) {\n this.objects[id] = obj;\n }\n return;\n }\n\n if (id.startsWith('enum.')) {\n // clear cache\n this.context.cacheObjectEnums = {};\n\n // update this._enums Set\n if (obj) {\n this._enums.add(id);\n } else {\n this._enums.delete(id);\n }\n }\n\n // IO-9: Invalidate sendTo instance-cache when adapter instances change\n if (id.startsWith('system.adapter.')) {\n const parts = id.split('.');\n if (parts.length >= 3) {\n const adapterName = parts[2]; // e.g. \"zigbee\" from \"system.adapter.zigbee.0\"\n this.sendToInstanceCache.delete(adapterName);\n }\n }\n\n if (id === 'system.config' && obj?.common?.language) {\n // set language for debug messages\n setLanguage(obj.common.language);\n this.language = obj.common.language;\n this.context.language = this.language as ioBroker.Languages;\n }\n\n // update stored time format for variables.dayTime\n if (id === `${this.namespace}.variables.dayTime` && obj?.native) {\n this.timeSettings.format12 = obj.native.format12 || false;\n this.timeSettings.leadingZeros = obj.native.leadingZeros === undefined ? true : obj.native.leadingZeros;\n }\n\n // send changes to the disk mirror\n this.mirror?.onObjectChange(id, obj as ioBroker.ScriptObject | null);\n\n const formerObj = this.objects[id];\n\n this.updateObjectContext(id, obj); // Update all Meta object data\n\n // for the alias object changes on the state objects, we need to manually update the\n // state cache value, because the new value is only published on the next change\n if (obj?.type === 'state' && id.startsWith('alias.0.')) {\n // execute async for speed\n this.getForeignStateAsync(id)\n .then(state => {\n if (state) {\n this.states[id] = state;\n } else if (this.states[id] !== undefined) {\n delete this.states[id];\n }\n })\n .catch(() => {\n /* ignore */\n });\n }\n\n // O(1) dispatch via pattern map instead of O(n) forEach\n const objSubs = this.subscriptionsObjectMap.get(id);\n if (objSubs) {\n for (const sub of objSubs) {\n try {\n sub.callback(id, obj);\n } catch (err: any) {\n this.log.error(`Error in callback: ${err.toString()}`);\n }\n }\n }\n\n // handle Script object updates\n if (!obj && formerObj?.type === 'script') {\n // Object Deleted just now\n if (checkIsGlobal(formerObj)) {\n // it was a global Script, and it was enabled and is now deleted => restart adapter\n if (formerObj.common.enabled) {\n this.log.info(`Active global Script ${id} deleted. Restart instance.`);\n this.restart();\n }\n } else if (formerObj.common?.engine === `system.adapter.${this.namespace}`) {\n // It was a non-global Script and deleted => stop and remove it\n await this.stopScript(id);\n\n // delete scriptEnabled.blabla variable\n const idActive = `scriptEnabled.${id.substring(SCRIPT_CODE_MARKER.length)}`;\n await this.delStateAsync(idActive);\n await this.delObjectAsync(idActive);\n\n // delete scriptProblem.blabla variable\n const idProblem = `scriptProblem.${id.substring(SCRIPT_CODE_MARKER.length)}`;\n await this.delStateAsync(idProblem);\n await this.delObjectAsync(idProblem);\n }\n } else if (!formerObj && obj?.type === 'script') {\n // New script that does not exist before\n if (checkIsGlobal(obj)) {\n // new global script added => restart adapter\n if (obj.common.enabled) {\n this.log.info(`Active global Script ${id} created. Restart instance.`);\n this.restart();\n }\n } else if (obj.common?.engine === `system.adapter.${this.namespace}`) {\n // new non-global script - create states for scripts\n await this.createActiveObject(id, !!obj.common.enabled);\n await this.createProblemObject(id);\n if (obj.common.enabled) {\n // if enabled => Start a script\n await this.loadScriptById(id);\n }\n }\n } else if (obj?.type === 'script' && formerObj?.common) {\n // Script changed ...\n if (checkIsGlobal(obj)) {\n if (obj.common.enabled || formerObj.common.enabled) {\n this.log.info(`Global Script ${id} updated. Restart instance.`);\n this.restart();\n }\n } else {\n // No global script\n if (obj.common?.engine === `system.adapter.${this.namespace}`) {\n // create states for scripts\n await this.createActiveObject(id, !!obj.common.enabled);\n await this.createProblemObject(id);\n }\n\n if (\n (formerObj.common.enabled && !obj.common.enabled) ||\n (formerObj.common.engine === `system.adapter.${this.namespace}` &&\n obj.common.engine !== `system.adapter.${this.namespace}`)\n ) {\n // Script disabled\n if (formerObj.common.enabled && formerObj.common.engine === `system.adapter.${this.namespace}`) {\n // Remove it from executing\n await this.stopScript(id);\n }\n } else if (\n (!formerObj.common.enabled && obj.common.enabled) ||\n (formerObj.common.engine !== `system.adapter.${this.namespace}` &&\n obj.common.engine === `system.adapter.${this.namespace}`)\n ) {\n // Script enabled\n\n if (obj.common.enabled && obj.common.engine === `system.adapter.${this.namespace}`) {\n // Start script\n await this.loadScriptById(id);\n }\n } else if (\n obj.common.engine === `system.adapter.${this.namespace}` ||\n formerObj.common.engine === `system.adapter.${this.namespace}`\n ) {\n // Source changed => restart the script (only on the relevant instance)\n this.stopCounters[id] = this.stopCounters[id] ? this.stopCounters[id] + 1 : 1;\n void this.stopScript(id).then(() => {\n // only start again after stop when \"last\" object change to prevent problems on\n // multiple changes in fast frequency\n if (!--this.stopCounters[id]) {\n void this.loadScriptById(id);\n }\n });\n }\n }\n }\n }\n\n onStateChange(id: string, state?: ioBroker.State | null): void {\n if (this.interimStateValues[id] !== undefined) {\n // any update invalidates the remembered interim value\n delete this.interimStateValues[id];\n }\n if (!id || id.startsWith('messagebox.') || id.startsWith('log.')) {\n return;\n }\n\n if (id === `${this.namespace}.debug.to` && state && !state.ack) {\n if (!this.context.debugMode) {\n this.debugSendToInspector(state.val);\n }\n return;\n }\n\n // When still in initializing: already remember current values,\n // but data structures are initialized elsewhere\n if (!this.statesInitDone) {\n if (state) {\n this.states[id] = state;\n }\n return;\n }\n\n const oldState: ioBroker.State | null | undefined = this.states[id];\n if (state) {\n if (oldState) {\n // enable or disable script\n if (!state.ack && id.startsWith(this.activeStr) && this.objects[id]?.native?.script) {\n void this.extendForeignObject(this.objects[id].native.script, {\n common: { enabled: state.val },\n });\n }\n\n // monitor if the adapter is alive and send all subscriptions once more, after the adapter goes online\n if (/*oldState && */ oldState.val === false && state.val && id.endsWith('.alive')) {\n if (this.adapterSubs[id]) {\n const parts = id.split('.');\n const a = `${parts[2]}.${parts[3]}`;\n for (const sub of this.adapterSubs[id]) {\n this.log.info(`Detected coming adapter \"${a}\". Send subscribe: ${sub}`);\n this.sendTo(a, 'subscribe', sub);\n }\n }\n }\n } else if (/*!oldState && */ !this.stateIdSet.has(id)) {\n this.sortedInsert(id);\n this.stateIdSet.add(id);\n }\n this.states[id] = state;\n } else {\n if (oldState) {\n delete this.states[id];\n }\n state = {} as ioBroker.State;\n const pos = this.binaryIndexOf(this.stateIds, id);\n if (pos !== -1) {\n this.stateIds.splice(pos, 1);\n this.stateIdSet.delete(id);\n }\n }\n\n // Collect matching subscriptions:\n // 1. O(1) exact-id map lookup – only buckets for this specific state id\n // 2. Linear scan over wildcard/regex subscriptions (unavoidable)\n // EventObj is created lazily – only when at least one subscription must be dispatched.\n const exactSubs = this.subscriptionsMap.get(id);\n const wildcardSubs = this.subscriptionsWildcard;\n const hasWork = (exactSubs && exactSubs.length > 0) || wildcardSubs.length > 0;\n\n if (!hasWork) {\n return;\n }\n\n let _eventObj: EventObj | null = null;\n const getEvent = (): EventObj => {\n if (!_eventObj) {\n _eventObj = createEventObject(\n this.context,\n id,\n this.convertBackStringifiedValues(id, state),\n this.convertBackStringifiedValues(id, oldState),\n );\n }\n return _eventObj;\n };\n\n if (exactSubs) {\n for (let i = 0, l = exactSubs.length; i < l; i++) {\n const sub = exactSubs[i];\n if (sub?.patternCompareFunctions && patternMatching(getEvent(), sub.patternCompareFunctions)) {\n try {\n sub.callback(getEvent());\n } catch (err: any) {\n this.log.error(`Error in callback: ${err.toString()}`);\n }\n }\n }\n }\n\n // if this state matches any subscriptions\n for (let i = 0, l = wildcardSubs.length; i < l; i++) {\n const sub = wildcardSubs[i];\n if (sub?.patternCompareFunctions && patternMatching(getEvent(), sub.patternCompareFunctions)) {\n try {\n sub.callback(getEvent());\n } catch (err: any) {\n this.log.error(`Error in callback: ${err.toString()}`);\n }\n }\n }\n }\n\n onFileChange(id: string, fileName: string, size: number | null): void {\n // if this file matches any subscriptions\n for (let i = 0, l = this.subscriptionsFile.length; i < l; i++) {\n const sub = this.subscriptionsFile[i];\n if (sub && fileMatching(sub, id, fileName)) {\n try {\n sub.callback(id, fileName, size, sub.withFile);\n } catch (err: any) {\n this.log.error(`Error in callback: ${err.toString()}`);\n }\n }\n }\n }\n\n async onUnload(callback: () => void): Promise {\n try {\n await this.debugStop();\n this.stopTimeSchedules();\n if (this.setStateCountCheckInterval) {\n clearInterval(this.setStateCountCheckInterval);\n this.setStateCountCheckInterval = null;\n }\n await this.unsubscribeAiCredentials();\n await this.stopAllScripts();\n } catch (err: unknown) {\n this.log.error(`Error during unload: ${(err as Error).message}`);\n } finally {\n if (typeof callback === 'function') {\n callback();\n }\n }\n }\n\n async onReady(): Promise {\n this.errorLogFunction = this.log;\n this.context.errorLogFunction = this.log;\n this.config.maxSetStatePerMinute = parseInt(this.config.maxSetStatePerMinute as unknown as string, 10) || 1000;\n this.config.maxTriggersPerScript = parseInt(this.config.maxTriggersPerScript as unknown as string, 10) || 100;\n\n if (this.supportsFeature?.('PLUGINS')) {\n const sentryInstance: InstanceType = this.getPluginInstance('sentry') as InstanceType<\n typeof SentryPlugin\n >;\n if (sentryInstance) {\n const Sentry = sentryInstance.getSentryObject();\n Sentry?.withScope(scope => {\n scope.addEventProcessor((event, _hint) => {\n if (event.exception?.values?.[0]) {\n const eventData = event.exception.values[0];\n if (\n eventData.stacktrace?.frames &&\n Array.isArray(eventData.stacktrace.frames) &&\n eventData.stacktrace.frames.length\n ) {\n // Exclude event if script Marker is included\n if (\n eventData.stacktrace.frames.find(frame =>\n frame.filename?.includes(SCRIPT_CODE_MARKER),\n )\n ) {\n return null;\n }\n // Exclude event if own directory is included but not inside own node_modules\n const ownNodeModulesDir = join(__dirname, 'node_modules');\n if (\n !eventData.stacktrace.frames.find(\n frame =>\n frame.filename?.includes(__dirname) &&\n !frame.filename.includes(ownNodeModulesDir),\n )\n ) {\n return null;\n }\n // We have exception data and did not sort it out, so report it\n return event;\n }\n }\n\n // No exception in it ... do not report\n return null;\n });\n });\n }\n }\n\n await this.main();\n }\n\n /** Read and decrypt a single AI credential's key from the central store; returns '' (and logs) on error. */\n private async readAiCredentialKey(id: string): Promise {\n try {\n const cred = await Credentials.getCredentials(this, id);\n return (cred?.values?.key || '').trim();\n } catch (e) {\n this.log.warn(`Cannot read AI credential \"${id}\": ${e instanceof Error ? e.message : String(e)}`);\n return '';\n }\n }\n\n /**\n * Resolve the API key (and base URL) for an AI provider.\n *\n * In `manual` mode the key comes from the encryptedNative adapter config.\n * In `manager` mode the config only stores the ID of a credential in the central\n * ioBroker credential store (`system.credentials.*`); the actual key is taken from the\n * `aiCredentialCache` (kept fresh by `subscribeAiCredentials`) or, for credentials we are\n * not subscribed to (e.g. a not-yet-saved selection in the settings dialog), read directly.\n *\n * The settings-dialog Test button may pass form values that are not saved yet\n * (`messageApiKey` / `messageCredentialId` / `credentialType`); those win over the stored config.\n */\n private async resolveAiCredentials(\n provider: string,\n opts: {\n messageBaseUrl?: string;\n messageApiKey?: string;\n messageCredentialId?: string;\n credentialType?: 'manual' | 'manager';\n } = {},\n ): Promise<{ apiKey: string; baseUrl: string }> {\n const mode = opts.credentialType || this.config.credentialType || 'manual';\n if (mode === 'manager') {\n // The base URL is not a secret and is resolved the same way in both modes.\n const { baseUrl } = resolveProviderCredentials(this.config, provider, opts.messageBaseUrl);\n const id = (opts.messageCredentialId || getProviderCredentialId(this.config, provider)).trim();\n if (!id) {\n return { apiKey: '', baseUrl };\n }\n // Prefer the cached value kept fresh by the credential subscription.\n const cached = this.aiCredentialCache.get(id);\n const apiKey = cached !== undefined ? cached : await this.readAiCredentialKey(id);\n return { apiKey, baseUrl };\n }\n // Manual mode. The Test button sends the current form key (maybe empty) — let it win.\n if (opts.messageApiKey !== undefined) {\n return resolveTestCredentials(this.config, provider, opts.messageApiKey, opts.messageBaseUrl);\n }\n return resolveProviderCredentials(this.config, provider, opts.messageBaseUrl);\n }\n\n /**\n * In `manager` mode, subscribe to all configured AI credentials so that edits made in the\n * admin credential manager (Settings → Credentials) are picked up live, without restarting\n * the adapter (the `system.credentials.*` objects are global, not part of the instance config).\n * The decrypted keys are cached and kept fresh by the subscription handlers.\n */\n private async subscribeAiCredentials(): Promise {\n // Always start from a clean state (idempotent — also used to re-subscribe).\n await this.unsubscribeAiCredentials();\n if (this.config.credentialType !== 'manager') {\n return;\n }\n // Collect the distinct credential IDs configured across all AI providers.\n const ids = new Set();\n for (const provider of ['openai', 'anthropic', 'gemini', 'deepseek', 'custom'] as const) {\n const id = getProviderCredentialId(this.config, provider);\n if (id) {\n ids.add(id);\n }\n }\n for (const id of ids) {\n try {\n const unsubscribe = await Credentials.subscribeCredentials(\n this,\n id,\n (changedId, cred) => {\n if (cred) {\n this.aiCredentialCache.set(changedId, (cred.values?.key || '').trim());\n this.log.debug(`AI credential \"${changedId}\" updated`);\n } else {\n // The credential was deleted\n this.aiCredentialCache.delete(changedId);\n this.log.debug(`AI credential \"${changedId}\" was deleted`);\n }\n },\n );\n this.aiCredentialUnsubscribers.push(unsubscribe);\n // Prime the cache with the current value (the handler may only fire on later changes).\n this.aiCredentialCache.set(id, await this.readAiCredentialKey(id));\n } catch (e) {\n this.log.warn(\n `Cannot subscribe to AI credential \"${id}\": ${e instanceof Error ? e.message : String(e)}`,\n );\n }\n }\n if (this.aiCredentialUnsubscribers.length) {\n this.log.debug(`Subscribed to ${this.aiCredentialUnsubscribers.length} AI credential(s)`);\n }\n }\n\n /** Tear down all AI credential subscriptions and clear the cache. */\n private async unsubscribeAiCredentials(): Promise {\n const unsubscribers = this.aiCredentialUnsubscribers;\n this.aiCredentialUnsubscribers = [];\n this.aiCredentialCache.clear();\n for (const unsubscribe of unsubscribers) {\n try {\n await unsubscribe();\n } catch (e) {\n this.log.warn(`Cannot unsubscribe from AI credential: ${e instanceof Error ? e.message : String(e)}`);\n }\n }\n }\n\n onMessage(obj: ioBroker.Message): void {\n switch (obj?.command) {\n // process messageTo commands\n case 'toScript':\n case 'jsMessageBus':\n if (\n obj.message &&\n (obj.message.instance === null ||\n obj.message.instance === undefined ||\n `javascript.${obj.message.instance}` === this.namespace ||\n obj.message.instance === this.namespace)\n ) {\n Object.keys(this.messageBusHandlers).forEach(name => {\n // the script name could be script.js.xxx or only xxx\n if (\n (!obj.message.script || obj.message.script === name) &&\n this.messageBusHandlers[name][obj.message.message]\n ) {\n this.messageBusHandlers[name][obj.message.message].forEach(handler => {\n const sandbox = handler.sandbox;\n\n sandbox.verbose && sandbox.log(`onMessage: ${JSON.stringify(obj.message)}`, 'info');\n\n try {\n if (obj.callback) {\n handler.cb.call(sandbox, obj.message.data, (result: any) => {\n if (sandbox.verbose) {\n sandbox.log(`onMessage result: ${JSON.stringify(result)}`, 'info');\n }\n\n this.sendTo(obj.from, obj.command, result, obj.callback);\n });\n } else {\n handler.cb.call(sandbox, obj.message.data, (result: any) => {\n sandbox.verbose &&\n sandbox.log(`onMessage result: ${JSON.stringify(result)}`, 'info');\n });\n }\n } catch (err: unknown) {\n void this.setState(\n `scriptProblem.${name.substring(SCRIPT_CODE_MARKER.length)}`,\n true,\n true,\n );\n this.logError(name, 'Error in callback:', err as Error);\n }\n });\n }\n });\n }\n break;\n\n case 'loadTypings': {\n // Load typings for the editor\n const typings: Record = {};\n\n // try to load TypeScript lib files from disk\n try {\n const typescriptLibs = resolveTypescriptLibs(targetTsLib);\n Object.assign(typings, typescriptLibs);\n } catch {\n /* ok, no lib then */\n }\n\n // provide the already-loaded ioBroker typings and global script declarations\n Object.assign(typings, tsAmbient);\n\n // also provide the known global declarations for each global script\n for (const globalScriptPaths of Object.keys(this.knownGlobalDeclarationsByScript)) {\n typings[`${globalScriptPaths}.d.ts`] = this.knownGlobalDeclarationsByScript[globalScriptPaths];\n }\n\n if (obj.callback) {\n this.sendTo(obj.from, obj.command, { typings }, obj.callback);\n }\n break;\n }\n\n case 'calcAstroAll': {\n if (obj.message) {\n const sunriseOffset =\n parseInt(\n obj.message.sunriseOffset === undefined\n ? this.config.sunriseOffset\n : obj.message.sunriseOffset,\n 10,\n ) || 0;\n const sunsetOffset =\n parseInt(\n obj.message.sunsetOffset === undefined\n ? this.config.sunsetOffset\n : obj.message.sunsetOffset,\n 10,\n ) || 0;\n const longitude =\n parseFloat(\n obj.message.longitude === undefined ? this.config.longitude : obj.message.longitude,\n ) || 0;\n const latitude =\n parseFloat(obj.message.latitude === undefined ? this.config.latitude : obj.message.latitude) ||\n 0;\n const today = getAstroStartOfDay();\n let astroEvents: GetTimesResult & { nextSunrise: Date; nextSunset: Date } = {} as GetTimesResult & {\n nextSunrise: Date;\n nextSunset: Date;\n };\n try {\n astroEvents = this.mods.suncalc.getTimes(today, latitude, longitude);\n } catch (err: unknown) {\n this.log.error(`Cannot calculate astro data: ${err as Error}`);\n }\n if (astroEvents) {\n try {\n astroEvents.nextSunrise = this.getAstroEvent(\n today,\n obj.message.sunriseEvent || this.config.sunriseEvent,\n obj.message.sunriseLimitStart || this.config.sunriseLimitStart,\n obj.message.sunriseLimitEnd || this.config.sunriseLimitEnd,\n sunriseOffset,\n false,\n latitude,\n longitude,\n true,\n );\n astroEvents.nextSunset = this.getAstroEvent(\n today,\n obj.message.sunsetEvent || this.config.sunsetEvent,\n obj.message.sunsetLimitStart || this.config.sunsetLimitStart,\n obj.message.sunsetLimitEnd || this.config.sunsetLimitEnd,\n sunsetOffset,\n true,\n latitude,\n longitude,\n true,\n );\n } catch (err: unknown) {\n this.log.error(`Cannot calculate astro data: ${err as Error}`);\n }\n }\n\n const result: Record = {};\n const keys = Object.keys(astroEvents).sort(\n (a, b) =>\n (astroEvents as unknown as Record)[a] -\n (astroEvents as unknown as Record)[b],\n );\n keys.forEach(key => {\n const validDate =\n (astroEvents as unknown as Record)[key] !== null &&\n !isNaN((astroEvents as unknown as Record)[key].getTime());\n\n result[key] = {\n isValidDate: validDate,\n serverTime: validDate\n ? formatHoursMinutesSeconds((astroEvents as unknown as Record)[key])\n : 'n/a',\n date: validDate\n ? (astroEvents as unknown as Record)[key].toISOString()\n : 'n/a',\n };\n });\n\n if (obj.callback) {\n this.sendTo(obj.from, obj.command, result, obj.callback);\n }\n }\n break;\n }\n\n case 'calcAstro': {\n if (obj.message) {\n const longitude =\n parseFloat(\n obj.message.longitude === undefined ? this.config.longitude : obj.message.longitude,\n ) || 0;\n const latitude =\n parseFloat(obj.message.latitude === undefined ? this.config.latitude : obj.message.latitude) ||\n 0;\n const today = getAstroStartOfDay();\n\n const sunriseEvent = obj.message?.sunriseEvent || this.config.sunriseEvent;\n const sunriseLimitStart = obj.message?.sunriseLimitStart || this.config.sunriseLimitStart;\n const sunriseLimitEnd = obj.message?.sunriseLimitEnd || this.config.sunriseLimitEnd;\n const sunriseOffset =\n parseInt(\n obj.message.sunriseOffset === undefined\n ? this.config.sunriseOffset\n : obj.message.sunriseOffset,\n 10,\n ) || 0;\n const nextSunrise = this.getAstroEvent(\n today,\n sunriseEvent,\n sunriseLimitStart,\n sunriseLimitEnd,\n sunriseOffset,\n false,\n latitude,\n longitude,\n true,\n );\n\n const sunsetEvent = obj.message?.sunsetEvent || this.config.sunsetEvent;\n const sunsetLimitStart = obj.message?.sunsetLimitStart || this.config.sunsetLimitStart;\n const sunsetLimitEnd = obj.message?.sunsetLimitEnd || this.config.sunsetLimitEnd;\n const sunsetOffset =\n parseInt(\n obj.message.sunsetOffset === undefined\n ? this.config.sunsetOffset\n : obj.message.sunsetOffset,\n 10,\n ) || 0;\n const nextSunset = this.getAstroEvent(\n today,\n sunsetEvent,\n sunsetLimitStart,\n sunsetLimitEnd,\n sunsetOffset,\n true,\n latitude,\n longitude,\n true,\n );\n\n const validDateSunrise = nextSunrise !== null && !isNaN(nextSunrise.getTime());\n const validDateSunset = nextSunset !== null && !isNaN(nextSunset.getTime());\n\n this.log.debug(\n `calcAstro sunrise: ${sunriseEvent} -> start ${sunriseLimitStart}, end: ${sunriseLimitEnd}, offset: ${sunriseOffset} - ${validDateSunrise ? nextSunrise.toISOString() : 'n/a'}`,\n );\n this.log.debug(\n `calcAstro sunset: ${sunsetEvent} -> start ${sunsetLimitStart}, end: ${sunsetLimitEnd}, offset: ${sunsetOffset} - ${validDateSunset ? nextSunset.toISOString() : 'n/a'}`,\n );\n\n if (obj.callback) {\n this.sendTo(\n obj.from,\n obj.command,\n {\n nextSunrise: {\n isValidDate: validDateSunrise,\n serverTime: validDateSunrise ? formatHoursMinutesSeconds(nextSunrise) : 'n/a',\n date: nextSunrise.toISOString(),\n },\n nextSunset: {\n isValidDate: validDateSunset,\n serverTime: validDateSunset ? formatHoursMinutesSeconds(nextSunset) : 'n/a',\n date: nextSunset.toISOString(),\n },\n },\n obj.callback,\n );\n }\n }\n break;\n }\n\n case 'debug': {\n if (!this.context.debugMode) {\n this.debugStart(obj.message);\n }\n break;\n }\n\n case 'debugStop': {\n if (!this.context.debugMode) {\n void this.debugStop().then(() => console.log('stopped'));\n }\n break;\n }\n\n case 'rulesOn': {\n this.context.rulesOpened = obj.message;\n console.log(`Enable messaging for ${this.context.rulesOpened}`);\n break;\n }\n\n case 'rulesOff': {\n // maybe if (context.rulesOpened === obj.message)\n console.log(`Disable messaging for ${this.context.rulesOpened}`);\n this.context.rulesOpened = null;\n break;\n }\n\n case 'getIoBrokerDataDir': {\n if (obj.callback) {\n this.sendTo(\n obj.from,\n obj.command,\n {\n dataDir: getAbsoluteDefaultDataDir(),\n sep,\n },\n obj.callback,\n );\n }\n break;\n }\n\n case 'chatCompletion': {\n // Proxy chat completion requests to an OpenAI-compatible API endpoint.\n // API keys are resolved server-side from the encryptedNative config or the central\n // credentials manager — they never leave the adapter (frontend only sends `provider`).\n void (async () => {\n if (!obj.callback) {\n return;\n }\n const chatModel = (obj.message?.model || '').trim();\n const messages = obj.message?.messages;\n const tools = obj.message?.tools;\n const provider = (obj.message?.provider || 'openai').trim();\n const { apiKey, baseUrl } = await this.resolveAiCredentials(provider, {\n messageBaseUrl: obj.message?.baseUrl,\n });\n // Anthropic, Gemini, and DeepSeek always require an API key; OpenAI-compatible allows empty key with custom base URL\n if (\n !apiKey &&\n (provider === 'anthropic' || provider === 'gemini' || provider === 'deepseek' || !baseUrl)\n ) {\n this.sendTo(obj.from, obj.command, { error: 'No API key provided' }, obj.callback);\n return;\n }\n if (!chatModel || !messages) {\n this.sendTo(obj.from, obj.command, { error: 'Model and messages are required' }, obj.callback);\n return;\n }\n\n let url: string;\n const chatHeaders: Record = {\n 'Content-Type': 'application/json',\n };\n let bodyObj: Record;\n\n if (provider === 'anthropic') {\n url = 'https://api.anthropic.com/v1/messages';\n chatHeaders['x-api-key'] = apiKey;\n chatHeaders['anthropic-version'] = '2023-06-01';\n // Translate OpenAI-format messages/tools into Anthropic's content-block format.\n const { system: systemText, messages: anthropicMessages } =\n translateMessagesToAnthropic(messages);\n const anthropicTools = tools?.length ? translateToolsToAnthropic(tools) : [];\n bodyObj = {\n model: chatModel,\n max_tokens: 8192,\n stream: false,\n ...(systemText ? { system: systemText } : {}),\n messages: anthropicMessages,\n ...(anthropicTools.length ? { tools: anthropicTools } : {}),\n };\n } else if (provider === 'gemini') {\n url = 'https://generativelanguage.googleapis.com/v1beta/openai/chat/completions';\n if (apiKey) {\n chatHeaders.Authorization = `Bearer ${apiKey}`;\n }\n bodyObj = { model: chatModel, messages, stream: false, ...(tools?.length ? { tools } : {}) };\n } else if (provider === 'deepseek') {\n url = 'https://api.deepseek.com/chat/completions';\n chatHeaders.Authorization = `Bearer ${apiKey}`;\n bodyObj = { model: chatModel, messages, stream: false, ...(tools?.length ? { tools } : {}) };\n } else {\n url = `${baseUrl || 'https://api.openai.com/v1'}/chat/completions`;\n if (apiKey) {\n chatHeaders.Authorization = `Bearer ${apiKey}`;\n }\n bodyObj = {\n model: chatModel,\n messages,\n stream: false,\n ...(tools?.length ? { tools } : {}),\n // Disable thinking/reasoning for local models to save context and speed\n ...(baseUrl ? { reasoning_effort: 'none' } : {}),\n };\n }\n\n const body = JSON.stringify(bodyObj);\n const bodyBuffer = Buffer.from(body, 'utf8');\n chatHeaders['Content-Length'] = bodyBuffer.length;\n\n const resolved = resolveRequestModule(url);\n if (!resolved) {\n this.sendTo(obj.from, obj.command, { error: `Invalid API URL: ${url}` }, obj.callback);\n return;\n }\n const { module: requestModule, isHttps } = resolved;\n\n try {\n const req = requestModule.request(\n url,\n {\n method: 'POST',\n headers: chatHeaders,\n timeout: 600000,\n ...(isHttps && this.config.allowSelfSignedCerts ? { rejectUnauthorized: false } : {}),\n },\n res => {\n let data = '';\n res.on('data', (chunk: Buffer) => {\n data += chunk.toString();\n });\n res.on('end', () => {\n if (res.statusCode === 200) {\n try {\n const parsed = JSON.parse(data);\n let content: string;\n let tool_calls: unknown;\n if (provider === 'anthropic') {\n const translated = translateAnthropicResponseToOpenAI(parsed);\n content = translated.content;\n tool_calls = translated.tool_calls;\n } else {\n const message = parsed.choices?.[0]?.message;\n content = message?.content || '';\n tool_calls = message?.tool_calls;\n }\n if (!content && !(tool_calls as unknown[] | undefined)?.length) {\n this.sendTo(\n obj.from,\n obj.command,\n { error: 'Empty response from API' },\n obj.callback,\n );\n } else {\n this.sendTo(\n obj.from,\n obj.command,\n {\n success: true,\n content,\n ...(tool_calls ? { tool_calls } : {}),\n },\n obj.callback,\n );\n }\n } catch {\n this.sendTo(\n obj.from,\n obj.command,\n { error: 'Invalid JSON response from API' },\n obj.callback,\n );\n }\n } else {\n let detail = '';\n try {\n const errParsed = JSON.parse(data);\n detail = errParsed.error?.message || data.substring(0, 200);\n } catch {\n detail = data.substring(0, 200);\n }\n this.sendTo(\n obj.from,\n obj.command,\n {\n error: `${detail || httpStatusText(res.statusCode || 0)} (${res.statusCode})`,\n },\n obj.callback,\n );\n }\n });\n },\n );\n\n req.on('error', (err: Error) => {\n this.sendTo(\n obj.from,\n obj.command,\n { error: `Connection failed: ${err.message}` },\n obj.callback,\n );\n });\n\n req.on('timeout', () => {\n req.destroy();\n this.sendTo(obj.from, obj.command, { error: 'Connection timeout (600s)' }, obj.callback);\n });\n\n req.write(bodyBuffer);\n req.end();\n } catch (error) {\n this.sendTo(\n obj.from,\n obj.command,\n { error: `Connection failed: ${(error as Error).toString()}` },\n obj.callback,\n );\n }\n })();\n break;\n }\n\n case 'testApiConnection': {\n // Test connection to an OpenAI-compatible API endpoint.\n // The settings-dialog Test button sends the current form value as `apiKey`\n // (so users can test before saving); otherwise we fall back to the stored key.\n void (async () => {\n if (!obj.callback) {\n return;\n }\n const provider = (obj.message?.provider || 'openai').trim();\n const { apiKey, baseUrl } = await this.resolveAiCredentials(provider, {\n messageApiKey: obj.message?.apiKey,\n messageBaseUrl: obj.message?.baseUrl,\n messageCredentialId: obj.message?.credentialId,\n credentialType: obj.message?.credentialType,\n });\n // Anthropic, Gemini, and DeepSeek always require an API key; OpenAI-compatible allows empty key with custom base URL\n if (\n !apiKey &&\n (provider === 'anthropic' || provider === 'gemini' || provider === 'deepseek' || !baseUrl)\n ) {\n this.sendTo(obj.from, obj.command, { error: 'No API key provided' }, obj.callback);\n return;\n }\n\n let url: string;\n const testHeaders: Record = {\n 'Content-Type': 'application/json',\n };\n\n if (provider === 'anthropic') {\n url = 'https://api.anthropic.com/v1/models';\n testHeaders['x-api-key'] = apiKey;\n testHeaders['anthropic-version'] = '2023-06-01';\n } else if (provider === 'gemini') {\n url = 'https://generativelanguage.googleapis.com/v1beta/openai/models';\n if (apiKey) {\n testHeaders.Authorization = `Bearer ${apiKey}`;\n }\n } else if (provider === 'deepseek') {\n url = 'https://api.deepseek.com/models';\n testHeaders.Authorization = `Bearer ${apiKey}`;\n } else {\n url = `${baseUrl || 'https://api.openai.com/v1'}/models`;\n if (apiKey) {\n testHeaders.Authorization = `Bearer ${apiKey}`;\n }\n }\n\n const resolved = resolveRequestModule(url);\n if (!resolved) {\n this.sendTo(obj.from, obj.command, { error: `Invalid API URL: ${url}` }, obj.callback);\n return;\n }\n const { module: requestModule, isHttps } = resolved;\n\n try {\n const req = requestModule.request(\n url,\n {\n method: 'GET',\n headers: testHeaders,\n timeout: 10000,\n ...(isHttps && this.config.allowSelfSignedCerts ? { rejectUnauthorized: false } : {}),\n },\n res => {\n let data = '';\n res.on('data', (chunk: Buffer) => {\n data += chunk.toString();\n });\n res.on('end', () => {\n if (res.statusCode === 200) {\n try {\n const parsed = JSON.parse(data);\n const models: string[] = (parsed.data || [])\n .map((m: { id: string }) =>\n m.id.startsWith('models/') ? m.id.substring(7) : m.id,\n )\n .sort();\n this.sendTo(\n obj.from,\n obj.command,\n { success: true, models, count: models.length },\n obj.callback,\n );\n } catch {\n this.sendTo(\n obj.from,\n obj.command,\n { error: 'Invalid JSON response from API' },\n obj.callback,\n );\n }\n } else if (res.statusCode === 401) {\n this.sendTo(\n obj.from,\n obj.command,\n { error: 'Invalid API key (401)' },\n obj.callback,\n );\n } else if (res.statusCode === 403) {\n this.sendTo(\n obj.from,\n obj.command,\n { error: 'Access denied (403)' },\n obj.callback,\n );\n } else {\n // Include response body for debugging\n let detail = '';\n try {\n const errParsed = JSON.parse(data);\n detail = errParsed.error?.message || data.substring(0, 200);\n } catch {\n detail = data.substring(0, 200);\n }\n this.sendTo(\n obj.from,\n obj.command,\n {\n error: `${detail || httpStatusText(res.statusCode || 0)} (${res.statusCode})`,\n },\n obj.callback,\n );\n }\n });\n },\n );\n\n req.on('error', (err: Error) => {\n this.sendTo(\n obj.from,\n obj.command,\n { error: `Connection failed: ${err.message}` },\n obj.callback,\n );\n });\n\n req.on('timeout', () => {\n req.destroy();\n this.sendTo(obj.from, obj.command, { error: 'Connection timeout (10s)' }, obj.callback);\n });\n\n req.end();\n } catch (error) {\n this.sendTo(\n obj.from,\n obj.command,\n { error: `Connection failed: ${(error as Error).toString()}` },\n obj.callback,\n );\n }\n })();\n break;\n }\n\n case 'getAvailableAiProviders': {\n // Reports which AI providers have stored credentials (keys never leave the backend).\n if (obj.callback) {\n const providers = listAvailableProviders(this.config);\n this.sendTo(obj.from, obj.command, { providers }, obj.callback);\n }\n break;\n }\n\n case 'prettier': {\n // Format the code with Prettier\n if (obj.message && typeof obj.message.code === 'string') {\n try {\n prettier\n .format(obj.message.code, {\n parser: obj.message.type === 'typescript' ? 'babel-ts' : 'babel',\n printWidth: 120,\n semi: true,\n tabWidth: 4,\n useTabs: false,\n trailingComma: 'all',\n singleQuote: true,\n singleAttributePerLine: true,\n endOfLine: 'lf',\n bracketSpacing: true,\n arrowParens: 'avoid',\n quoteProps: 'as-needed',\n })\n .then(formattedCode => {\n if (obj.callback) {\n this.sendTo(obj.from, obj.command, { code: formattedCode }, obj.callback);\n } else {\n this.logWithLineInfo(`Formatted code:\\n${formattedCode}`);\n }\n })\n .catch(e => {\n this.logError('Prettier', 'Error formatting code:', e as Error);\n this.sendTo(obj.from, obj.command, { error: (e as Error).toString() }, obj.callback);\n });\n } catch (e) {\n this.logError('Prettier', 'Error formatting code:', e as Error);\n this.sendTo(obj.from, obj.command, { error: (e as Error).toString() }, obj.callback);\n }\n } else {\n this.sendTo(obj.from, obj.command, { error: 'No code provided' }, obj.callback);\n }\n break;\n }\n\n case 'execute': {\n if (obj.callback) {\n void this.executeScript(obj.message)\n .then(result => this.sendTo(obj.from, obj.command, result, obj.callback))\n .catch(err =>\n this.sendTo(\n obj.from,\n obj.command,\n {\n ok: false,\n error: `Internal error: ${err as Error}`,\n logs: [],\n output: '',\n },\n obj.callback,\n ),\n );\n }\n break;\n }\n }\n }\n\n onLog(msg: any): void {\n for (const name of Object.keys(this.logSubscriptions)) {\n for (const handler of this.logSubscriptions[name]) {\n if (\n typeof handler.cb === 'function' &&\n (handler.severity === '*' || handler.severity === msg.severity)\n ) {\n handler.sandbox.logHandler = handler.severity || '*';\n handler.cb.call(handler.sandbox, msg);\n handler.sandbox.logHandler = undefined;\n }\n }\n }\n }\n\n logError(scriptName: string, msg: string, e: Error, offs?: number): void {\n const stack = e.stack ? e.stack.toString().split('\\n') : e ? e.toString() : '';\n if (!msg.includes('\\n')) {\n msg = msg.replace(/[: ]*$/, ': ');\n }\n if (!msg.endsWith(' ')) {\n msg += ':';\n }\n if (!scriptName.startsWith(SCRIPT_CODE_MARKER)) {\n scriptName = SCRIPT_CODE_MARKER + scriptName;\n }\n\n this.errorLogFunction.error(`${scriptName}: ${msg}${this.fixLineNo(stack[0])}`);\n for (let i = offs || 1; i < stack.length; i++) {\n if (!stack[i]) {\n continue;\n }\n if (stack[i].match(/runInNewContext|javascript\\.js:/)) {\n break;\n }\n this.errorLogFunction.error(`${scriptName}: ${this.fixLineNo(stack[i])}`);\n }\n }\n\n logWithLineInfo(msg: string): void {\n this.errorLogFunction.warn(msg);\n\n // get current error stack\n const stack = new Error().stack?.split('\\n');\n\n if (stack) {\n for (let i = 3; i < stack.length; i++) {\n if (!stack[i]) {\n continue;\n }\n if (stack[i].match(/runInContext|runInNewContext|javascript\\.js:/)) {\n break;\n }\n this.errorLogFunction.warn(this.fixLineNo(stack[i]));\n }\n }\n }\n\n async main(): Promise {\n // Patch the font as it sometimes is wrong\n if (!this.context.debugMode) {\n if (await this.patchFont()) {\n this.log.debug('Font patched');\n }\n }\n\n this.log.debug(`config.subscribe (Do not subscribe all states on start): ${this.config.subscribe}`);\n\n // correct jsonConfig for admin\n const instObj: ioBroker.InstanceObject | null | undefined = await this.getForeignObjectAsync(\n `system.adapter.${this.namespace}`,\n );\n if (instObj?.common) {\n if (instObj.common.adminUI?.config !== 'json') {\n if (instObj.common.adminUI) {\n instObj.common.adminUI.config = 'json';\n } else {\n instObj.common.adminUI = { config: 'json' };\n }\n void this.setForeignObject(instObj._id, instObj);\n }\n }\n\n if (webstormDebug) {\n this.errorLogFunction = {\n error: console.error,\n warn: console.warn,\n info: console.info,\n debug: console.log,\n silly: console.log,\n };\n this.context.errorLogFunction = this.errorLogFunction;\n }\n this.activeStr = `${this.namespace}.scriptEnabled.`;\n\n this.mods.fs = new ProtectFs(this.log, getAbsoluteDefaultDataDir());\n this.mods['fs/promises'] = this.mods.fs.promises; // to avoid require('fs/promises');\n\n // try to read TS declarations\n try {\n tsAmbient = {\n 'javascript.d.ts': readFileSync(this.mods.path.join(__dirname, 'lib/javascript.d.ts'), 'utf8'),\n };\n this.tsServer.provideAmbientDeclarations(tsAmbient);\n jsDeclarationServer.provideAmbientDeclarations(tsAmbient);\n } catch (err: unknown) {\n this.log.warn(`Could not read TypeScript ambient declarations: ${err as Error}`);\n // This should not happen, so send an error report to Sentry\n if (this.supportsFeature && this.supportsFeature('PLUGINS')) {\n const sentryInstance = this.getPluginInstance('sentry');\n if (sentryInstance) {\n const sentryObject = sentryInstance.getSentryObject();\n sentryObject?.captureException(err as Error);\n }\n }\n // Keep the adapter from crashing when the included typings cannot be read\n tsAmbient = {};\n }\n\n await this.installLibraries();\n // Load the TS declarations for Node.js and all 3rd party modules\n this.loadTypeScriptDeclarations();\n\n await this.getData();\n this.context.scheduler = new Scheduler(\n this.log,\n Date,\n this.mods.suncalc,\n this.config.latitude,\n this.config.longitude,\n );\n await this.dayTimeSchedules();\n await this.sunTimeSchedules();\n await this.timeSchedule();\n\n // Store allowSelfSignedCerts on the context, so sandbox HTTP functions can use it\n // without setting the global process.env.NODE_TLS_REJECT_UNAUTHORIZED (which affects all adapters in compact mode)\n this.context.allowSelfSignedCerts = this.config.allowSelfSignedCerts;\n\n // In `manager` credential mode, subscribe to the configured AI credentials so changes in the\n // central credential store are picked up live (the keys are cached for the AI sendTo handlers).\n await this.subscribeAiCredentials();\n\n const doc = await this.getObjectViewAsync('script', 'javascript', {});\n if (doc?.rows?.length) {\n // sort global scripts if configured\n if (this.config.sortGlobalScriptsAlphabetically) {\n doc.rows.sort((a, b) => a.value._id.localeCompare(b.value._id));\n }\n // assemble global script\n for (let g = 0; g < doc.rows.length; g++) {\n const obj = doc.rows[g].value;\n if (checkIsGlobal(obj)) {\n if (obj && obj.common) {\n const engineType = (obj.common.engineType || '').toLowerCase();\n\n if (obj.common.enabled) {\n if (engineType.startsWith('typescript')) {\n // TypeScript\n this.log.info(`${obj._id}: compiling TypeScript source...`);\n // In order to compile global TypeScript, we need to do some transformations\n // 1. For top-level-await, some statements must be wrapped in an immediately-invoked async function\n // 2. If any global script uses `import`, the declarations are no longer visible if they are not exported with `declare global`\n const transformedSource = transformScriptBeforeCompilation(obj.common.source, true);\n // The source code must be transformed in order to support top level await\n // Global scripts must not be treated as a module, otherwise their methods\n // cannot be found by the normal scripts\n // We need to hash both global declarations that are known until now\n // AND the script source, because changing either can change the compilation output\n const sourceHash: string = hashSource(\n tsSourceHashBase + this.globalDeclarations + transformedSource,\n );\n\n let compiled: string | undefined;\n let declarations: string | undefined;\n // If we already stored the compiled source code and the original source hash,\n // use the hash to check whether we can rely on the compiled source code or\n // if we need to compile it again\n if (\n typeof obj.common.compiled === 'string' &&\n typeof obj.common.sourceHash === 'string' &&\n sourceHash === obj.common.sourceHash\n ) {\n // We can reuse the stored source\n compiled = obj.common.compiled;\n declarations = obj.common.declarations;\n this.log.info(\n `${obj._id}: source code did not change, using cached compilation result...`,\n );\n } else {\n // We don't have a hashed source code, or the original source changed, compile it\n const filename = scriptIdToTSFilename(obj._id);\n let tsCompiled: CompileResult;\n try {\n tsCompiled = this.tsServer.compile(filename, transformedSource);\n } catch (err: unknown) {\n this.log.error(`${obj._id}: TypeScript compilation failed:\\n${err as Error}`);\n continue;\n }\n\n const errors = tsCompiled.diagnostics\n .map(diag => `${diag.annotatedSource}\\n`)\n .join('\\n');\n\n if (tsCompiled.success) {\n if (errors.length > 0) {\n this.log.warn(\n `${obj._id}: TypeScript compilation completed with errors:\\n${errors}`,\n );\n } else {\n this.log.info(`${obj._id}: TypeScript compilation successful`);\n }\n compiled = tsCompiled.result;\n // Global scripts that have been transformed to support `import` need to have their declarations transformed aswell\n declarations = transformGlobalDeclarations(tsCompiled.declarations || '');\n\n const newCommon: {\n compiled: string | undefined;\n declarations?: string;\n sourceHash: string;\n } = {\n sourceHash,\n compiled,\n };\n if (declarations) {\n newCommon.declarations = declarations;\n }\n\n // Store the compiled source and the original source hash, so we don't need to do the work again next time\n this.ignoreObjectChange.add(obj._id); // ignore the next change and don't restart scripts\n void this.extendForeignObject(obj._id, {\n common: newCommon,\n });\n } else {\n this.log.error(`${obj._id}: TypeScript compilation failed:\\n${errors}`);\n continue;\n }\n }\n this.globalScript += `${compiled}\\n`;\n // if declarations were generated, remember them\n if (declarations != null) {\n this.provideDeclarationsForGlobalScript(obj._id, declarations);\n }\n } else {\n // javascript\n const sourceCode = obj.common.source;\n this.globalScript += `${sourceCode}\\n`;\n\n // try to compile the declarations so TypeScripts can use\n // functions defined in global JavaScripts\n const filename = scriptIdToTSFilename(obj._id);\n let tsCompiled: CompileResult;\n try {\n tsCompiled = jsDeclarationServer.compile(filename, sourceCode);\n } catch (err: unknown) {\n this.log.warn(\n `${obj._id}: Error while generating type declarations, skipping:\\n${err as Error}`,\n );\n continue;\n }\n // if declarations were generated, remember them\n if (tsCompiled.success && tsCompiled.declarations != null) {\n this.provideDeclarationsForGlobalScript(obj._id, tsCompiled.declarations);\n }\n }\n }\n }\n }\n }\n }\n\n this.globalScript = this.globalScript.replace(/\\r\\n/g, '\\n');\n this.globalScriptLines = this.globalScript.split(/\\n/g).length - 1;\n\n if (doc?.rows?.length) {\n // load all scripts\n for (let i = 0; i < doc.rows.length; i++) {\n if (!checkIsGlobal(doc.rows[i].value)) {\n void this.loadScript(doc.rows[i].value);\n }\n }\n }\n\n if (this.config.mirrorPath?.trim()) {\n this.config.mirrorInstance = parseInt(this.config.mirrorInstance as unknown as string, 10) || 0;\n if (this.instance === this.config.mirrorInstance) {\n const ioBDataDir = getAbsoluteDefaultDataDir() + sep;\n this.config.mirrorPath = normalize(this.config.mirrorPath);\n let mirrorForbidden = false;\n for (let dir of forbiddenMirrorLocations) {\n dir = join(ioBDataDir, dir) + sep;\n if (dir.includes(this.config.mirrorPath) || this.config.mirrorPath.startsWith(dir)) {\n this.log.error(`The Mirror directory is not allowed to be a central ioBroker directory!`);\n this.log.error(`Directory ${this.config.mirrorPath} is not allowed to mirror files!`);\n mirrorForbidden = true;\n break;\n }\n }\n if (!mirrorForbidden) {\n this.mirror = new Mirror({\n adapter: this,\n log: this.log,\n diskRoot: this.config.mirrorPath,\n });\n }\n }\n }\n\n // Check setState counter per minute and stop a script if too high\n this.setStateCountCheckInterval = setInterval(() => {\n for (const id of Object.keys(this.scripts)) {\n if (!this.scripts[id]) {\n continue;\n }\n const currentSetStatePerMinuteCounter = this.scripts[id].setStatePerMinuteCounter;\n this.scripts[id].setStatePerMinuteCounter = 0;\n if (currentSetStatePerMinuteCounter > this.config.maxSetStatePerMinute) {\n this.scripts[id].setStatePerMinuteProblemCounter++;\n this.log.debug(\n `${id}: Script has reached the maximum of ${this.config.maxSetStatePerMinute} setState calls per minute in ${this.scripts[id].setStatePerMinuteProblemCounter} consecutive minutes`,\n );\n // Allow \"too high counters\" for 1 minute for script starts or such and only\n // stop the script when lasts longer\n if (this.scripts[id].setStatePerMinuteProblemCounter > 1) {\n this.log.error(\n `${id}: Script is calling setState more than ${this.config.maxSetStatePerMinute} times per minute! Stopping Script now! Please check your script!`,\n );\n void this.stopScript(id);\n }\n } else if (this.scripts[id].setStatePerMinuteProblemCounter > 0) {\n this.scripts[id].setStatePerMinuteProblemCounter--;\n this.log.debug(\n `Script ${id} has NOT reached the maximum of ${this.config.maxSetStatePerMinute} setState calls per minute. Decrease problem counter to ${this.scripts[id].setStatePerMinuteProblemCounter}`,\n );\n }\n }\n }, 60_000).unref();\n }\n\n private loadTypeScriptDeclarations(): void {\n // try to load the typings on disk for all 3rd party modules\n const packages = [\n 'node', // this provides auto-completion for most builtins\n '@iobroker/types', // this provides auto-completion for most builtins\n ];\n // Also include user-selected libraries (but only those that are also installed)\n if (typeof this.config?.libraries === 'string' && typeof this.config.libraryTypings === 'string') {\n const installedLibs = this.config.libraries\n .split(/[,;\\s]+/)\n .map(s => s.trim().split('@')[0])\n .filter(s => !!s);\n\n const wantsTypings = this.config.libraryTypings\n .split(/[,;\\s]+/)\n .map(s => s.trim())\n .filter(s => !!s);\n\n // O(1) lookups – avoids O(n²) Array.includes inside loops\n const installedSet = new Set(installedLibs);\n const wantsSet = new Set(wantsTypings);\n const packagesSet = new Set(packages);\n\n // Add all installed libraries the user has requested typings for to the list of packages\n for (const lib of installedLibs) {\n if (wantsSet.has(lib) && !packagesSet.has(lib)) {\n packages.push(lib);\n packagesSet.add(lib);\n }\n }\n // Some packages have submodules (e.g., rxjs/operators) that are not exposed through the main entry point\n // If typings are requested for them, also add them if the base module is installed\n for (const lib of wantsTypings) {\n // Extract the package name and check if we need to add it\n if (!lib.includes('/')) {\n continue;\n }\n const pkgName = lib.substring(0, lib.indexOf('/'));\n\n if (installedSet.has(pkgName) && !packagesSet.has(lib)) {\n packages.push(lib);\n packagesSet.add(lib);\n }\n }\n }\n for (const pkg of packages) {\n let pkgTypings = resolveTypings(\n pkg,\n this.getAdapterScopedPackageIdentifier ? this.getAdapterScopedPackageIdentifier(pkg) : pkg,\n // node needs ambient typings, so we don't wrap it in declare module\n pkg !== 'node',\n );\n if (!pkgTypings) {\n // Create the empty dummy declarations so users don't get the \"not found\" error\n // for installed packages\n if (pkg.includes('/')) {\n pkgTypings = {\n [`node_modules/${pkg}/index.d.ts`]: `declare module \"${pkg}\";`,\n };\n } else {\n pkgTypings = {\n [`node_modules/@types/${pkg}/index.d.ts`]: `declare module \"${pkg}\";`,\n };\n }\n }\n this.log.debug(`Loaded TypeScript definitions for \"${pkg}\": ${JSON.stringify(Object.keys(pkgTypings))}`);\n // remember the declarations for the editor\n Object.assign(tsAmbient, pkgTypings);\n // and give the language servers access to them\n this.tsServer.provideAmbientDeclarations(pkgTypings);\n jsDeclarationServer.provideAmbientDeclarations(pkgTypings);\n }\n }\n\n updateObjectContext(id: string, obj: ioBroker.Object | null | undefined): void {\n if (obj) {\n // add state to state ID's list\n if (obj.type === 'state') {\n if (!this.stateIdSet.has(id)) {\n this.sortedInsert(id);\n this.stateIdSet.add(id);\n }\n if (this.context.devices && this.context.channels) {\n const parts = id.split('.');\n parts.pop();\n const chn = parts.join('.');\n this.context.channels[chn] ||= new Set();\n this.context.channels[chn].add(id);\n\n parts.pop();\n const dev = parts.join('.');\n this.context.devices[dev] ||= new Set();\n this.context.devices[dev].add(id);\n }\n }\n } else {\n // delete object from state ID's list\n const pos = this.binaryIndexOf(this.stateIds, id);\n if (pos !== -1) {\n this.stateIds.splice(pos, 1);\n this.stateIdSet.delete(id);\n }\n if (this.context.devices && this.context.channels) {\n const parts = id.split('.');\n parts.pop();\n const chn = parts.join('.');\n this.context.channels[chn]?.delete(id);\n\n parts.pop();\n const dev = parts.join('.');\n this.context.devices[dev]?.delete(id);\n }\n\n delete this.folderCreationVerifiedObjects[id];\n }\n\n if (!obj && this.objects[id]) {\n // objects were deleted\n this.removeFromNames(id);\n delete this.objects[id];\n } else if (obj && !this.objects[id]) {\n // object was added\n this.objects[id] = obj;\n this.addToNames(obj);\n } else if (obj && this.objects[id].common) {\n // Object just changed\n this.objects[id] = obj;\n\n const n = this.getName(id);\n let nn = this.objects[id].common ? this.objects[id].common.name : '';\n\n if (nn && typeof nn === 'object') {\n nn = nn[getLanguage()] || nn.en;\n }\n\n if (n !== nn) {\n if (n) {\n this.removeFromNames(id);\n }\n if (nn) {\n this.addToNames(obj);\n }\n }\n }\n }\n\n async stopAllScripts(): Promise {\n const scripts = Object.keys(this.scripts);\n const promises: Promise[] = [];\n for (let i = 0; i < scripts.length; i++) {\n promises.push(this.stopScript(scripts[i]));\n }\n return Promise.all(promises).then(() => {});\n }\n\n convertBackStringifiedValues(\n id: string,\n state: ioBroker.State | null | undefined,\n ): ioBroker.State | null | undefined {\n if (\n state &&\n typeof state.val === 'string' &&\n this.objects[id]?.common &&\n (this.objects[id].common.type === 'array' || this.objects[id].common.type === 'object')\n ) {\n try {\n state.val = JSON.parse(state.val);\n } catch (err: any) {\n if (id.startsWith('javascript.') || id.startsWith('0_userdata.0')) {\n this.log.info(\n `Could not parse value for id \"${id}\" into ${this.objects[id].common.type}: ${err.toString()}`,\n );\n } else {\n this.log.debug(\n `Could not parse value for id \"${id}\" into ${this.objects[id].common.type}: ${err.toString()}`,\n );\n }\n }\n }\n return state;\n }\n\n prepareStateObjectSimple(id: string, state: ioBroker.StateValue, isAck: boolean): ioBroker.State {\n // otherwise, assume that the given state is the value to be set\n const oState: ioBroker.State = { val: state, ack: isAck } as ioBroker.State;\n\n return this.prepareStateObject(id, oState);\n }\n\n prepareStateObject(id: string, state: ioBroker.SettableState | null): ioBroker.State {\n let oState: ioBroker.State;\n\n if (state && typeof state === 'object') {\n oState = state as ioBroker.State;\n } else {\n oState = { val: null } as ioBroker.State;\n }\n\n if (this.config.subscribe) {\n return oState;\n }\n // set other values to have a full state object\n // mirrors logic from statesInRedis\n if (oState.ts === undefined) {\n oState.ts = Date.now();\n }\n\n if (oState.q === undefined) {\n oState.q = 0;\n }\n\n oState.from =\n typeof oState.from === 'string' && oState.from !== '' ? oState.from : `system.adapter.${this.namespace}`;\n\n if (oState.lc === undefined) {\n const formerStateValue = this.interimStateValues[id] || this.states[id];\n if (!formerStateValue) {\n oState.lc = oState.ts;\n } else {\n // isDeepStrictEqual works on objects and primitive values\n const hasChanged = !isDeepStrictEqual(formerStateValue.val, oState.val);\n if (!formerStateValue.lc || hasChanged) {\n oState.lc = oState.ts;\n } else {\n oState.lc = formerStateValue.lc;\n }\n }\n }\n\n return oState;\n }\n\n async getData(): Promise {\n await this.subscribeForeignObjectsAsync('*');\n\n if (!this.config.subscribe) {\n await this.subscribeForeignStatesAsync('*');\n } else {\n await this.subscribeStatesAsync('debug.to');\n await this.subscribeStatesAsync('scriptEnabled.*');\n }\n\n this.log.info('requesting all states');\n\n const statesPromise = this.getForeignStatesAsync('*')\n .then(res => {\n if (!res) {\n this.log.error(`Could not initialize states: no result`);\n this.terminate(EXIT_CODES.START_IMMEDIATELY_AFTER_STOP);\n return;\n }\n if (!this.config.subscribe) {\n this.states = Object.assign(res, this.states);\n this.context.states = this.states;\n\n this.addGetProperty(this.states);\n }\n\n // remember all IDs – sort once to guarantee the sorted invariant\n // required by binaryIndexOf() / sortedInsert() used later\n const keys = Object.keys(res).sort();\n for (const id of keys) {\n this.stateIds.push(id);\n this.stateIdSet.add(id);\n }\n this.statesInitDone = true;\n this.log.info('received all states');\n })\n .catch((err: any) => {\n this.log.error(`Could not initialize states: ${err?.message || 'no result'}`);\n this.terminate(EXIT_CODES.START_IMMEDIATELY_AFTER_STOP);\n });\n\n this.log.info('requesting all objects');\n\n const objectsPromise = this.getObjectListAsync({ include_docs: true })\n .then(res => {\n if (!res?.rows) {\n this.log.error(`Could not initialize objects: no result`);\n this.terminate(EXIT_CODES.START_IMMEDIATELY_AFTER_STOP);\n return;\n }\n this.objects = {};\n this.context.objects = this.objects;\n for (let i = 0; i < res.rows.length; i++) {\n const doc = res.rows[i]?.doc;\n if (!doc) {\n this.log.debug(`Got empty object for index ${i} (${res.rows[i].id})`);\n continue;\n }\n if (this.objects[doc._id] === undefined) {\n // If was already there, ignore\n this.objects[doc._id] = doc;\n }\n doc.type === 'enum' && this._enums.add(doc._id);\n\n // Collect all names\n this.addToNames(this.objects[doc._id]);\n }\n this.addGetProperty(this.objects);\n\n const systemConfig = this.objects['system.config'];\n this.password = systemConfig?.native?.javascriptPassword\n ? this.decrypt(systemConfig?.native.javascriptPassword)\n : '';\n\n // set language for debug messages\n if (systemConfig?.common?.language) {\n setLanguage(systemConfig.common.language);\n this.language = systemConfig.common.language;\n this.context.language = this.language as ioBroker.Languages;\n } else if (this.language) {\n setLanguage(this.language);\n this.context.language = this.language;\n }\n\n // try to use system coordinates\n if (this.config.useSystemGPS) {\n if (systemConfig?.common?.latitude || systemConfig?.common?.longitude) {\n this.config.latitude = systemConfig.common.latitude;\n this.config.longitude = systemConfig.common.longitude;\n } else if (this.latitude && this.longitude) {\n this.config.latitude = this.latitude;\n this.config.longitude = this.longitude;\n }\n }\n this.config.latitude = parseFloat(this.config.latitude as unknown as string);\n this.config.longitude = parseFloat(this.config.longitude as unknown as string);\n\n if (isNaN(this.config.latitude)) {\n this.log.warn(`Configured latitude is not a number - check (instance/system) configuration`);\n } else if (this.config.latitude < -90 || this.config.latitude > 90) {\n this.log.warn(\n `Configured latitude \"${this.config.latitude}\" is invalid - check (instance/system) configuration`,\n );\n }\n\n if (isNaN(this.config.longitude)) {\n this.log.warn(`Configured longitude is not a number - check (instance/system) configuration`);\n } else if (this.config.longitude < -180 || this.config.longitude > 180) {\n this.log.warn(\n `Configured longitude \"${this.config.longitude}\" is invalid - check (instance/system) configuration`,\n );\n }\n\n this.config.sunriseEvent ||= 'nightEnd';\n this.config.sunriseOffset ||= 0;\n this.config.sunriseLimitStart ||= '06:00';\n this.config.sunriseLimitEnd ||= '12:00';\n\n this.config.sunsetEvent ||= 'dusk';\n this.config.sunsetOffset ||= 0;\n this.config.sunsetLimitStart ||= '18:00';\n this.config.sunsetLimitEnd ||= '23:00';\n\n this.objectsInitDone = true;\n this.log.info('received all objects');\n })\n .catch((err: any) => {\n this.log.error(`Could not initialize objects: ${err?.message || 'no result'}`);\n this.terminate(EXIT_CODES.START_IMMEDIATELY_AFTER_STOP);\n });\n\n return Promise.all([statesPromise, objectsPromise]).then(() => {});\n }\n\n async createActiveObject(id: string, enabled: boolean): Promise {\n const idActive = `${this.namespace}.scriptEnabled.${id.substring(SCRIPT_CODE_MARKER.length)}`;\n\n if (!this.objects[idActive]) {\n this.objects[idActive] = {\n _id: idActive,\n common: {\n name: `scriptEnabled.${id.substring(SCRIPT_CODE_MARKER.length)}`,\n desc: 'controls script activity',\n type: 'boolean',\n write: true,\n read: true,\n role: 'switch.active',\n },\n native: {\n script: id,\n },\n type: 'state',\n };\n try {\n await this.setForeignObjectAsync(idActive, this.objects[idActive]);\n const intermediateStateValue = this.prepareStateObjectSimple(idActive, enabled, true);\n await this.setForeignStateAsync(idActive, enabled, true);\n if (enabled && !this.config.subscribe) {\n this.interimStateValues[idActive] = intermediateStateValue;\n }\n } catch {\n // ignore\n }\n } else {\n const state = await this.getForeignStateAsync(idActive);\n if (state && state.val !== enabled) {\n const intermediateStateValue = this.prepareStateObjectSimple(idActive, enabled, true);\n await this.setForeignStateAsync(idActive, enabled, true);\n if (enabled && !this.config.subscribe) {\n this.interimStateValues[idActive] = intermediateStateValue;\n }\n }\n }\n }\n\n async createProblemObject(id: string): Promise {\n const idProblem = `${this.namespace}.scriptProblem.${id.substring(SCRIPT_CODE_MARKER.length)}`;\n\n if (!this.objects[idProblem]) {\n this.objects[idProblem] = {\n _id: idProblem,\n common: {\n name: `scriptProblem.${id.substring(SCRIPT_CODE_MARKER.length)}`,\n desc: 'Script has a problem',\n type: 'boolean',\n expert: true,\n write: false,\n read: true,\n role: 'indicator.error',\n },\n native: {\n script: id,\n },\n type: 'state',\n };\n try {\n await this.setForeignObjectAsync(idProblem, this.objects[idProblem]);\n await this.setForeignStateAsync(idProblem, false, true);\n } catch {\n // ignore\n }\n } else {\n const state = await this.getForeignStateAsync(idProblem);\n if (state && state.val !== false) {\n await this.setForeignStateAsync(idProblem, false, true);\n }\n }\n }\n\n addToNames(obj: ioBroker.Object): void {\n const id = obj._id;\n\n if (obj.common?.name) {\n let name = obj.common.name;\n if (name && typeof name === 'object') {\n name = name[getLanguage()] || name.en;\n }\n if (!name || typeof name !== 'string') {\n // TODO, take name in current language\n return;\n }\n\n if (!this.names[name]) {\n this.names[name] = id;\n } else {\n // convert to array\n if (!Array.isArray(this.names[name])) {\n this.names[name] = [this.names[name] as string];\n }\n\n (this.names[name] as string[]).push(id);\n }\n\n // keep reverse-map up to date for O(1) getName()\n this.nameById.set(id, name);\n }\n }\n\n removeFromNames(id: string): void {\n const n = this.getName(id);\n\n if (n) {\n if (Array.isArray(this.names[n])) {\n const arr = this.names[n];\n const pos = arr.indexOf(id);\n if (pos > -1) {\n arr.splice(pos, 1);\n if (arr.length === 1) {\n this.names[n] = arr[0];\n }\n }\n } else {\n delete this.names[n];\n }\n\n // keep reverse-map up to date for O(1) getName()\n this.nameById.delete(id);\n }\n }\n\n getName(id: string): string | null {\n return this.nameById.get(id) ?? null;\n }\n\n async installNpm(npmLib: string): Promise {\n return new Promise((resolve, reject) => {\n const path = __dirname;\n\n // Also, set the working directory (cwd) of the process instead of using --prefix\n // because that has ugly bugs on Windows\n const cmd = `npm install ${npmLib} --omit=dev`;\n this.log.info(`Installing ${npmLib} into ${__dirname} - cmd: ${cmd}`);\n\n // System call used for update of js-controller itself,\n // because during the installation the npm packet will be deleted too, but some files must be loaded even during the installation process.\n const child = this.mods.child_process.exec(cmd, {\n windowsHide: true,\n cwd: path,\n timeout: 120_000, // 2 minutes max – prevents infinite blocking\n });\n\n child.stdout?.on('data', buf => this.log.info(buf.toString('utf8')));\n\n child.stderr?.on('data', buf => this.log.error(buf.toString('utf8')));\n\n child.on('err', err => {\n this.log.error(`Cannot install ${npmLib}: ${err}`);\n reject(new Error(`Cannot install ${npmLib}: ${err}`));\n });\n child.on('error', err => {\n this.log.error(`Cannot install ${npmLib}: ${err}`);\n reject(new Error(`Cannot install ${npmLib}: ${err}`));\n });\n\n child.on('exit', (code: number /* , signal */) => {\n if (code) {\n this.log.error(`Cannot install ${npmLib}: ${code}`);\n reject(new Error(`Cannot install ${npmLib}: ${code}`));\n }\n // command succeeded\n resolve(code);\n });\n });\n }\n\n async installLibraries(): Promise {\n if (typeof this.config?.libraries !== 'string') {\n this.config.libraries = '';\n }\n\n const libraries: string[] = this.config.libraries\n .split(/[,;\\s]+/)\n .map(d => d.trim())\n .filter(d => d);\n\n this.log.debug(`Custom libraries in config: \"${this.config.libraries}\": ${JSON.stringify(libraries)}`);\n\n let installedNodeModules: string[] = [];\n const keepModules: string[] = [];\n\n // js-controller >= 6.x\n if (typeof this.listInstalledNodeModules === 'function') {\n installedNodeModules = await this.listInstalledNodeModules();\n\n this.log.debug(`Found installed libraries: ${JSON.stringify(installedNodeModules)}`);\n }\n\n for (const lib of libraries) {\n let depName = lib;\n let version = 'latest';\n\n if (depName.includes('@') && depName.lastIndexOf('@') > 0) {\n const parts = depName.split('@');\n version = parts.pop() ?? 'latest';\n depName = parts.join('@');\n }\n\n /** The real module name, because the dependency can be a URL too */\n let moduleName = depName;\n\n if (URL.canParse(depName)) {\n moduleName = await requestModuleNameByUrl(depName);\n\n this.log.debug(`Found custom library in config: \"${moduleName}@${version}\" (from ${depName})`);\n } else {\n this.log.debug(`Found custom library in config: \"${moduleName}@${version}\"`);\n }\n\n keepModules.push(moduleName);\n\n // js-controller >= 6.x\n if (typeof this.installNodeModule === 'function') {\n try {\n const result = await this.installNodeModule(depName, { version });\n if (result.success) {\n this.log.debug(`Installed custom library: \"${moduleName}@${version}\"`);\n\n const importedModule: any = await this.importNodeModule(moduleName);\n (this.mods as Record)[moduleName] = importedModule.default ?? importedModule;\n } else {\n this.log.warn(`Cannot install custom npm package \"${moduleName}@${version}\"`);\n }\n } catch (err: unknown) {\n this.log.warn(`Cannot install custom npm package \"${moduleName}@${version}\": ${err as Error}`);\n }\n } else if (!existsSync(`${__dirname}/node_modules/${depName}/package.json`)) {\n // js-controller < 6.x\n this.log.info(`Installing custom library (legacy mode): \"${lib}\"`);\n\n try {\n await this.installNpm(lib);\n this.log.info(`Installed custom npm package (legacy mode): \"${lib}\"`);\n } catch (err: any) {\n this.log.warn(`Cannot install custom npm package \"${lib}\" (legacy mode): ${err.toString()}`);\n }\n }\n }\n\n // js-controller >= 6.x\n if (typeof this.uninstallNodeModule === 'function') {\n for (const installedNodeModule of installedNodeModules) {\n if (!keepModules.includes(installedNodeModule)) {\n try {\n await this.uninstallNodeModule(installedNodeModule);\n\n this.log.info(`Removed custom npm package: \"${installedNodeModule}\"`);\n } catch (err: any) {\n this.log.warn(`Cannot remove custom npm package ${installedNodeModule}: ${err.toString()}`);\n }\n }\n }\n }\n }\n\n createVM(source: string, name: string, wrapAsync: boolean): false | JsScript {\n if (this.context.debugMode && name !== this.context.debugMode) {\n return false;\n }\n\n if (!this.context.debugMode) {\n const logSubscriptionsText =\n \"\\n;\\nlog(`registered ${__engine.__subscriptions} subscription${__engine.__subscriptions === 1 ? '' : 's'},\" +\n \" ${__engine.__schedules} schedule${__engine.__schedules === 1 ? '' : 's'},\" +\n \" ${__engine.__subscriptionsMessage} message${__engine.__subscriptionsMessage === 1 ? '' : 's'},\" +\n \" ${__engine.__subscriptionsLog} log${__engine.__subscriptionsLog === 1 ? '' : 's'}\" +\n \" and ${__engine.__subscriptionsFile} file subscription${__engine.__subscriptionsFile === 1 ? '' : 's'}`);\\n\";\n\n if (wrapAsync) {\n source = `(async () => {\\n${source}\\n${logSubscriptionsText}\\n})();`;\n } else {\n if (source.endsWith('export {};\\n')) {\n // If the source ends with \"export {};\" place the log subscriptions before it\n source = source.slice(0, -11); // remove \"export {};\\n\"\n source = `${source}\\n${logSubscriptionsText}\\nexport {};\\n`;\n } else {\n source = `${source}\\n${logSubscriptionsText}`;\n }\n }\n } else {\n if (wrapAsync) {\n source = `(async () => {debugger;\\n${source}\\n})();`;\n } else {\n source = `debugger;${source}`;\n }\n }\n\n try {\n const options: ScriptOptions = {\n filename: name,\n // displayErrors: true,\n // lineOffset: this.globalScriptLines\n };\n return {\n script: new Script(source, options),\n } as JsScript;\n } catch (err: unknown) {\n this.logError(name, `compile failed at`, err as Error);\n return false;\n }\n }\n\n execute(\n script: JsScript,\n name: string,\n engineType: ScriptType,\n verbose: boolean,\n debug: boolean,\n /**\n * Optional sink for the \"execute\" message API. When provided, the script runs in an\n * ephemeral diagnostic mode: every log line (the script's own `log()`/`console.*` output\n * AND all verbose internal operations) is forwarded to this collector instead of the\n * adapter log, and no `scriptProblem` state is written.\n */\n logCollector?: ((severity: ioBroker.LogLevel, message: string) => void) | null,\n ): void {\n script.intervals = new Set();\n script.timeouts = new Set();\n script.schedules = [];\n script.wizards = [];\n script.name = name;\n script.engineType = engineType;\n script._id = Math.floor(Math.random() * 0xffffffff);\n script.subscribes = {};\n script.subscribesFile = {};\n script.setStatePerMinuteCounter = 0;\n script.setStatePerMinuteProblemCounter = 0;\n if (!logCollector) {\n void this.setState(`scriptProblem.${name.substring(SCRIPT_CODE_MARKER.length)}`, {\n val: false,\n ack: true,\n expire: 1000,\n });\n }\n\n const sandbox = sandBox(script, name, verbose, debug, this.context);\n\n // Redirect every log line into the collector. As `console.*`, the global `log()` and all\n // `sandbox.verbose && sandbox.log(...)` calls go through `sandbox.log`, this captures the\n // full picture for the caller while keeping the adapter log clean.\n if (logCollector) {\n sandbox.log = (msg: string, severity?: ioBroker.LogLevel): void => {\n let text: unknown = msg;\n if (text && typeof text !== 'string') {\n text = util.format(text);\n }\n logCollector(severity || 'info', text as string);\n };\n }\n\n try {\n script.script.runInNewContext(sandbox, {\n filename: name,\n displayErrors: true,\n // lineOffset: this.globalScriptLines\n });\n } catch (err: unknown) {\n if (logCollector) {\n const e = err as Error;\n const stack = (e?.stack ? e.stack.toString() : String(err))\n .split('\\n')\n .map(line => this.fixLineNo(line))\n .join('\\n');\n logCollector('error', `Error by run: ${stack}`);\n } else {\n void this.setState(`scriptProblem.${name.substring(SCRIPT_CODE_MARKER.length)}`, {\n val: true,\n ack: true,\n c: 'execute',\n });\n this.logError(name, 'Error by run:', err as Error);\n }\n }\n }\n\n /**\n * Run an ad-hoc script sent via the `execute` message and return everything it logged.\n *\n * The script is compiled (JavaScript or TypeScript), executed with the same sandbox API as a\n * regular script (verbose by default, so internal operations like setState/subscribe are logged\n * too), left running for `timeout` ms to collect asynchronous output, and afterwards stopped and\n * fully cleaned up (timers, subscriptions, schedules). It is ephemeral: no script object or\n * states are created.\n *\n * Expected `message`:\n * - `source` / `code` (string, required) – the script source\n * - `engineType` (string, optional) – `TypeScript/ts` to compile as TypeScript, otherwise JavaScript\n * - `verbose` (boolean, optional, default `true`) – log internal sandbox operations\n * - `logLevel` (silly|debug|info|warn|error, optional, default `silly`) – minimum severity to return\n * - `timeout` (number ms, optional, default 5000, clamped to 0…60000) – collection window\n * - `maxLogs` (number, optional, default 5000) – cap on returned log lines\n */\n async executeScript(message: {\n source: string;\n engineType?: 'Javascript/js' | 'TypeScript/ts';\n timeout?: number | string;\n verbose?: boolean;\n logLevel?: ioBroker.LogLevel;\n maxLogs?: number | string;\n }): Promise<{\n ok: boolean;\n error?: string;\n engineType: 'Javascript/js' | 'TypeScript/ts';\n runtime: number;\n truncated: boolean;\n logs: { ts: number; severity: ioBroker.LogLevel; message: string }[];\n output: string;\n }> {\n const LEVELS: ioBroker.LogLevel[] = ['silly', 'debug', 'info', 'warn', 'error'];\n\n const source: unknown = message?.source ?? (message as any)?.code;\n const engineTypeStr = (message?.engineType || '').toString().toLowerCase();\n const isTypeScript = engineTypeStr.startsWith('typescript') || engineTypeStr === 'ts';\n const engineType: 'Javascript/js' | 'TypeScript/ts' = isTypeScript ? 'TypeScript/ts' : 'Javascript/js';\n\n const empty = (\n error: string,\n ): {\n ok: boolean;\n error: string;\n engineType: 'Javascript/js' | 'TypeScript/ts';\n runtime: number;\n truncated: boolean;\n logs: { ts: number; severity: ioBroker.LogLevel; message: string }[];\n output: string;\n } => ({ ok: false, error, engineType, runtime: 0, truncated: false, logs: [], output: '' });\n\n if (typeof source !== 'string' || !source.trim()) {\n return empty('No source code provided');\n }\n\n if (this.context.debugMode) {\n return empty('Cannot execute a script while a debug session is active');\n }\n\n let timeout = parseInt(message?.timeout as string, 10);\n if (isNaN(timeout)) {\n timeout = 5000;\n }\n timeout = Math.max(0, Math.min(timeout, 60000));\n\n const verbose = message?.verbose !== false;\n const minLevel: ioBroker.LogLevel = message?.logLevel\n ? LEVELS.includes(message?.logLevel)\n ? message.logLevel\n : 'silly'\n : 'silly';\n let maxLogs = parseInt(message?.maxLogs as string, 10);\n if (isNaN(maxLogs) || maxLogs <= 0) {\n maxLogs = 5000;\n }\n\n const name = `${SCRIPT_CODE_MARKER}__execute_${++this.executeCounter}`;\n\n // Compile the source the same way regular scripts are compiled\n let createdScript: JsScript | false;\n if (isTypeScript) {\n const transformedSource = transformScriptBeforeCompilation(source, false);\n const filename = scriptIdToTSFilename(name);\n let tsCompiled: CompileResult;\n try {\n tsCompiled = this.tsServer.compile(filename, transformedSource);\n } catch (err: unknown) {\n return empty(`TypeScript compilation failed: ${err as Error}`);\n }\n if (!tsCompiled.success) {\n const errors = tsCompiled.diagnostics.map(diag => diag.annotatedSource).join('\\n');\n return empty(`TypeScript compilation failed:\\n${errors}`);\n }\n createdScript = this.createVM(`${this.globalScript}\\n${tsCompiled.result || ''}`, name, false);\n } else {\n createdScript = this.createVM(`${this.globalScript}\\n${source}`, name, true);\n }\n\n if (!createdScript) {\n return empty('Compilation failed');\n }\n\n const logs: { ts: number; severity: ioBroker.LogLevel; message: string }[] = [];\n let truncated = false;\n const collector = (severity: ioBroker.LogLevel, msg: string): void => {\n if (logs.length >= maxLogs) {\n truncated = true;\n return;\n }\n logs.push({ ts: Date.now(), severity, message: msg });\n };\n\n this.scripts[name] = createdScript;\n this.execute(createdScript, name, engineType, verbose, false, collector);\n\n // Let asynchronous output (timeouts, awaited code, triggered subscriptions) accumulate\n if (timeout) {\n await new Promise(resolve => setTimeout(resolve, timeout));\n }\n\n // Stop and clean up the ephemeral script (timers, subscriptions, schedules, …)\n await this.stopScript(name, true);\n\n const minIdx = LEVELS.indexOf(minLevel);\n const filtered = logs.filter(entry => {\n const idx = LEVELS.indexOf(entry.severity);\n return idx < 0 || idx >= minIdx;\n });\n\n return {\n ok: true,\n engineType,\n runtime: timeout,\n truncated,\n logs: filtered,\n output: filtered.map(entry => `[${entry.severity}] ${entry.message}`).join('\\n'),\n };\n }\n\n /**\n * Finds the index of `id` in a sorted array using binary search – O(log n).\n * Returns -1 if not found. Used instead of Array.indexOf on stateIds.\n */\n private binaryIndexOf(arr: string[], id: string): number {\n let lo = 0;\n let hi = arr.length - 1;\n while (lo <= hi) {\n const mid = (lo + hi) >>> 1;\n if (arr[mid] === id) {\n return mid;\n } else if (arr[mid] < id) {\n lo = mid + 1;\n } else {\n hi = mid - 1;\n }\n }\n return -1;\n }\n\n /**\n * Inserts `id` into the sorted `stateIds` array using binary search – O(log n).\n * Much faster than push() + sort() which is O(n log n) on every insertion.\n */\n private sortedInsert(id: string): void {\n let lo = 0;\n let hi = this.stateIds.length;\n while (lo < hi) {\n const mid = (lo + hi) >>> 1;\n if (this.stateIds[mid] < id) {\n lo = mid + 1;\n } else {\n hi = mid;\n }\n }\n if (this.stateIds[lo] !== id) {\n this.stateIds.splice(lo, 0, id);\n }\n }\n\n unsubscribe(id: string | RegExp | string[]): void {\n if (!id) {\n this.log.warn('unsubscribe: empty name');\n return;\n }\n\n if (Array.isArray(id)) {\n id.forEach(sub => this.unsubscribe(sub));\n return;\n }\n\n if (id.constructor && id.constructor.name === 'RegExp') {\n // adapter.log.warn('unsubscribe: todo - process regexp');\n return;\n }\n\n if (typeof id !== 'string') {\n this.log.error(`unsubscribe: invalid type of id - ${typeof id}`);\n return;\n }\n const parts = id.split('.');\n const _adapter = `system.adapter.${parts[0]}.${parts[1]}`;\n if (this.objects[_adapter]?.common?.subscribable) {\n const a = `${parts[0]}.${parts[1]}`;\n const alive = `system.adapter.${a}.alive`;\n if (this.adapterSubs[alive]) {\n this.adapterSubs[alive].delete(id);\n if (!this.adapterSubs[alive].size) {\n delete this.adapterSubs[alive];\n }\n }\n this.sendTo(a, 'unsubscribe', id);\n }\n }\n\n // Analyze if logs are still required or not\n updateLogSubscriptions(): void {\n let found = false;\n // go through all scripts and check if some script still requires logs\n Object.keys(this.logSubscriptions).forEach(scriptName => {\n if (!this.logSubscriptions?.[scriptName] || !this.logSubscriptions[scriptName].length) {\n delete this.logSubscriptions[scriptName];\n } else {\n found = true;\n }\n });\n\n if (this.requireLog) {\n if (found && !this.logSubscribed) {\n this.logSubscribed = true;\n void this.requireLog(this.logSubscribed);\n this.log.info(`Subscribed to log messages (found logSubscriptions)`);\n } else if (!found && this.logSubscribed) {\n this.logSubscribed = false;\n void this.requireLog(this.logSubscribed);\n this.log.info(`Unsubscribed from log messages (not found logSubscriptions)`);\n }\n }\n }\n\n async stopScript(name: string, silent?: boolean): Promise {\n if (!this.scripts[name]) {\n return false;\n }\n\n // `silent` is used for ephemeral scripts started via the \"execute\" message – they have no\n // `scriptEnabled` state and should not appear in the adapter log.\n if (!silent) {\n this.log.info(`${name}: Stopping script`);\n\n await this.setState(`scriptEnabled.${name.substring(SCRIPT_CODE_MARKER.length)}`, false, true);\n }\n\n if (this.messageBusHandlers[name]) {\n delete this.messageBusHandlers[name];\n }\n\n if (this.tempDirectories[name]) {\n try {\n this.mods.fs.rmSync(this.tempDirectories[name], { recursive: true });\n\n this.log.debug(`${name}: Removed temp directory: ${this.tempDirectories[name]}`);\n } catch {\n this.log.warn(`${name}: Unable to remove temp directory: ${this.tempDirectories[name]}`);\n }\n\n delete this.tempDirectories[name];\n }\n\n if (this.logSubscriptions[name]) {\n delete this.logSubscriptions[name];\n this.updateLogSubscriptions();\n }\n\n if (this.scripts[name]) {\n // Remove from subscriptions\n this.context.isEnums = false;\n if (this.config.subscribe) {\n // check all subscribed IDs\n Object.keys(this.scripts[name].subscribes).forEach(id => {\n if (this.subscribedPatterns[id]) {\n this.subscribedPatterns[id] -= this.scripts[name].subscribes[id];\n if (this.subscribedPatterns[id] <= 0) {\n this.unsubscribeForeignStates(id);\n delete this.subscribedPatterns[id];\n if (this.states[id]) {\n delete this.states[id];\n }\n }\n }\n });\n }\n\n for (let i = this.subscriptions.length - 1; i >= 0; i--) {\n if (this.subscriptions[i].name === name) {\n const sub = this.subscriptions.splice(i, 1)[0];\n // Also remove from the O(1) dispatch structures – shared helper to keep the\n // exact-id classification identical to the subscribe side in sandbox.ts\n if (sub) {\n removeFromDispatchIndex(this.context, sub);\n }\n if (sub?.pattern.id) {\n this.unsubscribe(sub.pattern.id);\n }\n } else {\n if (\n (!this.context.isEnums && this.subscriptions[i].pattern.enumName) ||\n this.subscriptions[i].pattern.enumId\n ) {\n this.context.isEnums = true;\n }\n }\n }\n\n // check all subscribed files\n Object.keys(this.scripts[name].subscribesFile).forEach(key => {\n if (this.subscribedPatternsFile[key]) {\n this.subscribedPatternsFile[key] -= this.scripts[name].subscribesFile[key];\n if (this.subscribedPatternsFile[key] <= 0) {\n const [id, file] = key.split('$%$');\n void this.unsubscribeForeignFiles(id, file);\n delete this.subscribedPatternsFile[key];\n }\n }\n });\n for (let i = this.subscriptionsFile.length - 1; i >= 0; i--) {\n if (this.subscriptionsFile[i].name === name) {\n this.subscriptionsFile.splice(i, 1);\n }\n }\n\n for (let i = this.subscriptionsObject.length - 1; i >= 0; i--) {\n if (this.subscriptionsObject[i].name === name) {\n const sub = this.subscriptionsObject.splice(i, 1)[0];\n if (sub) {\n // Remove from O(1) dispatch map\n const mapSubs = this.subscriptionsObjectMap.get(sub.pattern);\n if (mapSubs) {\n const pos = mapSubs.indexOf(sub);\n if (pos !== -1) {\n mapSubs.splice(pos, 1);\n }\n if (!mapSubs.length) {\n this.subscriptionsObjectMap.delete(sub.pattern);\n }\n }\n this.unsubscribeForeignObjects(sub.pattern);\n }\n }\n }\n\n // Stop all timeouts\n for (const t of this.scripts[name].timeouts) {\n clearTimeout(t);\n }\n // Stop all intervals\n for (const t of this.scripts[name].intervals) {\n clearInterval(t);\n }\n // Stop all delayed states (setStateDelayed timers) – O(1) via reverse-index\n const scriptStateIds = this.timersByScript.get(name);\n if (scriptStateIds) {\n for (const stateId of scriptStateIds) {\n if (this.timers[stateId]) {\n for (let i = this.timers[stateId].length - 1; i >= 0; i--) {\n if (this.timers[stateId][i].scriptName === name) {\n clearTimeout(this.timers[stateId][i].t);\n this.timers[stateId].splice(i, 1);\n }\n }\n if (!this.timers[stateId].length) {\n delete this.timers[stateId];\n }\n }\n }\n this.timersByScript.delete(name);\n }\n // Stop all scheduled jobs\n for (let i = 0; i < this.scripts[name].schedules.length; i++) {\n if (this.scripts[name].schedules[i]) {\n const _name = this.scripts[name].schedules[i].name;\n if (!this.mods.nodeSchedule.cancelJob(this.scripts[name].schedules[i])) {\n this.log.error(`${name}: Error by canceling scheduled job \"${_name}\"`);\n }\n }\n }\n\n // Stop all time wizards jobs\n if (this.context.scheduler) {\n for (let i = 0; i < this.scripts[name].wizards.length; i++) {\n if (this.scripts[name].wizards[i]) {\n this.context.scheduler.remove(this.scripts[name].wizards[i]);\n }\n }\n }\n\n // if callback for on stop\n if (typeof this.scripts[name].onStopCb === 'function') {\n this.scripts[name].onStopTimeout =\n parseInt(this.scripts[name].onStopTimeout as unknown as string, 10) || 1000;\n\n await new Promise(resolve => {\n let timeout: NodeJS.Timeout | null = setTimeout(() => {\n if (timeout) {\n timeout = null;\n resolve(true);\n }\n }, this.scripts[name].onStopTimeout);\n\n try {\n this.scripts[name].onStopCb(() => {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n resolve(true);\n }\n });\n } catch (err: unknown) {\n this.log.error(`${name}: error in onStop callback: ${err as Error}`);\n }\n });\n }\n\n delete this.scripts[name];\n return true;\n }\n return false;\n }\n\n async prepareScript(obj: ioBroker.ScriptObject): Promise {\n if (obj?.common?.enabled && this.debugState.scriptName === obj._id) {\n const id = obj._id;\n await this.debugStop();\n this.log.info(`${id}: Debugging was stopped, because started in normal mode`);\n return this.prepareScript(obj);\n }\n\n if (\n obj?.common?.source &&\n (obj.common.enabled || this.context.debugMode === obj._id) &&\n obj.common.engine === `system.adapter.${this.namespace}`\n ) {\n const name = obj._id;\n\n if (this.password && obj.native?.protected) {\n obj.common.source = decryptText(this.password, obj.common.source);\n }\n\n const nameId = name.substring(SCRIPT_CODE_MARKER.length);\n if (!nameId.length || nameId.endsWith('.')) {\n this.log.error(`${name}: Script name \"${name}\" is invalid!`);\n return false;\n }\n const idActive = `scriptEnabled.${nameId}`;\n if (!this.config.subscribe) {\n this.interimStateValues[idActive] = this.prepareStateObjectSimple(\n `${this.namespace}.${idActive}`,\n true,\n true,\n );\n }\n await this.setState(idActive, true, true);\n obj.common.engineType ||= '' as 'TypeScript/ts' | 'Blockly' | 'Rules' | 'Javascript/js';\n\n if (\n (obj.common.engineType as ScriptType).toLowerCase().startsWith('javascript') ||\n (obj.common.engineType as ScriptType) === 'Blockly' ||\n (obj.common.engineType as ScriptType) === 'Rules'\n ) {\n // Javascript\n this.log.info(`${name}: start JavaScript (${obj.common.engineType})`);\n\n let sourceFn = name;\n if (webstormDebug) {\n const fn = name.replace(/^script\\.js\\./, '').replace(/\\./g, '/');\n sourceFn = this.mods.path.join(webstormDebug, `${fn}.js`);\n }\n const createdScript = this.createVM(`${this.globalScript}\\n${obj.common.source}`, sourceFn, true);\n if (!createdScript) {\n return false;\n }\n this.scripts[name] = createdScript;\n this.execute(\n this.scripts[name],\n sourceFn,\n obj.common.engineType as ScriptType,\n obj.common.verbose,\n obj.common.debug,\n );\n return true;\n }\n\n if (obj.common.engineType.toLowerCase().startsWith('typescript')) {\n // TypeScript\n this.log.info(`${name}: Compiling TypeScript source`);\n // The source code must be transformed in order to support top level await\n // and to force TypeScript to compile the code as a module\n const transformedSource = transformScriptBeforeCompilation(obj.common.source, false);\n // We need to hash both global declarations that are known until now\n // AND the script source, because changing either can change the compilation output\n const sourceHash = hashSource(tsSourceHashBase + this.globalDeclarations + transformedSource);\n\n let compiled: string;\n // If we already stored the compiled source code and the original source hash,\n // use the hash to check whether we can rely on the compiled source code or\n // if we need to compile it again\n if (\n typeof obj.common.compiled === 'string' &&\n typeof obj.common.sourceHash === 'string' &&\n sourceHash === obj.common.sourceHash\n ) {\n // We can reuse the stored source\n compiled = obj.common.compiled;\n this.log.info(`${name}: source code did not change, using cached compilation result...`);\n } else {\n // We don't have a hashed source code, or the original source changed, compile it\n const filename = scriptIdToTSFilename(name);\n let tsCompiled: CompileResult;\n try {\n tsCompiled = this.tsServer.compile(filename, transformedSource);\n } catch (err: unknown) {\n this.log.error(`${obj._id}: TypeScript compilation failed:\\n${err as Error}`);\n return false;\n }\n\n const errors = tsCompiled.diagnostics.map(diag => `${diag.annotatedSource}\\n`).join('\\n');\n\n if (tsCompiled.success) {\n if (errors.length > 0) {\n this.log.warn(`${name}: TypeScript compilation had errors:\\n${errors}`);\n } else {\n this.log.info(`${name}: TypeScript compilation successful`);\n }\n compiled = tsCompiled.result || '';\n\n // Store the compiled source and the original source hash, so we don't need to do the work again next time\n this.ignoreObjectChange.add(name); // ignore the next change and don't restart scripts\n await this.extendForeignObjectAsync(name, {\n common: {\n sourceHash,\n compiled,\n },\n });\n } else {\n this.log.error(`${name}: TypeScript compilation failed:\\n${errors}`);\n return false;\n }\n }\n const createdScript: JsScript | false = this.createVM(`${this.globalScript}\\n${compiled}`, name, false);\n if (!createdScript) {\n return false;\n }\n this.scripts[name] = createdScript;\n this.execute(\n this.scripts[name],\n name,\n obj.common.engineType as ScriptType,\n obj.common.verbose,\n obj.common.debug,\n );\n return true;\n }\n\n this.log.warn(`${obj._id}: Unknown engine type: ${obj.common.engineType}`);\n return false;\n }\n\n let _name: string;\n if (obj?._id) {\n _name = obj._id;\n const scriptIdName = _name.substring(SCRIPT_CODE_MARKER.length);\n\n if (!scriptIdName.length || scriptIdName.endsWith('.')) {\n this.log.error(`${obj._id}: Script name \"${_name}\" is invalid!`);\n return false;\n }\n await this.setState(`scriptEnabled.${scriptIdName}`, false, true);\n }\n if (!obj) {\n this.log.error('Invalid script');\n }\n return false;\n }\n\n async loadScriptById(id: string): Promise {\n let obj: ioBroker.ScriptObject | null | undefined;\n try {\n obj = (await this.getForeignObjectAsync(id)) as ioBroker.ScriptObject | null | undefined;\n } catch (err: any) {\n this.log.error(`${id}: Invalid script: ${err}`);\n }\n if (!obj) {\n return false;\n }\n return this.loadScript(obj);\n }\n\n async loadScript(nameOrObject: ioBroker.ScriptObject): Promise {\n // create states for scripts\n await this.createActiveObject(nameOrObject._id, !!nameOrObject?.common?.enabled);\n await this.createProblemObject(nameOrObject._id);\n return this.prepareScript(nameOrObject);\n }\n\n getAstroEvent(\n date: Date,\n astroEvent: AstroEventName,\n start: string,\n end: string,\n offsetMinutes: number | string,\n isDayEnd: boolean,\n latitude: number,\n longitude: number,\n useNextDay?: boolean,\n ): Date {\n let ts: Date = this.mods.suncalc.getTimes(date, latitude, longitude)[astroEvent];\n\n if (!ts || ts.getTime().toString() === 'NaN') {\n ts = isDayEnd ? getNextTimeEvent(end, useNextDay) : getNextTimeEvent(start, useNextDay);\n }\n ts.setMilliseconds(0);\n ts.setMinutes(ts.getMinutes() + (parseInt(offsetMinutes as unknown as string, 10) || 0));\n\n const [timeHoursStart, timeMinutesStart] = start.split(':');\n const nTimeHoursStart = parseInt(timeHoursStart, 10);\n const nTimeMinutesStart = parseInt(timeMinutesStart, 10) || 0;\n\n if (\n ts.getHours() < nTimeHoursStart ||\n (ts.getHours() === nTimeHoursStart && ts.getMinutes() < nTimeMinutesStart)\n ) {\n ts = getNextTimeEvent(start, useNextDay);\n ts.setSeconds(0);\n }\n\n const [timeHoursEnd, timeMinutesEnd] = end.split(':');\n const nTimeHoursEnd = parseInt(timeHoursEnd, 10);\n const nTimeMinutesEnd = parseInt(timeMinutesEnd, 10) || 0;\n\n if (ts.getHours() > nTimeHoursEnd || (ts.getHours() === nTimeHoursEnd && ts.getMinutes() > nTimeMinutesEnd)) {\n ts = getNextTimeEvent(end, useNextDay);\n ts.setSeconds(0);\n }\n\n // if event in the past\n if (date > ts && useNextDay) {\n // take the next day\n ts.setDate(ts.getDate() + 1);\n }\n return ts;\n }\n\n async timeSchedule(): Promise {\n const now = new Date();\n let hours = now.getHours();\n const minutes = now.getMinutes();\n if (this.timeSettings.format12) {\n if (hours > 12) {\n hours -= 12;\n }\n }\n let sHours: string;\n if (this.timeSettings.leadingZeros) {\n sHours = hours.toString().padStart(2, '0');\n } else {\n sHours = hours.toString();\n }\n\n await this.setState('variables.dayTime', {\n val: `${sHours}:${minutes.toString().padStart(2, '0')}`,\n ack: true,\n });\n\n now.setMinutes(now.getMinutes() + 1);\n now.setSeconds(0);\n now.setMilliseconds(0);\n const interval = now.getTime() - Date.now();\n this.timeScheduleTimer = setTimeout(() => this.timeSchedule(), interval);\n }\n\n async dayTimeSchedules(): Promise {\n // Always clear any existing timer to prevent memory leaks on rapid re-scheduling\n if (this.dayScheduleTimer) {\n clearTimeout(this.dayScheduleTimer);\n this.dayScheduleTimer = null;\n }\n\n // get astrological event\n if (\n this.config.latitude === undefined ||\n this.config.longitude === undefined ||\n (this.config.latitude as unknown as string) === '' ||\n (this.config.longitude as unknown as string) === '' ||\n this.config.latitude === null ||\n this.config.longitude === null\n ) {\n this.log.error('Longitude or latitude does not set. Cannot use astro.');\n return;\n }\n\n // Calculate the next event today\n const todayDate = getAstroStartOfDay();\n const nowDate = new Date();\n\n const todaySunrise = this.getAstroEvent(\n todayDate,\n this.config.sunriseEvent,\n this.config.sunriseLimitStart,\n this.config.sunriseLimitEnd,\n this.config.sunriseOffset,\n false,\n this.config.latitude,\n this.config.longitude,\n );\n const todaySunset = this.getAstroEvent(\n todayDate,\n this.config.sunsetEvent,\n this.config.sunsetLimitStart,\n this.config.sunsetLimitEnd,\n this.config.sunsetOffset,\n true,\n this.config.latitude,\n this.config.longitude,\n );\n\n // Sunrise\n let sunriseTimeout = todaySunrise.getTime() - nowDate.getTime();\n if (sunriseTimeout < 0 || sunriseTimeout > 3600000) {\n sunriseTimeout = 3600000;\n }\n\n // Sunset\n let sunsetTimeout = todaySunset.getTime() - nowDate.getTime();\n if (sunsetTimeout < 0 || sunsetTimeout > 3600000) {\n sunsetTimeout = 3600000;\n }\n\n const isDayTime: ioBroker.State | null | undefined = await this.getStateAsync('variables.isDayTime');\n let isDay: boolean;\n if (sunriseTimeout < 5000) {\n isDay = true;\n } else if (sunsetTimeout < 5000) {\n isDay = false;\n } else {\n // check if in between\n isDay = nowDate.getTime() > todaySunrise.getTime() - 60000 && nowDate <= todaySunset;\n }\n\n const valDayTime = isDayTime ? !!isDayTime.val : false;\n if (valDayTime !== isDay || isDayTime === null) {\n await this.setState('variables.isDayTime', isDay, true);\n }\n\n const dayLightSaving: ioBroker.State | null | undefined =\n await this.getStateAsync('variables.isDaylightSaving');\n const isDayLightSaving = dstOffsetAtDate(nowDate) !== 0;\n const val = dayLightSaving ? !!dayLightSaving.val : false;\n\n if (val !== isDayLightSaving || dayLightSaving === null) {\n await this.setState('variables.isDaylightSaving', isDayLightSaving, true);\n }\n\n let nextTimeout = sunriseTimeout;\n if (sunriseTimeout > sunsetTimeout) {\n nextTimeout = sunsetTimeout;\n }\n nextTimeout = nextTimeout - 3000;\n if (nextTimeout < 3000) {\n nextTimeout = 3000;\n }\n\n this.dayScheduleTimer = setTimeout(() => this.dayTimeSchedules(), nextTimeout);\n }\n\n stopTimeSchedules(): void {\n if (this.dayScheduleTimer) {\n clearTimeout(this.dayScheduleTimer);\n this.dayScheduleTimer = null;\n }\n if (this.sunScheduleTimer) {\n clearTimeout(this.sunScheduleTimer);\n this.sunScheduleTimer = null;\n }\n if (this.timeScheduleTimer) {\n clearTimeout(this.timeScheduleTimer);\n this.timeScheduleTimer = null;\n }\n }\n\n async patchFont(): Promise {\n let stat: Stats | undefined;\n let dbFile: Buffer | undefined;\n let fileName = `${__dirname}/../admin/vs/base/browser/ui/codicons/codicon/codicon.ttf`;\n let jsonFileName = `${__dirname}/../admin/vsFont/codicon.json`;\n try {\n if (existsSync(fileName)) {\n stat = statSync(fileName);\n }\n if (!stat) {\n jsonFileName = `${__dirname}/admin/vsFont/codicon.json`;\n fileName = `${__dirname}/admin/vs/base/browser/ui/codicons/codicon/codicon.ttf`;\n if (existsSync(fileName)) {\n stat = statSync(fileName);\n }\n }\n const _dbFile = await this.readFileAsync(\n 'javascript.admin',\n `vs/base/browser/ui/codicons/codicon/codicon.ttf`,\n );\n if (_dbFile?.file) {\n dbFile = _dbFile.file as Buffer;\n }\n } catch {\n // ignore\n }\n\n if (stat?.size !== 73452 || dbFile?.byteLength !== 73452) {\n try {\n const buffer = Buffer.from(JSON.parse(readFileSync(jsonFileName).toString()), 'base64');\n\n const jszip = await import('jszip');\n const zip = await jszip.loadAsync(buffer);\n let data: ArrayBuffer | undefined;\n if (zip) {\n data = await zip.file('codicon.ttf')?.async('arraybuffer');\n if (data?.byteLength !== 73452) {\n this.log.error(`Cannot patch font: invalid font file!`);\n return false;\n }\n } else {\n this.log.error(`Cannot patch font: invalid font file!`);\n return false;\n }\n writeFileSync(fileName, Buffer.from(data));\n // upload this file\n await this.writeFileAsync(\n 'javascript.admin',\n 'vs/base/browser/ui/codicons/codicon/codicon.ttf',\n Buffer.from(data),\n );\n return true;\n } catch (err: unknown) {\n this.log.error(`Cannot patch font: ${err as Error}`);\n return false;\n }\n }\n return false;\n }\n\n async sunTimeSchedules(): Promise {\n if (this.config.createAstroStates) {\n if (!isNaN(this.config.longitude) && !isNaN(this.config.longitude)) {\n const calcDate = getAstroStartOfDay();\n\n const times = this.mods.suncalc.getTimes(calcDate, this.config.latitude, this.config.longitude);\n\n this.log.debug(`[sunTimeSchedules] Times: ${JSON.stringify(times)}`);\n\n for (const t in times) {\n try {\n const objId = `variables.astro.${t}`;\n\n await this.setObjectNotExistsAsync(objId, {\n type: 'state',\n common: {\n name: `Astro ${t}`,\n type: 'string',\n role: 'value',\n read: true,\n write: false,\n },\n native: {},\n });\n\n if (times[t] !== null && !isNaN(times[t].getTime())) {\n const timeFormatted = formatHoursMinutesSeconds(times[t]);\n await this.setState(objId, {\n val: timeFormatted,\n c: times[t].toISOString(),\n ack: true,\n });\n } else {\n await this.setState(objId, { val: null, c: 'n/a', ack: true, q: 0x01 });\n }\n } catch (err: unknown) {\n this.log.error(\n `[sunTimeSchedules] Unable to set state for astro time \"${t}\" (${times[t].getTime()}): ${err as Error}`,\n );\n }\n }\n\n const todayDate = new Date();\n todayDate.setHours(0);\n todayDate.setMinutes(0);\n todayDate.setSeconds(1);\n todayDate.setMilliseconds(0);\n todayDate.setDate(todayDate.getDate() + 1);\n\n this.log.debug(`[sunTimeSchedules] Next: ${todayDate.toISOString()}`);\n this.sunScheduleTimer = setTimeout(() => this.sunTimeSchedules(), todayDate.getTime() - Date.now());\n }\n } else {\n // remove astro states if disabled\n this.delObject('variables.astro', { recursive: true });\n }\n }\n\n /**\n * Redirects the virtual-tsc log output to the ioBroker log\n */\n tsLog = (message: string, severity?: ioBroker.LogLevel): void => {\n // shift the severities around, we don't care about the small details\n if (!severity || severity === 'info') {\n severity = 'debug';\n } else if (severity === 'debug') {\n // Don't spam build logs on Travis\n if (isCI) {\n return;\n }\n severity = 'silly';\n }\n\n if (this?.log) {\n this.log[severity](message);\n } else {\n console.log(`[${severity.toUpperCase()}] ${message}`);\n }\n };\n\n addGetProperty(object: Record): void {\n try {\n Object.defineProperty(object, 'get', {\n value: function (id: string): any {\n return this[id] || this[`${this.namespace}.${id}`];\n },\n enumerable: false,\n });\n } catch {\n console.error('Cannot install get property');\n }\n }\n\n /**\n * Add declarations for global scripts\n *\n * @param scriptID - The current script the declarations were generated from\n * @param declarations - Declarations from a script\n */\n provideDeclarationsForGlobalScript(scriptID: string, declarations: string): void {\n // Remember which declarations this global script had access to;\n // we need this so the editor doesn't show a duplicate identifier error\n if (this.globalDeclarations != null && this.globalDeclarations !== '') {\n this.knownGlobalDeclarationsByScript[scriptID] = this.globalDeclarations;\n }\n // and concatenate the global declarations for the next scripts\n this.globalDeclarations += `${declarations}\\n`;\n // remember all previously generated global declarations,\n // so global scripts can reference each other\n const globalDeclarationPath = 'global.d.ts';\n tsAmbient[globalDeclarationPath] = this.globalDeclarations;\n // make sure the next script compilation has access to the updated declarations\n this.tsServer.provideAmbientDeclarations({\n [globalDeclarationPath]: this.globalDeclarations,\n });\n jsDeclarationServer.provideAmbientDeclarations({\n [globalDeclarationPath]: this.globalDeclarations,\n });\n }\n\n fixLineNo(line: string): string {\n if (line.includes('javascript.js:')) {\n return line;\n }\n if (!/scripts?\\.js[.\\\\/]/.test(line)) {\n return line;\n }\n if (/:(\\d+):/.test(line)) {\n line = line.replace(\n /:(\\d+):/,\n (_$0, $1) => `:${$1 > this.globalScriptLines + 1 ? $1 - this.globalScriptLines - 1 : $1}:`,\n ); // one line for 'async function ()'\n } else {\n line = line.replace(\n /:(\\d+)$/,\n (_$0, $1) => `:${$1 > this.globalScriptLines + 1 ? $1 - this.globalScriptLines - 1 : $1}`,\n ); // one line for 'async function ()'\n }\n return line;\n }\n\n async debugStop(): Promise {\n if (this.debugState.child) {\n this.debugSendToInspector({ cmd: 'end' });\n this.debugState.endTimeout = setTimeout(() => {\n this.debugState.endTimeout = null;\n this.debugState.child?.kill('SIGTERM');\n }, 500);\n this.debugState.promiseOnEnd ||= Promise.resolve(0);\n } else {\n this.debugState.promiseOnEnd = Promise.resolve(0);\n }\n\n await this.debugState.promiseOnEnd;\n\n this.debugState.child = null;\n this.debugState.running = false;\n this.debugState.scriptName = '';\n if (this.debugState.endTimeout) {\n clearTimeout(this.debugState.endTimeout);\n this.debugState.endTimeout = null;\n }\n }\n\n async debugDisableScript(id: string | undefined): Promise {\n if (id) {\n const obj = this.objects[id];\n if (obj?.common?.enabled) {\n await this.extendForeignObjectAsync(obj._id, { common: { enabled: false } });\n }\n }\n }\n\n debugSendToInspector(message: any): void {\n if (this.debugState.child) {\n try {\n this.log.info(`send to debugger: ${message}`);\n this.debugState.child.send(message);\n } catch {\n void this.debugStop().then(() =>\n this.log.info(\n `${this.debugState.scriptName}: Debugging was stopped, because started in normal mode`,\n ),\n );\n }\n } else {\n this.log.error(`${this.debugState.scriptName}: Cannot send command to terminated inspector`);\n void this.setState(\n 'debug.from',\n JSON.stringify({ cmd: 'error', error: `Cannot send command to terminated inspector`, id: 1 }),\n true,\n );\n }\n }\n\n debugStart(data: { breakOnStart?: boolean; scriptName?: string; adapter?: string }): void {\n if (Date.now() - this.debugState.started < 1000) {\n console.log('Start ignored');\n return;\n }\n\n this.debugState.started = Date.now();\n // stop the script if it's running\n void this.debugDisableScript(data.scriptName)\n .then(() => this.debugStop())\n .then(() => {\n if (data.adapter) {\n this.debugState.adapterInstance = data.adapter;\n this.debugState.scriptName = '';\n } else {\n this.debugState.adapterInstance = '';\n this.debugState.scriptName = data.scriptName as string;\n }\n\n this.debugState.breakOnStart = data.breakOnStart;\n\n this.debugState.promiseOnEnd = new Promise(resolve => {\n const options: ForkOptions = {\n stdio: ['ignore', 'inherit', 'inherit', 'ipc'],\n //stdio: ['pipe', 'pipe', 'pipe', 'ipc']\n };\n const args: string[] = [];\n if (this.debugState.adapterInstance) {\n args.push('--breakOnStart');\n }\n\n this.debugState.child = fork(`${__dirname}/lib/inspect.js`, args, options);\n\n /*debugState.child.stdout.setEncoding('utf8');\n debugState.child.stderr.setEncoding('utf8');\n debugState.child.stdout.on('data', childPrint);\n debugState.child.stderr.on('data', childPrint);*/\n\n this.debugState.child?.on(\n 'message',\n (\n message:\n | string\n | {\n cmd: 'ready' | 'watched' | 'paused' | 'resumed' | 'log' | 'readyToDebug';\n severity?: string;\n text?: string;\n scriptId?: string;\n script?: string;\n },\n ) => {\n let oMessage: {\n cmd: 'ready' | 'watched' | 'paused' | 'resumed' | 'log' | 'readyToDebug';\n severity?: string;\n text?: string;\n scriptId?: string;\n script?: string;\n };\n if (typeof message === 'string') {\n try {\n oMessage = JSON.parse(message);\n } catch {\n return this.log.error(`Cannot parse message from inspector: ${message}`);\n }\n } else {\n oMessage = message;\n }\n\n if (oMessage.cmd !== 'ready') {\n void this.setState('debug.from', JSON.stringify(oMessage), true);\n }\n\n switch (oMessage.cmd) {\n case 'ready': {\n this.debugSendToInspector({\n cmd: 'start',\n scriptName: this.debugState.scriptName,\n adapterInstance: this.debugState.adapterInstance,\n instance: this.instance,\n });\n break;\n }\n\n case 'watched': {\n //console.log(`WATCHED: ${JSON.stringify(oMessage)}`);\n break;\n }\n\n case 'paused': {\n this.debugState.paused = true;\n console.log(`host: PAUSED`);\n break;\n }\n\n case 'resumed': {\n this.debugState.paused = false;\n //console.log(`STARTED`);\n break;\n }\n\n case 'log': {\n console.log(`[${oMessage.severity}] ${oMessage.text}`);\n break;\n }\n\n case 'readyToDebug': {\n console.log(\n `host: readyToDebug (set breakpoints): [${oMessage.scriptId}] ${oMessage.script}`,\n );\n break;\n }\n }\n },\n );\n this.debugState.child?.on('error', error => {\n this.log.error(`Cannot start inspector: ${error}`);\n void this.setState('debug.from', JSON.stringify({ cmd: 'error', error }), true);\n });\n\n this.debugState.child?.on('exit', async (code: number): Promise => {\n if (code) {\n await this.setState(\n 'debug.from',\n JSON.stringify({ cmd: 'error', error: `invalid response code: ${code}` }),\n true,\n );\n }\n await this.setState('debug.from', JSON.stringify({ cmd: 'debugStopped', code }), true);\n this.debugState.child = null;\n resolve(code);\n });\n });\n });\n }\n}\n\nfunction patternMatching(\n event: EventObj,\n patternFunctions: PatternEventCompareFunction[] & { logic?: 'and' | 'or' },\n): boolean {\n const logic = patternFunctions.logic ?? 'and';\n for (let i = 0, len = patternFunctions.length; i < len; i++) {\n const result = patternFunctions[i](event);\n if (logic === 'and' && !result) {\n return false; // short-circuit AND – one false is enough\n }\n if (logic === 'or' && result) {\n return true; // short-circuit OR – one true is enough\n }\n }\n // AND: all passed → true; OR: none matched → false\n return logic === 'and';\n}\n\n// If started as allInOne mode => return function to create an instance\nif (require.main !== module) {\n // Export the constructor in compact mode\n module.exports = (options: Partial | undefined) => new JavaScript(options);\n} else {\n // otherwise start the instance directly\n (() => new JavaScript())();\n}\n"]} \ No newline at end of file diff --git a/build/types.d.ts b/build/types.d.ts index c1ff150bb..1d07ca0a4 100644 --- a/build/types.d.ts +++ b/build/types.d.ts @@ -40,6 +40,12 @@ export interface JavaScriptAdapterConfig { geminiKey: string; deepseekKey: string; password?: string; + credentialType?: 'manual' | 'manager'; + credentialIdGptKey?: string; + credentialIdClaudeKey?: string; + credentialIdGeminiKey?: string; + credentialIdDeepseekKey?: string; + credentialIdGptBaseUrlKey?: string; } export type CommonAlias = { diff --git a/io-package.json b/io-package.json index dc33dda34..135a6fc5b 100644 --- a/io-package.json +++ b/io-package.json @@ -548,7 +548,13 @@ "gptBaseUrlKey": "", "claudeKey": "", "geminiKey": "", - "deepseekKey": "" + "deepseekKey": "", + "credentialType": "manual", + "credentialIdGptKey": "", + "credentialIdClaudeKey": "", + "credentialIdGeminiKey": "", + "credentialIdDeepseekKey": "", + "credentialIdGptBaseUrlKey": "" }, "encryptedNative": [ "gptKey", diff --git a/package-lock.json b/package-lock.json index be231a5a3..1bd1bacdc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,10299 +1,10076 @@ { - "name": "iobroker.javascript", - "version": "9.2.4", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "iobroker.javascript", - "version": "9.2.4", - "license": "MIT", - "dependencies": { - "@iobroker/adapter-core": "^3.3.2", - "@iobroker/types": "^7.1.2", - "@types/node": "^20.19.42", - "axios": "^1.17.0", - "jsonata": "^2.2.1", - "jszip": "^3.10.1", - "node-inspect": "^2.0.0", - "node-schedule": "2.1.1", - "nodemailer": "^8.0.10", - "prettier": "^3.8.3", - "promisify-child-process": "^5.0.1", - "semver": "^7.8.2", - "suncalc2": "^1.8.1", - "typescript": "5.9.3", - "virtual-tsc": "^0.6.2", - "wake_on_lan": "^1.0.0" - }, - "devDependencies": { - "@alcalzone/release-script": "^5.2.1", - "@alcalzone/release-script-plugin-iobroker": "^5.2.0", - "@alcalzone/release-script-plugin-license": "^5.2.0", - "@iobroker/adapter-dev": "^1.5.0", - "@iobroker/build-tools": "^3.0.1", - "@iobroker/eslint-config": "^2.2.0", - "@iobroker/plugin-sentry": "^3.0.4", - "@iobroker/testing": "^5.2.2", - "@iobroker/vis-2-widgets-react-dev": "^4.0.4", - "@types/node-schedule": "^2.1.8", - "@types/nodemailer": "^7.0.11", - "@types/request": "^2.48.13", - "@types/suncalc": "^1.9.2", - "alcalzone-shared": "^5.0.0", - "timekeeper": "^2.3.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@alcalzone/esbuild-register": { - "version": "2.5.1-1", - "resolved": "https://registry.npmjs.org/@alcalzone/esbuild-register/-/esbuild-register-2.5.1-1.tgz", - "integrity": "sha512-u19/K/ZaiWQhYIQZeF2FImUeJDiMD4i2h7qPdU0HVFCxoQynye59N4oy6EvjxeXaxLnGkppcb5KKeiYD4cT1iQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "esbuild": "^0.11.5", - "jsonc-parser": "^3.0.0" - } - }, - "node_modules/@alcalzone/esbuild-register/node_modules/esbuild": { - "version": "0.11.23", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.11.23.tgz", - "integrity": "sha512-iaiZZ9vUF5wJV8ob1tl+5aJTrwDczlvGP0JoMmnpC2B0ppiMCu8n8gmy5ZTGl5bcG081XBVn+U+jP+mPFm5T5Q==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - } - }, - "node_modules/@alcalzone/pak": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/@alcalzone/pak/-/pak-0.12.0.tgz", - "integrity": "sha512-9r0zM5JAVTuPma1M/nMXiIlihQ07bWnxiYdqQrRsqFcWfm/p2hATbMtDMBXonkKZZGuOQxEMzTk7kpzGgnEJEQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ky": "^1.14.3", - "nano-spawn": "^2.0.0", - "semver": "^7.7.4", - "tiny-glob": "^0.2.9" - }, - "engines": { - "node": ">= 20" - } - }, - "node_modules/@alcalzone/release-script": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-5.2.1.tgz", - "integrity": "sha512-d7aeYU/c1fKcBRkZGpfLLAK6zjpOPV00NzdsYKap9uTdlBqrC5d/OlY7n9Jet0eKTzygKsz7mtPlV8t5GNPGPg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@alcalzone/release-script-core": "5.2.0", - "@alcalzone/release-script-plugin-changelog": "5.2.1", - "@alcalzone/release-script-plugin-exec": "5.2.0", - "@alcalzone/release-script-plugin-git": "5.2.0", - "@alcalzone/release-script-plugin-package": "5.2.0", - "@alcalzone/release-script-plugin-version": "5.2.0", - "alcalzone-shared": "^5.0.0", - "enquirer": "^2.3.6", - "picocolors": "1.0.0", - "semver": "^7.7.2", - "source-map-support": "^0.5.21", - "yargs": "^17.4.1" - }, - "bin": { - "release-script": "bin/release.js" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@alcalzone/release-script-core": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-5.2.0.tgz", - "integrity": "sha512-xR09iP7pr9hpkdjvSQBxFTyV1MEvUQ+4ar5p0RUl5ogPqVqTF+r4GYkrOvZsxSFfTrU/Fm0TVC29mJ0UkmFrOw==", - "dev": true, - "license": "MIT", - "dependencies": { - "execa": "^5.1.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@alcalzone/release-script-plugin-changelog": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-changelog/-/release-script-plugin-changelog-5.2.1.tgz", - "integrity": "sha512-IUbwNQW6r5O40FUKGz3yHumnca6o8Xct/d4+7wslkcjnBMbUR5CMlt0/QCi/Xs9jNhumvLV9w7pNkku2WCz/xg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@alcalzone/release-script-core": "5.2.0", - "alcalzone-shared": "^5.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@alcalzone/release-script-plugin-exec": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-exec/-/release-script-plugin-exec-5.2.0.tgz", - "integrity": "sha512-YCLHx+W0MqYYR54scElkjcF3E16iqoh8j5aanmNMhoYTQYkBLX162zgIF/Ivx9kxVe47RNZhwdfg7sJd18ftKg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@alcalzone/release-script-core": "5.2.0", - "alcalzone-shared": "^5.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@alcalzone/release-script-plugin-git": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-git/-/release-script-plugin-git-5.2.0.tgz", - "integrity": "sha512-CDR1gVIKXp2RyYSKhOHxma2m7AH5p8Ont+Mlq2W5rWxCyhvxkKhSP363QoElWCTRIvYWLkwsR6Tf0KAyXf/mBQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@alcalzone/release-script-core": "5.2.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@alcalzone/release-script-plugin-iobroker": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-iobroker/-/release-script-plugin-iobroker-5.2.0.tgz", - "integrity": "sha512-xBjEXvleAd3vencWmwLt1BtI8ibueZWWD5Trzf2AyyIpN0LTSAa6oz+MCN9xafgBFYueaKXDmA1OARiKaiupSA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@alcalzone/release-script-core": "5.2.0", - "alcalzone-shared": "^5.0.0", - "ky": "^1.7.5", - "semver": "^7.7.2" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@alcalzone/release-script-plugin-license": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-license/-/release-script-plugin-license-5.2.0.tgz", - "integrity": "sha512-DeawSM2g9rWF355iQRBIrO69/Yct0Og6yhgFJjFCSGc3WNBq22l0GzalO1yIL84Ln12tnBhT7n9I+aOuJSnUNQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@alcalzone/release-script-core": "5.2.0", - "tiny-glob": "^0.2.9" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@alcalzone/release-script-plugin-package": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-5.2.0.tgz", - "integrity": "sha512-lgvd33pKJ2dCxEe8aVzNHTc7AIfv195URBmfu57NioWQhFAOISdNRMPzOWAqsDyOumYXGMGPBIPjUkCTGgYyKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@alcalzone/pak": "^0.12.0", - "@alcalzone/release-script-core": "5.2.0", - "alcalzone-shared": "^5.0.0", - "semver": "^7.7.2" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@alcalzone/release-script-plugin-version": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-version/-/release-script-plugin-version-5.2.0.tgz", - "integrity": "sha512-OeM4lpzou7SVtTdD1Jmfj+kq3LgLr9ed2EphoWfCeJe/ES5+ARhcqbTibfDX8K98lehil9Uc5l1T9NlrdlkzZQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@alcalzone/release-script-core": "5.2.0", - "alcalzone-shared": "^5.0.0", - "semver": "^7.7.2", - "tiny-glob": "^0.2.9" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", - "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/runtime": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz", - "integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==", - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@emotion/cache": { - "version": "11.14.0", - "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.14.0.tgz", - "integrity": "sha512-L/B1lc/TViYk4DcpGxtAVbx0ZyiKM5ktoIyafGkH6zg/tj+mA+NE//aPYKG0k8kCHSHVJrpLpcAlOBEXQ3SavA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@emotion/memoize": "^0.9.0", - "@emotion/sheet": "^1.4.0", - "@emotion/utils": "^1.4.2", - "@emotion/weak-memoize": "^0.4.0", - "stylis": "4.2.0" - } - }, - "node_modules/@emotion/hash": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.2.tgz", - "integrity": "sha512-MyqliTZGuOm3+5ZRSaaBGP3USLw6+EGykkwZns2EPC5g8jJ4z9OrdZY9apkl3+UP9+sdz76YYkwCKP5gh8iY3g==", - "dev": true, - "license": "MIT" - }, - "node_modules/@emotion/memoize": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.9.0.tgz", - "integrity": "sha512-30FAj7/EoJ5mwVPOWhAyCX+FPfMDrVecJAM+Iw9NRoSl4BBAQeqj4cApHHUXOVvIPgLVDsCFoz/hGD+5QQD1GQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@emotion/serialize": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.3.3.tgz", - "integrity": "sha512-EISGqt7sSNWHGI76hC7x1CksiXPahbxEOrC5RjmFRJTqLyEK9/9hZvBbiYn70dw4wuwMKiEMCUlR6ZXTSWQqxA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@emotion/hash": "^0.9.2", - "@emotion/memoize": "^0.9.0", - "@emotion/unitless": "^0.10.0", - "@emotion/utils": "^1.4.2", - "csstype": "^3.0.2" - } - }, - "node_modules/@emotion/sheet": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.4.0.tgz", - "integrity": "sha512-fTBW9/8r2w3dXWYM4HCB1Rdp8NLibOw2+XELH5m5+AkWiL/KqYX6dc0kKYlaYyKjrQ6ds33MCdMPEwgs2z1rqg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@emotion/unitless": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.10.0.tgz", - "integrity": "sha512-dFoMUuQA20zvtVTuxZww6OHoJYgrzfKM1t52mVySDJnMSEa08ruEvdYQbhvyu6soU+NeLVd3yKfTfT0NeV6qGg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@emotion/utils": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.4.2.tgz", - "integrity": "sha512-3vLclRofFziIa3J2wDh9jjbkUz9qk5Vi3IZ/FSTKViB0k+ef0fPV7dYrUIugbgupYDx7v9ud/SjrtEP8Y4xLoA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@emotion/weak-memoize": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.4.0.tgz", - "integrity": "sha512-snKqtPW01tN0ui7yu9rGv69aJXr/a/Ywvl11sUjNtEcRc+ng/mQriFL0wLXMef74iHa/EkftbDzU9F8iFbH+zg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@es-joy/jsdoccomment": { - "version": "0.56.0", - "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.56.0.tgz", - "integrity": "sha512-c6EW+aA1w2rjqOMjbL93nZlwxp6c1Ln06vTYs5FjRRhmJXK8V/OrSXdT+pUr4aRYgjCgu8/OkiZr0tzeVrRSbw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@types/estree": "^1.0.8", - "@typescript-eslint/types": "^8.42.0", - "comment-parser": "1.4.1", - "esquery": "^1.6.0", - "jsdoc-type-pratt-parser": "~5.1.0" - }, - "engines": { - "node": ">=20.11.0" - } - }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.11.tgz", - "integrity": "sha512-Xt1dOL13m8u0WE8iplx9Ibbm+hFAO0GsU2P34UNoDGvZYkY8ifSiy6Zuc1lYxfG7svWE2fzqCUmFp5HCn51gJg==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.11.tgz", - "integrity": "sha512-uoa7dU+Dt3HYsethkJ1k6Z9YdcHjTrSb5NUy66ZfZaSV8hEYGD5ZHbEMXnqLFlbBflLsl89Zke7CAdDJ4JI+Gg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.11.tgz", - "integrity": "sha512-9slpyFBc4FPPz48+f6jyiXOx/Y4v34TUeDDXJpZqAWQn/08lKGeD8aDp9TMn9jDz2CiEuHwfhRmGBvpnd/PWIQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.11.tgz", - "integrity": "sha512-Sgiab4xBjPU1QoPEIqS3Xx+R2lezu0LKIEcYe6pftr56PqPygbB7+szVnzoShbx64MUupqoE0KyRlN7gezbl8g==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.11.tgz", - "integrity": "sha512-VekY0PBCukppoQrycFxUqkCojnTQhdec0vevUL/EDOCnXd9LKWqD/bHwMPzigIJXPhC59Vd1WFIL57SKs2mg4w==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.11.tgz", - "integrity": "sha512-+hfp3yfBalNEpTGp9loYgbknjR695HkqtY3d3/JjSRUyPg/xd6q+mQqIb5qdywnDxRZykIHs3axEqU6l1+oWEQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.11.tgz", - "integrity": "sha512-CmKjrnayyTJF2eVuO//uSjl/K3KsMIeYeyN7FyDBjsR3lnSJHaXlVoAK8DZa7lXWChbuOk7NjAc7ygAwrnPBhA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.11.tgz", - "integrity": "sha512-Dyq+5oscTJvMaYPvW3x3FLpi2+gSZTCE/1ffdwuM6G1ARang/mb3jvjxs0mw6n3Lsw84ocfo9CrNMqc5lTfGOw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.11.tgz", - "integrity": "sha512-TBMv6B4kCfrGJ8cUPo7vd6NECZH/8hPpBHHlYI3qzoYFvWu2AdTvZNuU/7hsbKWqu/COU7NIK12dHAAqBLLXgw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.11.tgz", - "integrity": "sha512-Qr8AzcplUhGvdyUF08A1kHU3Vr2O88xxP0Tm8GcdVOUm25XYcMPp2YqSVHbLuXzYQMf9Bh/iKx7YPqECs6ffLA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.11.tgz", - "integrity": "sha512-TmnJg8BMGPehs5JKrCLqyWTVAvielc615jbkOirATQvWWB1NMXY77oLMzsUjRLa0+ngecEmDGqt5jiDC6bfvOw==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.11.tgz", - "integrity": "sha512-DIGXL2+gvDaXlaq8xruNXUJdT5tF+SBbJQKbWy/0J7OhU8gOHOzKmGIlfTTl6nHaCOoipxQbuJi7O++ldrxgMw==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.11.tgz", - "integrity": "sha512-Osx1nALUJu4pU43o9OyjSCXokFkFbyzjXb6VhGIJZQ5JZi8ylCQ9/LFagolPsHtgw6himDSyb5ETSfmp4rpiKQ==", - "cpu": [ - "mips64el" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.11.tgz", - "integrity": "sha512-nbLFgsQQEsBa8XSgSTSlrnBSrpoWh7ioFDUmwo158gIm5NNP+17IYmNWzaIzWmgCxq56vfr34xGkOcZ7jX6CPw==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.11.tgz", - "integrity": "sha512-HfyAmqZi9uBAbgKYP1yGuI7tSREXwIb438q0nqvlpxAOs3XnZ8RsisRfmVsgV486NdjD7Mw2UrFSw51lzUk1ww==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.11.tgz", - "integrity": "sha512-HjLqVgSSYnVXRisyfmzsH6mXqyvj0SA7pG5g+9W7ESgwA70AXYNpfKBqh1KbTxmQVaYxpzA/SvlB9oclGPbApw==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.11.tgz", - "integrity": "sha512-HSFAT4+WYjIhrHxKBwGmOOSpphjYkcswF449j6EjsjbinTZbp8PJtjsVK1XFJStdzXdy/jaddAep2FGY+wyFAQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-arm64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.11.tgz", - "integrity": "sha512-hr9Oxj1Fa4r04dNpWr3P8QKVVsjQhqrMSUzZzf+LZcYjZNqhA3IAfPQdEh1FLVUJSiu6sgAwp3OmwBfbFgG2Xg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.11.tgz", - "integrity": "sha512-u7tKA+qbzBydyj0vgpu+5h5AeudxOAGncb8N6C9Kh1N4n7wU1Xw1JDApsRjpShRpXRQlJLb9wY28ELpwdPcZ7A==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-arm64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.11.tgz", - "integrity": "sha512-Qq6YHhayieor3DxFOoYM1q0q1uMFYb7cSpLD2qzDSvK1NAvqFi8Xgivv0cFC6J+hWVw2teCYltyy9/m/14ryHg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.11.tgz", - "integrity": "sha512-CN+7c++kkbrckTOz5hrehxWN7uIhFFlmS/hqziSFVWpAzpWrQoAG4chH+nN3Be+Kzv/uuo7zhX716x3Sn2Jduw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/openharmony-arm64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.11.tgz", - "integrity": "sha512-rOREuNIQgaiR+9QuNkbkxubbp8MSO9rONmwP5nKncnWJ9v5jQ4JxFnLu4zDSRPf3x4u+2VN4pM4RdyIzDty/wQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.11.tgz", - "integrity": "sha512-nq2xdYaWxyg9DcIyXkZhcYulC6pQ2FuCgem3LI92IwMgIZ69KHeY8T4Y88pcwoLIjbed8n36CyKoYRDygNSGhA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.11.tgz", - "integrity": "sha512-3XxECOWJq1qMZ3MN8srCJ/QfoLpL+VaxD/WfNRm1O3B4+AZ/BnLVgFbUV3eiRYDMXetciH16dwPbbHqwe1uU0Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.11.tgz", - "integrity": "sha512-3ukss6gb9XZ8TlRyJlgLn17ecsK4NSQTmdIXRASVsiS2sQ6zPPZklNJT5GR5tE/MUarymmy8kCEf5xPCNCqVOA==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.11.tgz", - "integrity": "sha512-D7Hpz6A2L4hzsRpPaCYkQnGOotdUpDzSGRIv9I+1ITdHROSFUWW95ZPZWQmGka1Fg7W3zFJowyn9WGwMJ0+KPA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=18" - } - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", - "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", - "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/config-array": { - "version": "0.21.1", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.1.tgz", - "integrity": "sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "@eslint/object-schema": "^2.1.7", - "debug": "^4.3.1", - "minimatch": "^3.1.2" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/config-helpers": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz", - "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "@eslint/core": "^0.17.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/config-helpers/node_modules/@eslint/core": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", - "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "@types/json-schema": "^7.0.15" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/core": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.16.0.tgz", - "integrity": "sha512-nmC8/totwobIiFcGkDza3GIKfAw1+hLiYVrh3I1nIomQ8PEr5cxg34jnkmGawul/ep52wGRAcyeDCNtWKSOj4Q==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "@types/json-schema": "^7.0.15" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", - "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^10.0.1", - "globals": "^14.0.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", - "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@eslint/js": { - "version": "9.38.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.38.0.tgz", - "integrity": "sha512-UZ1VpFvXf9J06YG9xQBdnzU+kthors6KjhMAl6f4gH4usHyh31rUf2DLGInT8RFYIReYXNSydgPY0V2LuWgl7A==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://eslint.org/donate" - } - }, - "node_modules/@eslint/object-schema": { - "version": "2.1.7", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz", - "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/plugin-kit": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz", - "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "@eslint/core": "^0.17.0", - "levn": "^0.4.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/plugin-kit/node_modules/@eslint/core": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", - "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "@types/json-schema": "^7.0.15" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@esm2cjs/execa": { - "version": "6.1.1-cjs.1", - "resolved": "https://registry.npmjs.org/@esm2cjs/execa/-/execa-6.1.1-cjs.1.tgz", - "integrity": "sha512-FHxfnmuDIjY1VS/BLzDkL8EkbcFvi8s6x1nYQ1Nyu0An0n88EJcGhDBcRWLFwt3C3nT7xwI+MwHRH1TZcAFW2w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@esm2cjs/human-signals": "^3.0.1", - "@esm2cjs/is-stream": "^3.0.0", - "@esm2cjs/npm-run-path": "^5.1.1-cjs.0", - "@esm2cjs/onetime": "^6.0.1-cjs.0", - "@esm2cjs/strip-final-newline": "^3.0.1-cjs.0", - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.1", - "merge-stream": "^2.0.0", - "signal-exit": "^3.0.7" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/AlCalzone" - } - }, - "node_modules/@esm2cjs/human-signals": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@esm2cjs/human-signals/-/human-signals-3.0.1.tgz", - "integrity": "sha512-QZme4eF/PwTpeSbMB4AaWGQ4VSygzE30jI+Oas1NPTtZQAgcHwWVDOQpIW8FUmtzn5Q+2cS7AjnTzbtqtc5P6g==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=12.20.0" - }, - "funding": { - "url": "https://github.com/sponsors/AlCalzone" - } - }, - "node_modules/@esm2cjs/is-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@esm2cjs/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-qcBscHlJpZFOD5nnmMHkzOrq2xyvsp9fbVreQLS8x2LOs8N3CrNi3fqvFY0GVJR+YSOHscwhG9T5t4Ck7R7QGw==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/AlCalzone" - } - }, - "node_modules/@esm2cjs/mimic-fn": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@esm2cjs/mimic-fn/-/mimic-fn-4.0.0.tgz", - "integrity": "sha512-LIIAjcpjLr4rcbYmRQ+eRu55Upy/MMB78seIlwqbnyiA+cTa1/pxWnJ1NHJQrw6tx2wMQmlYoJj+wf16NjWH6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/AlCalzone" - } - }, - "node_modules/@esm2cjs/npm-run-path": { - "version": "5.1.1-cjs.0", - "resolved": "https://registry.npmjs.org/@esm2cjs/npm-run-path/-/npm-run-path-5.1.1-cjs.0.tgz", - "integrity": "sha512-CWeAIyE8iNSCgP2ItPE8iPgS+lACqgH+MuFRaWOIl2T7hnHqPFfhAJJ/LcLJJ/RMIxNMeenjFMwc91HW7NWr1A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@esm2cjs/path-key": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/AlCalzone" - } - }, - "node_modules/@esm2cjs/onetime": { - "version": "6.0.1-cjs.0", - "resolved": "https://registry.npmjs.org/@esm2cjs/onetime/-/onetime-6.0.1-cjs.0.tgz", - "integrity": "sha512-MkZMZSxrSC/6yUuAw6Azc56XOgwHQQIsNDlO/zgFmOcycJBhRwRuc/gdYUUOFNZIh7y+f0JSIxkNdJPFvJ5W0w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@esm2cjs/mimic-fn": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/AlCalzone" - } - }, - "node_modules/@esm2cjs/path-key": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@esm2cjs/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-fKzZ3uIIP4j+7WfyG0MEkomGHL0hUXWCx1kY2Zct3GTdl4pyY+3k5lCUxjgdDa2Ld1BCjMNorXnRHiBP6jW6CQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/AlCalzone" - } - }, - "node_modules/@esm2cjs/strip-final-newline": { - "version": "3.0.1-cjs.0", - "resolved": "https://registry.npmjs.org/@esm2cjs/strip-final-newline/-/strip-final-newline-3.0.1-cjs.0.tgz", - "integrity": "sha512-o41riCGPiOEStayoikBCAqwa6igbv9L9rP+k5UCfQ24EJD/wGrdDs/KTNwkHG5JzDK3T60D5dMkWkLKEPy8gjA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/AlCalzone" - } - }, - "node_modules/@fastify/otel": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/@fastify/otel/-/otel-0.17.1.tgz", - "integrity": "sha512-K4wyxfUZx2ux5o+b6BtTqouYFVILohLZmSbA2tKUueJstNcBnoGPVhllCaOvbQ3ZrXdUxUC/fyrSWSCqHhdOPg==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fastify" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fastify" - } - ], - "license": "MIT", - "dependencies": { - "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.212.0", - "@opentelemetry/semantic-conventions": "^1.28.0", - "minimatch": "^10.2.4" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.9.0" - } - }, - "node_modules/@fastify/otel/node_modules/@opentelemetry/api-logs": { - "version": "0.212.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.212.0.tgz", - "integrity": "sha512-TEEVrLbNROUkYY51sBJGk7lO/OLjuepch8+hmpM6ffMJQ2z/KVCjdHuCFX6fJj8OkJP2zckPjrJzQtXU3IAsFg==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/api": "^1.3.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@fastify/otel/node_modules/@opentelemetry/instrumentation": { - "version": "0.212.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.212.0.tgz", - "integrity": "sha512-IyXmpNnifNouMOe0I/gX7ENfv2ZCNdYTF0FpCsoBcpbIHzk81Ww9rQTYTnvghszCg7qGrIhNvWC8dhEifgX9Jg==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/api-logs": "0.212.0", - "import-in-the-middle": "^2.0.6", - "require-in-the-middle": "^8.0.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@fastify/otel/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/@fastify/otel/node_modules/brace-expansion": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.4.tgz", - "integrity": "sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/@fastify/otel/node_modules/import-in-the-middle": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-2.0.6.tgz", - "integrity": "sha512-3vZV3jX0XRFW3EJDTwzWoZa+RH1b8eTTx6YOCjglrLyPuepwoBti1k3L2dKwdCUrnVEfc5CuRuGstaC/uQJJaw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "acorn": "^8.15.0", - "acorn-import-attributes": "^1.9.5", - "cjs-module-lexer": "^2.2.0", - "module-details-from-path": "^1.0.4" - } - }, - "node_modules/@fastify/otel/node_modules/minimatch": { - "version": "10.2.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz", - "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@google-cloud/common": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-6.0.0.tgz", - "integrity": "sha512-IXh04DlkLMxWgYLIUYuHHKXKOUwPDzDgke1ykkkJPe48cGIS9kkL2U/o0pm4ankHLlvzLF/ma1eO86n/bkumIA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@google-cloud/projectify": "^4.0.0", - "@google-cloud/promisify": "^4.0.0", - "arrify": "^2.0.0", - "duplexify": "^4.1.3", - "extend": "^3.0.2", - "google-auth-library": "^10.0.0-rc.1", - "html-entities": "^2.5.2", - "retry-request": "^8.0.0", - "teeny-request": "^10.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@google-cloud/common/node_modules/@google-cloud/promisify": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@google-cloud/promisify/-/promisify-4.1.0.tgz", - "integrity": "sha512-G/FQx5cE/+DqBbOpA5jKsegGwdPniU6PuIEMt+qxWgFxvxuFOzVmp6zYchtYuwAWV5/8Dgs0yAmjvNZv3uXLQg==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18" - } - }, - "node_modules/@google-cloud/projectify": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@google-cloud/projectify/-/projectify-4.0.0.tgz", - "integrity": "sha512-MmaX6HeSvyPbWGwFq7mXdo0uQZLGBYCwziiLIGq5JVX+/bdI3SAq6bP98trV5eTWfLuvsMcIC1YJOF2vfteLFA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@google-cloud/promisify": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@google-cloud/promisify/-/promisify-5.0.0.tgz", - "integrity": "sha512-N8qS6dlORGHwk7WjGXKOSsLjIjNINCPicsOX6gyyLiYk7mq3MtII96NZ9N2ahwA2vnkLmZODOIH9rlNniYWvCQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18" - } - }, - "node_modules/@google-cloud/translate": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@google-cloud/translate/-/translate-9.2.1.tgz", - "integrity": "sha512-7/RWxkMd4fKX88Pzzhr2ly8yOjEepCW4ro4ZsdAUsf2Wo2ZLgp75yNZaQGKBBetgOc8yPVl8djr/2XFIHnWS3w==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@google-cloud/common": "^6.0.0", - "@google-cloud/promisify": "^5.0.0", - "arrify": "^2.0.0", - "extend": "^3.0.2", - "google-gax": "^5.0.0", - "is-html": "^2.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@grpc/grpc-js": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.14.0.tgz", - "integrity": "sha512-N8Jx6PaYzcTRNzirReJCtADVoq4z7+1KQ4E70jTg/koQiMoUSN1kbNjPOqpPbhMFhfU1/l7ixspPl8dNY+FoUg==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@grpc/proto-loader": "^0.8.0", - "@js-sdsl/ordered-map": "^4.4.2" - }, - "engines": { - "node": ">=12.10.0" - } - }, - "node_modules/@grpc/proto-loader": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.8.0.tgz", - "integrity": "sha512-rc1hOQtjIWGxcxpb9aHAfLpIctjEnsDehj0DAiVfBlmT84uvR0uUtN2hEi/ecvWVjXUGf5qPF4qEgiLOx1YIMQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "lodash.camelcase": "^4.3.0", - "long": "^5.0.0", - "protobufjs": "^7.5.3", - "yargs": "^17.7.2" - }, - "bin": { - "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@humanfs/core": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", - "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/node": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", - "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "@humanfs/core": "^0.19.1", - "@humanwhocodes/retry": "^0.4.0" - }, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/retry": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", - "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@iobroker/adapter-core": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-3.3.2.tgz", - "integrity": "sha512-knuCX6F1JUTnY1OdHzDhwNtOoe9/RZgBziDKSzCO3E4koteY/KRqZ7gtzmoavcAokejG68S5osbEnIb4MYT3VA==", - "license": "MIT", - "engines": { - "node": ">=16" - }, - "peerDependencies": { - "@iobroker/types": ">=6.0.11" - } - }, - "node_modules/@iobroker/adapter-dev": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@iobroker/adapter-dev/-/adapter-dev-1.5.0.tgz", - "integrity": "sha512-L1FhO7oxaz4hNMobvgbanSGyn2LaCESGKqPPJhXWU00vVEw5Cc166xdnU63Dk+JDnV5zl/HzOcFANGisETAWIg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@esm2cjs/execa": "^6.1.1-cjs.1", - "@google-cloud/translate": "^9.2.0", - "ansi-colors": "^4.1.3", - "axios": "^1.11.0", - "deepl-node": "^1.19.0", - "esbuild": "^0.25.9", - "fs-extra": "^11.3.1", - "rimraf": "^5.0.10", - "tiny-glob": "^0.2.9", - "yargs": "^18.0.0" - }, - "bin": { - "build-adapter": "bin/build-adapter.js", - "clean-dir": "bin/clean-dir.js", - "translate-adapter": "bin/translate-adapter.js" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@iobroker/adapter-dev/node_modules/ansi-regex": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", - "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@iobroker/adapter-dev/node_modules/ansi-styles": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", - "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@iobroker/adapter-dev/node_modules/cliui": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", - "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^7.2.0", - "strip-ansi": "^7.1.0", - "wrap-ansi": "^9.0.0" - }, - "engines": { - "node": ">=20" - } - }, - "node_modules/@iobroker/adapter-dev/node_modules/emoji-regex": { - "version": "10.6.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", - "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", - "dev": true, - "license": "MIT" - }, - "node_modules/@iobroker/adapter-dev/node_modules/fs-extra": { - "version": "11.3.2", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz", - "integrity": "sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, - "node_modules/@iobroker/adapter-dev/node_modules/string-width": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", - "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@iobroker/adapter-dev/node_modules/strip-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", - "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/@iobroker/adapter-dev/node_modules/wrap-ansi": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", - "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.2.1", - "string-width": "^7.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/@iobroker/adapter-dev/node_modules/yargs": { - "version": "18.0.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.0.0.tgz", - "integrity": "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^9.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "string-width": "^7.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^22.0.0" - }, - "engines": { - "node": "^20.19.0 || ^22.12.0 || >=23" - } - }, - "node_modules/@iobroker/adapter-dev/node_modules/yargs-parser": { - "version": "22.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", - "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", - "dev": true, - "license": "ISC", - "engines": { - "node": "^20.19.0 || ^22.12.0 || >=23" - } - }, - "node_modules/@iobroker/build-tools": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@iobroker/build-tools/-/build-tools-3.0.1.tgz", - "integrity": "sha512-i5PsBOHNscMAqmdYrdYxJUplyFCkTwPUVJVL5iQozbG7+e79bHTHXuLCHwslaN/m5ACfr0KmtpoMram8gzGnPg==", - "dev": true, - "dependencies": { - "glob": "^13.0.1" - }, - "engines": { - "node": ">=20" - } - }, - "node_modules/@iobroker/build-tools/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/@iobroker/build-tools/node_modules/brace-expansion": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.4.tgz", - "integrity": "sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/@iobroker/build-tools/node_modules/glob": { - "version": "13.0.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", - "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "minimatch": "^10.2.2", - "minipass": "^7.1.3", - "path-scurry": "^2.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@iobroker/build-tools/node_modules/lru-cache": { - "version": "11.2.7", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.7.tgz", - "integrity": "sha512-aY/R+aEsRelme17KGQa/1ZSIpLpNYYrhcrepKTZgE+W3WM16YMCaPwOHLHsmopZHELU0Ojin1lPVxKR0MihncA==", - "dev": true, - "license": "BlueOak-1.0.0", - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/@iobroker/build-tools/node_modules/minimatch": { - "version": "10.2.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz", - "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@iobroker/build-tools/node_modules/path-scurry": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz", - "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^11.0.0", - "minipass": "^7.1.2" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@iobroker/eslint-config": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@iobroker/eslint-config/-/eslint-config-2.2.0.tgz", - "integrity": "sha512-89U2d81BUrReVgVFUJwjxYsHSbvjAt8w8OoKavtNp//wkG7JU4n/VnISMEvQqaQt7i0sWc/xSx27TYDx9FXAYg==", - "dev": true, - "peerDependencies": { - "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "^9.34.0", - "@typescript-eslint/eslint-plugin": "^8.40.0", - "@typescript-eslint/parser": "^8.40.0", - "eslint": ">=9.32.0", - "eslint-config-prettier": "^10.1.8", - "eslint-plugin-import": "^2.30.0", - "eslint-plugin-jsdoc": "^54.1.1", - "eslint-plugin-prettier": "^5.5.4", - "eslint-plugin-react": "^7.37.5", - "eslint-plugin-react-hooks": "^5.2.0", - "eslint-plugin-unicorn": "^60.0.0", - "globals": "^16.3.0", - "prettier": ">=3.6.2", - "typescript-eslint": "^8.40.0" - } - }, - "node_modules/@iobroker/plugin-base": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@iobroker/plugin-base/-/plugin-base-3.0.3.tgz", - "integrity": "sha512-pUKOz9/ZqIDxPQo9E97UdCF6p8NyO+x9REAQYPQNmwkElWq0bka9tgphx+RTUj8inZoYbUd50o9YnotV5C/Jpg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@iobroker/plugin-sentry": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@iobroker/plugin-sentry/-/plugin-sentry-3.0.4.tgz", - "integrity": "sha512-VCHQ9zo5TKyO+A1xpWD8xXe/nW6/BYbEKFxAqHvfDM4U2R0wERZtbH6Ztg3lfV+JRwUn5TgqVRNXvHkvolgPHg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@iobroker/plugin-base": "^3.0.3", - "@sentry/integrations": "^7.114.0", - "@sentry/node": "^10.32.1", - "source-map-support": "^0.5.21" - } - }, - "node_modules/@iobroker/testing": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/@iobroker/testing/-/testing-5.2.2.tgz", - "integrity": "sha512-AiYi9qziPLiNDcwZJa3tcgdSjIq9lq7z4QFvWY9w099chmKOWyvUgWzDy3S/R3L7lJ0yviOeNEdpOHtX4wTf6g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@alcalzone/esbuild-register": "^2.5.1-1", - "@types/chai": "^4.3.20", - "@types/chai-as-promised": "^7.1.8", - "@types/mocha": "^10.0.10", - "@types/sinon": "^17.0.4", - "@types/sinon-chai": "^3.2.12", - "alcalzone-shared": "~5.0.0", - "chai": "^4.5.0", - "chai-as-promised": "^7.1.2", - "debug": "^4.4.3", - "fs-extra": "^11.3.2", - "json5": "^2.2.3", - "mocha": "^11.7.3", - "sinon": "^21.0.0", - "sinon-chai": "^3.7.0" - } - }, - "node_modules/@iobroker/testing/node_modules/fs-extra": { - "version": "11.3.2", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz", - "integrity": "sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, - "node_modules/@iobroker/testing/node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@iobroker/types": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/@iobroker/types/-/types-7.1.2.tgz", - "integrity": "sha512-6ci2ow3cHoIDIQEQh48lCG08MzgUdH8SGL5ks3kl2UBA2yAfSn5lEWs3BPoGiJS9wYTsBfKMas2fUHmTU1/A4g==", - "license": "MIT", - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@iobroker/vis-2-widgets-react-dev": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@iobroker/vis-2-widgets-react-dev/-/vis-2-widgets-react-dev-4.0.4.tgz", - "integrity": "sha512-l7jOrzwE9gxLtQCYyF/BXPMaFpT6fZHq6BoH9BAm/GhmoGzkh708zSx5jHfo0E6Dj4XnY/lgil+77tbDZeR6Gw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@mui/icons-material": "^6.1.8", - "@mui/material": "^6.1.8", - "@sentry/browser": "^8.40.0", - "acorn": "^8.14.0", - "acorn-jsx": "^5.3.2", - "acorn-jsx-walk": "^2.0.0", - "acorn-walk": "^8.3.4", - "node-dir": "^0.1.17" - } - }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", - "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", - "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/@js-sdsl/ordered-map": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz", - "integrity": "sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==", - "dev": true, - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/js-sdsl" - } - }, - "node_modules/@mui/core-downloads-tracker": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-6.5.0.tgz", - "integrity": "sha512-LGb8t8i6M2ZtS3Drn3GbTI1DVhDY6FJ9crEey2lZ0aN2EMZo8IZBZj9wRf4vqbZHaWjsYgtbOnJw5V8UWbmK2Q==", - "dev": true, - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui-org" - } - }, - "node_modules/@mui/icons-material": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-6.5.0.tgz", - "integrity": "sha512-VPuPqXqbBPlcVSA0BmnoE4knW4/xG6Thazo8vCLWkOKusko6DtwFV6B665MMWJ9j0KFohTIf3yx2zYtYacvG1g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.26.0" - }, - "engines": { - "node": ">=14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui-org" - }, - "peerDependencies": { - "@mui/material": "^6.5.0", - "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", - "react": "^17.0.0 || ^18.0.0 || ^19.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@mui/material": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@mui/material/-/material-6.5.0.tgz", - "integrity": "sha512-yjvtXoFcrPLGtgKRxFaH6OQPtcLPhkloC0BML6rBG5UeldR0nPULR/2E2BfXdo5JNV7j7lOzrrLX2Qf/iSidow==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.26.0", - "@mui/core-downloads-tracker": "^6.5.0", - "@mui/system": "^6.5.0", - "@mui/types": "~7.2.24", - "@mui/utils": "^6.4.9", - "@popperjs/core": "^2.11.8", - "@types/react-transition-group": "^4.4.12", - "clsx": "^2.1.1", - "csstype": "^3.1.3", - "prop-types": "^15.8.1", - "react-is": "^19.0.0", - "react-transition-group": "^4.4.5" - }, - "engines": { - "node": ">=14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui-org" - }, - "peerDependencies": { - "@emotion/react": "^11.5.0", - "@emotion/styled": "^11.3.0", - "@mui/material-pigment-css": "^6.5.0", - "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", - "react": "^17.0.0 || ^18.0.0 || ^19.0.0", - "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" - }, - "peerDependenciesMeta": { - "@emotion/react": { - "optional": true - }, - "@emotion/styled": { - "optional": true - }, - "@mui/material-pigment-css": { - "optional": true - }, - "@types/react": { - "optional": true - } - } - }, - "node_modules/@mui/private-theming": { - "version": "6.4.9", - "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-6.4.9.tgz", - "integrity": "sha512-LktcVmI5X17/Q5SkwjCcdOLBzt1hXuc14jYa7NPShog0GBDCDvKtcnP0V7a2s6EiVRlv7BzbWEJzH6+l/zaCxw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.26.0", - "@mui/utils": "^6.4.9", - "prop-types": "^15.8.1" - }, - "engines": { - "node": ">=14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui-org" - }, - "peerDependencies": { - "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", - "react": "^17.0.0 || ^18.0.0 || ^19.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@mui/styled-engine": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-6.5.0.tgz", - "integrity": "sha512-8woC2zAqF4qUDSPIBZ8v3sakj+WgweolpyM/FXf8jAx6FMls+IE4Y8VDZc+zS805J7PRz31vz73n2SovKGaYgw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.26.0", - "@emotion/cache": "^11.13.5", - "@emotion/serialize": "^1.3.3", - "@emotion/sheet": "^1.4.0", - "csstype": "^3.1.3", - "prop-types": "^15.8.1" - }, - "engines": { - "node": ">=14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui-org" - }, - "peerDependencies": { - "@emotion/react": "^11.4.1", - "@emotion/styled": "^11.3.0", - "react": "^17.0.0 || ^18.0.0 || ^19.0.0" - }, - "peerDependenciesMeta": { - "@emotion/react": { - "optional": true - }, - "@emotion/styled": { - "optional": true - } - } - }, - "node_modules/@mui/system": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/@mui/system/-/system-6.5.0.tgz", - "integrity": "sha512-XcbBYxDS+h/lgsoGe78ExXFZXtuIlSBpn/KsZq8PtZcIkUNJInkuDqcLd2rVBQrDC1u+rvVovdaWPf2FHKJf3w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.26.0", - "@mui/private-theming": "^6.4.9", - "@mui/styled-engine": "^6.5.0", - "@mui/types": "~7.2.24", - "@mui/utils": "^6.4.9", - "clsx": "^2.1.1", - "csstype": "^3.1.3", - "prop-types": "^15.8.1" - }, - "engines": { - "node": ">=14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui-org" - }, - "peerDependencies": { - "@emotion/react": "^11.5.0", - "@emotion/styled": "^11.3.0", - "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", - "react": "^17.0.0 || ^18.0.0 || ^19.0.0" - }, - "peerDependenciesMeta": { - "@emotion/react": { - "optional": true - }, - "@emotion/styled": { - "optional": true - }, - "@types/react": { - "optional": true - } - } - }, - "node_modules/@mui/types": { - "version": "7.2.24", - "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.24.tgz", - "integrity": "sha512-3c8tRt/CbWZ+pEg7QpSwbdxOk36EfmhbKf6AGZsD1EcLDLTSZoxxJ86FVtcjxvjuhdyBiWKSTGZFaXCnidO2kw==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@mui/utils": { - "version": "6.4.9", - "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-6.4.9.tgz", - "integrity": "sha512-Y12Q9hbK9g+ZY0T3Rxrx9m2m10gaphDuUMgWxyV5kNJevVxXYCLclYUCC9vXaIk1/NdNDTcW2Yfr2OGvNFNmHg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.26.0", - "@mui/types": "~7.2.24", - "@types/prop-types": "^15.7.14", - "clsx": "^2.1.1", - "prop-types": "^15.8.1", - "react-is": "^19.0.0" - }, - "engines": { - "node": ">=14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mui-org" - }, - "peerDependencies": { - "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", - "react": "^17.0.0 || ^18.0.0 || ^19.0.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@opentelemetry/api": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz", - "integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@opentelemetry/api-logs": { - "version": "0.213.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.213.0.tgz", - "integrity": "sha512-zRM5/Qj6G84Ej3F1yt33xBVY/3tnMxtL1fiDIxYbDWYaZ/eudVw3/PBiZ8G7JwUxXxjW8gU4g6LnOyfGKYHYgw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/api": "^1.3.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@opentelemetry/context-async-hooks": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-2.6.0.tgz", - "integrity": "sha512-L8UyDwqpTcbkIK5cgwDRDYDoEhQoj8wp8BwsO19w3LB1Z41yEQm2VJyNfAi9DrLP/YTqXqWpKHyZfR9/tFYo1Q==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/core": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.6.0.tgz", - "integrity": "sha512-HLM1v2cbZ4TgYN6KEOj+Bbj8rAKriOdkF9Ed3tG25FoprSiQl7kYc+RRT6fUZGOvx0oMi5U67GoFdT+XUn8zEg==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.0.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/instrumentation": { - "version": "0.213.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.213.0.tgz", - "integrity": "sha512-3i9NdkET/KvQomeh7UaR/F4r9P25Rx6ooALlWXPIjypcEOUxksCmVu0zA70NBJWlrMW1rPr/LRidFAflLI+s/w==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/api-logs": "0.213.0", - "import-in-the-middle": "^3.0.0", - "require-in-the-middle": "^8.0.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-amqplib": { - "version": "0.60.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-amqplib/-/instrumentation-amqplib-0.60.0.tgz", - "integrity": "sha512-q/B2IvoVXRm1M00MvhnzpMN6rKYOszPXVsALi6u0ss4AYHe+TidZEtLW9N1ZhrobI1dSriHnBqqtAOZVAv07sg==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.213.0", - "@opentelemetry/semantic-conventions": "^1.33.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-connect": { - "version": "0.56.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-connect/-/instrumentation-connect-0.56.0.tgz", - "integrity": "sha512-PKp+sSZ7AfzMvGgO3VCyo1inwNu+q7A1k9X88WK4PQ+S6Hp7eFk8pie+sWHDTaARovmqq5V2osav3lQej2B0nw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.213.0", - "@opentelemetry/semantic-conventions": "^1.27.0", - "@types/connect": "3.4.38" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-dataloader": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-dataloader/-/instrumentation-dataloader-0.30.0.tgz", - "integrity": "sha512-MXHP2Q38cd2OhzEBKAIXUi9uBlPEYzF6BNJbyjUXBQ6kLaf93kRC41vNMIz0Nl5mnuwK7fDvKT+/lpx7BXRwdg==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/instrumentation": "^0.213.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-express": { - "version": "0.61.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-express/-/instrumentation-express-0.61.0.tgz", - "integrity": "sha512-Xdmqo9RZuZlL29Flg8QdwrrX7eW1CZ7wFQPKHyXljNymgKhN1MCsYuqQ/7uxavhSKwAl7WxkTzKhnqpUApLMvQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.213.0", - "@opentelemetry/semantic-conventions": "^1.27.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-fs": { - "version": "0.32.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-fs/-/instrumentation-fs-0.32.0.tgz", - "integrity": "sha512-koR6apx0g0wX6RRiPpjA4AFQUQUbXrK16kq4/SZjVp7u5cffJhNkY4TnITxcGA4acGSPYAfx3NHRIv4Khn1axQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.213.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-generic-pool": { - "version": "0.56.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-generic-pool/-/instrumentation-generic-pool-0.56.0.tgz", - "integrity": "sha512-fg+Jffs6fqrf0uQS0hom7qBFKsbtpBiBl8+Vkc63Gx8xh6pVh+FhagmiO6oM0m3vyb683t1lP7yGYq22SiDnqg==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/instrumentation": "^0.213.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-graphql": { - "version": "0.61.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-graphql/-/instrumentation-graphql-0.61.0.tgz", - "integrity": "sha512-pUiVASv6nh2XrerTvlbVHh7vKFzscpgwiQ/xvnZuAIzQ5lRjWVdRPUuXbvZJ/Yq79QsE81TZdJ7z9YsXiss1ew==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/instrumentation": "^0.213.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-hapi": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-hapi/-/instrumentation-hapi-0.59.0.tgz", - "integrity": "sha512-33wa4mEr+9+ztwdgLor1SeBu4Opz4IsmpcLETXAd3VmBrOjez8uQtrsOhPCa5Vhbm5gzDlMYTgFRLQzf8/YHFA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.213.0", - "@opentelemetry/semantic-conventions": "^1.27.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-http": { - "version": "0.213.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-http/-/instrumentation-http-0.213.0.tgz", - "integrity": "sha512-B978Xsm5XEPGhm1P07grDoaOFLHapJPkOG9h016cJsyWWxmiLnPu2M/4Nrm7UCkHSiLnkXgC+zVGUAIahy8EEA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.6.0", - "@opentelemetry/instrumentation": "0.213.0", - "@opentelemetry/semantic-conventions": "^1.29.0", - "forwarded-parse": "2.1.2" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-ioredis": { - "version": "0.61.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-ioredis/-/instrumentation-ioredis-0.61.0.tgz", - "integrity": "sha512-hsHDadUtAFbws1YSDc1XW0svGFKiUbqv2td1Cby+UAiwvojm1NyBo/taifH0t8CuFZ0x/2SDm0iuTwrM5pnVOg==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/instrumentation": "^0.213.0", - "@opentelemetry/redis-common": "^0.38.2", - "@opentelemetry/semantic-conventions": "^1.33.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-kafkajs": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-kafkajs/-/instrumentation-kafkajs-0.22.0.tgz", - "integrity": "sha512-wJU4IBQMUikdJAcTChLFqK5lo+flo7pahqd8DSLv7uMxsdOdAHj6RzKYAm8pPfUS6ItKYutYyuicwKaFwQKsoA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/instrumentation": "^0.213.0", - "@opentelemetry/semantic-conventions": "^1.30.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-knex": { - "version": "0.57.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-knex/-/instrumentation-knex-0.57.0.tgz", - "integrity": "sha512-vMCSh8kolEm5rRsc+FZeTZymWmIJwc40hjIKnXH4O0Dv/gAkJJIRXCsPX5cPbe0c0j/34+PsENd0HqKruwhVYw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/instrumentation": "^0.213.0", - "@opentelemetry/semantic-conventions": "^1.33.1" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-koa": { - "version": "0.61.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-koa/-/instrumentation-koa-0.61.0.tgz", - "integrity": "sha512-lvrfWe9ShK/D2X4brmx8ZqqeWPfRl8xekU0FCn7C1dHm5k6+rTOOi36+4fnaHAP8lig9Ux6XQ1D4RNIpPCt1WQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.213.0", - "@opentelemetry/semantic-conventions": "^1.36.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.9.0" - } - }, - "node_modules/@opentelemetry/instrumentation-lru-memoizer": { - "version": "0.57.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-lru-memoizer/-/instrumentation-lru-memoizer-0.57.0.tgz", - "integrity": "sha512-cEqpUocSKJfwDtLYTTJehRLWzkZ2eoePCxfVIgGkGkb83fMB71O+y4MvRHJPbeV2bdoWdOVrl8uO0+EynWhTEA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/instrumentation": "^0.213.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-mongodb": { - "version": "0.66.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mongodb/-/instrumentation-mongodb-0.66.0.tgz", - "integrity": "sha512-d7m9QnAY+4TCWI4q1QRkfrc6fo/92VwssaB1DzQfXNRvu51b78P+HJlWP7Qg6N6nkwdb9faMZNBCZJfftmszkw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/instrumentation": "^0.213.0", - "@opentelemetry/semantic-conventions": "^1.33.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-mongoose": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mongoose/-/instrumentation-mongoose-0.59.0.tgz", - "integrity": "sha512-6/jWU+c1NgznkVLDU/2y0bXV2nJo3o9FWZ9mZ9nN6T/JBNRoMnVXZl2FdBmgH+a5MwaWLs5kmRJTP5oUVGIkPw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.213.0", - "@opentelemetry/semantic-conventions": "^1.33.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-mysql": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mysql/-/instrumentation-mysql-0.59.0.tgz", - "integrity": "sha512-r+V/Fh0sm7Ga8/zk/TI5H5FQRAjwr0RrpfPf8kNIehlsKf12XnvIaZi8ViZkpX0gyPEpLXqzqWD6QHlgObgzZw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/instrumentation": "^0.213.0", - "@opentelemetry/semantic-conventions": "^1.33.0", - "@types/mysql": "2.15.27" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-mysql2": { - "version": "0.59.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mysql2/-/instrumentation-mysql2-0.59.0.tgz", - "integrity": "sha512-n9/xrVCRBfG9egVbffnlU1uhr+HX0vF4GgtAB/Bvm48wpFgRidqD8msBMiym1kRYzmpWvJqTxNT47u1MkgBEdw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/instrumentation": "^0.213.0", - "@opentelemetry/semantic-conventions": "^1.33.0", - "@opentelemetry/sql-common": "^0.41.2" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-pg": { - "version": "0.65.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-pg/-/instrumentation-pg-0.65.0.tgz", - "integrity": "sha512-W0zpHEIEuyZ8zvb3njaX9AAbHgPYOsSWVOoWmv1sjVRSF6ZpBqtlxBWbU+6hhq1TFWBeWJOXZ8nZS/PUFpLJYQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.213.0", - "@opentelemetry/semantic-conventions": "^1.34.0", - "@opentelemetry/sql-common": "^0.41.2", - "@types/pg": "8.15.6", - "@types/pg-pool": "2.0.7" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-redis": { - "version": "0.61.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-redis/-/instrumentation-redis-0.61.0.tgz", - "integrity": "sha512-JnPexA034/0UJRsvH96B0erQoNOqKJZjE2ZRSw9hiTSC23LzE0nJE/u6D+xqOhgUhRnhhcPHq4MdYtmUdYTF+Q==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/instrumentation": "^0.213.0", - "@opentelemetry/redis-common": "^0.38.2", - "@opentelemetry/semantic-conventions": "^1.27.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-tedious": { - "version": "0.32.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-tedious/-/instrumentation-tedious-0.32.0.tgz", - "integrity": "sha512-BQS6gG8RJ1foEqfEZ+wxoqlwfCAzb1ZVG0ad8Gfe4x8T658HJCLGLd4E4NaoQd8EvPfLqOXgzGaE/2U4ytDSWA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/instrumentation": "^0.213.0", - "@opentelemetry/semantic-conventions": "^1.33.0", - "@types/tedious": "^4.0.14" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@opentelemetry/instrumentation-undici": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-undici/-/instrumentation-undici-0.23.0.tgz", - "integrity": "sha512-LL0VySzKVR2cJSFVZaTYpZl1XTpBGnfzoQPe2W7McS2267ldsaEIqtQY6VXs2KCXN0poFjze5110PIpxHDaDGg==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "^2.0.0", - "@opentelemetry/instrumentation": "^0.213.0", - "@opentelemetry/semantic-conventions": "^1.24.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.7.0" - } - }, - "node_modules/@opentelemetry/redis-common": { - "version": "0.38.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/redis-common/-/redis-common-0.38.2.tgz", - "integrity": "sha512-1BCcU93iwSRZvDAgwUxC/DV4T/406SkMfxGqu5ojc3AvNI+I9GhV7v0J1HljsczuuhcnFLYqD5VmwVXfCGHzxA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^18.19.0 || >=20.6.0" - } - }, - "node_modules/@opentelemetry/resources": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.6.0.tgz", - "integrity": "sha512-D4y/+OGe3JSuYUCBxtH5T9DSAWNcvCb/nQWIga8HNtXTVPQn59j0nTBAgaAXxUVBDl40mG3Tc76b46wPlZaiJQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.6.0", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/sdk-trace-base": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.6.0.tgz", - "integrity": "sha512-g/OZVkqlxllgFM7qMKqbPV9c1DUPhQ7d4n3pgZFcrnrNft9eJXZM2TNHTPYREJBrtNdRytYyvwjgL5geDKl3EQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "2.6.0", - "@opentelemetry/resources": "2.6.0", - "@opentelemetry/semantic-conventions": "^1.29.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": ">=1.3.0 <1.10.0" - } - }, - "node_modules/@opentelemetry/semantic-conventions": { - "version": "1.40.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.40.0.tgz", - "integrity": "sha512-cifvXDhcqMwwTlTK04GBNeIe7yyo28Mfby85QXFe1Yk8nmi36Ab/5UQwptOx84SsoGNRg+EVSjwzfSZMy6pmlw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=14" - } - }, - "node_modules/@opentelemetry/sql-common": { - "version": "0.41.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/sql-common/-/sql-common-0.41.2.tgz", - "integrity": "sha512-4mhWm3Z8z+i508zQJ7r6Xi7y4mmoJpdvH0fZPFRkWrdp5fq7hhZ2HhYokEOLkfqSMgPR4Z9EyB3DBkbKGOqZiQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/core": "^2.0.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.1.0" - } - }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/@pkgr/core": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.2.9.tgz", - "integrity": "sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": "^12.20.0 || ^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/pkgr" - } - }, - "node_modules/@popperjs/core": { - "version": "2.11.8", - "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", - "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", - "dev": true, - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/popperjs" - } - }, - "node_modules/@prisma/instrumentation": { - "version": "7.4.2", - "resolved": "https://registry.npmjs.org/@prisma/instrumentation/-/instrumentation-7.4.2.tgz", - "integrity": "sha512-r9JfchJF1Ae6yAxcaLu/V1TGqBhAuSDe3mRNOssBfx1rMzfZ4fdNvrgUBwyb/TNTGXFxlH9AZix5P257x07nrg==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/instrumentation": "^0.207.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.8" - } - }, - "node_modules/@prisma/instrumentation/node_modules/@opentelemetry/api-logs": { - "version": "0.207.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.207.0.tgz", - "integrity": "sha512-lAb0jQRVyleQQGiuuvCOTDVspc14nx6XJjP4FspJ1sNARo3Regq4ZZbrc3rN4b1TYSuUCvgH+UXUPug4SLOqEQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/api": "^1.3.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@prisma/instrumentation/node_modules/@opentelemetry/instrumentation": { - "version": "0.207.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.207.0.tgz", - "integrity": "sha512-y6eeli9+TLKnznrR8AZlQMSJT7wILpXH+6EYq5Vf/4Ao+huI7EedxQHwRgVUOMLFbe7VFDvHJrX9/f4lcwnJsA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@opentelemetry/api-logs": "0.207.0", - "import-in-the-middle": "^2.0.0", - "require-in-the-middle": "^8.0.0" - }, - "engines": { - "node": "^18.19.0 || >=20.6.0" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.3.0" - } - }, - "node_modules/@prisma/instrumentation/node_modules/import-in-the-middle": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-2.0.6.tgz", - "integrity": "sha512-3vZV3jX0XRFW3EJDTwzWoZa+RH1b8eTTx6YOCjglrLyPuepwoBti1k3L2dKwdCUrnVEfc5CuRuGstaC/uQJJaw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "acorn": "^8.15.0", - "acorn-import-attributes": "^1.9.5", - "cjs-module-lexer": "^2.2.0", - "module-details-from-path": "^1.0.4" - } - }, - "node_modules/@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" - } - }, - "node_modules/@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@rtsao/scc": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", - "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/@sentry-internal/browser-utils": { - "version": "8.55.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/browser-utils/-/browser-utils-8.55.0.tgz", - "integrity": "sha512-ROgqtQfpH/82AQIpESPqPQe0UyWywKJsmVIqi3c5Fh+zkds5LUxnssTj3yNd1x+kxaPDVB023jAP+3ibNgeNDw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@sentry/core": "8.55.0" - }, - "engines": { - "node": ">=14.18" - } - }, - "node_modules/@sentry-internal/feedback": { - "version": "8.55.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-8.55.0.tgz", - "integrity": "sha512-cP3BD/Q6pquVQ+YL+rwCnorKuTXiS9KXW8HNKu4nmmBAyf7urjs+F6Hr1k9MXP5yQ8W3yK7jRWd09Yu6DHWOiw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@sentry/core": "8.55.0" - }, - "engines": { - "node": ">=14.18" - } - }, - "node_modules/@sentry-internal/replay": { - "version": "8.55.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/replay/-/replay-8.55.0.tgz", - "integrity": "sha512-roCDEGkORwolxBn8xAKedybY+Jlefq3xYmgN2fr3BTnsXjSYOPC7D1/mYqINBat99nDtvgFvNfRcZPiwwZ1hSw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@sentry-internal/browser-utils": "8.55.0", - "@sentry/core": "8.55.0" - }, - "engines": { - "node": ">=14.18" - } - }, - "node_modules/@sentry-internal/replay-canvas": { - "version": "8.55.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-8.55.0.tgz", - "integrity": "sha512-nIkfgRWk1091zHdu4NbocQsxZF1rv1f7bbp3tTIlZYbrH62XVZosx5iHAuZG0Zc48AETLE7K4AX9VGjvQj8i9w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@sentry-internal/replay": "8.55.0", - "@sentry/core": "8.55.0" - }, - "engines": { - "node": ">=14.18" - } - }, - "node_modules/@sentry/browser": { - "version": "8.55.0", - "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-8.55.0.tgz", - "integrity": "sha512-1A31mCEWCjaMxJt6qGUK+aDnLDcK6AwLAZnqpSchNysGni1pSn1RWSmk9TBF8qyTds5FH8B31H480uxMPUJ7Cw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@sentry-internal/browser-utils": "8.55.0", - "@sentry-internal/feedback": "8.55.0", - "@sentry-internal/replay": "8.55.0", - "@sentry-internal/replay-canvas": "8.55.0", - "@sentry/core": "8.55.0" - }, - "engines": { - "node": ">=14.18" - } - }, - "node_modules/@sentry/core": { - "version": "8.55.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.55.0.tgz", - "integrity": "sha512-6g7jpbefjHYs821Z+EBJ8r4Z7LT5h80YSWRJaylGS4nW5W5Z2KXzpdnyFarv37O7QjauzVC2E+PABmpkw5/JGA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.18" - } - }, - "node_modules/@sentry/integrations": { - "version": "7.114.0", - "resolved": "https://registry.npmjs.org/@sentry/integrations/-/integrations-7.114.0.tgz", - "integrity": "sha512-BJIBWXGKeIH0ifd7goxOS29fBA8BkEgVVCahs6xIOXBjX1IRS6PmX0zYx/GP23nQTfhJiubv2XPzoYOlZZmDxg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@sentry/core": "7.114.0", - "@sentry/types": "7.114.0", - "@sentry/utils": "7.114.0", - "localforage": "^1.8.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/integrations/node_modules/@sentry/core": { - "version": "7.114.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.114.0.tgz", - "integrity": "sha512-YnanVlmulkjgZiVZ9BfY9k6I082n+C+LbZo52MTvx3FY6RE5iyiPMpaOh67oXEZRWcYQEGm+bKruRxLVP6RlbA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@sentry/types": "7.114.0", - "@sentry/utils": "7.114.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/node": { - "version": "10.44.0", - "resolved": "https://registry.npmjs.org/@sentry/node/-/node-10.44.0.tgz", - "integrity": "sha512-q+/WR9ZeF9Af8uyehOj2tQQOa7LH07mJfOuDus5X6G6cLuugdRUGUBB5Qhw+J/ULSxbzGADBZv6AYOyoGaNx7w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@fastify/otel": "0.17.1", - "@opentelemetry/api": "^1.9.0", - "@opentelemetry/context-async-hooks": "^2.6.0", - "@opentelemetry/core": "^2.6.0", - "@opentelemetry/instrumentation": "^0.213.0", - "@opentelemetry/instrumentation-amqplib": "0.60.0", - "@opentelemetry/instrumentation-connect": "0.56.0", - "@opentelemetry/instrumentation-dataloader": "0.30.0", - "@opentelemetry/instrumentation-express": "0.61.0", - "@opentelemetry/instrumentation-fs": "0.32.0", - "@opentelemetry/instrumentation-generic-pool": "0.56.0", - "@opentelemetry/instrumentation-graphql": "0.61.0", - "@opentelemetry/instrumentation-hapi": "0.59.0", - "@opentelemetry/instrumentation-http": "0.213.0", - "@opentelemetry/instrumentation-ioredis": "0.61.0", - "@opentelemetry/instrumentation-kafkajs": "0.22.0", - "@opentelemetry/instrumentation-knex": "0.57.0", - "@opentelemetry/instrumentation-koa": "0.61.0", - "@opentelemetry/instrumentation-lru-memoizer": "0.57.0", - "@opentelemetry/instrumentation-mongodb": "0.66.0", - "@opentelemetry/instrumentation-mongoose": "0.59.0", - "@opentelemetry/instrumentation-mysql": "0.59.0", - "@opentelemetry/instrumentation-mysql2": "0.59.0", - "@opentelemetry/instrumentation-pg": "0.65.0", - "@opentelemetry/instrumentation-redis": "0.61.0", - "@opentelemetry/instrumentation-tedious": "0.32.0", - "@opentelemetry/instrumentation-undici": "0.23.0", - "@opentelemetry/resources": "^2.6.0", - "@opentelemetry/sdk-trace-base": "^2.6.0", - "@opentelemetry/semantic-conventions": "^1.40.0", - "@prisma/instrumentation": "7.4.2", - "@sentry/core": "10.44.0", - "@sentry/node-core": "10.44.0", - "@sentry/opentelemetry": "10.44.0", - "import-in-the-middle": "^3.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@sentry/node-core": { - "version": "10.44.0", - "resolved": "https://registry.npmjs.org/@sentry/node-core/-/node-core-10.44.0.tgz", - "integrity": "sha512-jUGsadMrvZ08UMbqJBfjFFMk1k3VbyxfUypf0iDGGgyLmuHotYQPo/5aND+o2KxMDXR60LwcQrMoZFpanK6jXQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@sentry/core": "10.44.0", - "@sentry/opentelemetry": "10.44.0", - "import-in-the-middle": "^3.0.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.9.0", - "@opentelemetry/context-async-hooks": "^1.30.1 || ^2.1.0", - "@opentelemetry/core": "^1.30.1 || ^2.1.0", - "@opentelemetry/instrumentation": ">=0.57.1 <1", - "@opentelemetry/resources": "^1.30.1 || ^2.1.0", - "@opentelemetry/sdk-trace-base": "^1.30.1 || ^2.1.0", - "@opentelemetry/semantic-conventions": "^1.39.0" - }, - "peerDependenciesMeta": { - "@opentelemetry/api": { - "optional": true - }, - "@opentelemetry/context-async-hooks": { - "optional": true - }, - "@opentelemetry/core": { - "optional": true - }, - "@opentelemetry/instrumentation": { - "optional": true - }, - "@opentelemetry/resources": { - "optional": true - }, - "@opentelemetry/sdk-trace-base": { - "optional": true - }, - "@opentelemetry/semantic-conventions": { - "optional": true - } - } - }, - "node_modules/@sentry/node-core/node_modules/@sentry/core": { - "version": "10.44.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-10.44.0.tgz", - "integrity": "sha512-aa7CiDaNFZvHpqd97LJhuskolfJ/4IH5xyuVVLnv7l6B0v9KTwskPUxb0tH1ej3FxuzfH+i8iTiTFuqpfHS3QA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, - "node_modules/@sentry/node/node_modules/@sentry/core": { - "version": "10.44.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-10.44.0.tgz", - "integrity": "sha512-aa7CiDaNFZvHpqd97LJhuskolfJ/4IH5xyuVVLnv7l6B0v9KTwskPUxb0tH1ej3FxuzfH+i8iTiTFuqpfHS3QA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, - "node_modules/@sentry/opentelemetry": { - "version": "10.44.0", - "resolved": "https://registry.npmjs.org/@sentry/opentelemetry/-/opentelemetry-10.44.0.tgz", - "integrity": "sha512-zP4vP8tBxjlmxQ4VcWOwZ0b3lPUxlYPg9FqJwANm9SRJN+7V5psm8TIaAtu9uqtIcJMRHdXkOM4cAggNiLk0KA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@sentry/core": "10.44.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@opentelemetry/api": "^1.9.0", - "@opentelemetry/context-async-hooks": "^1.30.1 || ^2.1.0", - "@opentelemetry/core": "^1.30.1 || ^2.1.0", - "@opentelemetry/sdk-trace-base": "^1.30.1 || ^2.1.0", - "@opentelemetry/semantic-conventions": "^1.39.0" - } - }, - "node_modules/@sentry/opentelemetry/node_modules/@sentry/core": { - "version": "10.44.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-10.44.0.tgz", - "integrity": "sha512-aa7CiDaNFZvHpqd97LJhuskolfJ/4IH5xyuVVLnv7l6B0v9KTwskPUxb0tH1ej3FxuzfH+i8iTiTFuqpfHS3QA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, - "node_modules/@sentry/types": { - "version": "7.114.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.114.0.tgz", - "integrity": "sha512-tsqkkyL3eJtptmPtT0m9W/bPLkU7ILY7nvwpi1hahA5jrM7ppoU0IMaQWAgTD+U3rzFH40IdXNBFb8Gnqcva4w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/utils": { - "version": "7.114.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.114.0.tgz", - "integrity": "sha512-319N90McVpupQ6vws4+tfCy/03AdtsU0MurIE4+W5cubHME08HtiEWlfacvAxX+yuKFhvdsO4K4BB/dj54ideg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@sentry/types": "7.114.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sinonjs/commons": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", - "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/commons/node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/@sinonjs/fake-timers": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-13.0.5.tgz", - "integrity": "sha512-36/hTbH2uaWuGVERyC6da9YwGWnzUZXuPro/F2LfsdOsLnCojz/iSH8MxUt/FD2S5XBSVPhmArFUXcpCQ2Hkiw==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^3.0.1" - } - }, - "node_modules/@sinonjs/samsam": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-8.0.3.tgz", - "integrity": "sha512-hw6HbX+GyVZzmaYNh82Ecj1vdGZrqVIn/keDTg63IgAwiQPO+xCz99uG6Woqgb4tM0mUiFENKZ4cqd7IX94AXQ==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^3.0.1", - "type-detect": "^4.1.0" - } - }, - "node_modules/@tootallnate/once": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 10" - } - }, - "node_modules/@types/caseless": { - "version": "0.12.5", - "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.5.tgz", - "integrity": "sha512-hWtVTC2q7hc7xZ/RLbxapMvDMgUnDvKvMOpKal4DrMyfGBUfB1oKaZlIRr6mJL+If3bAP6sV/QneGzF6tJjZDg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/chai": { - "version": "4.3.20", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.20.tgz", - "integrity": "sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/chai-as-promised": { - "version": "7.1.8", - "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.8.tgz", - "integrity": "sha512-ThlRVIJhr69FLlh6IctTXFkmhtP3NpMZ2QGq69StYLyKZFp/HOp1VdKZj7RvfNWYYcJ1xlbLGLLWj1UvP5u/Gw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/chai": "*" - } - }, - "node_modules/@types/connect": { - "version": "3.4.38", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", - "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/estree": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", - "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/@types/json5": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/@types/mocha": { - "version": "10.0.10", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.10.tgz", - "integrity": "sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/mysql": { - "version": "2.15.27", - "resolved": "https://registry.npmjs.org/@types/mysql/-/mysql-2.15.27.tgz", - "integrity": "sha512-YfWiV16IY0OeBfBCk8+hXKmdTKrKlwKN1MNKAPBu5JYxLwBEZl7QzeEpGnlZb3VMGJrrGmB84gXiH+ofs/TezA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/node": { - "version": "20.19.42", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.42.tgz", - "integrity": "sha512-5L7SUaFC1RyDraj2yRhyBzHTobyXHmohD100CChNtyPyleoq37Mqab5Gn8XEKI04dfN/oqPdpHk38MgcQWHbZg==", - "license": "MIT", - "dependencies": { - "undici-types": "~6.21.0" - } - }, - "node_modules/@types/node-schedule": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/@types/node-schedule/-/node-schedule-2.1.8.tgz", - "integrity": "sha512-k00g6Yj/oUg/CDC+MeLHUzu0+OFxWbIqrFfDiLi6OPKxTujvpv29mHGM8GtKr7B+9Vv92FcK/8mRqi1DK5f3hA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/nodemailer": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/nodemailer/-/nodemailer-7.0.11.tgz", - "integrity": "sha512-E+U4RzR2dKrx+u3N4DlsmLaDC6mMZOM/TPROxA0UAPiTgI0y4CEFBmZE+coGWTjakDriRsXG368lNk1u9Q0a2g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/pg": { - "version": "8.15.6", - "resolved": "https://registry.npmjs.org/@types/pg/-/pg-8.15.6.tgz", - "integrity": "sha512-NoaMtzhxOrubeL/7UZuNTrejB4MPAJ0RpxZqXQf2qXuVlTPuG6Y8p4u9dKRaue4yjmC7ZhzVO2/Yyyn25znrPQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "pg-protocol": "*", - "pg-types": "^2.2.0" - } - }, - "node_modules/@types/pg-pool": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/@types/pg-pool/-/pg-pool-2.0.7.tgz", - "integrity": "sha512-U4CwmGVQcbEuqpyju8/ptOKg6gEC+Tqsvj2xS9o1g71bUh8twxnC6ZL5rZKCsGN0iyH0CwgUyc9VR5owNQF9Ng==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/pg": "*" - } - }, - "node_modules/@types/prop-types": { - "version": "15.7.15", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz", - "integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/react": { - "version": "19.2.2", - "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.2.tgz", - "integrity": "sha512-6mDvHUFSjyT2B2yeNx2nUgMxh9LtOWvkhIU3uePn2I2oyNymUAX1NIsdgviM4CH+JSrp2D2hsMvJOkxY+0wNRA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "csstype": "^3.0.2" - } - }, - "node_modules/@types/react-transition-group": { - "version": "4.4.12", - "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.12.tgz", - "integrity": "sha512-8TV6R3h2j7a91c+1DXdJi3Syo69zzIZbz7Lg5tORM5LEJG7X/E6a1V3drRyBRZq7/utz7A+c4OgYLiLcYGHG6w==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "@types/react": "*" - } - }, - "node_modules/@types/request": { - "version": "2.48.13", - "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.13.tgz", - "integrity": "sha512-FGJ6udDNUCjd19pp0Q3iTiDkwhYup7J8hpMW9c4k53NrccQFFWKRho6hvtPPEhnXWKvukfwAlB6DbDz4yhH5Gg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/caseless": "*", - "@types/node": "*", - "@types/tough-cookie": "*", - "form-data": "^2.5.5" - } - }, - "node_modules/@types/sinon": { - "version": "17.0.4", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-17.0.4.tgz", - "integrity": "sha512-RHnIrhfPO3+tJT0s7cFaXGZvsL4bbR3/k7z3P312qMS4JaS2Tk+KiwiLx1S0rQ56ERj00u1/BtdyVd0FY+Pdew==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/sinonjs__fake-timers": "*" - } - }, - "node_modules/@types/sinon-chai": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.12.tgz", - "integrity": "sha512-9y0Gflk3b0+NhQZ/oxGtaAJDvRywCa5sIyaVnounqLvmf93yBF4EgIRspePtkMs3Tr844nCclYMlcCNmLCvjuQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/chai": "*", - "@types/sinon": "*" - } - }, - "node_modules/@types/sinonjs__fake-timers": { - "version": "15.0.1", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-15.0.1.tgz", - "integrity": "sha512-Ko2tjWJq8oozHzHV+reuvS5KYIRAokHnGbDwGh/J64LntgpbuylF74ipEL24HCyRjf9FOlBiBHWBR1RlVKsI1w==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/suncalc": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/@types/suncalc/-/suncalc-1.9.2.tgz", - "integrity": "sha512-ATAGBHHfA1TlE2tjfidLyTcysjoT2JHHEAmWRULh73SU9UTn++j5fqHEW16X6Y/2Li87jEQXzgu4R/OOdlDqzw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/tedious": { - "version": "4.0.14", - "resolved": "https://registry.npmjs.org/@types/tedious/-/tedious-4.0.14.tgz", - "integrity": "sha512-KHPsfX/FoVbUGbyYvk1q9MMQHLPeRZhRJZdO45Q4YjvFkv4hMNghCWTvy7rdKessBsmtz4euWCWAB6/tVpI1Iw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/tough-cookie": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", - "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==", - "dev": true, - "license": "MIT" - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.46.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.46.2.tgz", - "integrity": "sha512-ZGBMToy857/NIPaaCucIUQgqueOiq7HeAKkhlvqVV4lm089zUFW6ikRySx2v+cAhKeUCPuWVHeimyk6Dw1iY3w==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.46.2", - "@typescript-eslint/type-utils": "8.46.2", - "@typescript-eslint/utils": "8.46.2", - "@typescript-eslint/visitor-keys": "8.46.2", - "graphemer": "^1.4.0", - "ignore": "^7.0.0", - "natural-compare": "^1.4.0", - "ts-api-utils": "^2.1.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^8.46.2", - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", - "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "8.46.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.46.2.tgz", - "integrity": "sha512-BnOroVl1SgrPLywqxyqdJ4l3S2MsKVLDVxZvjI1Eoe8ev2r3kGDo+PcMihNmDE+6/KjkTubSJnmqGZZjQSBq/g==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@typescript-eslint/scope-manager": "8.46.2", - "@typescript-eslint/types": "8.46.2", - "@typescript-eslint/typescript-estree": "8.46.2", - "@typescript-eslint/visitor-keys": "8.46.2", - "debug": "^4.3.4" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/project-service": { - "version": "8.46.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.46.2.tgz", - "integrity": "sha512-PULOLZ9iqwI7hXcmL4fVfIsBi6AN9YxRc0frbvmg8f+4hQAjQ5GYNKK0DIArNo+rOKmR/iBYwkpBmnIwin4wBg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.46.2", - "@typescript-eslint/types": "^8.46.2", - "debug": "^4.3.4" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "8.46.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.46.2.tgz", - "integrity": "sha512-LF4b/NmGvdWEHD2H4MsHD8ny6JpiVNDzrSZr3CsckEgCbAGZbYM4Cqxvi9L+WqDMT+51Ozy7lt2M+d0JLEuBqA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@typescript-eslint/types": "8.46.2", - "@typescript-eslint/visitor-keys": "8.46.2" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.46.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.46.2.tgz", - "integrity": "sha512-a7QH6fw4S57+F5y2FIxxSDyi5M4UfGF+Jl1bCGd7+L4KsaUY80GsiF/t0UoRFDHAguKlBaACWJRmdrc6Xfkkag==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "8.46.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.46.2.tgz", - "integrity": "sha512-HbPM4LbaAAt/DjxXaG9yiS9brOOz6fabal4uvUmaUYe6l3K1phQDMQKBRUrr06BQkxkvIZVVHttqiybM9nJsLA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@typescript-eslint/types": "8.46.2", - "@typescript-eslint/typescript-estree": "8.46.2", - "@typescript-eslint/utils": "8.46.2", - "debug": "^4.3.4", - "ts-api-utils": "^2.1.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/types": { - "version": "8.46.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.46.2.tgz", - "integrity": "sha512-lNCWCbq7rpg7qDsQrd3D6NyWYu+gkTENkG5IKYhUIcxSb59SQC/hEQ+MrG4sTgBVghTonNWq42bA/d4yYumldQ==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.46.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.46.2.tgz", - "integrity": "sha512-f7rW7LJ2b7Uh2EiQ+7sza6RDZnajbNbemn54Ob6fRwQbgcIn+GWfyuHDHRYgRoZu1P4AayVScrRW+YfbTvPQoQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@typescript-eslint/project-service": "8.46.2", - "@typescript-eslint/tsconfig-utils": "8.46.2", - "@typescript-eslint/types": "8.46.2", - "@typescript-eslint/visitor-keys": "8.46.2", - "debug": "^4.3.4", - "fast-glob": "^3.3.2", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^2.1.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "peer": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "8.46.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.46.2.tgz", - "integrity": "sha512-sExxzucx0Tud5tE0XqR0lT0psBQvEpnpiul9XbGUB1QwpWJJAps1O/Z7hJxLGiZLBKMCutjTzDgmd1muEhBnVg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.46.2", - "@typescript-eslint/types": "8.46.2", - "@typescript-eslint/typescript-estree": "8.46.2" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.46.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.46.2.tgz", - "integrity": "sha512-tUFMXI4gxzzMXt4xpGJEsBsTox0XbNQ1y94EwlD/CuZwFcQP79xfQqMhau9HsRc/J0cAPA/HZt1dZPtGn9V/7w==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@typescript-eslint/types": "8.46.2", - "eslint-visitor-keys": "^4.2.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", - "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/acorn": { - "version": "8.15.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", - "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-import-attributes": { - "version": "1.9.5", - "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", - "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^8" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/acorn-jsx-walk": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/acorn-jsx-walk/-/acorn-jsx-walk-2.0.0.tgz", - "integrity": "sha512-uuo6iJj4D4ygkdzd6jPtcxs8vZgDX9YFIkqczGImoypX2fQ4dVImmu3UzA4ynixCIMTrEOWW+95M2HuBaCEOVA==", - "dev": true, - "license": "MIT" - }, - "node_modules/acorn-walk": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", - "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "acorn": "^8.11.0" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/adm-zip": { - "version": "0.5.16", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.16.tgz", - "integrity": "sha512-TGw5yVi4saajsSEgz25grObGHEUaDrniwvA2qwSC060KfqGPdglhvPMA2lPIoxs3PQIItj2iag35fONcQqgUaQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.0" - } - }, - "node_modules/agent-base": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", - "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 14" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/alcalzone-shared": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/alcalzone-shared/-/alcalzone-shared-5.0.0.tgz", - "integrity": "sha512-X73hgVWcrIKUUB6jZgHj5flRbTft8AAoJ2MqRKEcAX1whW3OeGkxsQ6ol4nd4/rKxd1eoCRXUGW3cIhXrXU4Sg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, - "node_modules/ansi-colors": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/are-docs-informative": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.0.2.tgz", - "integrity": "sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "license": "Python-2.0" - }, - "node_modules/array-buffer-byte-length": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", - "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bound": "^1.0.3", - "is-array-buffer": "^3.0.5" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array-includes": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.9.tgz", - "integrity": "sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.24.0", - "es-object-atoms": "^1.1.1", - "get-intrinsic": "^1.3.0", - "is-string": "^1.1.1", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.findlast": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz", - "integrity": "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.findlastindex": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.6.tgz", - "integrity": "sha512-F/TKATkzseUExPlfvmwQKGITM3DGTK+vkAsCZoDc5daVygbJBnjEUCbgkAvVFsgfXfX4YIqZ/27G3k3tdXrTxQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.9", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "es-shim-unscopables": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flat": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz", - "integrity": "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.flatmap": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz", - "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/array.prototype.tosorted": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz", - "integrity": "sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.3", - "es-errors": "^1.3.0", - "es-shim-unscopables": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", - "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "is-array-buffer": "^3.0.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/arrify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", - "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/async-function": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", - "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "license": "MIT" - }, - "node_modules/available-typed-arrays": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", - "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "possible-typed-array-names": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/axios": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.17.0.tgz", - "integrity": "sha512-J8SwNxprqqpbfenehxWYXE7CW+wM1BB4w3+N+g+/Wx40xM4rsLrfPmHHxSWIxJLYDgSY/HqlFPIYb2/S3rxafw==", - "license": "MIT", - "dependencies": { - "follow-redirects": "^1.16.0", - "form-data": "^4.0.5", - "https-proxy-agent": "^5.0.1", - "proxy-from-env": "^2.1.0" - } - }, - "node_modules/axios/node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "license": "MIT", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/axios/node_modules/form-data": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", - "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "es-set-tostringtag": "^2.1.0", - "hasown": "^2.0.2", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/axios/node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "license": "MIT", - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/baseline-browser-mapping": { - "version": "2.8.21", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.21.tgz", - "integrity": "sha512-JU0h5APyQNsHOlAM7HnQnPToSDQoEBZqzu/YBlqDnEeymPnZDREeXJA3KBMQee+dKteAxZ2AtvQEvVYdZf241Q==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "bin": { - "baseline-browser-mapping": "dist/cli.js" - } - }, - "node_modules/bignumber.js": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.3.1.tgz", - "integrity": "sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true, - "license": "ISC" - }, - "node_modules/browserslist": { - "version": "4.27.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.27.0.tgz", - "integrity": "sha512-AXVQwdhot1eqLihwasPElhX2tAZiBjWdJ9i/Zcj2S6QYIjkx62OKSfnobkriB81C3l4w0rVy3Nt4jaTBltYEpw==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "peer": true, - "dependencies": { - "baseline-browser-mapping": "^2.8.19", - "caniuse-lite": "^1.0.30001751", - "electron-to-chromium": "^1.5.238", - "node-releases": "^2.0.26", - "update-browserslist-db": "^1.1.4" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/buffer-equal-constant-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/builtin-modules": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-5.0.0.tgz", - "integrity": "sha512-bkXY9WsVpY7CvMhKSR6pZilZu9Ln5WDrKVBUXf2S443etkmEO4V58heTecXcUIsNsi4Rx8JUO4NfX1IcQl4deg==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=18.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/call-bind": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", - "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bind-apply-helpers": "^1.0.0", - "es-define-property": "^1.0.0", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/call-bind-apply-helpers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", - "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/call-bound": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", - "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "get-intrinsic": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001751", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001751.tgz", - "integrity": "sha512-A0QJhug0Ly64Ii3eIqHu5X51ebln3k4yTUkY1j8drqpWHVreg/VLijN48cZ1bYPiqOQuqpkIKnzr/Ul8V+p6Cw==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0", - "peer": true - }, - "node_modules/chai": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", - "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", - "dev": true, - "license": "MIT", - "dependencies": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.3", - "deep-eql": "^4.1.3", - "get-func-name": "^2.0.2", - "loupe": "^2.3.6", - "pathval": "^1.1.1", - "type-detect": "^4.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/chai-as-promised": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.2.tgz", - "integrity": "sha512-aBDHZxRzYnUYuIAIPBH2s511DjlKPzXNlXSGFC8CwmroWQLfrW0LtE1nK3MAwwNhJPa9raEjNCmRoFpG0Hurdw==", - "dev": true, - "license": "WTFPL", - "dependencies": { - "check-error": "^1.0.2" - }, - "peerDependencies": { - "chai": ">= 2.1.2 < 6" - } - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/change-case": { - "version": "5.4.4", - "resolved": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz", - "integrity": "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/check-error": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", - "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", - "dev": true, - "license": "MIT", - "dependencies": { - "get-func-name": "^2.0.2" - }, - "engines": { - "node": "*" - } - }, - "node_modules/chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", - "dev": true, - "license": "MIT", - "dependencies": { - "readdirp": "^4.0.1" - }, - "engines": { - "node": ">= 14.16.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/ci-info": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.3.1.tgz", - "integrity": "sha512-Wdy2Igu8OcBpI2pZePZ5oWjPC38tmDVx5WKUXKwlLYkA0ozo85sLsLvkBbBn/sZaSCMFOGZJ14fvW9t5/d7kdA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "license": "MIT", - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/cjs-module-lexer": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz", - "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/clean-regexp": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clean-regexp/-/clean-regexp-1.0.0.tgz", - "integrity": "sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "escape-string-regexp": "^1.0.5" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/clean-regexp/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/cliui/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, - "node_modules/cliui/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/clsx": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", - "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "license": "MIT" - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "license": "MIT", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/comment-parser": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz", - "integrity": "sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "license": "MIT" - }, - "node_modules/core-js-compat": { - "version": "3.46.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.46.0.tgz", - "integrity": "sha512-p9hObIIEENxSV8xIu+V68JjSeARg6UVMG5mR+JEUguG3sI6MsiS1njz2jHmyJDvA+8jX/sytkBHup6kxhM9law==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "browserslist": "^4.26.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" - } - }, - "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "license": "MIT" - }, - "node_modules/cron-parser": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-4.9.0.tgz", - "integrity": "sha512-p0SaNjrHOnQeR8/VnfGbmg9te2kfyYSQ7Sc/j/6DtPL3JQvKxmjO9TSjNFpujqV3vEYYBvNNvXSxzyksBWAx1Q==", - "license": "MIT", - "dependencies": { - "luxon": "^3.2.1" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/csstype": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", - "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", - "dev": true, - "license": "MIT" - }, - "node_modules/data-uri-to-buffer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", - "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 12" - } - }, - "node_modules/data-view-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", - "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/data-view-byte-length": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz", - "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/inspect-js" - } - }, - "node_modules/data-view-byte-offset": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz", - "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/debug": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", - "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/deep-eql": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", - "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", - "dev": true, - "license": "MIT", - "dependencies": { - "type-detect": "^4.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/deepl-node": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/deepl-node/-/deepl-node-1.20.0.tgz", - "integrity": "sha512-2MNJgJgQQWHAieaKYJyxYe1g21P8MYOtMbcS7ApyBHT8856c6EYO9RRNevodGaIf0oiKMzwyenJ59O7B0NQyGw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": ">=12.0", - "adm-zip": "^0.5.16", - "axios": "^1.7.4", - "form-data": "^3.0.0", - "loglevel": ">=1.6.2", - "uuid": "^8.3.2" - }, - "engines": { - "node": ">=12.0" - } - }, - "node_modules/deepl-node/node_modules/form-data": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.4.tgz", - "integrity": "sha512-f0cRzm6dkyVYV3nPoooP8XlccPQukegwhAnpoLcXy+X+A8KfpGOoXwDr9FLZd3wzgLaBGQBE3lY93Zm/i1JvIQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "es-set-tostringtag": "^2.1.0", - "hasown": "^2.0.2", - "mime-types": "^2.1.35" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/define-properties": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", - "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/diff": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-7.0.0.tgz", - "integrity": "sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/dom-helpers": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", - "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.8.7", - "csstype": "^3.0.2" - } - }, - "node_modules/dunder-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", - "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/duplexify": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.3.tgz", - "integrity": "sha512-M3BmBhwJRZsSx38lZyhE53Csddgzl5R7xGJNk7CVddZD6CcmwMCH8J+7AprIrQKH7TonKxaCjcv27Qmf+sQ+oA==", - "dev": true, - "license": "MIT", - "dependencies": { - "end-of-stream": "^1.4.1", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1", - "stream-shift": "^1.0.2" - } - }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true, - "license": "MIT" - }, - "node_modules/ecdsa-sig-formatter": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", - "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "safe-buffer": "^5.0.1" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.5.243", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.243.tgz", - "integrity": "sha512-ZCphxFW3Q1TVhcgS9blfut1PX8lusVi2SvXQgmEEnK4TCmE1JhH2JkjJN+DNt0pJJwfBri5AROBnz2b/C+YU9g==", - "dev": true, - "license": "ISC", - "peer": true - }, - "node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true, - "license": "MIT" - }, - "node_modules/end-of-stream": { - "version": "1.4.5", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", - "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", - "dev": true, - "license": "MIT", - "dependencies": { - "once": "^1.4.0" - } - }, - "node_modules/enquirer": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", - "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-colors": "^4.1.1", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/es-abstract": { - "version": "1.24.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.0.tgz", - "integrity": "sha512-WSzPgsdLtTcQwm4CROfS5ju2Wa1QQcVeT37jFjYzdFz1r9ahadC8B8/a4qxJxM+09F18iumCdRmlr96ZYkQvEg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "array-buffer-byte-length": "^1.0.2", - "arraybuffer.prototype.slice": "^1.0.4", - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "data-view-buffer": "^1.0.2", - "data-view-byte-length": "^1.0.2", - "data-view-byte-offset": "^1.0.1", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "es-set-tostringtag": "^2.1.0", - "es-to-primitive": "^1.3.0", - "function.prototype.name": "^1.1.8", - "get-intrinsic": "^1.3.0", - "get-proto": "^1.0.1", - "get-symbol-description": "^1.1.0", - "globalthis": "^1.0.4", - "gopd": "^1.2.0", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "internal-slot": "^1.1.0", - "is-array-buffer": "^3.0.5", - "is-callable": "^1.2.7", - "is-data-view": "^1.0.2", - "is-negative-zero": "^2.0.3", - "is-regex": "^1.2.1", - "is-set": "^2.0.3", - "is-shared-array-buffer": "^1.0.4", - "is-string": "^1.1.1", - "is-typed-array": "^1.1.15", - "is-weakref": "^1.1.1", - "math-intrinsics": "^1.1.0", - "object-inspect": "^1.13.4", - "object-keys": "^1.1.1", - "object.assign": "^4.1.7", - "own-keys": "^1.0.1", - "regexp.prototype.flags": "^1.5.4", - "safe-array-concat": "^1.1.3", - "safe-push-apply": "^1.0.0", - "safe-regex-test": "^1.1.0", - "set-proto": "^1.0.0", - "stop-iteration-iterator": "^1.1.0", - "string.prototype.trim": "^1.2.10", - "string.prototype.trimend": "^1.0.9", - "string.prototype.trimstart": "^1.0.8", - "typed-array-buffer": "^1.0.3", - "typed-array-byte-length": "^1.0.3", - "typed-array-byte-offset": "^1.0.4", - "typed-array-length": "^1.0.7", - "unbox-primitive": "^1.1.0", - "which-typed-array": "^1.1.19" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-define-property": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", - "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-iterator-helpers": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.2.1.tgz", - "integrity": "sha512-uDn+FE1yrDzyC0pCo961B2IHbdM8y/ACZsKD4dG6WqrjV53BADjwa7D+1aom2rsNVfLyDgU/eigvlJGJ08OQ4w==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.6", - "es-errors": "^1.3.0", - "es-set-tostringtag": "^2.0.3", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.6", - "globalthis": "^1.0.4", - "gopd": "^1.2.0", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.2.0", - "has-symbols": "^1.1.0", - "internal-slot": "^1.1.0", - "iterator.prototype": "^1.1.4", - "safe-array-concat": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-object-atoms": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", - "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-set-tostringtag": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", - "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-shim-unscopables": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.1.0.tgz", - "integrity": "sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-to-primitive": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz", - "integrity": "sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "is-callable": "^1.2.7", - "is-date-object": "^1.0.5", - "is-symbol": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/esbuild": { - "version": "0.25.11", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.11.tgz", - "integrity": "sha512-KohQwyzrKTQmhXDW1PjCv3Tyspn9n5GcY2RTDqeORIdIJY8yKIF7sTSopFmn/wpMPW4rdPXI0UE5LJLuq3bx0Q==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.11", - "@esbuild/android-arm": "0.25.11", - "@esbuild/android-arm64": "0.25.11", - "@esbuild/android-x64": "0.25.11", - "@esbuild/darwin-arm64": "0.25.11", - "@esbuild/darwin-x64": "0.25.11", - "@esbuild/freebsd-arm64": "0.25.11", - "@esbuild/freebsd-x64": "0.25.11", - "@esbuild/linux-arm": "0.25.11", - "@esbuild/linux-arm64": "0.25.11", - "@esbuild/linux-ia32": "0.25.11", - "@esbuild/linux-loong64": "0.25.11", - "@esbuild/linux-mips64el": "0.25.11", - "@esbuild/linux-ppc64": "0.25.11", - "@esbuild/linux-riscv64": "0.25.11", - "@esbuild/linux-s390x": "0.25.11", - "@esbuild/linux-x64": "0.25.11", - "@esbuild/netbsd-arm64": "0.25.11", - "@esbuild/netbsd-x64": "0.25.11", - "@esbuild/openbsd-arm64": "0.25.11", - "@esbuild/openbsd-x64": "0.25.11", - "@esbuild/openharmony-arm64": "0.25.11", - "@esbuild/sunos-x64": "0.25.11", - "@esbuild/win32-arm64": "0.25.11", - "@esbuild/win32-ia32": "0.25.11", - "@esbuild/win32-x64": "0.25.11" - } - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "9.38.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.38.0.tgz", - "integrity": "sha512-t5aPOpmtJcZcz5UJyY2GbvpDlsK5E8JqRqoKtfiKE3cNh437KIqfJr3A3AKf5k64NPx6d0G3dno6XDY05PqPtw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.8.0", - "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.21.1", - "@eslint/config-helpers": "^0.4.1", - "@eslint/core": "^0.16.0", - "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.38.0", - "@eslint/plugin-kit": "^0.4.0", - "@humanfs/node": "^0.16.6", - "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.4.2", - "@types/estree": "^1.0.6", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.6", - "debug": "^4.3.2", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.4.0", - "eslint-visitor-keys": "^4.2.1", - "espree": "^10.4.0", - "esquery": "^1.5.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^8.0.0", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://eslint.org/donate" - }, - "peerDependencies": { - "jiti": "*" - }, - "peerDependenciesMeta": { - "jiti": { - "optional": true - } - } - }, - "node_modules/eslint-config-prettier": { - "version": "10.1.8", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.8.tgz", - "integrity": "sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==", - "dev": true, - "license": "MIT", - "peer": true, - "bin": { - "eslint-config-prettier": "bin/cli.js" - }, - "funding": { - "url": "https://opencollective.com/eslint-config-prettier" - }, - "peerDependencies": { - "eslint": ">=7.0.0" - } - }, - "node_modules/eslint-import-resolver-node": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", - "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "debug": "^3.2.7", - "is-core-module": "^2.13.0", - "resolve": "^1.22.4" - } - }, - "node_modules/eslint-import-resolver-node/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-module-utils": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.1.tgz", - "integrity": "sha512-L8jSWTze7K2mTg0vos/RuLRS5soomksDPoJLXIslC7c8Wmut3bx7CPpJijDcBZtxQ5lrbUdM+s0OlNbz0DCDNw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "debug": "^3.2.7" - }, - "engines": { - "node": ">=4" - }, - "peerDependenciesMeta": { - "eslint": { - "optional": true - } - } - }, - "node_modules/eslint-module-utils/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-import": { - "version": "2.32.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.32.0.tgz", - "integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@rtsao/scc": "^1.1.0", - "array-includes": "^3.1.9", - "array.prototype.findlastindex": "^1.2.6", - "array.prototype.flat": "^1.3.3", - "array.prototype.flatmap": "^1.3.3", - "debug": "^3.2.7", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.9", - "eslint-module-utils": "^2.12.1", - "hasown": "^2.0.2", - "is-core-module": "^2.16.1", - "is-glob": "^4.0.3", - "minimatch": "^3.1.2", - "object.fromentries": "^2.0.8", - "object.groupby": "^1.0.3", - "object.values": "^1.2.1", - "semver": "^6.3.1", - "string.prototype.trimend": "^1.0.9", - "tsconfig-paths": "^3.15.0" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" - } - }, - "node_modules/eslint-plugin-import/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-import/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "peer": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/eslint-plugin-jsdoc": { - "version": "54.7.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-54.7.0.tgz", - "integrity": "sha512-u5Na4he2+6kY1rWqxzbQaAwJL3/tDCuT5ElDRc5UJ9stOeQeQ5L1JJ1kRRu7ldYMlOHMCJLsY8Mg/Tu3ExdZiQ==", - "dev": true, - "license": "BSD-3-Clause", - "peer": true, - "dependencies": { - "@es-joy/jsdoccomment": "~0.56.0", - "are-docs-informative": "^0.0.2", - "comment-parser": "1.4.1", - "debug": "^4.4.1", - "escape-string-regexp": "^4.0.0", - "espree": "^10.4.0", - "esquery": "^1.6.0", - "parse-imports-exports": "^0.2.4", - "semver": "^7.7.2", - "spdx-expression-parse": "^4.0.0" - }, - "engines": { - "node": ">=20.11.0" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0" - } - }, - "node_modules/eslint-plugin-prettier": { - "version": "5.5.4", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.4.tgz", - "integrity": "sha512-swNtI95SToIz05YINMA6Ox5R057IMAmWZ26GqPxusAp1TZzj+IdY9tXNWWD3vkF/wEqydCONcwjTFpxybBqZsg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "prettier-linter-helpers": "^1.0.0", - "synckit": "^0.11.7" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint-plugin-prettier" - }, - "peerDependencies": { - "@types/eslint": ">=8.0.0", - "eslint": ">=8.0.0", - "eslint-config-prettier": ">= 7.0.0 <10.0.0 || >=10.1.0", - "prettier": ">=3.0.0" - }, - "peerDependenciesMeta": { - "@types/eslint": { - "optional": true - }, - "eslint-config-prettier": { - "optional": true - } - } - }, - "node_modules/eslint-plugin-react": { - "version": "7.37.5", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.5.tgz", - "integrity": "sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "array-includes": "^3.1.8", - "array.prototype.findlast": "^1.2.5", - "array.prototype.flatmap": "^1.3.3", - "array.prototype.tosorted": "^1.1.4", - "doctrine": "^2.1.0", - "es-iterator-helpers": "^1.2.1", - "estraverse": "^5.3.0", - "hasown": "^2.0.2", - "jsx-ast-utils": "^2.4.1 || ^3.0.0", - "minimatch": "^3.1.2", - "object.entries": "^1.1.9", - "object.fromentries": "^2.0.8", - "object.values": "^1.2.1", - "prop-types": "^15.8.1", - "resolve": "^2.0.0-next.5", - "semver": "^6.3.1", - "string.prototype.matchall": "^4.0.12", - "string.prototype.repeat": "^1.0.0" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7" - } - }, - "node_modules/eslint-plugin-react-hooks": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.2.0.tgz", - "integrity": "sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0" - } - }, - "node_modules/eslint-plugin-react/node_modules/resolve": { - "version": "2.0.0-next.5", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz", - "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/eslint-plugin-react/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "peer": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/eslint-plugin-unicorn": { - "version": "60.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-60.0.0.tgz", - "integrity": "sha512-QUzTefvP8stfSXsqKQ+vBQSEsXIlAiCduS/V1Em+FKgL9c21U/IIm20/e3MFy1jyCf14tHAhqC1sX8OTy6VUCg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.27.1", - "@eslint-community/eslint-utils": "^4.7.0", - "@eslint/plugin-kit": "^0.3.3", - "change-case": "^5.4.4", - "ci-info": "^4.3.0", - "clean-regexp": "^1.0.0", - "core-js-compat": "^3.44.0", - "esquery": "^1.6.0", - "find-up-simple": "^1.0.1", - "globals": "^16.3.0", - "indent-string": "^5.0.0", - "is-builtin-module": "^5.0.0", - "jsesc": "^3.1.0", - "pluralize": "^8.0.0", - "regexp-tree": "^0.1.27", - "regjsparser": "^0.12.0", - "semver": "^7.7.2", - "strip-indent": "^4.0.0" - }, - "engines": { - "node": "^20.10.0 || >=21.0.0" - }, - "funding": { - "url": "https://github.com/sindresorhus/eslint-plugin-unicorn?sponsor=1" - }, - "peerDependencies": { - "eslint": ">=9.29.0" - } - }, - "node_modules/eslint-plugin-unicorn/node_modules/@eslint/core": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.2.tgz", - "integrity": "sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "@types/json-schema": "^7.0.15" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/eslint-plugin-unicorn/node_modules/@eslint/plugin-kit": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.5.tgz", - "integrity": "sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "@eslint/core": "^0.15.2", - "levn": "^0.4.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/eslint-scope": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", - "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", - "dev": true, - "license": "BSD-2-Clause", - "peer": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/eslint-visitor-keys": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", - "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/espree": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", - "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", - "dev": true, - "license": "BSD-2-Clause", - "peer": true, - "dependencies": { - "acorn": "^8.15.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.2.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", - "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esquery": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", - "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", - "dev": true, - "license": "BSD-3-Clause", - "peer": true, - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "license": "BSD-2-Clause", - "peer": true, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "license": "BSD-2-Clause", - "peer": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "license": "BSD-2-Clause", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/fast-diff": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", - "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", - "dev": true, - "license": "Apache-2.0", - "peer": true - }, - "node_modules/fast-glob": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", - "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.8" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "peer": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/fastq": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", - "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", - "dev": true, - "license": "ISC", - "peer": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fetch-blob": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", - "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "paypal", - "url": "https://paypal.me/jimmywarting" - } - ], - "license": "MIT", - "dependencies": { - "node-domexception": "^1.0.0", - "web-streams-polyfill": "^3.0.3" - }, - "engines": { - "node": "^12.20 || >= 14.13" - } - }, - "node_modules/file-entry-cache": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", - "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "flat-cache": "^4.0.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/find-up-simple": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/find-up-simple/-/find-up-simple-1.0.1.tgz", - "integrity": "sha512-afd4O7zpqHeRyg4PfDQsXmlDe2PfdHtJt6Akt8jOWaApLOZk5JXs6VMR29lz03pRe9mpykrRCYIYxaJYcfpncQ==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "license": "BSD-3-Clause", - "bin": { - "flat": "cli.js" - } - }, - "node_modules/flat-cache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", - "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.4" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/flatted": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", - "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", - "dev": true, - "license": "ISC", - "peer": true - }, - "node_modules/follow-redirects": { - "version": "1.16.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz", - "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "license": "MIT", - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/for-each": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", - "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "is-callable": "^1.2.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/foreground-child": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", - "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", - "dev": true, - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.6", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/foreground-child/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/form-data": { - "version": "2.5.5", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.5.tgz", - "integrity": "sha512-jqdObeR2rxZZbPSGL+3VckHMYtu+f9//KXBsVny6JSX/pa38Fy+bGjuG8eW/H6USNQWhLi8Num++cU2yOCNz4A==", - "dev": true, - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "es-set-tostringtag": "^2.1.0", - "hasown": "^2.0.2", - "mime-types": "^2.1.35", - "safe-buffer": "^5.2.1" - }, - "engines": { - "node": ">= 0.12" - } - }, - "node_modules/formdata-polyfill": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", - "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "fetch-blob": "^3.1.2" - }, - "engines": { - "node": ">=12.20.0" - } - }, - "node_modules/forwarded-parse": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/forwarded-parse/-/forwarded-parse-2.1.2.tgz", - "integrity": "sha512-alTFZZQDKMporBH77856pXgzhEzaUVmLCDk+egLgIgHst3Tpndzz8MnKe+GzRJRfvVdn69HhpW7cmXzvtLvJAw==", - "dev": true, - "license": "MIT" - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/function.prototype.name": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz", - "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "functions-have-names": "^1.2.3", - "hasown": "^2.0.2", - "is-callable": "^1.2.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true, - "license": "MIT", - "peer": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/gaxios": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-7.1.2.tgz", - "integrity": "sha512-/Szrn8nr+2TsQT1Gp8iIe/BEytJmbyfrbFh419DfGQSkEgNEhbPi7JRJuughjkTzPWgU9gBQf5AVu3DbHt0OXA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "extend": "^3.0.2", - "https-proxy-agent": "^7.0.1", - "node-fetch": "^3.3.2" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/gcp-metadata": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-8.1.1.tgz", - "integrity": "sha512-dTCcAe9fRQf06ELwel6lWWFrEbstwjUBYEhr5VRGoC+iPDZQucHppCowaIp8b8v92tU1G4X4H3b/Y6zXZxkMsQ==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "gaxios": "^7.0.0", - "google-logging-utils": "^1.0.0", - "json-bigint": "^1.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/generator-function": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.1.tgz", - "integrity": "sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-east-asian-width": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.4.0.tgz", - "integrity": "sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/get-func-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", - "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/get-intrinsic": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", - "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "function-bind": "^1.1.2", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", - "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/get-symbol-description": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", - "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", - "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "license": "ISC", - "peer": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/glob/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/glob/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/globals": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-16.4.0.tgz", - "integrity": "sha512-ob/2LcVVaVGCYN+r14cnwnoDPUufjiYgSqRhiFD0Q1iI4Odora5RE8Iv1D24hAz5oMophRGkGz+yuvQmmUMnMw==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globalthis": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", - "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "define-properties": "^1.2.1", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/globalyzer": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz", - "integrity": "sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/globrex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", - "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==", - "dev": true, - "license": "MIT" - }, - "node_modules/google-auth-library": { - "version": "10.4.2", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-10.4.2.tgz", - "integrity": "sha512-EKiQasw6aEdxSovPEf1oBxCEvxjFamZ6MPaVOSPXZMnqKFLo+rrYjHyjKlFfZcXiKi9qAH6cutr5WRqqa1jKhg==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "base64-js": "^1.3.0", - "ecdsa-sig-formatter": "^1.0.11", - "gaxios": "^7.0.0", - "gcp-metadata": "^8.0.0", - "google-logging-utils": "^1.0.0", - "gtoken": "^8.0.0", - "jws": "^4.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/google-gax": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-5.0.4.tgz", - "integrity": "sha512-HmQ6zIYBs2EikTk+kjeHmtHprNTEpsnVaKONw9cwZZwUNCkUb+D5RYrJpCxyjdvIDvJp3wLbVReolJLRZRms1g==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@grpc/grpc-js": "^1.12.6", - "@grpc/proto-loader": "^0.8.0", - "duplexify": "^4.1.3", - "google-auth-library": "^10.1.0", - "google-logging-utils": "^1.1.1", - "node-fetch": "^3.3.2", - "object-hash": "^3.0.0", - "proto3-json-serializer": "^3.0.0", - "protobufjs": "^7.5.3", - "retry-request": "^8.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/google-logging-utils": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/google-logging-utils/-/google-logging-utils-1.1.1.tgz", - "integrity": "sha512-rcX58I7nqpu4mbKztFeOAObbomBbHU2oIb/d3tJfF3dizGSApqtSwYJigGCooHdnMyQBIw8BrWyK96w3YXgr6A==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=14" - } - }, - "node_modules/gopd": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", - "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/gtoken": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-8.0.0.tgz", - "integrity": "sha512-+CqsMbHPiSTdtSO14O51eMNlrp9N79gmeqmXeouJOhfucAedHw9noVe/n5uJk3tbKE6a+6ZCQg3RPhVhHByAIw==", - "dev": true, - "license": "MIT", - "dependencies": { - "gaxios": "^7.0.0", - "jws": "^4.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/has-bigints": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", - "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-proto": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz", - "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "dunder-proto": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "license": "MIT", - "dependencies": { - "has-symbols": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, - "license": "MIT", - "bin": { - "he": "bin/he" - } - }, - "node_modules/html-entities": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.6.0.tgz", - "integrity": "sha512-kig+rMn/QOVRvr7c86gQ8lWXq+Hkv6CbAH1hLu+RG338StTpE8Z0b44SDVaqVu7HGKf27frdmUYEs9hTUX/cLQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/mdevils" - }, - { - "type": "patreon", - "url": "https://patreon.com/mdevils" - } - ], - "license": "MIT" - }, - "node_modules/html-tags": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.3.1.tgz", - "integrity": "sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/http-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", - "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", - "dev": true, - "license": "MIT", - "dependencies": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/http-proxy-agent/node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/https-proxy-agent": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", - "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", - "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "^7.1.2", - "debug": "4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10.17.0" - } - }, - "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/immediate": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", - "license": "MIT" - }, - "node_modules/import-fresh": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", - "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/import-in-the-middle": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz", - "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "acorn": "^8.15.0", - "acorn-import-attributes": "^1.9.5", - "cjs-module-lexer": "^2.2.0", - "module-details-from-path": "^1.0.4" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/indent-string": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", - "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "license": "ISC" - }, - "node_modules/internal-slot": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", - "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "es-errors": "^1.3.0", - "hasown": "^2.0.2", - "side-channel": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/is-array-buffer": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", - "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-async-function": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.1.tgz", - "integrity": "sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "async-function": "^1.0.0", - "call-bound": "^1.0.3", - "get-proto": "^1.0.1", - "has-tostringtag": "^1.0.2", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-bigint": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz", - "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "has-bigints": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-boolean-object": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz", - "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-builtin-module": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-5.0.0.tgz", - "integrity": "sha512-f4RqJKBUe5rQkJ2eJEJBXSticB3hGbN9j0yxxMQFqIW89Jp9WYFtzfTcRlstDKVUTRzSOTLKRfO9vIztenwtxA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "builtin-modules": "^5.0.0" - }, - "engines": { - "node": ">=18.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-core-module": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", - "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-data-view": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", - "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bound": "^1.0.2", - "get-intrinsic": "^1.2.6", - "is-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-date-object": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", - "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bound": "^1.0.2", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-finalizationregistry": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz", - "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bound": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-generator-function": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.2.tgz", - "integrity": "sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bound": "^1.0.4", - "generator-function": "^2.0.0", - "get-proto": "^1.0.1", - "has-tostringtag": "^1.0.2", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-html": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-html/-/is-html-2.0.0.tgz", - "integrity": "sha512-S+OpgB5i7wzIue/YSE5hg0e5ZYfG3hhpNh9KGl6ayJ38p7ED6wxQLd1TV91xHpcTvw90KMJ9EwN3F/iNflHBVg==", - "dev": true, - "license": "MIT", - "dependencies": { - "html-tags": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-map": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", - "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-negative-zero": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", - "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-number-object": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", - "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-regex": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", - "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bound": "^1.0.2", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-set": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", - "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", - "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bound": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-string": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", - "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bound": "^1.0.3", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-symbol": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", - "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bound": "^1.0.2", - "has-symbols": "^1.1.0", - "safe-regex-test": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typed-array": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", - "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "which-typed-array": "^1.1.16" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-weakmap": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", - "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakref": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.1.tgz", - "integrity": "sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bound": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakset": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz", - "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bound": "^1.0.3", - "get-intrinsic": "^1.2.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, - "license": "ISC" - }, - "node_modules/iterator.prototype": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.5.tgz", - "integrity": "sha512-H0dkQoCa3b2VEeKQBOxFph+JAbcrQdE7KC0UkqwpLmv2EC4P41QXP+rqo9wYodACiG5/WM5s9oDApTU8utwj9g==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "define-data-property": "^1.1.4", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.6", - "get-proto": "^1.0.0", - "has-symbols": "^1.1.0", - "set-function-name": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/jackspeak": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", - "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsdoc-type-pratt-parser": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-5.1.1.tgz", - "integrity": "sha512-DYYlVP1fe4QBMh2xTIs20/YeTz2GYVbWAEZweHSZD+qQ/Cx2d5RShuhhsdk64eTjNq0FeVnteP/qVOgaywSRbg==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/jsesc": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", - "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", - "dev": true, - "license": "MIT", - "peer": true, - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/json-bigint": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", - "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "bignumber.js": "^9.0.0" - } - }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, - "node_modules/jsonata": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/jsonata/-/jsonata-2.2.1.tgz", - "integrity": "sha512-xd1uwUrKeIcJbsWhaoS3qAX4Ea8m0Mw0G5nlnAQvPT7TbZ5qaPdzBVTQia9KfyuyQm+nenfyjvzUDTRYHsC2sw==", - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/jsonc-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", - "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/jsonfile": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", - "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", - "dev": true, - "license": "MIT", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/jsx-ast-utils": { - "version": "3.3.5", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", - "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "array-includes": "^3.1.6", - "array.prototype.flat": "^1.3.1", - "object.assign": "^4.1.4", - "object.values": "^1.1.6" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/jszip": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", - "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", - "license": "(MIT OR GPL-3.0-or-later)", - "dependencies": { - "lie": "~3.3.0", - "pako": "~1.0.2", - "readable-stream": "~2.3.6", - "setimmediate": "^1.0.5" - } - }, - "node_modules/jszip/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "license": "MIT" - }, - "node_modules/jszip/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/jszip/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "license": "MIT" - }, - "node_modules/jszip/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/jwa": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.1.tgz", - "integrity": "sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-equal-constant-time": "^1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/jws": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.1.tgz", - "integrity": "sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA==", - "dev": true, - "license": "MIT", - "dependencies": { - "jwa": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/ky": { - "version": "1.14.3", - "resolved": "https://registry.npmjs.org/ky/-/ky-1.14.3.tgz", - "integrity": "sha512-9zy9lkjac+TR1c2tG+mkNSVlyOpInnWdSMiue4F+kq8TwJSgv6o8jhLRg8Ho6SnZ9wOYUq/yozts9qQCfk7bIw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sindresorhus/ky?sponsor=1" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/lie": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", - "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", - "license": "MIT", - "dependencies": { - "immediate": "~3.0.5" - } - }, - "node_modules/localforage": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.10.0.tgz", - "integrity": "sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "lie": "3.1.1" - } - }, - "node_modules/localforage/node_modules/lie": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz", - "integrity": "sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw==", - "dev": true, - "license": "MIT", - "dependencies": { - "immediate": "~3.0.5" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "license": "MIT", - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/loglevel": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.2.tgz", - "integrity": "sha512-HgMmCqIJSAKqo68l0rS2AanEWfkxaZ5wNiEFb5ggm08lDs9Xl2KxBlX3PTcaD2chBM1gXAYf491/M2Rv8Jwayg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6.0" - }, - "funding": { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/loglevel" - } - }, - "node_modules/long": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", - "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/long-timeout": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/long-timeout/-/long-timeout-0.1.1.tgz", - "integrity": "sha512-BFRuQUqc7x2NWxfJBCyUrN8iYUYznzL9JROmRz1gZ6KlOIgmoD+njPVbb+VNn2nGMKggMsK79iUNErillsrx7w==", - "license": "MIT" - }, - "node_modules/loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, - "node_modules/loupe": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", - "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", - "dev": true, - "license": "MIT", - "dependencies": { - "get-func-name": "^2.0.1" - } - }, - "node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/luxon": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.7.2.tgz", - "integrity": "sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew==", - "license": "MIT", - "engines": { - "node": ">=12" - } - }, - "node_modules/math-intrinsics": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", - "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true, - "license": "MIT" - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/minipass": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", - "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", - "dev": true, - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/mocha": { - "version": "11.7.4", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.7.4.tgz", - "integrity": "sha512-1jYAaY8x0kAZ0XszLWu14pzsf4KV740Gld4HXkhNTXwcHx4AUEDkPzgEHg9CM5dVcW+zv036tjpsEbLraPJj4w==", - "dev": true, - "license": "MIT", - "dependencies": { - "browser-stdout": "^1.3.1", - "chokidar": "^4.0.1", - "debug": "^4.3.5", - "diff": "^7.0.0", - "escape-string-regexp": "^4.0.0", - "find-up": "^5.0.0", - "glob": "^10.4.5", - "he": "^1.2.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "log-symbols": "^4.1.0", - "minimatch": "^9.0.5", - "ms": "^2.1.3", - "picocolors": "^1.1.1", - "serialize-javascript": "^6.0.2", - "strip-json-comments": "^3.1.1", - "supports-color": "^8.1.1", - "workerpool": "^9.2.0", - "yargs": "^17.7.2", - "yargs-parser": "^21.1.1", - "yargs-unparser": "^2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/mocha/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/mocha/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/mocha/node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true, - "license": "ISC" - }, - "node_modules/mocha/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/module-details-from-path": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/module-details-from-path/-/module-details-from-path-1.0.4.tgz", - "integrity": "sha512-EGWKgxALGMgzvxYF1UyGTy0HXX/2vHLkw6+NvDKW2jypWbHpjQuj4UMcqQWXHERJhVGKikolT06G3bcKe4fi7w==", - "dev": true, - "license": "MIT" - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "license": "MIT" - }, - "node_modules/nano-spawn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/nano-spawn/-/nano-spawn-2.1.0.tgz", - "integrity": "sha512-yTW+2okrElHiH4fsiz/+/zc0EDo9BDDoC3iKk8dpv1GeRc9nUWzUZHx6TofMWErchhUQR8hY9/Eu1Uja9x1nqA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=20.17" - }, - "funding": { - "url": "https://github.com/sindresorhus/nano-spawn?sponsor=1" - } - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/node-dir": { - "version": "0.1.17", - "resolved": "https://registry.npmjs.org/node-dir/-/node-dir-0.1.17.tgz", - "integrity": "sha512-tmPX422rYgofd4epzrNoOXiE8XFZYOcCq1vD7MAXCDO+O+zndlA2ztdKKMa+EeuBG5tHETpr4ml4RGgpqDCCAg==", - "dev": true, - "license": "MIT", - "dependencies": { - "minimatch": "^3.0.2" - }, - "engines": { - "node": ">= 0.10.5" - } - }, - "node_modules/node-domexception": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", - "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", - "deprecated": "Use your platform's native DOMException instead", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "github", - "url": "https://paypal.me/jimmywarting" - } - ], - "license": "MIT", - "engines": { - "node": ">=10.5.0" - } - }, - "node_modules/node-fetch": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", - "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", - "dev": true, - "license": "MIT", - "dependencies": { - "data-uri-to-buffer": "^4.0.0", - "fetch-blob": "^3.1.4", - "formdata-polyfill": "^4.0.10" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/node-fetch" - } - }, - "node_modules/node-inspect": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/node-inspect/-/node-inspect-2.0.0.tgz", - "integrity": "sha512-vaDNU6Fa/vt8gv/PV+QoeSIPhcBnHMiNOtInxcojfagspQg5KP9HloUDGJWIacamT8Agiu51eF+fuBjrE25a6w==", - "deprecated": "This module is part of Node.js core and does not need to be installed separately. It is now unmaintained.", - "license": "MIT", - "bin": { - "node-inspect": "cli.js" - } - }, - "node_modules/node-releases": { - "version": "2.0.27", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz", - "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/node-schedule": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/node-schedule/-/node-schedule-2.1.1.tgz", - "integrity": "sha512-OXdegQq03OmXEjt2hZP33W2YPs/E5BcFQks46+G2gAxs4gHOIVD1u7EqlYLYSKsaIpyKCK9Gbk0ta1/gjRSMRQ==", - "license": "MIT", - "dependencies": { - "cron-parser": "^4.2.0", - "long-timeout": "0.1.1", - "sorted-array-functions": "^1.3.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/nodemailer": { - "version": "8.0.10", - "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-8.0.10.tgz", - "integrity": "sha512-BLFuSth7QtHOkBzyqTehWWyub0NTRDuK2Q2SQfnGLsrJnzyU+Yeh4WpV1eZGuARFj1xQJHIdnTuJZLP+b9R1GQ==", - "license": "MIT-0", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-hash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", - "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "node_modules/object-inspect": { - "version": "1.13.4", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", - "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.7", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", - "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0", - "has-symbols": "^1.1.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.entries": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.9.tgz", - "integrity": "sha512-8u/hfXFRBD1O0hPUjioLhoWFHRmt6tKA4/vZPyckBr18l1KE9uHrFaFaUi8MDRTpi4uak2goyPTSNJLXX2k2Hw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.fromentries": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", - "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.groupby": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", - "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.values": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz", - "integrity": "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/own-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz", - "integrity": "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "get-intrinsic": "^1.2.6", - "object-keys": "^1.1.1", - "safe-push-apply": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/package-json-from-dist": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", - "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", - "dev": true, - "license": "BlueOak-1.0.0" - }, - "node_modules/pako": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", - "license": "(MIT AND Zlib)" - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/parse-imports-exports": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/parse-imports-exports/-/parse-imports-exports-0.2.4.tgz", - "integrity": "sha512-4s6vd6dx1AotCx/RCI2m7t7GCh5bDRUtGNvRfHSP2wbBQdMi67pPe7mtzmgwcaQ8VKK/6IB7Glfyu3qdZJPybQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "parse-statements": "1.0.11" - } - }, - "node_modules/parse-statements": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/parse-statements/-/parse-statements-1.0.11.tgz", - "integrity": "sha512-HlsyYdMBnbPQ9Jr/VgJ1YF4scnldvJpJxCVx6KgqPL4dxppsWrJHCIIxQXMJrqGnsRkNPATbeMJ8Yxu7JMsYcA==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/path-scurry": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, - "node_modules/pg-int8": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", - "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/pg-protocol": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.13.0.tgz", - "integrity": "sha512-zzdvXfS6v89r6v7OcFCHfHlyG/wvry1ALxZo4LqgUoy7W9xhBDMaqOuMiF3qEV45VqsN6rdlcehHrfDtlCPc8w==", - "dev": true, - "license": "MIT" - }, - "node_modules/pg-types": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", - "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", - "dev": true, - "license": "MIT", - "dependencies": { - "pg-int8": "1.0.1", - "postgres-array": "~2.0.0", - "postgres-bytea": "~1.0.0", - "postgres-date": "~1.0.4", - "postgres-interval": "^1.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pluralize": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", - "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/possible-typed-array-names": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", - "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/postgres-array": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", - "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/postgres-bytea": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.1.tgz", - "integrity": "sha512-5+5HqXnsZPE65IJZSMkZtURARZelel2oXUEO8rH83VS/hxH5vv1uHquPg5wZs8yMAfdv971IU+kcPUczi7NVBQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/postgres-date": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", - "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/postgres-interval": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", - "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "xtend": "^4.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/prettier": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.3.tgz", - "integrity": "sha512-7igPTM53cGHMW8xWuVTydi2KO233VFiTNyF5hLJqpilHfmn8C8gPf+PS7dUT64YcXFbiMGZxS9pCSxL/Dxm/Jw==", - "license": "MIT", - "bin": { - "prettier": "bin/prettier.cjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" - } - }, - "node_modules/prettier-linter-helpers": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", - "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "fast-diff": "^1.1.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "license": "MIT" - }, - "node_modules/promisify-child-process": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/promisify-child-process/-/promisify-child-process-5.0.1.tgz", - "integrity": "sha512-jP2Aw1acio5NYIgCEpW9Ay2OhWlcbKTZp4aY6iivx75K2yXizJBt6Wz7sQrHloXKIfrjhbUfdH9m6UZrus4tmA==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.26.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/prop-types": { - "version": "15.8.1", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", - "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dev": true, - "license": "MIT", - "dependencies": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.13.1" - } - }, - "node_modules/prop-types/node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/proto3-json-serializer": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/proto3-json-serializer/-/proto3-json-serializer-3.0.3.tgz", - "integrity": "sha512-iUi7jGLuECChuoUwtvf6eXBDcFXTHAt5GM6ckvtD3RqD+j2wW0GW6WndPOu9IWeUk7n933lzrskcNMHJy2tFSw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "protobufjs": "^7.4.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/protobufjs": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.4.tgz", - "integrity": "sha512-CvexbZtbov6jW2eXAvLukXjXUW1TzFaivC46BpWc/3BpcCysb5Vffu+B3XHMm8lVEuy2Mm4XGex8hBSg1yapPg==", - "dev": true, - "hasInstallScript": true, - "license": "BSD-3-Clause", - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/node": ">=13.7.0", - "long": "^5.0.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/proxy-from-env": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz", - "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", - "license": "MIT", - "engines": { - "node": ">=10" - } - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "peer": true - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/react": { - "version": "19.2.0", - "resolved": "https://registry.npmjs.org/react/-/react-19.2.0.tgz", - "integrity": "sha512-tmbWg6W31tQLeB5cdIBOicJDJRR2KzXsV7uSK9iNfLWQ5bIZfxuPEHp7M8wiHyHnn0DD1i7w3Zmin0FtkrwoCQ==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-dom": { - "version": "19.2.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.0.tgz", - "integrity": "sha512-UlbRu4cAiGaIewkPyiRGJk0imDN2T3JjieT6spoL2UeSf5od4n5LB/mQ4ejmxhCFT1tYe8IvaFulzynWovsEFQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "scheduler": "^0.27.0" - }, - "peerDependencies": { - "react": "^19.2.0" - } - }, - "node_modules/react-is": { - "version": "19.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.2.0.tgz", - "integrity": "sha512-x3Ax3kNSMIIkyVYhWPyO09bu0uttcAIoecO/um/rKGQ4EltYWVYtyiGkS/3xMynrbVQdS69Jhlv8FXUEZehlzA==", - "dev": true, - "license": "MIT" - }, - "node_modules/react-transition-group": { - "version": "4.4.5", - "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", - "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/runtime": "^7.5.5", - "dom-helpers": "^5.0.1", - "loose-envify": "^1.4.0", - "prop-types": "^15.6.2" - }, - "peerDependencies": { - "react": ">=16.6.0", - "react-dom": ">=16.6.0" - } - }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 14.18.0" - }, - "funding": { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/reflect.getprototypeof": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", - "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.9", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.7", - "get-proto": "^1.0.1", - "which-builtin-type": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/regexp-tree": { - "version": "0.1.27", - "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.27.tgz", - "integrity": "sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==", - "dev": true, - "license": "MIT", - "peer": true, - "bin": { - "regexp-tree": "bin/regexp-tree" - } - }, - "node_modules/regexp.prototype.flags": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", - "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bind": "^1.0.8", - "define-properties": "^1.2.1", - "es-errors": "^1.3.0", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "set-function-name": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/regjsparser": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.12.0.tgz", - "integrity": "sha512-cnE+y8bz4NhMjISKbgeVJtqNbtf5QpjZP+Bslo+UqkIt9QPnX9q095eiRRASJG1/tz6dlNr6Z5NsBiWYokp6EQ==", - "dev": true, - "license": "BSD-2-Clause", - "peer": true, - "dependencies": { - "jsesc": "~3.0.2" - }, - "bin": { - "regjsparser": "bin/parser" - } - }, - "node_modules/regjsparser/node_modules/jsesc": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", - "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", - "dev": true, - "license": "MIT", - "peer": true, - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-in-the-middle": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz", - "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^4.3.5", - "module-details-from-path": "^1.0.3" - }, - "engines": { - "node": ">=9.3.0 || >=8.10.0 <9.0.0" - } - }, - "node_modules/resolve": { - "version": "1.22.11", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", - "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "is-core-module": "^2.16.1", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/retry-request": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-8.0.2.tgz", - "integrity": "sha512-JzFPAfklk1kjR1w76f0QOIhoDkNkSqW8wYKT08n9yysTmZfB+RQ2QoXoTAeOi1HD9ZipTyTAZg3c4pM/jeqgSw==", - "dev": true, - "license": "MIT", - "dependencies": { - "extend": "^3.0.2", - "teeny-request": "^10.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/reusify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", - "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rimraf": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.10.tgz", - "integrity": "sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^10.3.7" - }, - "bin": { - "rimraf": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "peer": true, - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/safe-array-concat": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", - "integrity": "sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "get-intrinsic": "^1.2.6", - "has-symbols": "^1.1.0", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">=0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/safe-push-apply": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz", - "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "es-errors": "^1.3.0", - "isarray": "^2.0.5" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safe-regex-test": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", - "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "is-regex": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/scheduler": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", - "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/semver": { - "version": "7.8.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.2.tgz", - "integrity": "sha512-c8jsqUZm3omBOI66G90z1Dyw5z622G8oLG+omfsHBJf3CWQTlOcwOjvOG6wtiNfW6anKm/eA39LMwMtMez2TiQ==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/serialize-javascript": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", - "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/set-function-length": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/set-function-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", - "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/set-proto": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz", - "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "dunder-proto": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", - "license": "MIT" - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/side-channel": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", - "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3", - "side-channel-list": "^1.0.0", - "side-channel-map": "^1.0.1", - "side-channel-weakmap": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-list": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", - "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-map": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", - "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-weakmap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", - "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3", - "side-channel-map": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/sinon": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-21.0.0.tgz", - "integrity": "sha512-TOgRcwFPbfGtpqvZw+hyqJDvqfapr1qUlOizROIk4bBLjlsjlB00Pg6wMFXNtJRpu+eCZuVOaLatG7M8105kAw==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^3.0.1", - "@sinonjs/fake-timers": "^13.0.5", - "@sinonjs/samsam": "^8.0.1", - "diff": "^7.0.0", - "supports-color": "^7.2.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/sinon" - } - }, - "node_modules/sinon-chai": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/sinon-chai/-/sinon-chai-3.7.0.tgz", - "integrity": "sha512-mf5NURdUaSdnatJx3uhoBOrY9dtL19fiOtAdT1Azxg3+lNJFiuN0uzaU3xX1LeAfL17kHQhTAJgpsfhbMJMY2g==", - "dev": true, - "license": "(BSD-2-Clause OR WTFPL)", - "peerDependencies": { - "chai": "^4.0.0", - "sinon": ">=4.0.0" - } - }, - "node_modules/sorted-array-functions": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/sorted-array-functions/-/sorted-array-functions-1.3.0.tgz", - "integrity": "sha512-2sqgzeFlid6N4Z2fUQ1cvFmTOLRi/sEDzSQ0OKYchqgoPmQBVyM3959qYx3fpS6Esef80KjmpgPeEr028dP3OA==", - "license": "MIT" - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/spdx-exceptions": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", - "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", - "dev": true, - "license": "CC-BY-3.0", - "peer": true - }, - "node_modules/spdx-expression-parse": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz", - "integrity": "sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-license-ids": { - "version": "3.0.22", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.22.tgz", - "integrity": "sha512-4PRT4nh1EImPbt2jASOKHX7PB7I+e4IWNLvkKFDxNhJlfjbYlleYQh285Z/3mPTHSAK/AvdMmw5BNNuYH8ShgQ==", - "dev": true, - "license": "CC0-1.0", - "peer": true - }, - "node_modules/stop-iteration-iterator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz", - "integrity": "sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "es-errors": "^1.3.0", - "internal-slot": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/stream-events": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.5.tgz", - "integrity": "sha512-E1GUzBSgvct8Jsb3v2X15pjzN1tYebtbLaMg+eBOUOAxgbLoSbT2NS91ckc5lJD1KfLjId+jXJRgo0qnV5Nerg==", - "dev": true, - "license": "MIT", - "dependencies": { - "stubs": "^3.0.0" - } - }, - "node_modules/stream-shift": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.3.tgz", - "integrity": "sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, - "node_modules/string-width/node_modules/ansi-regex": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", - "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/string-width/node_modules/strip-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", - "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/string.prototype.matchall": { - "version": "4.0.12", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz", - "integrity": "sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.3", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.6", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.6", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "internal-slot": "^1.1.0", - "regexp.prototype.flags": "^1.5.3", - "set-function-name": "^2.0.2", - "side-channel": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.repeat": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz", - "integrity": "sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - } - }, - "node_modules/string.prototype.trim": { - "version": "1.2.10", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", - "integrity": "sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "define-data-property": "^1.1.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.5", - "es-object-atoms": "^1.0.0", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimend": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz", - "integrity": "sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.2", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", - "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/strip-indent": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-4.1.1.tgz", - "integrity": "sha512-SlyRoSkdh1dYP0PzclLE7r0M9sgbFKKMFXpFRUMNuKhQSbC6VQIGzq3E0qsfvGJaUFJPGv6Ws1NZ/haTAjfbMA==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/stubs": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/stubs/-/stubs-3.0.0.tgz", - "integrity": "sha512-PdHt7hHUJKxvTCgbKX9C1V/ftOcjJQgz8BZwNfV5c4B6dcGqlpelTbJ999jBGZ2jYiPAwcX5dP6oBwVlBlUbxw==", - "dev": true, - "license": "MIT" - }, - "node_modules/stylis": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.2.0.tgz", - "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==", - "dev": true, - "license": "MIT" - }, - "node_modules/suncalc2": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/suncalc2/-/suncalc2-1.8.1.tgz", - "integrity": "sha512-tNoAni1LqWzBzJRX3NRCsD50gVsuejH1jd9Y+XyKO3WkpPIU+QNyWF4Zf2JnUQKW2LKLWIBgVDQCrgsQwqs0tA==" - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/synckit": { - "version": "0.11.11", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.11.tgz", - "integrity": "sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@pkgr/core": "^0.2.9" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/synckit" - } - }, - "node_modules/teeny-request": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-10.1.0.tgz", - "integrity": "sha512-3ZnLvgWF29jikg1sAQ1g0o+lr5JX6sVgYvfUJazn7ZjJroDBUTWp44/+cFVX0bULjv4vci+rBD+oGVAkWqhUbw==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", - "node-fetch": "^3.3.2", - "stream-events": "^1.0.5" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/teeny-request/node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/teeny-request/node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/timekeeper": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/timekeeper/-/timekeeper-2.3.1.tgz", - "integrity": "sha512-LeQRS7/4JcC0PgdSFnfUiStQEdiuySlCj/5SJ18D+T1n9BoY7PxKFfCwLulpHXoLUFr67HxBddQdEX47lDGx1g==", - "dev": true, - "license": "MIT" - }, - "node_modules/tiny-glob": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz", - "integrity": "sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==", - "dev": true, - "license": "MIT", - "dependencies": { - "globalyzer": "0.1.0", - "globrex": "^0.1.2" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/ts-api-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", - "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=18.12" - }, - "peerDependencies": { - "typescript": ">=4.8.4" - } - }, - "node_modules/tsconfig-paths": { - "version": "3.15.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", - "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@types/json5": "^0.0.29", - "json5": "^1.0.2", - "minimist": "^1.2.6", - "strip-bom": "^3.0.0" - } - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-detect": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", - "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/typed-array-buffer": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", - "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bound": "^1.0.3", - "es-errors": "^1.3.0", - "is-typed-array": "^1.1.14" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/typed-array-byte-length": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz", - "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bind": "^1.0.8", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-proto": "^1.2.0", - "is-typed-array": "^1.1.14" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-byte-offset": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz", - "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "for-each": "^0.3.3", - "gopd": "^1.2.0", - "has-proto": "^1.2.0", - "is-typed-array": "^1.1.15", - "reflect.getprototypeof": "^1.0.9" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typed-array-length": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.7.tgz", - "integrity": "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "is-typed-array": "^1.1.13", - "possible-typed-array-names": "^1.0.0", - "reflect.getprototypeof": "^1.0.6" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/typescript": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/typescript-eslint": { - "version": "8.46.2", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.46.2.tgz", - "integrity": "sha512-vbw8bOmiuYNdzzV3lsiWv6sRwjyuKJMQqWulBOU7M0RrxedXledX8G8kBbQeiOYDnTfiXz0Y4081E1QMNB6iQg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@typescript-eslint/eslint-plugin": "8.46.2", - "@typescript-eslint/parser": "8.46.2", - "@typescript-eslint/typescript-estree": "8.46.2", - "@typescript-eslint/utils": "8.46.2" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/unbox-primitive": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", - "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bound": "^1.0.3", - "has-bigints": "^1.0.2", - "has-symbols": "^1.1.0", - "which-boxed-primitive": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/undici-types": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", - "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", - "license": "MIT" - }, - "node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/update-browserslist-db": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.4.tgz", - "integrity": "sha512-q0SPT4xyU84saUX+tomz1WLkxUbuaJnR1xWt17M7fJtEJigJeWUNGUqrauFXsHnqev9y9JTRGwk13tFBuKby4A==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" + "name": "iobroker.javascript", + "version": "9.2.4", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "iobroker.javascript", + "version": "9.2.4", + "license": "MIT", + "dependencies": { + "@iobroker/adapter-core": "^3.4.1", + "@iobroker/types": "^7.1.2", + "@types/node": "^18.19.130", + "axios": "^1.17.0", + "jsonata": "^2.2.1", + "jszip": "^3.10.1", + "node-inspect": "^2.0.0", + "node-schedule": "2.1.1", + "nodemailer": "^8.0.11", + "prettier": "^3.8.4", + "promisify-child-process": "^5.0.1", + "semver": "^7.8.4", + "suncalc2": "^1.8.1", + "typescript": "5.9.3", + "virtual-tsc": "^0.6.2", + "wake_on_lan": "^1.0.0" + }, + "devDependencies": { + "@alcalzone/release-script": "^5.2.1", + "@alcalzone/release-script-plugin-iobroker": "^5.2.0", + "@alcalzone/release-script-plugin-license": "^5.2.0", + "@iobroker/adapter-dev": "^1.5.0", + "@iobroker/build-tools": "^3.0.1", + "@iobroker/eslint-config": "^2.2.0", + "@iobroker/plugin-sentry": "^3.0.4", + "@iobroker/testing": "^5.2.2", + "@iobroker/vis-2-widgets-react-dev": "^4.0.4", + "@types/node-schedule": "^2.1.8", + "@types/nodemailer": "^7.0.12", + "@types/request": "^2.48.13", + "@types/suncalc": "^1.9.2", + "alcalzone-shared": "^5.0.0", + "timekeeper": "^2.3.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@alcalzone/esbuild-register": { + "version": "2.5.1-1", + "resolved": "https://registry.npmjs.org/@alcalzone/esbuild-register/-/esbuild-register-2.5.1-1.tgz", + "integrity": "sha512-u19/K/ZaiWQhYIQZeF2FImUeJDiMD4i2h7qPdU0HVFCxoQynye59N4oy6EvjxeXaxLnGkppcb5KKeiYD4cT1iQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.11.5", + "jsonc-parser": "^3.0.0" + } + }, + "node_modules/@alcalzone/esbuild-register/node_modules/esbuild": { + "version": "0.11.23", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.11.23.tgz", + "integrity": "sha512-iaiZZ9vUF5wJV8ob1tl+5aJTrwDczlvGP0JoMmnpC2B0ppiMCu8n8gmy5ZTGl5bcG081XBVn+U+jP+mPFm5T5Q==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + } + }, + "node_modules/@alcalzone/pak": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@alcalzone/pak/-/pak-0.12.0.tgz", + "integrity": "sha512-9r0zM5JAVTuPma1M/nMXiIlihQ07bWnxiYdqQrRsqFcWfm/p2hATbMtDMBXonkKZZGuOQxEMzTk7kpzGgnEJEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ky": "^1.14.3", + "nano-spawn": "^2.0.0", + "semver": "^7.7.4", + "tiny-glob": "^0.2.9" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/@alcalzone/release-script": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script/-/release-script-5.2.1.tgz", + "integrity": "sha512-d7aeYU/c1fKcBRkZGpfLLAK6zjpOPV00NzdsYKap9uTdlBqrC5d/OlY7n9Jet0eKTzygKsz7mtPlV8t5GNPGPg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@alcalzone/release-script-core": "5.2.0", + "@alcalzone/release-script-plugin-changelog": "5.2.1", + "@alcalzone/release-script-plugin-exec": "5.2.0", + "@alcalzone/release-script-plugin-git": "5.2.0", + "@alcalzone/release-script-plugin-package": "5.2.0", + "@alcalzone/release-script-plugin-version": "5.2.0", + "alcalzone-shared": "^5.0.0", + "enquirer": "^2.3.6", + "picocolors": "1.0.0", + "semver": "^7.7.2", + "source-map-support": "^0.5.21", + "yargs": "^17.4.1" + }, + "bin": { + "release-script": "bin/release.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@alcalzone/release-script-core": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-core/-/release-script-core-5.2.0.tgz", + "integrity": "sha512-xR09iP7pr9hpkdjvSQBxFTyV1MEvUQ+4ar5p0RUl5ogPqVqTF+r4GYkrOvZsxSFfTrU/Fm0TVC29mJ0UkmFrOw==", + "dev": true, + "license": "MIT", + "dependencies": { + "execa": "^5.1.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@alcalzone/release-script-plugin-changelog": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-changelog/-/release-script-plugin-changelog-5.2.1.tgz", + "integrity": "sha512-IUbwNQW6r5O40FUKGz3yHumnca6o8Xct/d4+7wslkcjnBMbUR5CMlt0/QCi/Xs9jNhumvLV9w7pNkku2WCz/xg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@alcalzone/release-script-core": "5.2.0", + "alcalzone-shared": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@alcalzone/release-script-plugin-exec": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-exec/-/release-script-plugin-exec-5.2.0.tgz", + "integrity": "sha512-YCLHx+W0MqYYR54scElkjcF3E16iqoh8j5aanmNMhoYTQYkBLX162zgIF/Ivx9kxVe47RNZhwdfg7sJd18ftKg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@alcalzone/release-script-core": "5.2.0", + "alcalzone-shared": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@alcalzone/release-script-plugin-git": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-git/-/release-script-plugin-git-5.2.0.tgz", + "integrity": "sha512-CDR1gVIKXp2RyYSKhOHxma2m7AH5p8Ont+Mlq2W5rWxCyhvxkKhSP363QoElWCTRIvYWLkwsR6Tf0KAyXf/mBQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@alcalzone/release-script-core": "5.2.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@alcalzone/release-script-plugin-iobroker": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-iobroker/-/release-script-plugin-iobroker-5.2.0.tgz", + "integrity": "sha512-xBjEXvleAd3vencWmwLt1BtI8ibueZWWD5Trzf2AyyIpN0LTSAa6oz+MCN9xafgBFYueaKXDmA1OARiKaiupSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@alcalzone/release-script-core": "5.2.0", + "alcalzone-shared": "^5.0.0", + "ky": "^1.7.5", + "semver": "^7.7.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@alcalzone/release-script-plugin-license": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-license/-/release-script-plugin-license-5.2.0.tgz", + "integrity": "sha512-DeawSM2g9rWF355iQRBIrO69/Yct0Og6yhgFJjFCSGc3WNBq22l0GzalO1yIL84Ln12tnBhT7n9I+aOuJSnUNQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@alcalzone/release-script-core": "5.2.0", + "tiny-glob": "^0.2.9" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@alcalzone/release-script-plugin-package": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-package/-/release-script-plugin-package-5.2.0.tgz", + "integrity": "sha512-lgvd33pKJ2dCxEe8aVzNHTc7AIfv195URBmfu57NioWQhFAOISdNRMPzOWAqsDyOumYXGMGPBIPjUkCTGgYyKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@alcalzone/pak": "^0.12.0", + "@alcalzone/release-script-core": "5.2.0", + "alcalzone-shared": "^5.0.0", + "semver": "^7.7.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@alcalzone/release-script-plugin-version": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@alcalzone/release-script-plugin-version/-/release-script-plugin-version-5.2.0.tgz", + "integrity": "sha512-OeM4lpzou7SVtTdD1Jmfj+kq3LgLr9ed2EphoWfCeJe/ES5+ARhcqbTibfDX8K98lehil9Uc5l1T9NlrdlkzZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@alcalzone/release-script-core": "5.2.0", + "alcalzone-shared": "^5.0.0", + "semver": "^7.7.2", + "tiny-glob": "^0.2.9" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/runtime": { + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz", + "integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@emotion/cache": { + "version": "11.14.0", + "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.14.0.tgz", + "integrity": "sha512-L/B1lc/TViYk4DcpGxtAVbx0ZyiKM5ktoIyafGkH6zg/tj+mA+NE//aPYKG0k8kCHSHVJrpLpcAlOBEXQ3SavA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@emotion/memoize": "^0.9.0", + "@emotion/sheet": "^1.4.0", + "@emotion/utils": "^1.4.2", + "@emotion/weak-memoize": "^0.4.0", + "stylis": "4.2.0" + } + }, + "node_modules/@emotion/hash": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.2.tgz", + "integrity": "sha512-MyqliTZGuOm3+5ZRSaaBGP3USLw6+EGykkwZns2EPC5g8jJ4z9OrdZY9apkl3+UP9+sdz76YYkwCKP5gh8iY3g==", + "dev": true, + "license": "MIT" + }, + "node_modules/@emotion/memoize": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.9.0.tgz", + "integrity": "sha512-30FAj7/EoJ5mwVPOWhAyCX+FPfMDrVecJAM+Iw9NRoSl4BBAQeqj4cApHHUXOVvIPgLVDsCFoz/hGD+5QQD1GQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@emotion/serialize": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.3.3.tgz", + "integrity": "sha512-EISGqt7sSNWHGI76hC7x1CksiXPahbxEOrC5RjmFRJTqLyEK9/9hZvBbiYn70dw4wuwMKiEMCUlR6ZXTSWQqxA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@emotion/hash": "^0.9.2", + "@emotion/memoize": "^0.9.0", + "@emotion/unitless": "^0.10.0", + "@emotion/utils": "^1.4.2", + "csstype": "^3.0.2" + } + }, + "node_modules/@emotion/sheet": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.4.0.tgz", + "integrity": "sha512-fTBW9/8r2w3dXWYM4HCB1Rdp8NLibOw2+XELH5m5+AkWiL/KqYX6dc0kKYlaYyKjrQ6ds33MCdMPEwgs2z1rqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@emotion/unitless": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.10.0.tgz", + "integrity": "sha512-dFoMUuQA20zvtVTuxZww6OHoJYgrzfKM1t52mVySDJnMSEa08ruEvdYQbhvyu6soU+NeLVd3yKfTfT0NeV6qGg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@emotion/utils": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.4.2.tgz", + "integrity": "sha512-3vLclRofFziIa3J2wDh9jjbkUz9qk5Vi3IZ/FSTKViB0k+ef0fPV7dYrUIugbgupYDx7v9ud/SjrtEP8Y4xLoA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@emotion/weak-memoize": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.4.0.tgz", + "integrity": "sha512-snKqtPW01tN0ui7yu9rGv69aJXr/a/Ywvl11sUjNtEcRc+ng/mQriFL0wLXMef74iHa/EkftbDzU9F8iFbH+zg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@es-joy/jsdoccomment": { + "version": "0.56.0", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.56.0.tgz", + "integrity": "sha512-c6EW+aA1w2rjqOMjbL93nZlwxp6c1Ln06vTYs5FjRRhmJXK8V/OrSXdT+pUr4aRYgjCgu8/OkiZr0tzeVrRSbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.8", + "@typescript-eslint/types": "^8.42.0", + "comment-parser": "1.4.1", + "esquery": "^1.6.0", + "jsdoc-type-pratt-parser": "~5.1.0" + }, + "engines": { + "node": ">=20.11.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.11.tgz", + "integrity": "sha512-Xt1dOL13m8u0WE8iplx9Ibbm+hFAO0GsU2P34UNoDGvZYkY8ifSiy6Zuc1lYxfG7svWE2fzqCUmFp5HCn51gJg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.11.tgz", + "integrity": "sha512-uoa7dU+Dt3HYsethkJ1k6Z9YdcHjTrSb5NUy66ZfZaSV8hEYGD5ZHbEMXnqLFlbBflLsl89Zke7CAdDJ4JI+Gg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.11.tgz", + "integrity": "sha512-9slpyFBc4FPPz48+f6jyiXOx/Y4v34TUeDDXJpZqAWQn/08lKGeD8aDp9TMn9jDz2CiEuHwfhRmGBvpnd/PWIQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.11.tgz", + "integrity": "sha512-Sgiab4xBjPU1QoPEIqS3Xx+R2lezu0LKIEcYe6pftr56PqPygbB7+szVnzoShbx64MUupqoE0KyRlN7gezbl8g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.11.tgz", + "integrity": "sha512-VekY0PBCukppoQrycFxUqkCojnTQhdec0vevUL/EDOCnXd9LKWqD/bHwMPzigIJXPhC59Vd1WFIL57SKs2mg4w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.11.tgz", + "integrity": "sha512-+hfp3yfBalNEpTGp9loYgbknjR695HkqtY3d3/JjSRUyPg/xd6q+mQqIb5qdywnDxRZykIHs3axEqU6l1+oWEQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.11.tgz", + "integrity": "sha512-CmKjrnayyTJF2eVuO//uSjl/K3KsMIeYeyN7FyDBjsR3lnSJHaXlVoAK8DZa7lXWChbuOk7NjAc7ygAwrnPBhA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.11.tgz", + "integrity": "sha512-Dyq+5oscTJvMaYPvW3x3FLpi2+gSZTCE/1ffdwuM6G1ARang/mb3jvjxs0mw6n3Lsw84ocfo9CrNMqc5lTfGOw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.11.tgz", + "integrity": "sha512-TBMv6B4kCfrGJ8cUPo7vd6NECZH/8hPpBHHlYI3qzoYFvWu2AdTvZNuU/7hsbKWqu/COU7NIK12dHAAqBLLXgw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.11.tgz", + "integrity": "sha512-Qr8AzcplUhGvdyUF08A1kHU3Vr2O88xxP0Tm8GcdVOUm25XYcMPp2YqSVHbLuXzYQMf9Bh/iKx7YPqECs6ffLA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.11.tgz", + "integrity": "sha512-TmnJg8BMGPehs5JKrCLqyWTVAvielc615jbkOirATQvWWB1NMXY77oLMzsUjRLa0+ngecEmDGqt5jiDC6bfvOw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.11.tgz", + "integrity": "sha512-DIGXL2+gvDaXlaq8xruNXUJdT5tF+SBbJQKbWy/0J7OhU8gOHOzKmGIlfTTl6nHaCOoipxQbuJi7O++ldrxgMw==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.11.tgz", + "integrity": "sha512-Osx1nALUJu4pU43o9OyjSCXokFkFbyzjXb6VhGIJZQ5JZi8ylCQ9/LFagolPsHtgw6himDSyb5ETSfmp4rpiKQ==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.11.tgz", + "integrity": "sha512-nbLFgsQQEsBa8XSgSTSlrnBSrpoWh7ioFDUmwo158gIm5NNP+17IYmNWzaIzWmgCxq56vfr34xGkOcZ7jX6CPw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.11.tgz", + "integrity": "sha512-HfyAmqZi9uBAbgKYP1yGuI7tSREXwIb438q0nqvlpxAOs3XnZ8RsisRfmVsgV486NdjD7Mw2UrFSw51lzUk1ww==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.11.tgz", + "integrity": "sha512-HjLqVgSSYnVXRisyfmzsH6mXqyvj0SA7pG5g+9W7ESgwA70AXYNpfKBqh1KbTxmQVaYxpzA/SvlB9oclGPbApw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.11.tgz", + "integrity": "sha512-HSFAT4+WYjIhrHxKBwGmOOSpphjYkcswF449j6EjsjbinTZbp8PJtjsVK1XFJStdzXdy/jaddAep2FGY+wyFAQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.11.tgz", + "integrity": "sha512-hr9Oxj1Fa4r04dNpWr3P8QKVVsjQhqrMSUzZzf+LZcYjZNqhA3IAfPQdEh1FLVUJSiu6sgAwp3OmwBfbFgG2Xg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.11.tgz", + "integrity": "sha512-u7tKA+qbzBydyj0vgpu+5h5AeudxOAGncb8N6C9Kh1N4n7wU1Xw1JDApsRjpShRpXRQlJLb9wY28ELpwdPcZ7A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.11.tgz", + "integrity": "sha512-Qq6YHhayieor3DxFOoYM1q0q1uMFYb7cSpLD2qzDSvK1NAvqFi8Xgivv0cFC6J+hWVw2teCYltyy9/m/14ryHg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.11.tgz", + "integrity": "sha512-CN+7c++kkbrckTOz5hrehxWN7uIhFFlmS/hqziSFVWpAzpWrQoAG4chH+nN3Be+Kzv/uuo7zhX716x3Sn2Jduw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.11.tgz", + "integrity": "sha512-rOREuNIQgaiR+9QuNkbkxubbp8MSO9rONmwP5nKncnWJ9v5jQ4JxFnLu4zDSRPf3x4u+2VN4pM4RdyIzDty/wQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.11.tgz", + "integrity": "sha512-nq2xdYaWxyg9DcIyXkZhcYulC6pQ2FuCgem3LI92IwMgIZ69KHeY8T4Y88pcwoLIjbed8n36CyKoYRDygNSGhA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.11.tgz", + "integrity": "sha512-3XxECOWJq1qMZ3MN8srCJ/QfoLpL+VaxD/WfNRm1O3B4+AZ/BnLVgFbUV3eiRYDMXetciH16dwPbbHqwe1uU0Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.11.tgz", + "integrity": "sha512-3ukss6gb9XZ8TlRyJlgLn17ecsK4NSQTmdIXRASVsiS2sQ6zPPZklNJT5GR5tE/MUarymmy8kCEf5xPCNCqVOA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.11.tgz", + "integrity": "sha512-D7Hpz6A2L4hzsRpPaCYkQnGOotdUpDzSGRIv9I+1ITdHROSFUWW95ZPZWQmGka1Fg7W3zFJowyn9WGwMJ0+KPA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", + "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.1.tgz", + "integrity": "sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.7", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz", + "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.17.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-helpers/node_modules/@eslint/core": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", + "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.16.0.tgz", + "integrity": "sha512-nmC8/totwobIiFcGkDza3GIKfAw1+hLiYVrh3I1nIomQ8PEr5cxg34jnkmGawul/ep52wGRAcyeDCNtWKSOj4Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", + "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/js": { + "version": "9.38.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.38.0.tgz", + "integrity": "sha512-UZ1VpFvXf9J06YG9xQBdnzU+kthors6KjhMAl6f4gH4usHyh31rUf2DLGInT8RFYIReYXNSydgPY0V2LuWgl7A==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz", + "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz", + "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.17.0", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit/node_modules/@eslint/core": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", + "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@esm2cjs/execa": { + "version": "6.1.1-cjs.1", + "resolved": "https://registry.npmjs.org/@esm2cjs/execa/-/execa-6.1.1-cjs.1.tgz", + "integrity": "sha512-FHxfnmuDIjY1VS/BLzDkL8EkbcFvi8s6x1nYQ1Nyu0An0n88EJcGhDBcRWLFwt3C3nT7xwI+MwHRH1TZcAFW2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@esm2cjs/human-signals": "^3.0.1", + "@esm2cjs/is-stream": "^3.0.0", + "@esm2cjs/npm-run-path": "^5.1.1-cjs.0", + "@esm2cjs/onetime": "^6.0.1-cjs.0", + "@esm2cjs/strip-final-newline": "^3.0.1-cjs.0", + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.1", + "merge-stream": "^2.0.0", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/AlCalzone" + } + }, + "node_modules/@esm2cjs/human-signals": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@esm2cjs/human-signals/-/human-signals-3.0.1.tgz", + "integrity": "sha512-QZme4eF/PwTpeSbMB4AaWGQ4VSygzE30jI+Oas1NPTtZQAgcHwWVDOQpIW8FUmtzn5Q+2cS7AjnTzbtqtc5P6g==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.20.0" + }, + "funding": { + "url": "https://github.com/sponsors/AlCalzone" + } + }, + "node_modules/@esm2cjs/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@esm2cjs/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-qcBscHlJpZFOD5nnmMHkzOrq2xyvsp9fbVreQLS8x2LOs8N3CrNi3fqvFY0GVJR+YSOHscwhG9T5t4Ck7R7QGw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/AlCalzone" + } + }, + "node_modules/@esm2cjs/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@esm2cjs/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-LIIAjcpjLr4rcbYmRQ+eRu55Upy/MMB78seIlwqbnyiA+cTa1/pxWnJ1NHJQrw6tx2wMQmlYoJj+wf16NjWH6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/AlCalzone" + } + }, + "node_modules/@esm2cjs/npm-run-path": { + "version": "5.1.1-cjs.0", + "resolved": "https://registry.npmjs.org/@esm2cjs/npm-run-path/-/npm-run-path-5.1.1-cjs.0.tgz", + "integrity": "sha512-CWeAIyE8iNSCgP2ItPE8iPgS+lACqgH+MuFRaWOIl2T7hnHqPFfhAJJ/LcLJJ/RMIxNMeenjFMwc91HW7NWr1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@esm2cjs/path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/AlCalzone" + } + }, + "node_modules/@esm2cjs/onetime": { + "version": "6.0.1-cjs.0", + "resolved": "https://registry.npmjs.org/@esm2cjs/onetime/-/onetime-6.0.1-cjs.0.tgz", + "integrity": "sha512-MkZMZSxrSC/6yUuAw6Azc56XOgwHQQIsNDlO/zgFmOcycJBhRwRuc/gdYUUOFNZIh7y+f0JSIxkNdJPFvJ5W0w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@esm2cjs/mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/AlCalzone" + } + }, + "node_modules/@esm2cjs/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@esm2cjs/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-fKzZ3uIIP4j+7WfyG0MEkomGHL0hUXWCx1kY2Zct3GTdl4pyY+3k5lCUxjgdDa2Ld1BCjMNorXnRHiBP6jW6CQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/AlCalzone" + } + }, + "node_modules/@esm2cjs/strip-final-newline": { + "version": "3.0.1-cjs.0", + "resolved": "https://registry.npmjs.org/@esm2cjs/strip-final-newline/-/strip-final-newline-3.0.1-cjs.0.tgz", + "integrity": "sha512-o41riCGPiOEStayoikBCAqwa6igbv9L9rP+k5UCfQ24EJD/wGrdDs/KTNwkHG5JzDK3T60D5dMkWkLKEPy8gjA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/AlCalzone" + } + }, + "node_modules/@fastify/otel": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/@fastify/otel/-/otel-0.17.1.tgz", + "integrity": "sha512-K4wyxfUZx2ux5o+b6BtTqouYFVILohLZmSbA2tKUueJstNcBnoGPVhllCaOvbQ3ZrXdUxUC/fyrSWSCqHhdOPg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "MIT", + "dependencies": { + "@opentelemetry/core": "^2.0.0", + "@opentelemetry/instrumentation": "^0.212.0", + "@opentelemetry/semantic-conventions": "^1.28.0", + "minimatch": "^10.2.4" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.9.0" + } + }, + "node_modules/@fastify/otel/node_modules/@opentelemetry/api-logs": { + "version": "0.212.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.212.0.tgz", + "integrity": "sha512-TEEVrLbNROUkYY51sBJGk7lO/OLjuepch8+hmpM6ffMJQ2z/KVCjdHuCFX6fJj8OkJP2zckPjrJzQtXU3IAsFg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/api": "^1.3.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@fastify/otel/node_modules/@opentelemetry/instrumentation": { + "version": "0.212.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.212.0.tgz", + "integrity": "sha512-IyXmpNnifNouMOe0I/gX7ENfv2ZCNdYTF0FpCsoBcpbIHzk81Ww9rQTYTnvghszCg7qGrIhNvWC8dhEifgX9Jg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/api-logs": "0.212.0", + "import-in-the-middle": "^2.0.6", + "require-in-the-middle": "^8.0.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@fastify/otel/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/@fastify/otel/node_modules/brace-expansion": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.4.tgz", + "integrity": "sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/@fastify/otel/node_modules/import-in-the-middle": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-2.0.6.tgz", + "integrity": "sha512-3vZV3jX0XRFW3EJDTwzWoZa+RH1b8eTTx6YOCjglrLyPuepwoBti1k3L2dKwdCUrnVEfc5CuRuGstaC/uQJJaw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "acorn": "^8.15.0", + "acorn-import-attributes": "^1.9.5", + "cjs-module-lexer": "^2.2.0", + "module-details-from-path": "^1.0.4" + } + }, + "node_modules/@fastify/otel/node_modules/minimatch": { + "version": "10.2.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz", + "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@google-cloud/common": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-6.0.0.tgz", + "integrity": "sha512-IXh04DlkLMxWgYLIUYuHHKXKOUwPDzDgke1ykkkJPe48cGIS9kkL2U/o0pm4ankHLlvzLF/ma1eO86n/bkumIA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@google-cloud/projectify": "^4.0.0", + "@google-cloud/promisify": "^4.0.0", + "arrify": "^2.0.0", + "duplexify": "^4.1.3", + "extend": "^3.0.2", + "google-auth-library": "^10.0.0-rc.1", + "html-entities": "^2.5.2", + "retry-request": "^8.0.0", + "teeny-request": "^10.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@google-cloud/common/node_modules/@google-cloud/promisify": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@google-cloud/promisify/-/promisify-4.1.0.tgz", + "integrity": "sha512-G/FQx5cE/+DqBbOpA5jKsegGwdPniU6PuIEMt+qxWgFxvxuFOzVmp6zYchtYuwAWV5/8Dgs0yAmjvNZv3uXLQg==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/@google-cloud/projectify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@google-cloud/projectify/-/projectify-4.0.0.tgz", + "integrity": "sha512-MmaX6HeSvyPbWGwFq7mXdo0uQZLGBYCwziiLIGq5JVX+/bdI3SAq6bP98trV5eTWfLuvsMcIC1YJOF2vfteLFA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@google-cloud/promisify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@google-cloud/promisify/-/promisify-5.0.0.tgz", + "integrity": "sha512-N8qS6dlORGHwk7WjGXKOSsLjIjNINCPicsOX6gyyLiYk7mq3MtII96NZ9N2ahwA2vnkLmZODOIH9rlNniYWvCQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/@google-cloud/translate": { + "version": "9.2.1", + "resolved": "https://registry.npmjs.org/@google-cloud/translate/-/translate-9.2.1.tgz", + "integrity": "sha512-7/RWxkMd4fKX88Pzzhr2ly8yOjEepCW4ro4ZsdAUsf2Wo2ZLgp75yNZaQGKBBetgOc8yPVl8djr/2XFIHnWS3w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@google-cloud/common": "^6.0.0", + "@google-cloud/promisify": "^5.0.0", + "arrify": "^2.0.0", + "extend": "^3.0.2", + "google-gax": "^5.0.0", + "is-html": "^2.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@grpc/grpc-js": { + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.14.0.tgz", + "integrity": "sha512-N8Jx6PaYzcTRNzirReJCtADVoq4z7+1KQ4E70jTg/koQiMoUSN1kbNjPOqpPbhMFhfU1/l7ixspPl8dNY+FoUg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@grpc/proto-loader": "^0.8.0", + "@js-sdsl/ordered-map": "^4.4.2" + }, + "engines": { + "node": ">=12.10.0" + } + }, + "node_modules/@grpc/proto-loader": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.8.0.tgz", + "integrity": "sha512-rc1hOQtjIWGxcxpb9aHAfLpIctjEnsDehj0DAiVfBlmT84uvR0uUtN2hEi/ecvWVjXUGf5qPF4qEgiLOx1YIMQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "lodash.camelcase": "^4.3.0", + "long": "^5.0.0", + "protobufjs": "^7.5.3", + "yargs": "^17.7.2" + }, + "bin": { + "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.7", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", + "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.4.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@iobroker/adapter-core": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/@iobroker/adapter-core/-/adapter-core-3.4.1.tgz", + "integrity": "sha512-0Rwpq1fkoOWe4sGunLSdJrD1zNUHYQPZd7pJMOnCpaO6q2dpSatfgxURyM8dw5z6NZNmZrqP7XyUOIPUObICpg==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@iobroker/types": ">=6.0.11" + } + }, + "node_modules/@iobroker/adapter-dev": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@iobroker/adapter-dev/-/adapter-dev-1.5.0.tgz", + "integrity": "sha512-L1FhO7oxaz4hNMobvgbanSGyn2LaCESGKqPPJhXWU00vVEw5Cc166xdnU63Dk+JDnV5zl/HzOcFANGisETAWIg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@esm2cjs/execa": "^6.1.1-cjs.1", + "@google-cloud/translate": "^9.2.0", + "ansi-colors": "^4.1.3", + "axios": "^1.11.0", + "deepl-node": "^1.19.0", + "esbuild": "^0.25.9", + "fs-extra": "^11.3.1", + "rimraf": "^5.0.10", + "tiny-glob": "^0.2.9", + "yargs": "^18.0.0" + }, + "bin": { + "build-adapter": "bin/build-adapter.js", + "clean-dir": "bin/clean-dir.js", + "translate-adapter": "bin/translate-adapter.js" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@iobroker/adapter-dev/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@iobroker/adapter-dev/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@iobroker/adapter-dev/node_modules/cliui": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", + "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@iobroker/adapter-dev/node_modules/emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", + "dev": true, + "license": "MIT" + }, + "node_modules/@iobroker/adapter-dev/node_modules/fs-extra": { + "version": "11.3.2", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz", + "integrity": "sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/@iobroker/adapter-dev/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@iobroker/adapter-dev/node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@iobroker/adapter-dev/node_modules/wrap-ansi": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@iobroker/adapter-dev/node_modules/yargs": { + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.0.0.tgz", + "integrity": "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^9.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "string-width": "^7.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^22.0.0" + }, + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=23" + } + }, + "node_modules/@iobroker/adapter-dev/node_modules/yargs-parser": { + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", + "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=23" + } + }, + "node_modules/@iobroker/build-tools": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@iobroker/build-tools/-/build-tools-3.0.1.tgz", + "integrity": "sha512-i5PsBOHNscMAqmdYrdYxJUplyFCkTwPUVJVL5iQozbG7+e79bHTHXuLCHwslaN/m5ACfr0KmtpoMram8gzGnPg==", + "dev": true, + "dependencies": { + "glob": "^13.0.1" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@iobroker/build-tools/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/@iobroker/build-tools/node_modules/brace-expansion": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.4.tgz", + "integrity": "sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/@iobroker/build-tools/node_modules/glob": { + "version": "13.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz", + "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "minimatch": "^10.2.2", + "minipass": "^7.1.3", + "path-scurry": "^2.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@iobroker/build-tools/node_modules/lru-cache": { + "version": "11.2.7", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.7.tgz", + "integrity": "sha512-aY/R+aEsRelme17KGQa/1ZSIpLpNYYrhcrepKTZgE+W3WM16YMCaPwOHLHsmopZHELU0Ojin1lPVxKR0MihncA==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@iobroker/build-tools/node_modules/minimatch": { + "version": "10.2.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz", + "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@iobroker/build-tools/node_modules/path-scurry": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz", + "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@iobroker/eslint-config": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@iobroker/eslint-config/-/eslint-config-2.2.0.tgz", + "integrity": "sha512-89U2d81BUrReVgVFUJwjxYsHSbvjAt8w8OoKavtNp//wkG7JU4n/VnISMEvQqaQt7i0sWc/xSx27TYDx9FXAYg==", + "dev": true, + "peerDependencies": { + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "^9.34.0", + "@typescript-eslint/eslint-plugin": "^8.40.0", + "@typescript-eslint/parser": "^8.40.0", + "eslint": ">=9.32.0", + "eslint-config-prettier": "^10.1.8", + "eslint-plugin-import": "^2.30.0", + "eslint-plugin-jsdoc": "^54.1.1", + "eslint-plugin-prettier": "^5.5.4", + "eslint-plugin-react": "^7.37.5", + "eslint-plugin-react-hooks": "^5.2.0", + "eslint-plugin-unicorn": "^60.0.0", + "globals": "^16.3.0", + "prettier": ">=3.6.2", + "typescript-eslint": "^8.40.0" + } + }, + "node_modules/@iobroker/plugin-base": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@iobroker/plugin-base/-/plugin-base-3.0.3.tgz", + "integrity": "sha512-pUKOz9/ZqIDxPQo9E97UdCF6p8NyO+x9REAQYPQNmwkElWq0bka9tgphx+RTUj8inZoYbUd50o9YnotV5C/Jpg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@iobroker/plugin-sentry": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@iobroker/plugin-sentry/-/plugin-sentry-3.0.4.tgz", + "integrity": "sha512-VCHQ9zo5TKyO+A1xpWD8xXe/nW6/BYbEKFxAqHvfDM4U2R0wERZtbH6Ztg3lfV+JRwUn5TgqVRNXvHkvolgPHg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@iobroker/plugin-base": "^3.0.3", + "@sentry/integrations": "^7.114.0", + "@sentry/node": "^10.32.1", + "source-map-support": "^0.5.21" + } + }, + "node_modules/@iobroker/testing": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@iobroker/testing/-/testing-5.2.2.tgz", + "integrity": "sha512-AiYi9qziPLiNDcwZJa3tcgdSjIq9lq7z4QFvWY9w099chmKOWyvUgWzDy3S/R3L7lJ0yviOeNEdpOHtX4wTf6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@alcalzone/esbuild-register": "^2.5.1-1", + "@types/chai": "^4.3.20", + "@types/chai-as-promised": "^7.1.8", + "@types/mocha": "^10.0.10", + "@types/sinon": "^17.0.4", + "@types/sinon-chai": "^3.2.12", + "alcalzone-shared": "~5.0.0", + "chai": "^4.5.0", + "chai-as-promised": "^7.1.2", + "debug": "^4.4.3", + "fs-extra": "^11.3.2", + "json5": "^2.2.3", + "mocha": "^11.7.3", + "sinon": "^21.0.0", + "sinon-chai": "^3.7.0" + } + }, + "node_modules/@iobroker/testing/node_modules/fs-extra": { + "version": "11.3.2", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.2.tgz", + "integrity": "sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/@iobroker/testing/node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@iobroker/types": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/@iobroker/types/-/types-7.1.2.tgz", + "integrity": "sha512-6ci2ow3cHoIDIQEQh48lCG08MzgUdH8SGL5ks3kl2UBA2yAfSn5lEWs3BPoGiJS9wYTsBfKMas2fUHmTU1/A4g==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@iobroker/vis-2-widgets-react-dev": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@iobroker/vis-2-widgets-react-dev/-/vis-2-widgets-react-dev-4.0.4.tgz", + "integrity": "sha512-l7jOrzwE9gxLtQCYyF/BXPMaFpT6fZHq6BoH9BAm/GhmoGzkh708zSx5jHfo0E6Dj4XnY/lgil+77tbDZeR6Gw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@mui/icons-material": "^6.1.8", + "@mui/material": "^6.1.8", + "@sentry/browser": "^8.40.0", + "acorn": "^8.14.0", + "acorn-jsx": "^5.3.2", + "acorn-jsx-walk": "^2.0.0", + "acorn-walk": "^8.3.4", + "node-dir": "^0.1.17" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@js-sdsl/ordered-map": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz", + "integrity": "sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==", + "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/js-sdsl" + } + }, + "node_modules/@mui/core-downloads-tracker": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-6.5.0.tgz", + "integrity": "sha512-LGb8t8i6M2ZtS3Drn3GbTI1DVhDY6FJ9crEey2lZ0aN2EMZo8IZBZj9wRf4vqbZHaWjsYgtbOnJw5V8UWbmK2Q==", + "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + } + }, + "node_modules/@mui/icons-material": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-6.5.0.tgz", + "integrity": "sha512-VPuPqXqbBPlcVSA0BmnoE4knW4/xG6Thazo8vCLWkOKusko6DtwFV6B665MMWJ9j0KFohTIf3yx2zYtYacvG1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.26.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@mui/material": "^6.5.0", + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/material": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@mui/material/-/material-6.5.0.tgz", + "integrity": "sha512-yjvtXoFcrPLGtgKRxFaH6OQPtcLPhkloC0BML6rBG5UeldR0nPULR/2E2BfXdo5JNV7j7lOzrrLX2Qf/iSidow==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.26.0", + "@mui/core-downloads-tracker": "^6.5.0", + "@mui/system": "^6.5.0", + "@mui/types": "~7.2.24", + "@mui/utils": "^6.4.9", + "@popperjs/core": "^2.11.8", + "@types/react-transition-group": "^4.4.12", + "clsx": "^2.1.1", + "csstype": "^3.1.3", + "prop-types": "^15.8.1", + "react-is": "^19.0.0", + "react-transition-group": "^4.4.5" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.5.0", + "@emotion/styled": "^11.3.0", + "@mui/material-pigment-css": "^6.5.0", + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + }, + "@mui/material-pigment-css": { + "optional": true + }, + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/private-theming": { + "version": "6.4.9", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-6.4.9.tgz", + "integrity": "sha512-LktcVmI5X17/Q5SkwjCcdOLBzt1hXuc14jYa7NPShog0GBDCDvKtcnP0V7a2s6EiVRlv7BzbWEJzH6+l/zaCxw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.26.0", + "@mui/utils": "^6.4.9", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/styled-engine": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-6.5.0.tgz", + "integrity": "sha512-8woC2zAqF4qUDSPIBZ8v3sakj+WgweolpyM/FXf8jAx6FMls+IE4Y8VDZc+zS805J7PRz31vz73n2SovKGaYgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.26.0", + "@emotion/cache": "^11.13.5", + "@emotion/serialize": "^1.3.3", + "@emotion/sheet": "^1.4.0", + "csstype": "^3.1.3", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.4.1", + "@emotion/styled": "^11.3.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + } + } + }, + "node_modules/@mui/system": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@mui/system/-/system-6.5.0.tgz", + "integrity": "sha512-XcbBYxDS+h/lgsoGe78ExXFZXtuIlSBpn/KsZq8PtZcIkUNJInkuDqcLd2rVBQrDC1u+rvVovdaWPf2FHKJf3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.26.0", + "@mui/private-theming": "^6.4.9", + "@mui/styled-engine": "^6.5.0", + "@mui/types": "~7.2.24", + "@mui/utils": "^6.4.9", + "clsx": "^2.1.1", + "csstype": "^3.1.3", + "prop-types": "^15.8.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@emotion/react": "^11.5.0", + "@emotion/styled": "^11.3.0", + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + }, + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/types": { + "version": "7.2.24", + "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.24.tgz", + "integrity": "sha512-3c8tRt/CbWZ+pEg7QpSwbdxOk36EfmhbKf6AGZsD1EcLDLTSZoxxJ86FVtcjxvjuhdyBiWKSTGZFaXCnidO2kw==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@mui/utils": { + "version": "6.4.9", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-6.4.9.tgz", + "integrity": "sha512-Y12Q9hbK9g+ZY0T3Rxrx9m2m10gaphDuUMgWxyV5kNJevVxXYCLclYUCC9vXaIk1/NdNDTcW2Yfr2OGvNFNmHg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.26.0", + "@mui/types": "~7.2.24", + "@types/prop-types": "^15.7.14", + "clsx": "^2.1.1", + "prop-types": "^15.8.1", + "react-is": "^19.0.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mui-org" + }, + "peerDependencies": { + "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", + "react": "^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@opentelemetry/api": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz", + "integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@opentelemetry/api-logs": { + "version": "0.213.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.213.0.tgz", + "integrity": "sha512-zRM5/Qj6G84Ej3F1yt33xBVY/3tnMxtL1fiDIxYbDWYaZ/eudVw3/PBiZ8G7JwUxXxjW8gU4g6LnOyfGKYHYgw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/api": "^1.3.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@opentelemetry/context-async-hooks": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-2.6.0.tgz", + "integrity": "sha512-L8UyDwqpTcbkIK5cgwDRDYDoEhQoj8wp8BwsO19w3LB1Z41yEQm2VJyNfAi9DrLP/YTqXqWpKHyZfR9/tFYo1Q==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.10.0" + } + }, + "node_modules/@opentelemetry/core": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.6.0.tgz", + "integrity": "sha512-HLM1v2cbZ4TgYN6KEOj+Bbj8rAKriOdkF9Ed3tG25FoprSiQl7kYc+RRT6fUZGOvx0oMi5U67GoFdT+XUn8zEg==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@opentelemetry/semantic-conventions": "^1.29.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0 <1.10.0" + } + }, + "node_modules/@opentelemetry/instrumentation": { + "version": "0.213.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.213.0.tgz", + "integrity": "sha512-3i9NdkET/KvQomeh7UaR/F4r9P25Rx6ooALlWXPIjypcEOUxksCmVu0zA70NBJWlrMW1rPr/LRidFAflLI+s/w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/api-logs": "0.213.0", + "import-in-the-middle": "^3.0.0", + "require-in-the-middle": "^8.0.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-amqplib": { + "version": "0.60.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-amqplib/-/instrumentation-amqplib-0.60.0.tgz", + "integrity": "sha512-q/B2IvoVXRm1M00MvhnzpMN6rKYOszPXVsALi6u0ss4AYHe+TidZEtLW9N1ZhrobI1dSriHnBqqtAOZVAv07sg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "^2.0.0", + "@opentelemetry/instrumentation": "^0.213.0", + "@opentelemetry/semantic-conventions": "^1.33.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-connect": { + "version": "0.56.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-connect/-/instrumentation-connect-0.56.0.tgz", + "integrity": "sha512-PKp+sSZ7AfzMvGgO3VCyo1inwNu+q7A1k9X88WK4PQ+S6Hp7eFk8pie+sWHDTaARovmqq5V2osav3lQej2B0nw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "^2.0.0", + "@opentelemetry/instrumentation": "^0.213.0", + "@opentelemetry/semantic-conventions": "^1.27.0", + "@types/connect": "3.4.38" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-dataloader": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-dataloader/-/instrumentation-dataloader-0.30.0.tgz", + "integrity": "sha512-MXHP2Q38cd2OhzEBKAIXUi9uBlPEYzF6BNJbyjUXBQ6kLaf93kRC41vNMIz0Nl5mnuwK7fDvKT+/lpx7BXRwdg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/instrumentation": "^0.213.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-express": { + "version": "0.61.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-express/-/instrumentation-express-0.61.0.tgz", + "integrity": "sha512-Xdmqo9RZuZlL29Flg8QdwrrX7eW1CZ7wFQPKHyXljNymgKhN1MCsYuqQ/7uxavhSKwAl7WxkTzKhnqpUApLMvQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "^2.0.0", + "@opentelemetry/instrumentation": "^0.213.0", + "@opentelemetry/semantic-conventions": "^1.27.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-fs": { + "version": "0.32.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-fs/-/instrumentation-fs-0.32.0.tgz", + "integrity": "sha512-koR6apx0g0wX6RRiPpjA4AFQUQUbXrK16kq4/SZjVp7u5cffJhNkY4TnITxcGA4acGSPYAfx3NHRIv4Khn1axQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "^2.0.0", + "@opentelemetry/instrumentation": "^0.213.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-generic-pool": { + "version": "0.56.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-generic-pool/-/instrumentation-generic-pool-0.56.0.tgz", + "integrity": "sha512-fg+Jffs6fqrf0uQS0hom7qBFKsbtpBiBl8+Vkc63Gx8xh6pVh+FhagmiO6oM0m3vyb683t1lP7yGYq22SiDnqg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/instrumentation": "^0.213.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-graphql": { + "version": "0.61.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-graphql/-/instrumentation-graphql-0.61.0.tgz", + "integrity": "sha512-pUiVASv6nh2XrerTvlbVHh7vKFzscpgwiQ/xvnZuAIzQ5lRjWVdRPUuXbvZJ/Yq79QsE81TZdJ7z9YsXiss1ew==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/instrumentation": "^0.213.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-hapi": { + "version": "0.59.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-hapi/-/instrumentation-hapi-0.59.0.tgz", + "integrity": "sha512-33wa4mEr+9+ztwdgLor1SeBu4Opz4IsmpcLETXAd3VmBrOjez8uQtrsOhPCa5Vhbm5gzDlMYTgFRLQzf8/YHFA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "^2.0.0", + "@opentelemetry/instrumentation": "^0.213.0", + "@opentelemetry/semantic-conventions": "^1.27.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-http": { + "version": "0.213.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-http/-/instrumentation-http-0.213.0.tgz", + "integrity": "sha512-B978Xsm5XEPGhm1P07grDoaOFLHapJPkOG9h016cJsyWWxmiLnPu2M/4Nrm7UCkHSiLnkXgC+zVGUAIahy8EEA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "2.6.0", + "@opentelemetry/instrumentation": "0.213.0", + "@opentelemetry/semantic-conventions": "^1.29.0", + "forwarded-parse": "2.1.2" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-ioredis": { + "version": "0.61.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-ioredis/-/instrumentation-ioredis-0.61.0.tgz", + "integrity": "sha512-hsHDadUtAFbws1YSDc1XW0svGFKiUbqv2td1Cby+UAiwvojm1NyBo/taifH0t8CuFZ0x/2SDm0iuTwrM5pnVOg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/instrumentation": "^0.213.0", + "@opentelemetry/redis-common": "^0.38.2", + "@opentelemetry/semantic-conventions": "^1.33.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-kafkajs": { + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-kafkajs/-/instrumentation-kafkajs-0.22.0.tgz", + "integrity": "sha512-wJU4IBQMUikdJAcTChLFqK5lo+flo7pahqd8DSLv7uMxsdOdAHj6RzKYAm8pPfUS6ItKYutYyuicwKaFwQKsoA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/instrumentation": "^0.213.0", + "@opentelemetry/semantic-conventions": "^1.30.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-knex": { + "version": "0.57.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-knex/-/instrumentation-knex-0.57.0.tgz", + "integrity": "sha512-vMCSh8kolEm5rRsc+FZeTZymWmIJwc40hjIKnXH4O0Dv/gAkJJIRXCsPX5cPbe0c0j/34+PsENd0HqKruwhVYw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/instrumentation": "^0.213.0", + "@opentelemetry/semantic-conventions": "^1.33.1" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-koa": { + "version": "0.61.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-koa/-/instrumentation-koa-0.61.0.tgz", + "integrity": "sha512-lvrfWe9ShK/D2X4brmx8ZqqeWPfRl8xekU0FCn7C1dHm5k6+rTOOi36+4fnaHAP8lig9Ux6XQ1D4RNIpPCt1WQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "^2.0.0", + "@opentelemetry/instrumentation": "^0.213.0", + "@opentelemetry/semantic-conventions": "^1.36.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.9.0" + } + }, + "node_modules/@opentelemetry/instrumentation-lru-memoizer": { + "version": "0.57.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-lru-memoizer/-/instrumentation-lru-memoizer-0.57.0.tgz", + "integrity": "sha512-cEqpUocSKJfwDtLYTTJehRLWzkZ2eoePCxfVIgGkGkb83fMB71O+y4MvRHJPbeV2bdoWdOVrl8uO0+EynWhTEA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/instrumentation": "^0.213.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-mongodb": { + "version": "0.66.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mongodb/-/instrumentation-mongodb-0.66.0.tgz", + "integrity": "sha512-d7m9QnAY+4TCWI4q1QRkfrc6fo/92VwssaB1DzQfXNRvu51b78P+HJlWP7Qg6N6nkwdb9faMZNBCZJfftmszkw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/instrumentation": "^0.213.0", + "@opentelemetry/semantic-conventions": "^1.33.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-mongoose": { + "version": "0.59.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mongoose/-/instrumentation-mongoose-0.59.0.tgz", + "integrity": "sha512-6/jWU+c1NgznkVLDU/2y0bXV2nJo3o9FWZ9mZ9nN6T/JBNRoMnVXZl2FdBmgH+a5MwaWLs5kmRJTP5oUVGIkPw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "^2.0.0", + "@opentelemetry/instrumentation": "^0.213.0", + "@opentelemetry/semantic-conventions": "^1.33.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-mysql": { + "version": "0.59.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mysql/-/instrumentation-mysql-0.59.0.tgz", + "integrity": "sha512-r+V/Fh0sm7Ga8/zk/TI5H5FQRAjwr0RrpfPf8kNIehlsKf12XnvIaZi8ViZkpX0gyPEpLXqzqWD6QHlgObgzZw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/instrumentation": "^0.213.0", + "@opentelemetry/semantic-conventions": "^1.33.0", + "@types/mysql": "2.15.27" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-mysql2": { + "version": "0.59.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-mysql2/-/instrumentation-mysql2-0.59.0.tgz", + "integrity": "sha512-n9/xrVCRBfG9egVbffnlU1uhr+HX0vF4GgtAB/Bvm48wpFgRidqD8msBMiym1kRYzmpWvJqTxNT47u1MkgBEdw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/instrumentation": "^0.213.0", + "@opentelemetry/semantic-conventions": "^1.33.0", + "@opentelemetry/sql-common": "^0.41.2" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-pg": { + "version": "0.65.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-pg/-/instrumentation-pg-0.65.0.tgz", + "integrity": "sha512-W0zpHEIEuyZ8zvb3njaX9AAbHgPYOsSWVOoWmv1sjVRSF6ZpBqtlxBWbU+6hhq1TFWBeWJOXZ8nZS/PUFpLJYQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "^2.0.0", + "@opentelemetry/instrumentation": "^0.213.0", + "@opentelemetry/semantic-conventions": "^1.34.0", + "@opentelemetry/sql-common": "^0.41.2", + "@types/pg": "8.15.6", + "@types/pg-pool": "2.0.7" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-redis": { + "version": "0.61.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-redis/-/instrumentation-redis-0.61.0.tgz", + "integrity": "sha512-JnPexA034/0UJRsvH96B0erQoNOqKJZjE2ZRSw9hiTSC23LzE0nJE/u6D+xqOhgUhRnhhcPHq4MdYtmUdYTF+Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/instrumentation": "^0.213.0", + "@opentelemetry/redis-common": "^0.38.2", + "@opentelemetry/semantic-conventions": "^1.27.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-tedious": { + "version": "0.32.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-tedious/-/instrumentation-tedious-0.32.0.tgz", + "integrity": "sha512-BQS6gG8RJ1foEqfEZ+wxoqlwfCAzb1ZVG0ad8Gfe4x8T658HJCLGLd4E4NaoQd8EvPfLqOXgzGaE/2U4ytDSWA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/instrumentation": "^0.213.0", + "@opentelemetry/semantic-conventions": "^1.33.0", + "@types/tedious": "^4.0.14" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@opentelemetry/instrumentation-undici": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-undici/-/instrumentation-undici-0.23.0.tgz", + "integrity": "sha512-LL0VySzKVR2cJSFVZaTYpZl1XTpBGnfzoQPe2W7McS2267ldsaEIqtQY6VXs2KCXN0poFjze5110PIpxHDaDGg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "^2.0.0", + "@opentelemetry/instrumentation": "^0.213.0", + "@opentelemetry/semantic-conventions": "^1.24.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.7.0" + } + }, + "node_modules/@opentelemetry/redis-common": { + "version": "0.38.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/redis-common/-/redis-common-0.38.2.tgz", + "integrity": "sha512-1BCcU93iwSRZvDAgwUxC/DV4T/406SkMfxGqu5ojc3AvNI+I9GhV7v0J1HljsczuuhcnFLYqD5VmwVXfCGHzxA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.19.0 || >=20.6.0" + } + }, + "node_modules/@opentelemetry/resources": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.6.0.tgz", + "integrity": "sha512-D4y/+OGe3JSuYUCBxtH5T9DSAWNcvCb/nQWIga8HNtXTVPQn59j0nTBAgaAXxUVBDl40mG3Tc76b46wPlZaiJQ==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@opentelemetry/core": "2.6.0", + "@opentelemetry/semantic-conventions": "^1.29.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.3.0 <1.10.0" + } + }, + "node_modules/@opentelemetry/sdk-trace-base": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-2.6.0.tgz", + "integrity": "sha512-g/OZVkqlxllgFM7qMKqbPV9c1DUPhQ7d4n3pgZFcrnrNft9eJXZM2TNHTPYREJBrtNdRytYyvwjgL5geDKl3EQ==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@opentelemetry/core": "2.6.0", + "@opentelemetry/resources": "2.6.0", + "@opentelemetry/semantic-conventions": "^1.29.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.3.0 <1.10.0" + } + }, + "node_modules/@opentelemetry/semantic-conventions": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.40.0.tgz", + "integrity": "sha512-cifvXDhcqMwwTlTK04GBNeIe7yyo28Mfby85QXFe1Yk8nmi36Ab/5UQwptOx84SsoGNRg+EVSjwzfSZMy6pmlw==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@opentelemetry/sql-common": { + "version": "0.41.2", + "resolved": "https://registry.npmjs.org/@opentelemetry/sql-common/-/sql-common-0.41.2.tgz", + "integrity": "sha512-4mhWm3Z8z+i508zQJ7r6Xi7y4mmoJpdvH0fZPFRkWrdp5fq7hhZ2HhYokEOLkfqSMgPR4Z9EyB3DBkbKGOqZiQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/core": "^2.0.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.1.0" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@pkgr/core": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.2.9.tgz", + "integrity": "sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/pkgr" + } + }, + "node_modules/@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, + "node_modules/@prisma/instrumentation": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/@prisma/instrumentation/-/instrumentation-7.4.2.tgz", + "integrity": "sha512-r9JfchJF1Ae6yAxcaLu/V1TGqBhAuSDe3mRNOssBfx1rMzfZ4fdNvrgUBwyb/TNTGXFxlH9AZix5P257x07nrg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/instrumentation": "^0.207.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.8" + } + }, + "node_modules/@prisma/instrumentation/node_modules/@opentelemetry/api-logs": { + "version": "0.207.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-logs/-/api-logs-0.207.0.tgz", + "integrity": "sha512-lAb0jQRVyleQQGiuuvCOTDVspc14nx6XJjP4FspJ1sNARo3Regq4ZZbrc3rN4b1TYSuUCvgH+UXUPug4SLOqEQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/api": "^1.3.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@prisma/instrumentation/node_modules/@opentelemetry/instrumentation": { + "version": "0.207.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.207.0.tgz", + "integrity": "sha512-y6eeli9+TLKnznrR8AZlQMSJT7wILpXH+6EYq5Vf/4Ao+huI7EedxQHwRgVUOMLFbe7VFDvHJrX9/f4lcwnJsA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@opentelemetry/api-logs": "0.207.0", + "import-in-the-middle": "^2.0.0", + "require-in-the-middle": "^8.0.0" + }, + "engines": { + "node": "^18.19.0 || >=20.6.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.3.0" + } + }, + "node_modules/@prisma/instrumentation/node_modules/import-in-the-middle": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-2.0.6.tgz", + "integrity": "sha512-3vZV3jX0XRFW3EJDTwzWoZa+RH1b8eTTx6YOCjglrLyPuepwoBti1k3L2dKwdCUrnVEfc5CuRuGstaC/uQJJaw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "acorn": "^8.15.0", + "acorn-import-attributes": "^1.9.5", + "cjs-module-lexer": "^2.2.0", + "module-details-from-path": "^1.0.4" + } + }, + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@rtsao/scc": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", + "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==", + "dev": true, + "license": "MIT" + }, + "node_modules/@sentry-internal/browser-utils": { + "version": "8.55.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/browser-utils/-/browser-utils-8.55.0.tgz", + "integrity": "sha512-ROgqtQfpH/82AQIpESPqPQe0UyWywKJsmVIqi3c5Fh+zkds5LUxnssTj3yNd1x+kxaPDVB023jAP+3ibNgeNDw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sentry/core": "8.55.0" + }, + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry-internal/feedback": { + "version": "8.55.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-8.55.0.tgz", + "integrity": "sha512-cP3BD/Q6pquVQ+YL+rwCnorKuTXiS9KXW8HNKu4nmmBAyf7urjs+F6Hr1k9MXP5yQ8W3yK7jRWd09Yu6DHWOiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sentry/core": "8.55.0" + }, + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry-internal/replay": { + "version": "8.55.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/replay/-/replay-8.55.0.tgz", + "integrity": "sha512-roCDEGkORwolxBn8xAKedybY+Jlefq3xYmgN2fr3BTnsXjSYOPC7D1/mYqINBat99nDtvgFvNfRcZPiwwZ1hSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sentry-internal/browser-utils": "8.55.0", + "@sentry/core": "8.55.0" + }, + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry-internal/replay-canvas": { + "version": "8.55.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-8.55.0.tgz", + "integrity": "sha512-nIkfgRWk1091zHdu4NbocQsxZF1rv1f7bbp3tTIlZYbrH62XVZosx5iHAuZG0Zc48AETLE7K4AX9VGjvQj8i9w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sentry-internal/replay": "8.55.0", + "@sentry/core": "8.55.0" + }, + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry/browser": { + "version": "8.55.0", + "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-8.55.0.tgz", + "integrity": "sha512-1A31mCEWCjaMxJt6qGUK+aDnLDcK6AwLAZnqpSchNysGni1pSn1RWSmk9TBF8qyTds5FH8B31H480uxMPUJ7Cw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sentry-internal/browser-utils": "8.55.0", + "@sentry-internal/feedback": "8.55.0", + "@sentry-internal/replay": "8.55.0", + "@sentry-internal/replay-canvas": "8.55.0", + "@sentry/core": "8.55.0" + }, + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry/core": { + "version": "8.55.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.55.0.tgz", + "integrity": "sha512-6g7jpbefjHYs821Z+EBJ8r4Z7LT5h80YSWRJaylGS4nW5W5Z2KXzpdnyFarv37O7QjauzVC2E+PABmpkw5/JGA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.18" + } + }, + "node_modules/@sentry/integrations": { + "version": "7.114.0", + "resolved": "https://registry.npmjs.org/@sentry/integrations/-/integrations-7.114.0.tgz", + "integrity": "sha512-BJIBWXGKeIH0ifd7goxOS29fBA8BkEgVVCahs6xIOXBjX1IRS6PmX0zYx/GP23nQTfhJiubv2XPzoYOlZZmDxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sentry/core": "7.114.0", + "@sentry/types": "7.114.0", + "@sentry/utils": "7.114.0", + "localforage": "^1.8.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@sentry/integrations/node_modules/@sentry/core": { + "version": "7.114.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.114.0.tgz", + "integrity": "sha512-YnanVlmulkjgZiVZ9BfY9k6I082n+C+LbZo52MTvx3FY6RE5iyiPMpaOh67oXEZRWcYQEGm+bKruRxLVP6RlbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sentry/types": "7.114.0", + "@sentry/utils": "7.114.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@sentry/node": { + "version": "10.44.0", + "resolved": "https://registry.npmjs.org/@sentry/node/-/node-10.44.0.tgz", + "integrity": "sha512-q+/WR9ZeF9Af8uyehOj2tQQOa7LH07mJfOuDus5X6G6cLuugdRUGUBB5Qhw+J/ULSxbzGADBZv6AYOyoGaNx7w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@fastify/otel": "0.17.1", + "@opentelemetry/api": "^1.9.0", + "@opentelemetry/context-async-hooks": "^2.6.0", + "@opentelemetry/core": "^2.6.0", + "@opentelemetry/instrumentation": "^0.213.0", + "@opentelemetry/instrumentation-amqplib": "0.60.0", + "@opentelemetry/instrumentation-connect": "0.56.0", + "@opentelemetry/instrumentation-dataloader": "0.30.0", + "@opentelemetry/instrumentation-express": "0.61.0", + "@opentelemetry/instrumentation-fs": "0.32.0", + "@opentelemetry/instrumentation-generic-pool": "0.56.0", + "@opentelemetry/instrumentation-graphql": "0.61.0", + "@opentelemetry/instrumentation-hapi": "0.59.0", + "@opentelemetry/instrumentation-http": "0.213.0", + "@opentelemetry/instrumentation-ioredis": "0.61.0", + "@opentelemetry/instrumentation-kafkajs": "0.22.0", + "@opentelemetry/instrumentation-knex": "0.57.0", + "@opentelemetry/instrumentation-koa": "0.61.0", + "@opentelemetry/instrumentation-lru-memoizer": "0.57.0", + "@opentelemetry/instrumentation-mongodb": "0.66.0", + "@opentelemetry/instrumentation-mongoose": "0.59.0", + "@opentelemetry/instrumentation-mysql": "0.59.0", + "@opentelemetry/instrumentation-mysql2": "0.59.0", + "@opentelemetry/instrumentation-pg": "0.65.0", + "@opentelemetry/instrumentation-redis": "0.61.0", + "@opentelemetry/instrumentation-tedious": "0.32.0", + "@opentelemetry/instrumentation-undici": "0.23.0", + "@opentelemetry/resources": "^2.6.0", + "@opentelemetry/sdk-trace-base": "^2.6.0", + "@opentelemetry/semantic-conventions": "^1.40.0", + "@prisma/instrumentation": "7.4.2", + "@sentry/core": "10.44.0", + "@sentry/node-core": "10.44.0", + "@sentry/opentelemetry": "10.44.0", + "import-in-the-middle": "^3.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@sentry/node-core": { + "version": "10.44.0", + "resolved": "https://registry.npmjs.org/@sentry/node-core/-/node-core-10.44.0.tgz", + "integrity": "sha512-jUGsadMrvZ08UMbqJBfjFFMk1k3VbyxfUypf0iDGGgyLmuHotYQPo/5aND+o2KxMDXR60LwcQrMoZFpanK6jXQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sentry/core": "10.44.0", + "@sentry/opentelemetry": "10.44.0", + "import-in-the-middle": "^3.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.9.0", + "@opentelemetry/context-async-hooks": "^1.30.1 || ^2.1.0", + "@opentelemetry/core": "^1.30.1 || ^2.1.0", + "@opentelemetry/instrumentation": ">=0.57.1 <1", + "@opentelemetry/resources": "^1.30.1 || ^2.1.0", + "@opentelemetry/sdk-trace-base": "^1.30.1 || ^2.1.0", + "@opentelemetry/semantic-conventions": "^1.39.0" + }, + "peerDependenciesMeta": { + "@opentelemetry/api": { + "optional": true + }, + "@opentelemetry/context-async-hooks": { + "optional": true + }, + "@opentelemetry/core": { + "optional": true + }, + "@opentelemetry/instrumentation": { + "optional": true + }, + "@opentelemetry/resources": { + "optional": true + }, + "@opentelemetry/sdk-trace-base": { + "optional": true + }, + "@opentelemetry/semantic-conventions": { + "optional": true + } + } + }, + "node_modules/@sentry/node-core/node_modules/@sentry/core": { + "version": "10.44.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-10.44.0.tgz", + "integrity": "sha512-aa7CiDaNFZvHpqd97LJhuskolfJ/4IH5xyuVVLnv7l6B0v9KTwskPUxb0tH1ej3FxuzfH+i8iTiTFuqpfHS3QA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/@sentry/node/node_modules/@sentry/core": { + "version": "10.44.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-10.44.0.tgz", + "integrity": "sha512-aa7CiDaNFZvHpqd97LJhuskolfJ/4IH5xyuVVLnv7l6B0v9KTwskPUxb0tH1ej3FxuzfH+i8iTiTFuqpfHS3QA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/@sentry/opentelemetry": { + "version": "10.44.0", + "resolved": "https://registry.npmjs.org/@sentry/opentelemetry/-/opentelemetry-10.44.0.tgz", + "integrity": "sha512-zP4vP8tBxjlmxQ4VcWOwZ0b3lPUxlYPg9FqJwANm9SRJN+7V5psm8TIaAtu9uqtIcJMRHdXkOM4cAggNiLk0KA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sentry/core": "10.44.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.9.0", + "@opentelemetry/context-async-hooks": "^1.30.1 || ^2.1.0", + "@opentelemetry/core": "^1.30.1 || ^2.1.0", + "@opentelemetry/sdk-trace-base": "^1.30.1 || ^2.1.0", + "@opentelemetry/semantic-conventions": "^1.39.0" + } + }, + "node_modules/@sentry/opentelemetry/node_modules/@sentry/core": { + "version": "10.44.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-10.44.0.tgz", + "integrity": "sha512-aa7CiDaNFZvHpqd97LJhuskolfJ/4IH5xyuVVLnv7l6B0v9KTwskPUxb0tH1ej3FxuzfH+i8iTiTFuqpfHS3QA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/@sentry/types": { + "version": "7.114.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.114.0.tgz", + "integrity": "sha512-tsqkkyL3eJtptmPtT0m9W/bPLkU7ILY7nvwpi1hahA5jrM7ppoU0IMaQWAgTD+U3rzFH40IdXNBFb8Gnqcva4w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@sentry/utils": { + "version": "7.114.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.114.0.tgz", + "integrity": "sha512-319N90McVpupQ6vws4+tfCy/03AdtsU0MurIE4+W5cubHME08HtiEWlfacvAxX+yuKFhvdsO4K4BB/dj54ideg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sentry/types": "7.114.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@sinonjs/commons": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/commons/node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "13.0.5", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-13.0.5.tgz", + "integrity": "sha512-36/hTbH2uaWuGVERyC6da9YwGWnzUZXuPro/F2LfsdOsLnCojz/iSH8MxUt/FD2S5XBSVPhmArFUXcpCQ2Hkiw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sinonjs/commons": "^3.0.1" + } + }, + "node_modules/@sinonjs/samsam": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-8.0.3.tgz", + "integrity": "sha512-hw6HbX+GyVZzmaYNh82Ecj1vdGZrqVIn/keDTg63IgAwiQPO+xCz99uG6Woqgb4tM0mUiFENKZ4cqd7IX94AXQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sinonjs/commons": "^3.0.1", + "type-detect": "^4.1.0" + } + }, + "node_modules/@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, + "node_modules/@types/caseless": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.5.tgz", + "integrity": "sha512-hWtVTC2q7hc7xZ/RLbxapMvDMgUnDvKvMOpKal4DrMyfGBUfB1oKaZlIRr6mJL+If3bAP6sV/QneGzF6tJjZDg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/chai": { + "version": "4.3.20", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.20.tgz", + "integrity": "sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/chai-as-promised": { + "version": "7.1.8", + "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.8.tgz", + "integrity": "sha512-ThlRVIJhr69FLlh6IctTXFkmhtP3NpMZ2QGq69StYLyKZFp/HOp1VdKZj7RvfNWYYcJ1xlbLGLLWj1UvP5u/Gw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/chai": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/mocha": { + "version": "10.0.10", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.10.tgz", + "integrity": "sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/mysql": { + "version": "2.15.27", + "resolved": "https://registry.npmjs.org/@types/mysql/-/mysql-2.15.27.tgz", + "integrity": "sha512-YfWiV16IY0OeBfBCk8+hXKmdTKrKlwKN1MNKAPBu5JYxLwBEZl7QzeEpGnlZb3VMGJrrGmB84gXiH+ofs/TezA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/node": { + "version": "18.19.130", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.130.tgz", + "integrity": "sha512-GRaXQx6jGfL8sKfaIDD6OupbIHBr9jv7Jnaml9tB7l4v068PAOXqfcujMMo5PhbIs6ggR1XODELqahT2R8v0fg==", + "license": "MIT", + "peer": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@types/node-schedule": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/@types/node-schedule/-/node-schedule-2.1.8.tgz", + "integrity": "sha512-k00g6Yj/oUg/CDC+MeLHUzu0+OFxWbIqrFfDiLi6OPKxTujvpv29mHGM8GtKr7B+9Vv92FcK/8mRqi1DK5f3hA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/nodemailer": { + "version": "7.0.12", + "resolved": "https://registry.npmjs.org/@types/nodemailer/-/nodemailer-7.0.12.tgz", + "integrity": "sha512-80vKwiIsVSyFA1rRovH59jNPLBOuc6dRZIHEu40gXTkBkZnQv8vog1xSGEb9j5q/tdMAs5ivvDR2pLTU0hGHXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/pg": { + "version": "8.15.6", + "resolved": "https://registry.npmjs.org/@types/pg/-/pg-8.15.6.tgz", + "integrity": "sha512-NoaMtzhxOrubeL/7UZuNTrejB4MPAJ0RpxZqXQf2qXuVlTPuG6Y8p4u9dKRaue4yjmC7ZhzVO2/Yyyn25znrPQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "pg-protocol": "*", + "pg-types": "^2.2.0" + } + }, + "node_modules/@types/pg-pool": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/pg-pool/-/pg-pool-2.0.7.tgz", + "integrity": "sha512-U4CwmGVQcbEuqpyju8/ptOKg6gEC+Tqsvj2xS9o1g71bUh8twxnC6ZL5rZKCsGN0iyH0CwgUyc9VR5owNQF9Ng==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/pg": "*" + } + }, + "node_modules/@types/prop-types": { + "version": "15.7.15", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz", + "integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/react": { + "version": "19.2.2", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.2.tgz", + "integrity": "sha512-6mDvHUFSjyT2B2yeNx2nUgMxh9LtOWvkhIU3uePn2I2oyNymUAX1NIsdgviM4CH+JSrp2D2hsMvJOkxY+0wNRA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "csstype": "^3.0.2" + } + }, + "node_modules/@types/react-transition-group": { + "version": "4.4.12", + "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.12.tgz", + "integrity": "sha512-8TV6R3h2j7a91c+1DXdJi3Syo69zzIZbz7Lg5tORM5LEJG7X/E6a1V3drRyBRZq7/utz7A+c4OgYLiLcYGHG6w==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "*" + } + }, + "node_modules/@types/request": { + "version": "2.48.13", + "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.13.tgz", + "integrity": "sha512-FGJ6udDNUCjd19pp0Q3iTiDkwhYup7J8hpMW9c4k53NrccQFFWKRho6hvtPPEhnXWKvukfwAlB6DbDz4yhH5Gg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/caseless": "*", + "@types/node": "*", + "@types/tough-cookie": "*", + "form-data": "^2.5.5" + } + }, + "node_modules/@types/sinon": { + "version": "17.0.4", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-17.0.4.tgz", + "integrity": "sha512-RHnIrhfPO3+tJT0s7cFaXGZvsL4bbR3/k7z3P312qMS4JaS2Tk+KiwiLx1S0rQ56ERj00u1/BtdyVd0FY+Pdew==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/sinonjs__fake-timers": "*" + } + }, + "node_modules/@types/sinon-chai": { + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/@types/sinon-chai/-/sinon-chai-3.2.12.tgz", + "integrity": "sha512-9y0Gflk3b0+NhQZ/oxGtaAJDvRywCa5sIyaVnounqLvmf93yBF4EgIRspePtkMs3Tr844nCclYMlcCNmLCvjuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/chai": "*", + "@types/sinon": "*" + } + }, + "node_modules/@types/sinonjs__fake-timers": { + "version": "15.0.1", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-15.0.1.tgz", + "integrity": "sha512-Ko2tjWJq8oozHzHV+reuvS5KYIRAokHnGbDwGh/J64LntgpbuylF74ipEL24HCyRjf9FOlBiBHWBR1RlVKsI1w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/suncalc": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@types/suncalc/-/suncalc-1.9.2.tgz", + "integrity": "sha512-ATAGBHHfA1TlE2tjfidLyTcysjoT2JHHEAmWRULh73SU9UTn++j5fqHEW16X6Y/2Li87jEQXzgu4R/OOdlDqzw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/tedious": { + "version": "4.0.14", + "resolved": "https://registry.npmjs.org/@types/tedious/-/tedious-4.0.14.tgz", + "integrity": "sha512-KHPsfX/FoVbUGbyYvk1q9MMQHLPeRZhRJZdO45Q4YjvFkv4hMNghCWTvy7rdKessBsmtz4euWCWAB6/tVpI1Iw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/tough-cookie": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", + "integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.46.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.46.2.tgz", + "integrity": "sha512-ZGBMToy857/NIPaaCucIUQgqueOiq7HeAKkhlvqVV4lm089zUFW6ikRySx2v+cAhKeUCPuWVHeimyk6Dw1iY3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.46.2", + "@typescript-eslint/type-utils": "8.46.2", + "@typescript-eslint/utils": "8.46.2", + "@typescript-eslint/visitor-keys": "8.46.2", + "graphemer": "^1.4.0", + "ignore": "^7.0.0", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.46.2", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.46.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.46.2.tgz", + "integrity": "sha512-BnOroVl1SgrPLywqxyqdJ4l3S2MsKVLDVxZvjI1Eoe8ev2r3kGDo+PcMihNmDE+6/KjkTubSJnmqGZZjQSBq/g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@typescript-eslint/scope-manager": "8.46.2", + "@typescript-eslint/types": "8.46.2", + "@typescript-eslint/typescript-estree": "8.46.2", + "@typescript-eslint/visitor-keys": "8.46.2", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.46.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.46.2.tgz", + "integrity": "sha512-PULOLZ9iqwI7hXcmL4fVfIsBi6AN9YxRc0frbvmg8f+4hQAjQ5GYNKK0DIArNo+rOKmR/iBYwkpBmnIwin4wBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.46.2", + "@typescript-eslint/types": "^8.46.2", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.46.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.46.2.tgz", + "integrity": "sha512-LF4b/NmGvdWEHD2H4MsHD8ny6JpiVNDzrSZr3CsckEgCbAGZbYM4Cqxvi9L+WqDMT+51Ozy7lt2M+d0JLEuBqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.46.2", + "@typescript-eslint/visitor-keys": "8.46.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.46.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.46.2.tgz", + "integrity": "sha512-a7QH6fw4S57+F5y2FIxxSDyi5M4UfGF+Jl1bCGd7+L4KsaUY80GsiF/t0UoRFDHAguKlBaACWJRmdrc6Xfkkag==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.46.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.46.2.tgz", + "integrity": "sha512-HbPM4LbaAAt/DjxXaG9yiS9brOOz6fabal4uvUmaUYe6l3K1phQDMQKBRUrr06BQkxkvIZVVHttqiybM9nJsLA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.46.2", + "@typescript-eslint/typescript-estree": "8.46.2", + "@typescript-eslint/utils": "8.46.2", + "debug": "^4.3.4", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.46.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.46.2.tgz", + "integrity": "sha512-lNCWCbq7rpg7qDsQrd3D6NyWYu+gkTENkG5IKYhUIcxSb59SQC/hEQ+MrG4sTgBVghTonNWq42bA/d4yYumldQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.46.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.46.2.tgz", + "integrity": "sha512-f7rW7LJ2b7Uh2EiQ+7sza6RDZnajbNbemn54Ob6fRwQbgcIn+GWfyuHDHRYgRoZu1P4AayVScrRW+YfbTvPQoQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.46.2", + "@typescript-eslint/tsconfig-utils": "8.46.2", + "@typescript-eslint/types": "8.46.2", + "@typescript-eslint/visitor-keys": "8.46.2", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.46.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.46.2.tgz", + "integrity": "sha512-sExxzucx0Tud5tE0XqR0lT0psBQvEpnpiul9XbGUB1QwpWJJAps1O/Z7hJxLGiZLBKMCutjTzDgmd1muEhBnVg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/scope-manager": "8.46.2", + "@typescript-eslint/types": "8.46.2", + "@typescript-eslint/typescript-estree": "8.46.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.46.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.46.2.tgz", + "integrity": "sha512-tUFMXI4gxzzMXt4xpGJEsBsTox0XbNQ1y94EwlD/CuZwFcQP79xfQqMhau9HsRc/J0cAPA/HZt1dZPtGn9V/7w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.46.2", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/acorn": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-import-attributes": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", + "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^8" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/acorn-jsx-walk": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/acorn-jsx-walk/-/acorn-jsx-walk-2.0.0.tgz", + "integrity": "sha512-uuo6iJj4D4ygkdzd6jPtcxs8vZgDX9YFIkqczGImoypX2fQ4dVImmu3UzA4ynixCIMTrEOWW+95M2HuBaCEOVA==", + "dev": true, + "license": "MIT" + }, + "node_modules/acorn-walk": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/adm-zip": { + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.16.tgz", + "integrity": "sha512-TGw5yVi4saajsSEgz25grObGHEUaDrniwvA2qwSC060KfqGPdglhvPMA2lPIoxs3PQIItj2iag35fONcQqgUaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0" + } + }, + "node_modules/agent-base": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/alcalzone-shared": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/alcalzone-shared/-/alcalzone-shared-5.0.0.tgz", + "integrity": "sha512-X73hgVWcrIKUUB6jZgHj5flRbTft8AAoJ2MqRKEcAX1whW3OeGkxsQ6ol4nd4/rKxd1eoCRXUGW3cIhXrXU4Sg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/are-docs-informative": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.0.2.tgz", + "integrity": "sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.2.tgz", + "integrity": "sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "is-array-buffer": "^3.0.5" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-includes": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.9.tgz", + "integrity": "sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "define-properties": "^1.2.1", + "es-abstract": "^1.24.0", + "es-object-atoms": "^1.1.1", + "get-intrinsic": "^1.3.0", + "is-string": "^1.1.1", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.findlast": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz", + "integrity": "sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.findlastindex": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.6.tgz", + "integrity": "sha512-F/TKATkzseUExPlfvmwQKGITM3DGTK+vkAsCZoDc5daVygbJBnjEUCbgkAvVFsgfXfX4YIqZ/27G3k3tdXrTxQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.9", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "es-shim-unscopables": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz", + "integrity": "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz", + "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.tosorted": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz", + "integrity": "sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.3", + "es-errors": "^1.3.0", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", + "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arrify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", + "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/async-function": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", + "integrity": "sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/axios": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.17.0.tgz", + "integrity": "sha512-J8SwNxprqqpbfenehxWYXE7CW+wM1BB4w3+N+g+/Wx40xM4rsLrfPmHHxSWIxJLYDgSY/HqlFPIYb2/S3rxafw==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.16.0", + "form-data": "^4.0.5", + "https-proxy-agent": "^5.0.1", + "proxy-from-env": "^2.1.0" + } + }, + "node_modules/axios/node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/axios/node_modules/form-data": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", + "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/axios/node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/baseline-browser-mapping": { + "version": "2.8.21", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.21.tgz", + "integrity": "sha512-JU0h5APyQNsHOlAM7HnQnPToSDQoEBZqzu/YBlqDnEeymPnZDREeXJA3KBMQee+dKteAxZ2AtvQEvVYdZf241Q==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.js" + } + }, + "node_modules/bignumber.js": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.3.1.tgz", + "integrity": "sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true, + "license": "ISC" + }, + "node_modules/browserslist": { + "version": "4.27.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.27.0.tgz", + "integrity": "sha512-AXVQwdhot1eqLihwasPElhX2tAZiBjWdJ9i/Zcj2S6QYIjkx62OKSfnobkriB81C3l4w0rVy3Nt4jaTBltYEpw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "baseline-browser-mapping": "^2.8.19", + "caniuse-lite": "^1.0.30001751", + "electron-to-chromium": "^1.5.238", + "node-releases": "^2.0.26", + "update-browserslist-db": "^1.1.4" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/builtin-modules": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-5.0.0.tgz", + "integrity": "sha512-bkXY9WsVpY7CvMhKSR6pZilZu9Ln5WDrKVBUXf2S443etkmEO4V58heTecXcUIsNsi4Rx8JUO4NfX1IcQl4deg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/call-bind": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.0", + "es-define-property": "^1.0.0", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001751", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001751.tgz", + "integrity": "sha512-A0QJhug0Ly64Ii3eIqHu5X51ebln3k4yTUkY1j8drqpWHVreg/VLijN48cZ1bYPiqOQuqpkIKnzr/Ul8V+p6Cw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/chai": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", + "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", + "pathval": "^1.1.1", + "type-detect": "^4.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chai-as-promised": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.2.tgz", + "integrity": "sha512-aBDHZxRzYnUYuIAIPBH2s511DjlKPzXNlXSGFC8CwmroWQLfrW0LtE1nK3MAwwNhJPa9raEjNCmRoFpG0Hurdw==", + "dev": true, + "license": "WTFPL", + "dependencies": { + "check-error": "^1.0.2" + }, + "peerDependencies": { + "chai": ">= 2.1.2 < 6" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/change-case": { + "version": "5.4.4", + "resolved": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz", + "integrity": "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/check-error": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-func-name": "^2.0.2" + }, + "engines": { + "node": "*" + } + }, + "node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/ci-info": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.3.1.tgz", + "integrity": "sha512-Wdy2Igu8OcBpI2pZePZ5oWjPC38tmDVx5WKUXKwlLYkA0ozo85sLsLvkBbBn/sZaSCMFOGZJ14fvW9t5/d7kdA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cjs-module-lexer": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz", + "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/clean-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clean-regexp/-/clean-regexp-1.0.0.tgz", + "integrity": "sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/clean-regexp/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/cliui/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/comment-parser": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz", + "integrity": "sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 12.0.0" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/core-js-compat": { + "version": "3.46.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.46.0.tgz", + "integrity": "sha512-p9hObIIEENxSV8xIu+V68JjSeARg6UVMG5mR+JEUguG3sI6MsiS1njz2jHmyJDvA+8jX/sytkBHup6kxhM9law==", + "dev": true, + "license": "MIT", + "dependencies": { + "browserslist": "^4.26.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "license": "MIT" + }, + "node_modules/cron-parser": { + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/cron-parser/-/cron-parser-4.9.0.tgz", + "integrity": "sha512-p0SaNjrHOnQeR8/VnfGbmg9te2kfyYSQ7Sc/j/6DtPL3JQvKxmjO9TSjNFpujqV3vEYYBvNNvXSxzyksBWAx1Q==", + "license": "MIT", + "dependencies": { + "luxon": "^3.2.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "dev": true, + "license": "MIT" + }, + "node_modules/data-uri-to-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/data-view-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.2.tgz", + "integrity": "sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.2.tgz", + "integrity": "sha512-tuhGbE6CfTM9+5ANGf+oQb72Ky/0+s3xKUpHvShfiz2RxMFgFPjsXuRLBVMtvMs15awe45SRb83D6wH4ew6wlQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/inspect-js" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.1.tgz", + "integrity": "sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-eql": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", + "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/deepl-node": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/deepl-node/-/deepl-node-1.20.0.tgz", + "integrity": "sha512-2MNJgJgQQWHAieaKYJyxYe1g21P8MYOtMbcS7ApyBHT8856c6EYO9RRNevodGaIf0oiKMzwyenJ59O7B0NQyGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": ">=12.0", + "adm-zip": "^0.5.16", + "axios": "^1.7.4", + "form-data": "^3.0.0", + "loglevel": ">=1.6.2", + "uuid": "^8.3.2" + }, + "engines": { + "node": ">=12.0" + } + }, + "node_modules/deepl-node/node_modules/form-data": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.4.tgz", + "integrity": "sha512-f0cRzm6dkyVYV3nPoooP8XlccPQukegwhAnpoLcXy+X+A8KfpGOoXwDr9FLZd3wzgLaBGQBE3lY93Zm/i1JvIQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.35" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/diff": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-7.0.0.tgz", + "integrity": "sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/dom-helpers": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", + "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.8.7", + "csstype": "^3.0.2" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/duplexify": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.3.tgz", + "integrity": "sha512-M3BmBhwJRZsSx38lZyhE53Csddgzl5R7xGJNk7CVddZD6CcmwMCH8J+7AprIrQKH7TonKxaCjcv27Qmf+sQ+oA==", + "dev": true, + "license": "MIT", + "dependencies": { + "end-of-stream": "^1.4.1", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1", + "stream-shift": "^1.0.2" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.243", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.243.tgz", + "integrity": "sha512-ZCphxFW3Q1TVhcgS9blfut1PX8lusVi2SvXQgmEEnK4TCmE1JhH2JkjJN+DNt0pJJwfBri5AROBnz2b/C+YU9g==", + "dev": true, + "license": "ISC" + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/end-of-stream": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", + "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/enquirer": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", + "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/es-abstract": { + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.0.tgz", + "integrity": "sha512-WSzPgsdLtTcQwm4CROfS5ju2Wa1QQcVeT37jFjYzdFz1r9ahadC8B8/a4qxJxM+09F18iumCdRmlr96ZYkQvEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.2", + "arraybuffer.prototype.slice": "^1.0.4", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "data-view-buffer": "^1.0.2", + "data-view-byte-length": "^1.0.2", + "data-view-byte-offset": "^1.0.1", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "es-set-tostringtag": "^2.1.0", + "es-to-primitive": "^1.3.0", + "function.prototype.name": "^1.1.8", + "get-intrinsic": "^1.3.0", + "get-proto": "^1.0.1", + "get-symbol-description": "^1.1.0", + "globalthis": "^1.0.4", + "gopd": "^1.2.0", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "internal-slot": "^1.1.0", + "is-array-buffer": "^3.0.5", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.2", + "is-negative-zero": "^2.0.3", + "is-regex": "^1.2.1", + "is-set": "^2.0.3", + "is-shared-array-buffer": "^1.0.4", + "is-string": "^1.1.1", + "is-typed-array": "^1.1.15", + "is-weakref": "^1.1.1", + "math-intrinsics": "^1.1.0", + "object-inspect": "^1.13.4", + "object-keys": "^1.1.1", + "object.assign": "^4.1.7", + "own-keys": "^1.0.1", + "regexp.prototype.flags": "^1.5.4", + "safe-array-concat": "^1.1.3", + "safe-push-apply": "^1.0.0", + "safe-regex-test": "^1.1.0", + "set-proto": "^1.0.0", + "stop-iteration-iterator": "^1.1.0", + "string.prototype.trim": "^1.2.10", + "string.prototype.trimend": "^1.0.9", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.3", + "typed-array-byte-length": "^1.0.3", + "typed-array-byte-offset": "^1.0.4", + "typed-array-length": "^1.0.7", + "unbox-primitive": "^1.1.0", + "which-typed-array": "^1.1.19" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-iterator-helpers": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.2.1.tgz", + "integrity": "sha512-uDn+FE1yrDzyC0pCo961B2IHbdM8y/ACZsKD4dG6WqrjV53BADjwa7D+1aom2rsNVfLyDgU/eigvlJGJ08OQ4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.6", + "es-errors": "^1.3.0", + "es-set-tostringtag": "^2.0.3", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.6", + "globalthis": "^1.0.4", + "gopd": "^1.2.0", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.2.0", + "has-symbols": "^1.1.0", + "internal-slot": "^1.1.0", + "iterator.prototype": "^1.1.4", + "safe-array-concat": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.1.0.tgz", + "integrity": "sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-to-primitive": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz", + "integrity": "sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7", + "is-date-object": "^1.0.5", + "is-symbol": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/esbuild": { + "version": "0.25.11", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.11.tgz", + "integrity": "sha512-KohQwyzrKTQmhXDW1PjCv3Tyspn9n5GcY2RTDqeORIdIJY8yKIF7sTSopFmn/wpMPW4rdPXI0UE5LJLuq3bx0Q==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.11", + "@esbuild/android-arm": "0.25.11", + "@esbuild/android-arm64": "0.25.11", + "@esbuild/android-x64": "0.25.11", + "@esbuild/darwin-arm64": "0.25.11", + "@esbuild/darwin-x64": "0.25.11", + "@esbuild/freebsd-arm64": "0.25.11", + "@esbuild/freebsd-x64": "0.25.11", + "@esbuild/linux-arm": "0.25.11", + "@esbuild/linux-arm64": "0.25.11", + "@esbuild/linux-ia32": "0.25.11", + "@esbuild/linux-loong64": "0.25.11", + "@esbuild/linux-mips64el": "0.25.11", + "@esbuild/linux-ppc64": "0.25.11", + "@esbuild/linux-riscv64": "0.25.11", + "@esbuild/linux-s390x": "0.25.11", + "@esbuild/linux-x64": "0.25.11", + "@esbuild/netbsd-arm64": "0.25.11", + "@esbuild/netbsd-x64": "0.25.11", + "@esbuild/openbsd-arm64": "0.25.11", + "@esbuild/openbsd-x64": "0.25.11", + "@esbuild/openharmony-arm64": "0.25.11", + "@esbuild/sunos-x64": "0.25.11", + "@esbuild/win32-arm64": "0.25.11", + "@esbuild/win32-ia32": "0.25.11", + "@esbuild/win32-x64": "0.25.11" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "9.38.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.38.0.tgz", + "integrity": "sha512-t5aPOpmtJcZcz5UJyY2GbvpDlsK5E8JqRqoKtfiKE3cNh437KIqfJr3A3AKf5k64NPx6d0G3dno6XDY05PqPtw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.21.1", + "@eslint/config-helpers": "^0.4.1", + "@eslint/core": "^0.16.0", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.38.0", + "@eslint/plugin-kit": "^0.4.0", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "esquery": "^1.5.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-config-prettier": { + "version": "10.1.8", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.8.tgz", + "integrity": "sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "funding": { + "url": "https://opencollective.com/eslint-config-prettier" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", + "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^3.2.7", + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-module-utils": { + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.1.tgz", + "integrity": "sha512-L8jSWTze7K2mTg0vos/RuLRS5soomksDPoJLXIslC7c8Wmut3bx7CPpJijDcBZtxQ5lrbUdM+s0OlNbz0DCDNw==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^3.2.7" + }, + "engines": { + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.32.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.32.0.tgz", + "integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rtsao/scc": "^1.1.0", + "array-includes": "^3.1.9", + "array.prototype.findlastindex": "^1.2.6", + "array.prototype.flat": "^1.3.3", + "array.prototype.flatmap": "^1.3.3", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.9", + "eslint-module-utils": "^2.12.1", + "hasown": "^2.0.2", + "is-core-module": "^2.16.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.8", + "object.groupby": "^1.0.3", + "object.values": "^1.2.1", + "semver": "^6.3.1", + "string.prototype.trimend": "^1.0.9", + "tsconfig-paths": "^3.15.0" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/eslint-plugin-jsdoc": { + "version": "54.7.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-54.7.0.tgz", + "integrity": "sha512-u5Na4he2+6kY1rWqxzbQaAwJL3/tDCuT5ElDRc5UJ9stOeQeQ5L1JJ1kRRu7ldYMlOHMCJLsY8Mg/Tu3ExdZiQ==", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "@es-joy/jsdoccomment": "~0.56.0", + "are-docs-informative": "^0.0.2", + "comment-parser": "1.4.1", + "debug": "^4.4.1", + "escape-string-regexp": "^4.0.0", + "espree": "^10.4.0", + "esquery": "^1.6.0", + "parse-imports-exports": "^0.2.4", + "semver": "^7.7.2", + "spdx-expression-parse": "^4.0.0" + }, + "engines": { + "node": ">=20.11.0" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0" + } + }, + "node_modules/eslint-plugin-prettier": { + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.4.tgz", + "integrity": "sha512-swNtI95SToIz05YINMA6Ox5R057IMAmWZ26GqPxusAp1TZzj+IdY9tXNWWD3vkF/wEqydCONcwjTFpxybBqZsg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.11.7" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-plugin-prettier" + }, + "peerDependencies": { + "@types/eslint": ">=8.0.0", + "eslint": ">=8.0.0", + "eslint-config-prettier": ">= 7.0.0 <10.0.0 || >=10.1.0", + "prettier": ">=3.0.0" + }, + "peerDependenciesMeta": { + "@types/eslint": { + "optional": true + }, + "eslint-config-prettier": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-react": { + "version": "7.37.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.5.tgz", + "integrity": "sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-includes": "^3.1.8", + "array.prototype.findlast": "^1.2.5", + "array.prototype.flatmap": "^1.3.3", + "array.prototype.tosorted": "^1.1.4", + "doctrine": "^2.1.0", + "es-iterator-helpers": "^1.2.1", + "estraverse": "^5.3.0", + "hasown": "^2.0.2", + "jsx-ast-utils": "^2.4.1 || ^3.0.0", + "minimatch": "^3.1.2", + "object.entries": "^1.1.9", + "object.fromentries": "^2.0.8", + "object.values": "^1.2.1", + "prop-types": "^15.8.1", + "resolve": "^2.0.0-next.5", + "semver": "^6.3.1", + "string.prototype.matchall": "^4.0.12", + "string.prototype.repeat": "^1.0.0" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7" + } + }, + "node_modules/eslint-plugin-react-hooks": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.2.0.tgz", + "integrity": "sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0" + } + }, + "node_modules/eslint-plugin-react/node_modules/resolve": { + "version": "2.0.0-next.5", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.5.tgz", + "integrity": "sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/eslint-plugin-react/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/eslint-plugin-unicorn": { + "version": "60.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-60.0.0.tgz", + "integrity": "sha512-QUzTefvP8stfSXsqKQ+vBQSEsXIlAiCduS/V1Em+FKgL9c21U/IIm20/e3MFy1jyCf14tHAhqC1sX8OTy6VUCg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.27.1", + "@eslint-community/eslint-utils": "^4.7.0", + "@eslint/plugin-kit": "^0.3.3", + "change-case": "^5.4.4", + "ci-info": "^4.3.0", + "clean-regexp": "^1.0.0", + "core-js-compat": "^3.44.0", + "esquery": "^1.6.0", + "find-up-simple": "^1.0.1", + "globals": "^16.3.0", + "indent-string": "^5.0.0", + "is-builtin-module": "^5.0.0", + "jsesc": "^3.1.0", + "pluralize": "^8.0.0", + "regexp-tree": "^0.1.27", + "regjsparser": "^0.12.0", + "semver": "^7.7.2", + "strip-indent": "^4.0.0" + }, + "engines": { + "node": "^20.10.0 || >=21.0.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/eslint-plugin-unicorn?sponsor=1" + }, + "peerDependencies": { + "eslint": ">=9.29.0" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/@eslint/core": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.2.tgz", + "integrity": "sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/@eslint/plugin-kit": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.5.tgz", + "integrity": "sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.15.2", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/eslint-scope": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.15.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-diff": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fastq": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], + "license": "MIT", + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/find-up-simple": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/find-up-simple/-/find-up-simple-1.0.1.tgz", + "integrity": "sha512-afd4O7zpqHeRyg4PfDQsXmlDe2PfdHtJt6Akt8jOWaApLOZk5JXs6VMR29lz03pRe9mpykrRCYIYxaJYcfpncQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "license": "BSD-3-Clause", + "bin": { + "flat": "cli.js" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "dev": true, + "license": "ISC" + }, + "node_modules/follow-redirects": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz", + "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/for-each": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/form-data": { + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.5.tgz", + "integrity": "sha512-jqdObeR2rxZZbPSGL+3VckHMYtu+f9//KXBsVny6JSX/pa38Fy+bGjuG8eW/H6USNQWhLi8Num++cU2yOCNz4A==", + "dev": true, + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.35", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fetch-blob": "^3.1.2" + }, + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/forwarded-parse": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/forwarded-parse/-/forwarded-parse-2.1.2.tgz", + "integrity": "sha512-alTFZZQDKMporBH77856pXgzhEzaUVmLCDk+egLgIgHst3Tpndzz8MnKe+GzRJRfvVdn69HhpW7cmXzvtLvJAw==", + "dev": true, + "license": "MIT" + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/function.prototype.name": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz", + "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "functions-have-names": "^1.2.3", + "hasown": "^2.0.2", + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gaxios": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-7.1.2.tgz", + "integrity": "sha512-/Szrn8nr+2TsQT1Gp8iIe/BEytJmbyfrbFh419DfGQSkEgNEhbPi7JRJuughjkTzPWgU9gBQf5AVu3DbHt0OXA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "extend": "^3.0.2", + "https-proxy-agent": "^7.0.1", + "node-fetch": "^3.3.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/gcp-metadata": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-8.1.1.tgz", + "integrity": "sha512-dTCcAe9fRQf06ELwel6lWWFrEbstwjUBYEhr5VRGoC+iPDZQucHppCowaIp8b8v92tU1G4X4H3b/Y6zXZxkMsQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "gaxios": "^7.0.0", + "google-logging-utils": "^1.0.0", + "json-bigint": "^1.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/generator-function": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.1.tgz", + "integrity": "sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-east-asian-width": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.4.0.tgz", + "integrity": "sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-func-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-symbol-description": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.1.0.tgz", + "integrity": "sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/globals": { + "version": "16.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-16.4.0.tgz", + "integrity": "sha512-ob/2LcVVaVGCYN+r14cnwnoDPUufjiYgSqRhiFD0Q1iI4Odora5RE8Iv1D24hAz5oMophRGkGz+yuvQmmUMnMw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globalthis": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-properties": "^1.2.1", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/globalyzer": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz", + "integrity": "sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/globrex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", + "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==", + "dev": true, + "license": "MIT" + }, + "node_modules/google-auth-library": { + "version": "10.4.2", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-10.4.2.tgz", + "integrity": "sha512-EKiQasw6aEdxSovPEf1oBxCEvxjFamZ6MPaVOSPXZMnqKFLo+rrYjHyjKlFfZcXiKi9qAH6cutr5WRqqa1jKhg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "base64-js": "^1.3.0", + "ecdsa-sig-formatter": "^1.0.11", + "gaxios": "^7.0.0", + "gcp-metadata": "^8.0.0", + "google-logging-utils": "^1.0.0", + "gtoken": "^8.0.0", + "jws": "^4.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/google-gax": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-5.0.4.tgz", + "integrity": "sha512-HmQ6zIYBs2EikTk+kjeHmtHprNTEpsnVaKONw9cwZZwUNCkUb+D5RYrJpCxyjdvIDvJp3wLbVReolJLRZRms1g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@grpc/grpc-js": "^1.12.6", + "@grpc/proto-loader": "^0.8.0", + "duplexify": "^4.1.3", + "google-auth-library": "^10.1.0", + "google-logging-utils": "^1.1.1", + "node-fetch": "^3.3.2", + "object-hash": "^3.0.0", + "proto3-json-serializer": "^3.0.0", + "protobufjs": "^7.5.3", + "retry-request": "^8.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/google-logging-utils": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/google-logging-utils/-/google-logging-utils-1.1.1.tgz", + "integrity": "sha512-rcX58I7nqpu4mbKztFeOAObbomBbHU2oIb/d3tJfF3dizGSApqtSwYJigGCooHdnMyQBIw8BrWyK96w3YXgr6A==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=14" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, + "license": "MIT" + }, + "node_modules/gtoken": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-8.0.0.tgz", + "integrity": "sha512-+CqsMbHPiSTdtSO14O51eMNlrp9N79gmeqmXeouJOhfucAedHw9noVe/n5uJk3tbKE6a+6ZCQg3RPhVhHByAIw==", + "dev": true, + "license": "MIT", + "dependencies": { + "gaxios": "^7.0.0", + "jws": "^4.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/has-bigints": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", + "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz", + "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "license": "MIT", + "bin": { + "he": "bin/he" + } + }, + "node_modules/html-entities": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.6.0.tgz", + "integrity": "sha512-kig+rMn/QOVRvr7c86gQ8lWXq+Hkv6CbAH1hLu+RG338StTpE8Z0b44SDVaqVu7HGKf27frdmUYEs9hTUX/cLQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/mdevils" + }, + { + "type": "patreon", + "url": "https://patreon.com/mdevils" + } + ], + "license": "MIT" + }, + "node_modules/html-tags": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.3.1.tgz", + "integrity": "sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/http-proxy-agent/node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", + "license": "MIT" + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-in-the-middle": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-in-the-middle/-/import-in-the-middle-3.0.0.tgz", + "integrity": "sha512-OnGy+eYT7wVejH2XWgLRgbmzujhhVIATQH0ztIeRilwHBjTeG3pD+XnH3PKX0r9gJ0BuJmJ68q/oh9qgXnNDQg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "acorn": "^8.15.0", + "acorn-import-attributes": "^1.9.5", + "cjs-module-lexer": "^2.2.0", + "module-details-from-path": "^1.0.4" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indent-string": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", + "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/internal-slot": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", + "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.2", + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", + "integrity": "sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-async-function": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.1.1.tgz", + "integrity": "sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "async-function": "^1.0.0", + "call-bound": "^1.0.3", + "get-proto": "^1.0.1", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz", + "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-bigints": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz", + "integrity": "sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-builtin-module": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-5.0.0.tgz", + "integrity": "sha512-f4RqJKBUe5rQkJ2eJEJBXSticB3hGbN9j0yxxMQFqIW89Jp9WYFtzfTcRlstDKVUTRzSOTLKRfO9vIztenwtxA==", + "dev": true, + "license": "MIT", + "dependencies": { + "builtin-modules": "^5.0.0" + }, + "engines": { + "node": ">=18.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-view": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", + "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", + "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-finalizationregistry": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.1.tgz", + "integrity": "sha512-1pC6N8qWJbWoPtEjgcL2xyhQOP491EQjeUo3qTKcmV8YSDDJrOepfG8pcC7h/QgnQHYSv0mJ3Z/ZWxmatVrysg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-function": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.2.tgz", + "integrity": "sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.4", + "generator-function": "^2.0.0", + "get-proto": "^1.0.1", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-html": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-html/-/is-html-2.0.0.tgz", + "integrity": "sha512-S+OpgB5i7wzIue/YSE5hg0e5ZYfG3hhpNh9KGl6ayJ38p7ED6wxQLd1TV91xHpcTvw90KMJ9EwN3F/iNflHBVg==", + "dev": true, + "license": "MIT", + "dependencies": { + "html-tags": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", + "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-number-object": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", + "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-regex": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", + "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-set": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", + "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.4.tgz", + "integrity": "sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-string": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", + "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", + "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "has-symbols": "^1.1.0", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-weakmap": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", + "integrity": "sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakref": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.1.tgz", + "integrity": "sha512-6i9mGWSlqzNMEqpCp93KwRS1uUOodk2OJ6b+sq7ZPDSy2WuI5NFIxp/254TytR8ftefexkWn5xNiHUNpPOfSew==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakset": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.4.tgz", + "integrity": "sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true, + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/iterator.prototype": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.5.tgz", + "integrity": "sha512-H0dkQoCa3b2VEeKQBOxFph+JAbcrQdE7KC0UkqwpLmv2EC4P41QXP+rqo9wYodACiG5/WM5s9oDApTU8utwj9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.6", + "get-proto": "^1.0.0", + "has-symbols": "^1.1.0", + "set-function-name": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsdoc-type-pratt-parser": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-5.1.1.tgz", + "integrity": "sha512-DYYlVP1fe4QBMh2xTIs20/YeTz2GYVbWAEZweHSZD+qQ/Cx2d5RShuhhsdk64eTjNq0FeVnteP/qVOgaywSRbg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json-bigint": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", + "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bignumber.js": "^9.0.0" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/jsonata": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/jsonata/-/jsonata-2.2.1.tgz", + "integrity": "sha512-xd1uwUrKeIcJbsWhaoS3qAX4Ea8m0Mw0G5nlnAQvPT7TbZ5qaPdzBVTQia9KfyuyQm+nenfyjvzUDTRYHsC2sw==", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/jsonc-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", + "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jsx-ast-utils": { + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", + "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "object.assign": "^4.1.4", + "object.values": "^1.1.6" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/jszip": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", + "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", + "license": "(MIT OR GPL-3.0-or-later)", + "dependencies": { + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "setimmediate": "^1.0.5" + } + }, + "node_modules/jszip/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "license": "MIT" + }, + "node_modules/jszip/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/jszip/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" + }, + "node_modules/jszip/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/jwa": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.1.tgz", + "integrity": "sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-equal-constant-time": "^1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jws": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.1.tgz", + "integrity": "sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA==", + "dev": true, + "license": "MIT", + "dependencies": { + "jwa": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/ky": { + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/ky/-/ky-1.14.3.tgz", + "integrity": "sha512-9zy9lkjac+TR1c2tG+mkNSVlyOpInnWdSMiue4F+kq8TwJSgv6o8jhLRg8Ho6SnZ9wOYUq/yozts9qQCfk7bIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sindresorhus/ky?sponsor=1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lie": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", + "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "license": "MIT", + "dependencies": { + "immediate": "~3.0.5" + } + }, + "node_modules/localforage": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.10.0.tgz", + "integrity": "sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "lie": "3.1.1" + } + }, + "node_modules/localforage/node_modules/lie": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz", + "integrity": "sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw==", + "dev": true, + "license": "MIT", + "dependencies": { + "immediate": "~3.0.5" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/loglevel": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.2.tgz", + "integrity": "sha512-HgMmCqIJSAKqo68l0rS2AanEWfkxaZ5wNiEFb5ggm08lDs9Xl2KxBlX3PTcaD2chBM1gXAYf491/M2Rv8Jwayg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6.0" + }, + "funding": { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/loglevel" + } + }, + "node_modules/long": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", + "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/long-timeout": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/long-timeout/-/long-timeout-0.1.1.tgz", + "integrity": "sha512-BFRuQUqc7x2NWxfJBCyUrN8iYUYznzL9JROmRz1gZ6KlOIgmoD+njPVbb+VNn2nGMKggMsK79iUNErillsrx7w==", + "license": "MIT" + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/loupe": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-func-name": "^2.0.1" + } + }, + "node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/luxon": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.7.2.tgz", + "integrity": "sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew==", + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true, + "license": "MIT" + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/mocha": { + "version": "11.7.4", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.7.4.tgz", + "integrity": "sha512-1jYAaY8x0kAZ0XszLWu14pzsf4KV740Gld4HXkhNTXwcHx4AUEDkPzgEHg9CM5dVcW+zv036tjpsEbLraPJj4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "browser-stdout": "^1.3.1", + "chokidar": "^4.0.1", + "debug": "^4.3.5", + "diff": "^7.0.0", + "escape-string-regexp": "^4.0.0", + "find-up": "^5.0.0", + "glob": "^10.4.5", + "he": "^1.2.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimatch": "^9.0.5", + "ms": "^2.1.3", + "picocolors": "^1.1.1", + "serialize-javascript": "^6.0.2", + "strip-json-comments": "^3.1.1", + "supports-color": "^8.1.1", + "workerpool": "^9.2.0", + "yargs": "^17.7.2", + "yargs-parser": "^21.1.1", + "yargs-unparser": "^2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/mocha/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/mocha/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/mocha/node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/mocha/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/module-details-from-path": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/module-details-from-path/-/module-details-from-path-1.0.4.tgz", + "integrity": "sha512-EGWKgxALGMgzvxYF1UyGTy0HXX/2vHLkw6+NvDKW2jypWbHpjQuj4UMcqQWXHERJhVGKikolT06G3bcKe4fi7w==", + "dev": true, + "license": "MIT" + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/nano-spawn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/nano-spawn/-/nano-spawn-2.1.0.tgz", + "integrity": "sha512-yTW+2okrElHiH4fsiz/+/zc0EDo9BDDoC3iKk8dpv1GeRc9nUWzUZHx6TofMWErchhUQR8hY9/Eu1Uja9x1nqA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20.17" + }, + "funding": { + "url": "https://github.com/sindresorhus/nano-spawn?sponsor=1" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-dir": { + "version": "0.1.17", + "resolved": "https://registry.npmjs.org/node-dir/-/node-dir-0.1.17.tgz", + "integrity": "sha512-tmPX422rYgofd4epzrNoOXiE8XFZYOcCq1vD7MAXCDO+O+zndlA2ztdKKMa+EeuBG5tHETpr4ml4RGgpqDCCAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimatch": "^3.0.2" + }, + "engines": { + "node": ">= 0.10.5" + } + }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "deprecated": "Use your platform's native DOMException instead", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "license": "MIT", + "engines": { + "node": ">=10.5.0" + } + }, + "node_modules/node-fetch": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" + } + }, + "node_modules/node-inspect": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/node-inspect/-/node-inspect-2.0.0.tgz", + "integrity": "sha512-vaDNU6Fa/vt8gv/PV+QoeSIPhcBnHMiNOtInxcojfagspQg5KP9HloUDGJWIacamT8Agiu51eF+fuBjrE25a6w==", + "deprecated": "This module is part of Node.js core and does not need to be installed separately. It is now unmaintained.", + "license": "MIT", + "bin": { + "node-inspect": "cli.js" + } + }, + "node_modules/node-releases": { + "version": "2.0.27", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz", + "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-schedule": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/node-schedule/-/node-schedule-2.1.1.tgz", + "integrity": "sha512-OXdegQq03OmXEjt2hZP33W2YPs/E5BcFQks46+G2gAxs4gHOIVD1u7EqlYLYSKsaIpyKCK9Gbk0ta1/gjRSMRQ==", + "license": "MIT", + "dependencies": { + "cron-parser": "^4.2.0", + "long-timeout": "0.1.1", + "sorted-array-functions": "^1.3.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/nodemailer": { + "version": "8.0.11", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-8.0.11.tgz", + "integrity": "sha512-nrO/pDAUKl+wXX+lx16tDLbnm0fW6sK/x8mgohaCpg+CdCEl482bD4tCuAZk2DyliruiNTIZxRCoWkDqJEnAiA==", + "license": "MIT-0", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz", + "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.7.tgz", + "integrity": "sha512-nK28WOo+QIjBkDduTINE4JkF/UJJKyf2EJxvJKfblDpyg0Q+pkOHNTL0Qwy6NP6FhE/EnzV73BxxqcJaXY9anw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0", + "has-symbols": "^1.1.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.entries": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.9.tgz", + "integrity": "sha512-8u/hfXFRBD1O0hPUjioLhoWFHRmt6tKA4/vZPyckBr18l1KE9uHrFaFaUi8MDRTpi4uak2goyPTSNJLXX2k2Hw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.fromentries": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", + "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.groupby": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", + "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.values": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz", + "integrity": "sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/own-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz", + "integrity": "sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.6", + "object-keys": "^1.1.1", + "safe-push-apply": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, + "node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "license": "(MIT AND Zlib)" + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-imports-exports": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/parse-imports-exports/-/parse-imports-exports-0.2.4.tgz", + "integrity": "sha512-4s6vd6dx1AotCx/RCI2m7t7GCh5bDRUtGNvRfHSP2wbBQdMi67pPe7mtzmgwcaQ8VKK/6IB7Glfyu3qdZJPybQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "parse-statements": "1.0.11" + } + }, + "node_modules/parse-statements": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/parse-statements/-/parse-statements-1.0.11.tgz", + "integrity": "sha512-HlsyYdMBnbPQ9Jr/VgJ1YF4scnldvJpJxCVx6KgqPL4dxppsWrJHCIIxQXMJrqGnsRkNPATbeMJ8Yxu7JMsYcA==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/pg-int8": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", + "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/pg-protocol": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.13.0.tgz", + "integrity": "sha512-zzdvXfS6v89r6v7OcFCHfHlyG/wvry1ALxZo4LqgUoy7W9xhBDMaqOuMiF3qEV45VqsN6rdlcehHrfDtlCPc8w==", + "dev": true, + "license": "MIT" + }, + "node_modules/pg-types": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", + "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", + "dev": true, + "license": "MIT", + "dependencies": { + "pg-int8": "1.0.1", + "postgres-array": "~2.0.0", + "postgres-bytea": "~1.0.0", + "postgres-date": "~1.0.4", + "postgres-interval": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/possible-typed-array-names": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", + "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/postgres-array": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", + "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/postgres-bytea": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.1.tgz", + "integrity": "sha512-5+5HqXnsZPE65IJZSMkZtURARZelel2oXUEO8rH83VS/hxH5vv1uHquPg5wZs8yMAfdv971IU+kcPUczi7NVBQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-date": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", + "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-interval": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", + "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "xtend": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "3.8.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.4.tgz", + "integrity": "sha512-N2MylSdi48+5N/6S5j+maeHbUSIzzZ5uOcX5Hm4QpV8Dkb1HFjfAKTKX6yNPJQD9AhcT3ifHNB66tWTTJDi11Q==", + "license": "MIT", + "peer": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "license": "MIT" + }, + "node_modules/promisify-child-process": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/promisify-child-process/-/promisify-child-process-5.0.1.tgz", + "integrity": "sha512-jP2Aw1acio5NYIgCEpW9Ay2OhWlcbKTZp4aY6iivx75K2yXizJBt6Wz7sQrHloXKIfrjhbUfdH9m6UZrus4tmA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.26.0" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "dev": true, + "license": "MIT", + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, + "node_modules/prop-types/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/proto3-json-serializer": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/proto3-json-serializer/-/proto3-json-serializer-3.0.3.tgz", + "integrity": "sha512-iUi7jGLuECChuoUwtvf6eXBDcFXTHAt5GM6ckvtD3RqD+j2wW0GW6WndPOu9IWeUk7n933lzrskcNMHJy2tFSw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "protobufjs": "^7.4.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/protobufjs": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.4.tgz", + "integrity": "sha512-CvexbZtbov6jW2eXAvLukXjXUW1TzFaivC46BpWc/3BpcCysb5Vffu+B3XHMm8lVEuy2Mm4XGex8hBSg1yapPg==", + "dev": true, + "hasInstallScript": true, + "license": "BSD-3-Clause", + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/proxy-from-env": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz", + "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/react": { + "version": "19.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-19.2.0.tgz", + "integrity": "sha512-tmbWg6W31tQLeB5cdIBOicJDJRR2KzXsV7uSK9iNfLWQ5bIZfxuPEHp7M8wiHyHnn0DD1i7w3Zmin0FtkrwoCQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "19.2.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.0.tgz", + "integrity": "sha512-UlbRu4cAiGaIewkPyiRGJk0imDN2T3JjieT6spoL2UeSf5od4n5LB/mQ4ejmxhCFT1tYe8IvaFulzynWovsEFQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "scheduler": "^0.27.0" + }, + "peerDependencies": { + "react": "^19.2.0" + } + }, + "node_modules/react-is": { + "version": "19.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.2.0.tgz", + "integrity": "sha512-x3Ax3kNSMIIkyVYhWPyO09bu0uttcAIoecO/um/rKGQ4EltYWVYtyiGkS/3xMynrbVQdS69Jhlv8FXUEZehlzA==", + "dev": true, + "license": "MIT" + }, + "node_modules/react-transition-group": { + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", + "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/runtime": "^7.5.5", + "dom-helpers": "^5.0.1", + "loose-envify": "^1.4.0", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": ">=16.6.0", + "react-dom": ">=16.6.0" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/reflect.getprototypeof": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", + "integrity": "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.9", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.7", + "get-proto": "^1.0.1", + "which-builtin-type": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/regexp-tree": { + "version": "0.1.27", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.27.tgz", + "integrity": "sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==", + "dev": true, + "license": "MIT", + "bin": { + "regexp-tree": "bin/regexp-tree" + } + }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.4.tgz", + "integrity": "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "set-function-name": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/regjsparser": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.12.0.tgz", + "integrity": "sha512-cnE+y8bz4NhMjISKbgeVJtqNbtf5QpjZP+Bslo+UqkIt9QPnX9q095eiRRASJG1/tz6dlNr6Z5NsBiWYokp6EQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "jsesc": "~3.0.2" + }, + "bin": { + "regjsparser": "bin/parser" + } + }, + "node_modules/regjsparser/node_modules/jsesc": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", + "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-in-the-middle": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz", + "integrity": "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.3.5", + "module-details-from-path": "^1.0.3" + }, + "engines": { + "node": ">=9.3.0 || >=8.10.0 <9.0.0" + } + }, + "node_modules/resolve": { + "version": "1.22.11", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", + "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.16.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/retry-request": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-8.0.2.tgz", + "integrity": "sha512-JzFPAfklk1kjR1w76f0QOIhoDkNkSqW8wYKT08n9yysTmZfB+RQ2QoXoTAeOi1HD9ZipTyTAZg3c4pM/jeqgSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "extend": "^3.0.2", + "teeny-request": "^10.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "5.0.10", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.10.tgz", + "integrity": "sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^10.3.7" + }, + "bin": { + "rimraf": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-array-concat": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", + "integrity": "sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", + "has-symbols": "^1.1.0", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safe-push-apply": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-push-apply/-/safe-push-apply-1.0.0.tgz", + "integrity": "sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-regex-test": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", + "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-regex": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/scheduler": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", + "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.4.tgz", + "integrity": "sha512-rUCObTnP32Q08R2uuIrt7r9PlEonuTmtuXYcW6s5kjdlj3xbnwe+21yXptAUYcMAABLkYYTtnmzb3w3EDZfueA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/set-proto": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/set-proto/-/set-proto-1.0.0.tgz", + "integrity": "sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", + "license": "MIT" + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/sinon": { + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-21.0.0.tgz", + "integrity": "sha512-TOgRcwFPbfGtpqvZw+hyqJDvqfapr1qUlOizROIk4bBLjlsjlB00Pg6wMFXNtJRpu+eCZuVOaLatG7M8105kAw==", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "@sinonjs/commons": "^3.0.1", + "@sinonjs/fake-timers": "^13.0.5", + "@sinonjs/samsam": "^8.0.1", + "diff": "^7.0.0", + "supports-color": "^7.2.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/sinon" + } + }, + "node_modules/sinon-chai": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/sinon-chai/-/sinon-chai-3.7.0.tgz", + "integrity": "sha512-mf5NURdUaSdnatJx3uhoBOrY9dtL19fiOtAdT1Azxg3+lNJFiuN0uzaU3xX1LeAfL17kHQhTAJgpsfhbMJMY2g==", + "dev": true, + "license": "(BSD-2-Clause OR WTFPL)", + "peerDependencies": { + "chai": "^4.0.0", + "sinon": ">=4.0.0" + } + }, + "node_modules/sorted-array-functions": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/sorted-array-functions/-/sorted-array-functions-1.3.0.tgz", + "integrity": "sha512-2sqgzeFlid6N4Z2fUQ1cvFmTOLRi/sEDzSQ0OKYchqgoPmQBVyM3959qYx3fpS6Esef80KjmpgPeEr028dP3OA==", + "license": "MIT" + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true, + "license": "CC-BY-3.0" + }, + "node_modules/spdx-expression-parse": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz", + "integrity": "sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.22", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.22.tgz", + "integrity": "sha512-4PRT4nh1EImPbt2jASOKHX7PB7I+e4IWNLvkKFDxNhJlfjbYlleYQh285Z/3mPTHSAK/AvdMmw5BNNuYH8ShgQ==", + "dev": true, + "license": "CC0-1.0" + }, + "node_modules/stop-iteration-iterator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz", + "integrity": "sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "internal-slot": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/stream-events": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.5.tgz", + "integrity": "sha512-E1GUzBSgvct8Jsb3v2X15pjzN1tYebtbLaMg+eBOUOAxgbLoSbT2NS91ckc5lJD1KfLjId+jXJRgo0qnV5Nerg==", + "dev": true, + "license": "MIT", + "dependencies": { + "stubs": "^3.0.0" + } + }, + "node_modules/stream-shift": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.3.tgz", + "integrity": "sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/string-width/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/string-width/node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/string.prototype.matchall": { + "version": "4.0.12", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.12.tgz", + "integrity": "sha512-6CC9uyBL+/48dYizRf7H7VAYCMCNTBeM78x/VTUe9bFEaxBepPJDa1Ow99LqI/1yF7kuy7Q3cQsYMrcjGUcskA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.6", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.6", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "internal-slot": "^1.1.0", + "regexp.prototype.flags": "^1.5.3", + "set-function-name": "^2.0.2", + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.repeat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz", + "integrity": "sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "node_modules/string.prototype.trim": { + "version": "1.2.10", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", + "integrity": "sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "define-data-property": "^1.1.4", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-object-atoms": "^1.0.0", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz", + "integrity": "sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-indent": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-4.1.1.tgz", + "integrity": "sha512-SlyRoSkdh1dYP0PzclLE7r0M9sgbFKKMFXpFRUMNuKhQSbC6VQIGzq3E0qsfvGJaUFJPGv6Ws1NZ/haTAjfbMA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/stubs": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/stubs/-/stubs-3.0.0.tgz", + "integrity": "sha512-PdHt7hHUJKxvTCgbKX9C1V/ftOcjJQgz8BZwNfV5c4B6dcGqlpelTbJ999jBGZ2jYiPAwcX5dP6oBwVlBlUbxw==", + "dev": true, + "license": "MIT" + }, + "node_modules/stylis": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.2.0.tgz", + "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==", + "dev": true, + "license": "MIT" + }, + "node_modules/suncalc2": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/suncalc2/-/suncalc2-1.8.1.tgz", + "integrity": "sha512-tNoAni1LqWzBzJRX3NRCsD50gVsuejH1jd9Y+XyKO3WkpPIU+QNyWF4Zf2JnUQKW2LKLWIBgVDQCrgsQwqs0tA==" + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/synckit": { + "version": "0.11.11", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.11.tgz", + "integrity": "sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@pkgr/core": "^0.2.9" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/synckit" + } + }, + "node_modules/teeny-request": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-10.1.0.tgz", + "integrity": "sha512-3ZnLvgWF29jikg1sAQ1g0o+lr5JX6sVgYvfUJazn7ZjJroDBUTWp44/+cFVX0bULjv4vci+rBD+oGVAkWqhUbw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "node-fetch": "^3.3.2", + "stream-events": "^1.0.5" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/teeny-request/node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/teeny-request/node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/timekeeper": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/timekeeper/-/timekeeper-2.3.1.tgz", + "integrity": "sha512-LeQRS7/4JcC0PgdSFnfUiStQEdiuySlCj/5SJ18D+T1n9BoY7PxKFfCwLulpHXoLUFr67HxBddQdEX47lDGx1g==", + "dev": true, + "license": "MIT" + }, + "node_modules/tiny-glob": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz", + "integrity": "sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==", + "dev": true, + "license": "MIT", + "dependencies": { + "globalyzer": "0.1.0", + "globrex": "^0.1.2" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-api-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", + "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, + "node_modules/tsconfig-paths": { + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", + "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-detect": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/typed-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.3.tgz", + "integrity": "sha512-BaXgOuIxz8n8pIq3e7Atg/7s+DpiYrxn4vdot3w9KbnBhcRQq6o3xemQdIfynqSeXeDrF32x+WvfzmOjPiY9lg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "for-each": "^0.3.3", + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.4.tgz", + "integrity": "sha512-bTlAFB/FBYMcuX81gbL4OcpH5PmlFHqlCCpAl8AlEzMz5k53oNDvN8p1PNOWLEmI2x4orp3raOFB51tv9X+MFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "for-each": "^0.3.3", + "gopd": "^1.2.0", + "has-proto": "^1.2.0", + "is-typed-array": "^1.1.15", + "reflect.getprototypeof": "^1.0.9" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.7.tgz", + "integrity": "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0", + "reflect.getprototypeof": "^1.0.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "license": "Apache-2.0", + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.46.2", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.46.2.tgz", + "integrity": "sha512-vbw8bOmiuYNdzzV3lsiWv6sRwjyuKJMQqWulBOU7M0RrxedXledX8G8kBbQeiOYDnTfiXz0Y4081E1QMNB6iQg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.46.2", + "@typescript-eslint/parser": "8.46.2", + "@typescript-eslint/typescript-estree": "8.46.2", + "@typescript-eslint/utils": "8.46.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/unbox-primitive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", + "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-bigints": "^1.0.2", + "has-symbols": "^1.1.0", + "which-boxed-primitive": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "license": "MIT" + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.4.tgz", + "integrity": "sha512-q0SPT4xyU84saUX+tomz1WLkxUbuaJnR1xWt17M7fJtEJigJeWUNGUqrauFXsHnqev9y9JTRGwk13tFBuKby4A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/update-browserslist-db/node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/virtual-tsc": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/virtual-tsc/-/virtual-tsc-0.6.2.tgz", + "integrity": "sha512-NeCuRFla3ASmhn24Da00UzEQX2FoLrOWX7P3K0IK0kK2WX//joUOLbOYkQEQg+FqYf75lw9jBI++iGszvospjg==", + "license": "MIT", + "dependencies": { + "debug": "^4.3.3", + "picocolors": "1.0.0" + }, + "peerDependencies": { + "@types/node": "*", + "typescript": ">=2.0.0" + } + }, + "node_modules/wake_on_lan": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wake_on_lan/-/wake_on_lan-1.0.0.tgz", + "integrity": "sha512-0QSpxny0QmsssshI6kePj6cobQPK+i8r5shfj58ZfQIUH9fUTyAaYPqZO3W/Ai7mN4vQVdTdsSGIr20M81UL6Q==", + "license": "MIT", + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "wake": "wake" + } + }, + "node_modules/web-streams-polyfill": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", + "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", + "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-bigint": "^1.1.0", + "is-boolean-object": "^1.2.1", + "is-number-object": "^1.1.1", + "is-string": "^1.1.1", + "is-symbol": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-builtin-type": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", + "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "function.prototype.name": "^1.1.6", + "has-tostringtag": "^1.0.2", + "is-async-function": "^2.0.0", + "is-date-object": "^1.1.0", + "is-finalizationregistry": "^1.1.0", + "is-generator-function": "^1.0.10", + "is-regex": "^1.2.1", + "is-weakref": "^1.0.2", + "isarray": "^2.0.5", + "which-boxed-primitive": "^1.1.0", + "which-collection": "^1.0.2", + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-collection": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", + "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.19", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz", + "integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "for-each": "^0.3.5", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/workerpool": { + "version": "9.3.4", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-9.3.4.tgz", + "integrity": "sha512-TmPRQYYSAnnDiEB0P/Ytip7bFGvqnSU6I2BcuSw7Hx+JSg/DsUi5ebYfc8GYaSdpuvOcEs6dXxPurOYpe9QFwg==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } - ], - "license": "MIT", - "peer": true, - "dependencies": { - "escalade": "^3.2.0", - "picocolors": "^1.1.1" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/update-browserslist-db/node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", - "dev": true, - "license": "ISC", - "peer": true - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "license": "BSD-2-Clause", - "peer": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "license": "MIT" - }, - "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true, - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/virtual-tsc": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/virtual-tsc/-/virtual-tsc-0.6.2.tgz", - "integrity": "sha512-NeCuRFla3ASmhn24Da00UzEQX2FoLrOWX7P3K0IK0kK2WX//joUOLbOYkQEQg+FqYf75lw9jBI++iGszvospjg==", - "license": "MIT", - "dependencies": { - "debug": "^4.3.3", - "picocolors": "1.0.0" - }, - "peerDependencies": { - "@types/node": "*", - "typescript": ">=2.0.0" - } - }, - "node_modules/wake_on_lan": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wake_on_lan/-/wake_on_lan-1.0.0.tgz", - "integrity": "sha512-0QSpxny0QmsssshI6kePj6cobQPK+i8r5shfj58ZfQIUH9fUTyAaYPqZO3W/Ai7mN4vQVdTdsSGIr20M81UL6Q==", - "license": "MIT", - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "wake": "wake" - } - }, - "node_modules/web-streams-polyfill": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", - "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/which-boxed-primitive": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", - "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "is-bigint": "^1.1.0", - "is-boolean-object": "^1.2.1", - "is-number-object": "^1.1.1", - "is-string": "^1.1.1", - "is-symbol": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-builtin-type": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", - "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bound": "^1.0.2", - "function.prototype.name": "^1.1.6", - "has-tostringtag": "^1.0.2", - "is-async-function": "^2.0.0", - "is-date-object": "^1.1.0", - "is-finalizationregistry": "^1.1.0", - "is-generator-function": "^1.0.10", - "is-regex": "^1.2.1", - "is-weakref": "^1.0.2", - "isarray": "^2.0.5", - "which-boxed-primitive": "^1.1.0", - "which-collection": "^1.0.2", - "which-typed-array": "^1.1.16" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-collection": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", - "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "is-map": "^2.0.3", - "is-set": "^2.0.3", - "is-weakmap": "^2.0.2", - "is-weakset": "^2.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-typed-array": { - "version": "1.1.19", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz", - "integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "for-each": "^0.3.5", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/workerpool": { - "version": "9.3.4", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-9.3.4.tgz", - "integrity": "sha512-TmPRQYYSAnnDiEB0P/Ytip7bFGvqnSU6I2BcuSw7Hx+JSg/DsUi5ebYfc8GYaSdpuvOcEs6dXxPurOYpe9QFwg==", - "dev": true, - "license": "Apache-2.0" - }, - "node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, - "node_modules/wrap-ansi-cjs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", - "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", - "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", - "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.4" - } - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "license": "MIT", - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, - "license": "MIT" - }, - "node_modules/yargs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } } - } } diff --git a/package.json b/package.json index 73b6e3bee..a7602f8c8 100644 --- a/package.json +++ b/package.json @@ -1,122 +1,122 @@ { - "name": "iobroker.javascript", - "version": "9.2.4", - "description": "Rules Engine for ioBroker", - "author": "bluefox ", - "contributors": [ - { - "name": "hobbyquaker", - "email": "hq@ccu.io" + "name": "iobroker.javascript", + "version": "9.2.4", + "description": "Rules Engine for ioBroker", + "author": "bluefox ", + "contributors": [ + { + "name": "hobbyquaker", + "email": "hq@ccu.io" + }, + { + "name": "Apollon77", + "email": "ingo@fischer-ka.de" + }, + { + "name": "AlCalzone", + "email": "d.griesel@gmx.net" + }, + { + "name": "Matthias Kleine", + "email": "info@haus-automatisierung.com" + } + ], + "homepage": "https://github.com/ioBroker/ioBroker.javascript", + "license": "MIT", + "keywords": [ + "ioBroker", + "javascript", + "script", + "engine", + "home automation" + ], + "repository": { + "type": "git", + "url": "https://github.com/ioBroker/ioBroker.javascript" }, - { - "name": "Apollon77", - "email": "ingo@fischer-ka.de" + "engines": { + "node": ">=18" }, - { - "name": "AlCalzone", - "email": "d.griesel@gmx.net" + "depsComment": { + "@types/node": "should match the lowest MAJOR version of Node.js we support." }, - { - "name": "Matthias Kleine", - "email": "info@haus-automatisierung.com" + "dependencies": { + "@iobroker/adapter-core": "^3.4.1", + "@iobroker/types": "^7.1.2", + "@types/node": "^18.19.130", + "axios": "^1.17.0", + "jsonata": "^2.2.1", + "jszip": "^3.10.1", + "node-inspect": "^2.0.0", + "node-schedule": "2.1.1", + "nodemailer": "^8.0.11", + "prettier": "^3.8.4", + "promisify-child-process": "^5.0.1", + "semver": "^7.8.4", + "suncalc2": "^1.8.1", + "typescript": "5.9.3", + "virtual-tsc": "^0.6.2", + "wake_on_lan": "^1.0.0" + }, + "devDependencies": { + "@alcalzone/release-script": "^5.2.1", + "@alcalzone/release-script-plugin-iobroker": "^5.2.0", + "@alcalzone/release-script-plugin-license": "^5.2.0", + "@iobroker/adapter-dev": "^1.5.0", + "@iobroker/build-tools": "^3.0.1", + "@iobroker/eslint-config": "^2.2.0", + "@iobroker/plugin-sentry": "^3.0.4", + "@iobroker/testing": "^5.2.2", + "@iobroker/vis-2-widgets-react-dev": "^4.0.4", + "@types/node-schedule": "^2.1.8", + "@types/nodemailer": "^7.0.12", + "@types/request": "^2.48.13", + "@types/suncalc": "^1.9.2", + "alcalzone-shared": "^5.0.0", + "timekeeper": "^2.3.1" + }, + "bugs": { + "url": "https://github.com/ioBroker/ioBroker.javascript/issues" + }, + "main": "build/main.js", + "files": [ + "admin/", + "build/", + "docs/", + "install/", + "io-package.json", + "LICENSE", + "admin/vsFont/codicon.json" + ], + "scripts": { + "test:declarations": "tsc -p test/lib/TS/tsconfig.json && tsc -p test/lib/JS/tsconfig.json", + "test:integration": "mocha --exit", + "test:package": "mocha test/testPackageFiles.js --exit", + "test:scheduler": "mocha test/testScheduler.js --exit", + "test": "npm run test:declarations && npm run test:integration", + "translate": "translate-adapter", + "//postinstall": "node ./install/installTypings.js", + "build": "npm run build-backend && node tasks", + "build-backend": "tsc -p tsconfig.build.json && node tasks --copy-types", + "release": "release-script --noPush -y --all", + "update-packages": "npx -y npm-check-updates --upgrade && cd src-editor && npx -y npm-check-updates --upgrade && cd ../src-admin && npx -y npm-check-updates --upgrade", + "npm": "npm i && cd src-editor && npm i -f && cd ../src-admin && npm i", + "lint": "eslint -c eslint.config.mjs", + "lint-all": "eslint -c eslint.config.mjs && cd src-editor && eslint -c eslint.config.mjs && cd ../src-admin && eslint -c eslint.config.mjs", + "admin-0-clean": "node tasks.js --admin-0-clean", + "admin-1-npm": "node tasks.js --admin-1-npm", + "admin-2-compile": "node tasks.js --admin-2-compile", + "admin-3-copy": "node tasks.js --admin-3-copy", + "admin-build": "node tasks.js --admin-build", + "0-clean": "node tasks.js --0-clean", + "1-npm": "node tasks.js --1-npm", + "2-build": "node tasks.js --2-build", + "3-copy": "node tasks.js --3-copy", + "4-patch": "node tasks.js --4-patch", + "build-editor": "node tasks.js --build", + "blocklyJson2words": "node tasks.js --blocklyJson2words", + "blocklyWords2json": "node tasks.js --blocklyWords2json", + "monaco-update": "node tasks.js --monaco-update", + "monaco-typescript": "node tasks.js --monaco-typescript" } - ], - "homepage": "https://github.com/ioBroker/ioBroker.javascript", - "license": "MIT", - "keywords": [ - "ioBroker", - "javascript", - "script", - "engine", - "home automation" - ], - "repository": { - "type": "git", - "url": "https://github.com/ioBroker/ioBroker.javascript" - }, - "engines": { - "node": ">=18" - }, - "depsComment": { - "@types/node": "should match the lowest MAJOR version of Node.js we support." - }, - "dependencies": { - "@iobroker/adapter-core": "^3.3.2", - "@iobroker/types": "^7.1.2", - "@types/node": "^20.19.42", - "axios": "^1.17.0", - "jsonata": "^2.2.1", - "jszip": "^3.10.1", - "node-inspect": "^2.0.0", - "node-schedule": "2.1.1", - "nodemailer": "^8.0.10", - "prettier": "^3.8.3", - "promisify-child-process": "^5.0.1", - "semver": "^7.8.2", - "suncalc2": "^1.8.1", - "typescript": "5.9.3", - "virtual-tsc": "^0.6.2", - "wake_on_lan": "^1.0.0" - }, - "devDependencies": { - "@alcalzone/release-script": "^5.2.1", - "@alcalzone/release-script-plugin-iobroker": "^5.2.0", - "@alcalzone/release-script-plugin-license": "^5.2.0", - "@iobroker/adapter-dev": "^1.5.0", - "@iobroker/build-tools": "^3.0.1", - "@iobroker/eslint-config": "^2.2.0", - "@iobroker/plugin-sentry": "^3.0.4", - "@iobroker/testing": "^5.2.2", - "@iobroker/vis-2-widgets-react-dev": "^4.0.4", - "@types/node-schedule": "^2.1.8", - "@types/nodemailer": "^7.0.11", - "@types/request": "^2.48.13", - "@types/suncalc": "^1.9.2", - "alcalzone-shared": "^5.0.0", - "timekeeper": "^2.3.1" - }, - "bugs": { - "url": "https://github.com/ioBroker/ioBroker.javascript/issues" - }, - "main": "build/main.js", - "files": [ - "admin/", - "build/", - "docs/", - "install/", - "io-package.json", - "LICENSE", - "admin/vsFont/codicon.json" - ], - "scripts": { - "test:declarations": "tsc -p test/lib/TS/tsconfig.json && tsc -p test/lib/JS/tsconfig.json", - "test:integration": "mocha --exit", - "test:package": "mocha test/testPackageFiles.js --exit", - "test:scheduler": "mocha test/testScheduler.js --exit", - "test": "npm run test:declarations && npm run test:integration", - "translate": "translate-adapter", - "//postinstall": "node ./install/installTypings.js", - "build": "npm run build-backend && node tasks", - "build-backend": "tsc -p tsconfig.build.json && node tasks --copy-types", - "release": "release-script --noPush -y --all", - "update-packages": "npx -y npm-check-updates --upgrade && cd src-editor && npx -y npm-check-updates --upgrade && cd ../src-admin && npx -y npm-check-updates --upgrade", - "npm": "npm i && cd src-editor && npm i -f && cd ../src-admin && npm i", - "lint": "eslint -c eslint.config.mjs", - "lint-all": "eslint -c eslint.config.mjs && cd src-editor && eslint -c eslint.config.mjs && cd ../src-admin && eslint -c eslint.config.mjs", - "admin-0-clean": "node tasks.js --admin-0-clean", - "admin-1-npm": "node tasks.js --admin-1-npm", - "admin-2-compile": "node tasks.js --admin-2-compile", - "admin-3-copy": "node tasks.js --admin-3-copy", - "admin-build": "node tasks.js --admin-build", - "0-clean": "node tasks.js --0-clean", - "1-npm": "node tasks.js --1-npm", - "2-build": "node tasks.js --2-build", - "3-copy": "node tasks.js --3-copy", - "4-patch": "node tasks.js --4-patch", - "build-editor": "node tasks.js --build", - "blocklyJson2words": "node tasks.js --blocklyJson2words", - "blocklyWords2json": "node tasks.js --blocklyWords2json", - "monaco-update": "node tasks.js --monaco-update", - "monaco-typescript": "node tasks.js --monaco-typescript" - } } diff --git a/src-admin/.mf/diagnostics/latest.json b/src-admin/.mf/diagnostics/latest.json index d3a45654c..992bc1cb9 100644 --- a/src-admin/.mf/diagnostics/latest.json +++ b/src-admin/.mf/diagnostics/latest.json @@ -1,10 +1,10 @@ { "latestErrorEvent": { "code": "TYPE-001", - "message": "Failed to generate type declaration. Execute the below cmd to reproduce and fix the error. #TYPE-001\nargs: {\"cmd\":\"npx tsc --project j:\\\\source\\\\ioBroker_sourcen\\\\iobroker.javascript\\\\src-admin\\\\node_modules\\\\.federation\\\\tsconfig.a069227a671c5aaba9de321bcdeb4f35.json\"}\nView the docs to see how to solve: https://module-federation.io/guide/troubleshooting/type#type-001", + "message": "Failed to generate type declaration. Execute the below cmd to reproduce and fix the error. #TYPE-001\nargs: {\"cmd\":\"npx tsc --project C:\\\\pWork\\\\ioBroker.javascript\\\\src-admin\\\\node_modules\\\\.federation\\\\tsconfig.3123b20b11f31dbb699ad541e33270a9.json\"}\nView the docs to see how to solve: https://module-federation.io/guide/troubleshooting/type#type-001", "args": { - "cmd": "npx tsc --project j:\\source\\ioBroker_sourcen\\iobroker.javascript\\src-admin\\node_modules\\.federation\\tsconfig.a069227a671c5aaba9de321bcdeb4f35.json" + "cmd": "npx tsc --project C:\\pWork\\ioBroker.javascript\\src-admin\\node_modules\\.federation\\tsconfig.3123b20b11f31dbb699ad541e33270a9.json" }, - "timestamp": 1780561089963 + "timestamp": 1781165772744 } } \ No newline at end of file diff --git a/src-admin/package-lock.json b/src-admin/package-lock.json index 41e9c9651..480810448 100644 --- a/src-admin/package-lock.json +++ b/src-admin/package-lock.json @@ -1,17 +1,17 @@ { "name": "iobroker-admin-component-javascript", - "version": "9.2.3", + "version": "9.2.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "iobroker-admin-component-javascript", - "version": "9.2.3", + "version": "9.2.4", "devDependencies": { "@emotion/react": "^11.14.0", "@emotion/styled": "^11.14.1", - "@iobroker/adapter-react-v5": "^8.2.6", - "@iobroker/json-config": "^8.4.3", + "@iobroker/adapter-react-v5": "^8.2.7", + "@iobroker/json-config": "^8.4.7", "@module-federation/runtime": "^2.2.3", "@module-federation/vite": "^1.13.1", "@mui/icons-material": "^6.5.0", @@ -135,6 +135,7 @@ "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@babel/code-frame": "^7.29.0", "@babel/generator": "^7.29.0", @@ -524,6 +525,7 @@ "integrity": "sha512-O000MLDBDdk/EohJPFUqvnp4qnHeYkVP5B0xEG0D/L7cOKP9kefu2DXn8dj74cQfsEzUqh+sr1RzFqiL1o+PpA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@babel/runtime": "^7.18.3", "@emotion/babel-plugin": "^11.13.5", @@ -570,6 +572,7 @@ "integrity": "sha512-qEEJt42DuToa3gurlH4Qqc1kVpNq8wO8cJtDzU46TjlzWjDlsVyevtYCRijVq3SrHsROS+gVQ8Fnea108GnKzw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@babel/runtime": "^7.18.3", "@emotion/babel-plugin": "^11.13.5", @@ -1072,9 +1075,9 @@ } }, "node_modules/@iobroker/adapter-react-v5": { - "version": "8.2.6", - "resolved": "https://registry.npmjs.org/@iobroker/adapter-react-v5/-/adapter-react-v5-8.2.6.tgz", - "integrity": "sha512-tp6KsxF8WlMFem31eM0F6l+6nGKaHqDO2lxM0R+iTJsUzdV6TNwkP+LiqaWSi18HMpl5jnnPYHA7DgWeW4QJiA==", + "version": "8.2.7", + "resolved": "https://registry.npmjs.org/@iobroker/adapter-react-v5/-/adapter-react-v5-8.2.7.tgz", + "integrity": "sha512-kzapXA20Pvwqhgivdzuc0epMe1BeG77n6qbzA38ve2crkzeqMQzCrhdLtXie2Kp6eX7bcYAzgY//4ztM0gqPxw==", "dev": true, "license": "MIT", "dependencies": { @@ -1271,9 +1274,9 @@ } }, "node_modules/@iobroker/json-config": { - "version": "8.4.3", - "resolved": "https://registry.npmjs.org/@iobroker/json-config/-/json-config-8.4.3.tgz", - "integrity": "sha512-9pH0rri2oMTQFhFCZXzXMumA3EGRcu4Mg/gY3mOu52ouY9y+sJDdj1ol1vtVdv7V52hKKzX7IMHV/VAV13LTLQ==", + "version": "8.4.7", + "resolved": "https://registry.npmjs.org/@iobroker/json-config/-/json-config-8.4.7.tgz", + "integrity": "sha512-QcOgOXuQic6aw5e87D7xy3sgWwUxeHCuWrAOBeN3QciQRp2cABHS/ustYJsI10d1aErXh6QGhTtkj2uIj4JXog==", "dev": true, "license": "MIT", "dependencies": { @@ -1665,6 +1668,7 @@ "integrity": "sha512-VPuPqXqbBPlcVSA0BmnoE4knW4/xG6Thazo8vCLWkOKusko6DtwFV6B665MMWJ9j0KFohTIf3yx2zYtYacvG1g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@babel/runtime": "^7.26.0" }, @@ -1692,6 +1696,7 @@ "integrity": "sha512-yjvtXoFcrPLGtgKRxFaH6OQPtcLPhkloC0BML6rBG5UeldR0nPULR/2E2BfXdo5JNV7j7lOzrrLX2Qf/iSidow==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@babel/runtime": "^7.26.0", "@mui/core-downloads-tracker": "^6.5.0", @@ -1846,7 +1851,6 @@ "integrity": "sha512-OJM+9nj5JIyPUvsZ5ZjaeC9PfktmK+W5YaVLToLR8L0lB/DGmv1gcKE43ssNLSvpoW71Hct0necfade6+kW3zQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@babel/runtime": "^7.28.4", "@mui/utils": "^7.3.3", @@ -1875,7 +1879,6 @@ "integrity": "sha512-8vVje9rdEr1rY8oIkYgP+Su5Kwl6ik7O3jQ0wl78JGSmiZhRHV+vkjooGdKD8pbtZbutXFVTWQYshu2b3sG9zw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@babel/runtime": "^7.28.4" }, @@ -1894,7 +1897,6 @@ "integrity": "sha512-kwNAUh7bLZ7mRz9JZ+6qfRnnxbE4Zuc+RzXnhSpRSxjTlSTj7b4JxRLXpG+MVtPVtqks5k/XC8No1Vs3x4Z2gg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@babel/runtime": "^7.28.4", "@mui/types": "^7.4.7", @@ -1926,7 +1928,6 @@ "integrity": "sha512-CmFxvRJIBCEaWdilhXMw/5wFJ1+FT9f3xt+m2pPXhHPeVIbBg9MnMvNSJjdALvnQJMPw8jLhrUtXmN7QAZV2fw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@babel/runtime": "^7.28.4", "@emotion/cache": "^11.14.0", @@ -1962,7 +1963,6 @@ "integrity": "sha512-Lqq3emZr5IzRLKaHPuMaLBDVaGvxoh6z7HMWd1RPKawBM5uMRaQ4ImsmmgXWtwJdfZux5eugfDhXJUo2mliS8Q==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@babel/runtime": "^7.28.4", "@mui/private-theming": "^7.3.3", @@ -2004,7 +2004,6 @@ "integrity": "sha512-8vVje9rdEr1rY8oIkYgP+Su5Kwl6ik7O3jQ0wl78JGSmiZhRHV+vkjooGdKD8pbtZbutXFVTWQYshu2b3sG9zw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@babel/runtime": "^7.28.4" }, @@ -2023,7 +2022,6 @@ "integrity": "sha512-kwNAUh7bLZ7mRz9JZ+6qfRnnxbE4Zuc+RzXnhSpRSxjTlSTj7b4JxRLXpG+MVtPVtqks5k/XC8No1Vs3x4Z2gg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@babel/runtime": "^7.28.4", "@mui/types": "^7.4.7", @@ -3015,6 +3013,7 @@ "integrity": "sha512-z9VXpC7MWrhfWipitjNdgCauoMLRdIILQsAEV+ZesIzBq/oUlxk0m3ApZuMFCXdnS4U7KrI+l3WRUEGQ8K1QKw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@types/prop-types": "*", "csstype": "^3.2.2" @@ -3263,6 +3262,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "baseline-browser-mapping": "^2.9.0", "caniuse-lite": "^1.0.30001759", @@ -3591,6 +3591,7 @@ "integrity": "sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==", "dev": true, "license": "MIT", + "peer": true, "funding": { "type": "github", "url": "https://github.com/sponsors/kossnocorp" @@ -4757,7 +4758,8 @@ "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz", "integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==", "dev": true, - "license": "BSD-2-Clause" + "license": "BSD-2-Clause", + "peer": true }, "node_modules/lie": { "version": "3.3.0", @@ -5478,6 +5480,7 @@ "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "loose-envify": "^1.1.0" }, @@ -5552,6 +5555,7 @@ "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.2" @@ -5826,6 +5830,7 @@ "integrity": "sha512-3GuObel8h7Kqdjt0gxkEzaifHTqLVW56Y/bjN7PSQtkKr0w3V/QYSdt6QWYtd7A1xUtYQigtdUfgj1RvWVtorw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@types/estree": "1.0.8" }, @@ -6366,6 +6371,7 @@ "integrity": "sha512-w+N7Hifpc3gRjZ63vYBXA56dvvRlNWRczTdmCBBa+CotUzAPf5b7YMdMR/8CQoeYE5LX3W4wj6RYTgonm1b9DA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "esbuild": "^0.27.0", "fdir": "^6.5.0", @@ -6512,6 +6518,7 @@ "integrity": "sha512-LZNJgPzfKR+/J3cHkxcpHKpKKvGfDZVPS4hfJCc4cCG0CgYzvlD6yE/S3CIL/Yt91ak327YCpiF/0MyeZHEHKA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@colors/colors": "^1.6.0", "@dabh/diagnostics": "^2.0.8", @@ -6641,6 +6648,7 @@ "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=10.0.0" }, diff --git a/src-admin/package.json b/src-admin/package.json index eab8ffd03..689dbcc91 100644 --- a/src-admin/package.json +++ b/src-admin/package.json @@ -1,7 +1,7 @@ { "name": "iobroker-admin-component-javascript", "private": true, - "version": "9.2.3", + "version": "9.2.4", "type": "module", "scripts": { "start": "vite --port 4173", @@ -13,8 +13,8 @@ "devDependencies": { "@emotion/react": "^11.14.0", "@emotion/styled": "^11.14.1", - "@iobroker/adapter-react-v5": "^8.2.6", - "@iobroker/json-config": "^8.4.3", + "@iobroker/adapter-react-v5": "^8.2.7", + "@iobroker/json-config": "^8.4.7", "@module-federation/runtime": "^2.2.3", "@module-federation/vite": "^1.13.1", "@mui/icons-material": "^6.5.0", diff --git a/src-editor/package-lock.json b/src-editor/package-lock.json index c6399f982..ab9170c82 100644 --- a/src-editor/package-lock.json +++ b/src-editor/package-lock.json @@ -1,12 +1,12 @@ { "name": "js", - "version": "9.2.3", + "version": "9.2.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "js", - "version": "9.2.3", + "version": "9.2.4", "dependencies": { "@blockly/field-colour": "^5.0.19", "@blockly/field-multilineinput": "^5.0.17", @@ -14,7 +14,7 @@ "@devbookhq/splitter": "^1.4.2", "@emotion/react": "^11.14.0", "@emotion/styled": "^11.14.1", - "@iobroker/adapter-react-v5": "^8.2.6", + "@iobroker/adapter-react-v5": "^8.2.7", "@iobroker/javascript-rules-dev": "^0.0.6", "@iobroker/type-detector": "^5.0.13", "@iobroker/types": "^7.1.2", @@ -34,7 +34,7 @@ "jszip": "^3.10.1", "moment": "^2.30.1", "monaco-editor": "~0.55.1", - "openai": "^6.39.0", + "openai": "^6.42.0", "react": "^18.3.1", "react-bem-helper": "^1.4.1", "react-dnd": "^16.0.1", @@ -197,6 +197,7 @@ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.0.tgz", "integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==", "license": "MIT", + "peer": true, "dependencies": { "@babel/code-frame": "^7.29.0", "@babel/generator": "^7.29.0", @@ -611,6 +612,7 @@ } ], "license": "MIT", + "peer": true, "engines": { "node": ">=20.19.0" }, @@ -659,6 +661,7 @@ } ], "license": "MIT", + "peer": true, "engines": { "node": ">=20.19.0" } @@ -761,6 +764,7 @@ "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.14.0.tgz", "integrity": "sha512-O000MLDBDdk/EohJPFUqvnp4qnHeYkVP5B0xEG0D/L7cOKP9kefu2DXn8dj74cQfsEzUqh+sr1RzFqiL1o+PpA==", "license": "MIT", + "peer": true, "dependencies": { "@babel/runtime": "^7.18.3", "@emotion/babel-plugin": "^11.13.5", @@ -804,6 +808,7 @@ "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.14.1.tgz", "integrity": "sha512-qEEJt42DuToa3gurlH4Qqc1kVpNq8wO8cJtDzU46TjlzWjDlsVyevtYCRijVq3SrHsROS+gVQ8Fnea108GnKzw==", "license": "MIT", + "peer": true, "dependencies": { "@babel/runtime": "^7.18.3", "@emotion/babel-plugin": "^11.13.5", @@ -1293,9 +1298,9 @@ } }, "node_modules/@iobroker/adapter-react-v5": { - "version": "8.2.6", - "resolved": "https://registry.npmjs.org/@iobroker/adapter-react-v5/-/adapter-react-v5-8.2.6.tgz", - "integrity": "sha512-tp6KsxF8WlMFem31eM0F6l+6nGKaHqDO2lxM0R+iTJsUzdV6TNwkP+LiqaWSi18HMpl5jnnPYHA7DgWeW4QJiA==", + "version": "8.2.7", + "resolved": "https://registry.npmjs.org/@iobroker/adapter-react-v5/-/adapter-react-v5-8.2.7.tgz", + "integrity": "sha512-kzapXA20Pvwqhgivdzuc0epMe1BeG77n6qbzA38ve2crkzeqMQzCrhdLtXie2Kp6eX7bcYAzgY//4ztM0gqPxw==", "license": "MIT", "dependencies": { "@iobroker/js-controller-common": "^7.1.2-alpha.0-20260409-feacb179d", @@ -1626,26 +1631,6 @@ "node": ">=10" } }, - "node_modules/@module-federation/dts-plugin/node_modules/node-fetch": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", - "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "data-uri-to-buffer": "^4.0.0", - "fetch-blob": "^3.1.4", - "formdata-polyfill": "^4.0.10" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/node-fetch" - } - }, "node_modules/@module-federation/dts-plugin/node_modules/ws": { "version": "8.18.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", @@ -1713,26 +1698,6 @@ "node": ">=10" } }, - "node_modules/@module-federation/managers/node_modules/node-fetch": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", - "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "data-uri-to-buffer": "^4.0.0", - "fetch-blob": "^3.1.4", - "formdata-polyfill": "^4.0.10" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/node-fetch" - } - }, "node_modules/@module-federation/runtime": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/@module-federation/runtime/-/runtime-2.2.3.tgz", @@ -1768,26 +1733,6 @@ } } }, - "node_modules/@module-federation/runtime-core/node_modules/node-fetch": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", - "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "data-uri-to-buffer": "^4.0.0", - "fetch-blob": "^3.1.4", - "formdata-polyfill": "^4.0.10" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/node-fetch" - } - }, "node_modules/@module-federation/runtime/node_modules/@module-federation/sdk": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/@module-federation/sdk/-/sdk-2.2.3.tgz", @@ -1802,26 +1747,6 @@ } } }, - "node_modules/@module-federation/runtime/node_modules/node-fetch": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", - "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "data-uri-to-buffer": "^4.0.0", - "fetch-blob": "^3.1.4", - "formdata-polyfill": "^4.0.10" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/node-fetch" - } - }, "node_modules/@module-federation/third-party-dts-extractor": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/@module-federation/third-party-dts-extractor/-/third-party-dts-extractor-2.2.2.tgz", @@ -1934,26 +1859,6 @@ "@types/estree": "^1.0.0" } }, - "node_modules/@module-federation/vite/node_modules/node-fetch": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", - "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "data-uri-to-buffer": "^4.0.0", - "fetch-blob": "^3.1.4", - "formdata-polyfill": "^4.0.10" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/node-fetch" - } - }, "node_modules/@mui/core-downloads-tracker": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-6.5.0.tgz", @@ -1969,6 +1874,7 @@ "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-6.5.0.tgz", "integrity": "sha512-VPuPqXqbBPlcVSA0BmnoE4knW4/xG6Thazo8vCLWkOKusko6DtwFV6B665MMWJ9j0KFohTIf3yx2zYtYacvG1g==", "license": "MIT", + "peer": true, "dependencies": { "@babel/runtime": "^7.26.0" }, @@ -1995,6 +1901,7 @@ "resolved": "https://registry.npmjs.org/@mui/material/-/material-6.5.0.tgz", "integrity": "sha512-yjvtXoFcrPLGtgKRxFaH6OQPtcLPhkloC0BML6rBG5UeldR0nPULR/2E2BfXdo5JNV7j7lOzrrLX2Qf/iSidow==", "license": "MIT", + "peer": true, "dependencies": { "@babel/runtime": "^7.26.0", "@mui/core-downloads-tracker": "^6.5.0", @@ -2151,7 +2058,6 @@ "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-7.3.9.tgz", "integrity": "sha512-ErIyRQvsiQEq7Yvcvfw9UDHngaqjMy9P3JDPnRAaKG5qhpl2C4tX/W1S4zJvpu+feihmZJStjIyvnv6KDbIrlw==", "license": "MIT", - "peer": true, "dependencies": { "@babel/runtime": "^7.28.6", "@mui/utils": "^7.3.9", @@ -2179,7 +2085,6 @@ "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.4.12.tgz", "integrity": "sha512-iKNAF2u9PzSIj40CjvKJWxFXJo122jXVdrmdh0hMYd+FR+NuJMkr/L88XwWLCRiJ5P1j+uyac25+Kp6YC4hu6w==", "license": "MIT", - "peer": true, "dependencies": { "@babel/runtime": "^7.28.6" }, @@ -2197,7 +2102,6 @@ "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-7.3.9.tgz", "integrity": "sha512-U6SdZaGbfb65fqTsH3V5oJdFj9uYwyLE2WVuNvmbggTSDBb8QHrFsqY8BN3taK9t3yJ8/BPHD/kNvLNyjwM7Yw==", "license": "MIT", - "peer": true, "dependencies": { "@babel/runtime": "^7.28.6", "@mui/types": "^7.4.12", @@ -2227,15 +2131,13 @@ "version": "19.2.4", "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.2.4.tgz", "integrity": "sha512-W+EWGn2v0ApPKgKKCy/7s7WHXkboGcsrXE+2joLyVxkbyVQfO3MUEaUQDHoSmb8TFFrSKYa9mw64WZHNHSDzYA==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/@mui/styled-engine": { "version": "7.3.9", "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-7.3.9.tgz", "integrity": "sha512-JqujWt5bX4okjUPGpVof/7pvgClqh7HvIbsIBIOOlCh2u3wG/Bwp4+E1bc1dXSwkrkp9WUAoNdI5HEC+5HKvMw==", "license": "MIT", - "peer": true, "dependencies": { "@babel/runtime": "^7.28.6", "@emotion/cache": "^11.14.0", @@ -2270,7 +2172,6 @@ "resolved": "https://registry.npmjs.org/@mui/system/-/system-7.3.9.tgz", "integrity": "sha512-aL1q9am8XpRrSabv9qWf5RHhJICJql34wnrc1nz0MuOglPRYF/liN+c8VqZdTvUn9qg+ZjRVbKf4sJVFfIDtmg==", "license": "MIT", - "peer": true, "dependencies": { "@babel/runtime": "^7.28.6", "@mui/private-theming": "^7.3.9", @@ -2311,7 +2212,6 @@ "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.4.12.tgz", "integrity": "sha512-iKNAF2u9PzSIj40CjvKJWxFXJo122jXVdrmdh0hMYd+FR+NuJMkr/L88XwWLCRiJ5P1j+uyac25+Kp6YC4hu6w==", "license": "MIT", - "peer": true, "dependencies": { "@babel/runtime": "^7.28.6" }, @@ -2329,7 +2229,6 @@ "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-7.3.9.tgz", "integrity": "sha512-U6SdZaGbfb65fqTsH3V5oJdFj9uYwyLE2WVuNvmbggTSDBb8QHrFsqY8BN3taK9t3yJ8/BPHD/kNvLNyjwM7Yw==", "license": "MIT", - "peer": true, "dependencies": { "@babel/runtime": "^7.28.6", "@mui/types": "^7.4.12", @@ -2359,8 +2258,7 @@ "version": "19.2.4", "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.2.4.tgz", "integrity": "sha512-W+EWGn2v0ApPKgKKCy/7s7WHXkboGcsrXE+2joLyVxkbyVQfO3MUEaUQDHoSmb8TFFrSKYa9mw64WZHNHSDzYA==", - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/@mui/types": { "version": "7.2.24", @@ -3611,6 +3509,7 @@ "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.28.tgz", "integrity": "sha512-z9VXpC7MWrhfWipitjNdgCauoMLRdIILQsAEV+ZesIzBq/oUlxk0m3ApZuMFCXdnS4U7KrI+l3WRUEGQ8K1QKw==", "license": "MIT", + "peer": true, "dependencies": { "@types/prop-types": "*", "csstype": "^3.2.2" @@ -3993,6 +3892,7 @@ "resolved": "https://registry.npmjs.org/blockly/-/blockly-11.2.2.tgz", "integrity": "sha512-YJW9jMz4qoBXzOOUqxWBOHL35QhOOTAg2a6sVAFJh+/uNTXW0z506JS7qkqZI4PQ9fnUhDqmhF8a0qWSTL1tjg==", "license": "Apache-2.0", + "peer": true, "dependencies": { "jsdom": "25.0.1" }, @@ -4181,6 +4081,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "baseline-browser-mapping": "^2.9.0", "caniuse-lite": "^1.0.30001759", @@ -4678,6 +4579,7 @@ } ], "license": "MIT", + "peer": true, "engines": { "node": ">=18" }, @@ -4700,6 +4602,7 @@ } ], "license": "MIT", + "peer": true, "engines": { "node": ">=18" } @@ -4728,7 +4631,6 @@ "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", "license": "MIT", "optional": true, - "peer": true, "engines": { "node": ">= 12" } @@ -5228,7 +5130,6 @@ ], "license": "MIT", "optional": true, - "peer": true, "dependencies": { "node-domexception": "^1.0.0", "web-streams-polyfill": "^3.0.3" @@ -5379,7 +5280,6 @@ "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", "license": "MIT", "optional": true, - "peer": true, "dependencies": { "fetch-blob": "^3.1.2" }, @@ -6416,6 +6316,7 @@ "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.55.1.tgz", "integrity": "sha512-jz4x+TJNFHwHtwuV9vA9rMujcZRb0CEilTEwG2rRSpe/A7Jdkuj8xPKttCgOh+v/lkHy7HsZ64oj+q3xoAFl9A==", "license": "MIT", + "peer": true, "dependencies": { "dompurify": "3.2.7", "marked": "14.0.0" @@ -6486,7 +6387,6 @@ ], "license": "MIT", "optional": true, - "peer": true, "engines": { "node": ">=10.5.0" } @@ -6647,13 +6547,10 @@ } }, "node_modules/openai": { - "version": "6.39.0", - "resolved": "https://registry.npmjs.org/openai/-/openai-6.39.0.tgz", - "integrity": "sha512-O61LIsimY3acVabwvomwFhwrnN36yvHY2quIfy9keEcFytGgWeV35yLHQ6NVMLSBxRpHmcg2yuhCnlu2HT4pLQ==", + "version": "6.42.0", + "resolved": "https://registry.npmjs.org/openai/-/openai-6.42.0.tgz", + "integrity": "sha512-1WFEt/uXMXOLhYRNkgJWo08Y2YNvNwpVU72K7ibrWgWpNOXd4VojXLbe6SQ4bLiUQ3Y8jz4IiyVkylJCL1DtZg==", "license": "Apache-2.0", - "bin": { - "openai": "bin/cli" - }, "peerDependencies": { "ws": "^8.18.0", "zod": "^3.25 || ^4.0" @@ -6857,6 +6754,7 @@ "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", "license": "MIT", + "peer": true, "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -6921,6 +6819,7 @@ "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", "license": "MIT", + "peer": true, "dependencies": { "loose-envify": "^1.1.0" }, @@ -7055,6 +6954,7 @@ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", "license": "MIT", + "peer": true, "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.2" @@ -7504,6 +7404,7 @@ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.52.5.tgz", "integrity": "sha512-3GuObel8h7Kqdjt0gxkEzaifHTqLVW56Y/bjN7PSQtkKr0w3V/QYSdt6QWYtd7A1xUtYQigtdUfgj1RvWVtorw==", "license": "MIT", + "peer": true, "dependencies": { "@types/estree": "1.0.8" }, @@ -7609,6 +7510,7 @@ "resolved": "https://registry.npmjs.org/sass/-/sass-1.100.0.tgz", "integrity": "sha512-B5j0rYMlinhhOo9tjQebMVVn0TfyXAF+wB3b2ggZUuJ/is/Y+7+JGjirAMxHZ9Z3hIP98NPfamlAkBHa1lAaXQ==", "license": "MIT", + "peer": true, "dependencies": { "chokidar": "^5.0.0", "immutable": "^5.1.5", @@ -7876,6 +7778,7 @@ "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-6.4.2.tgz", "integrity": "sha512-xZBhBJsMtGqb+aKcwKgaT+BtuFums9VynX2JRvXJGTx5UfZzN12rk5r4nVdhXYvRw+hE7yiYxVrOqJZaK2+Txg==", "license": "MIT", + "peer": true, "dependencies": { "@emotion/is-prop-valid": "1.4.0", "css-to-react-native": "3.2.0", @@ -8324,6 +8227,7 @@ "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.1.tgz", "integrity": "sha512-w+N7Hifpc3gRjZ63vYBXA56dvvRlNWRczTdmCBBa+CotUzAPf5b7YMdMR/8CQoeYE5LX3W4wj6RYTgonm1b9DA==", "license": "MIT", + "peer": true, "dependencies": { "esbuild": "^0.27.0", "fdir": "^6.5.0", @@ -8568,7 +8472,6 @@ "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", "license": "MIT", "optional": true, - "peer": true, "engines": { "node": ">= 8" } @@ -8658,6 +8561,7 @@ "resolved": "https://registry.npmjs.org/winston/-/winston-3.19.0.tgz", "integrity": "sha512-LZNJgPzfKR+/J3cHkxcpHKpKKvGfDZVPS4hfJCc4cCG0CgYzvlD6yE/S3CIL/Yt91ak327YCpiF/0MyeZHEHKA==", "license": "MIT", + "peer": true, "dependencies": { "@colors/colors": "^1.6.0", "@dabh/diagnostics": "^2.0.8", @@ -8779,6 +8683,7 @@ "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", "license": "MIT", + "peer": true, "engines": { "node": ">=10.0.0" }, diff --git a/src-editor/package.json b/src-editor/package.json index 3d7d0fab1..503c7d39b 100644 --- a/src-editor/package.json +++ b/src-editor/package.json @@ -1,6 +1,6 @@ { "name": "js", - "version": "9.2.3", + "version": "9.2.4", "private": true, "type": "module", "dependencies": { @@ -10,7 +10,7 @@ "@devbookhq/splitter": "^1.4.2", "@emotion/react": "^11.14.0", "@emotion/styled": "^11.14.1", - "@iobroker/adapter-react-v5": "^8.2.6", + "@iobroker/adapter-react-v5": "^8.2.7", "@iobroker/javascript-rules-dev": "^0.0.6", "@iobroker/type-detector": "^5.0.13", "@iobroker/types": "^7.1.2", @@ -30,7 +30,7 @@ "jszip": "^3.10.1", "moment": "^2.30.1", "monaco-editor": "~0.55.1", - "openai": "^6.39.0", + "openai": "^6.42.0", "react": "^18.3.1", "react-bem-helper": "^1.4.1", "react-dnd": "^16.0.1", diff --git a/src-editor/src/AiChat/AiToolExecutor.ts b/src-editor/src/AiChat/AiToolExecutor.ts index 18ac76250..6607c98e5 100644 --- a/src-editor/src/AiChat/AiToolExecutor.ts +++ b/src-editor/src/AiChat/AiToolExecutor.ts @@ -124,6 +124,39 @@ export const IOBROKER_TOOLS = [ }, }, }, + { + type: 'function' as const, + function: { + name: 'run_script', + description: + 'Execute a JavaScript or TypeScript snippet in the live ioBroker javascript engine and get back everything it logged. The code runs with the full script API (log, console.*, setState, getState, on, schedule, $, exec, httpGet, …) in VERBOSE mode, so internal operations (setState/getState/subscribe/…) are logged too — ideal for diagnosing behaviour or inspecting values. The snippet runs for a short window and is then automatically STOPPED and fully cleaned up (timers, subscriptions, schedules removed); it does NOT create a persistent script. Use `log(...)` or `console.log(...)` in the code to surface the values you want to inspect. WARNING: side effects are real (e.g. setState changes actual devices) — prefer read-only diagnostics unless the user explicitly asked to change something.', + parameters: { + type: 'object', + properties: { + source: { + type: 'string', + description: + 'The JavaScript (or TypeScript) source to execute. Log the values you want to inspect via log(...) / console.log(...). Top-level await is supported.', + }, + engineType: { + type: 'string', + description: 'Optional. "TypeScript/ts" to run the code as TypeScript. Defaults to JavaScript.', + }, + timeout: { + type: 'number', + description: + 'Optional. Milliseconds to keep the script alive to collect asynchronous logs before it is stopped (default 5000, max 60000). Increase when waiting for timers, subscriptions or HTTP responses.', + }, + logLevel: { + type: 'string', + description: + 'Optional minimum severity to return: silly, debug, info, warn, error. Default silly (everything).', + }, + }, + required: ['source'], + }, + }, + }, // ─── Monaco editor interaction ────────────────────────────────────────── { @@ -592,12 +625,67 @@ function editorApiMissing(): string { }); } +interface ExecuteResult { + ok: boolean; + error?: string; + engineType?: string; + runtime?: number; + truncated?: boolean; + logs?: { ts: number; severity: string; message: string }[]; + output?: string; +} + +/** + * Run an ad-hoc script in the live javascript engine via the adapter's "execute" message and + * return the collected logs. The script is ephemeral – the backend stops and cleans it up after + * the collection window. + */ +async function runScript( + socket: AdminConnection, + instanceId: string | undefined, + args: Record, +): Promise { + if (!instanceId) { + return JSON.stringify({ error: 'No running javascript instance found to execute the script.' }); + } + const source = args.source; + if (!source || typeof source !== 'string') { + return JSON.stringify({ error: 'No source code provided.' }); + } + try { + const result = (await socket.sendTo(instanceId, 'execute', { + source, + engineType: args.engineType, + timeout: args.timeout, + logLevel: args.logLevel, + })) as ExecuteResult | null; + + if (!result || result.ok === false) { + return JSON.stringify({ + error: result?.error || 'Execution failed', + logs: result?.logs || [], + }); + } + return JSON.stringify({ + engineType: result.engineType, + runtime: result.runtime, + truncated: result.truncated || false, + logCount: result.logs?.length || 0, + logs: result.logs || [], + output: result.output || '', + }); + } catch (e) { + return JSON.stringify({ error: `Failed to execute script: ${e instanceof Error ? e.message : String(e)}` }); + } +} + /** Execute a tool call and return the result as a string. */ export async function executeToolCall( socket: AdminConnection, toolCall: ToolCall, scripts?: ScriptInfo[], editorApi?: EditorApi, + instanceId?: string, ): Promise { let args: Record; try { @@ -625,6 +713,8 @@ export async function executeToolCall( return readScript(scripts || [], args.id as string); case 'list_scripts': return listScripts(scripts || []); + case 'run_script': + return runScript(socket, instanceId, args); // ── Monaco editor tools (editorApi may be undefined if the editor isn't mounted) ── case 'get_editor_selection': { diff --git a/src-editor/src/AiChat/__tests__/editorTools.test.ts b/src-editor/src/AiChat/__tests__/editorTools.test.ts index 2d682ed2f..d2f0e0ea9 100644 --- a/src-editor/src/AiChat/__tests__/editorTools.test.ts +++ b/src-editor/src/AiChat/__tests__/editorTools.test.ts @@ -207,6 +207,69 @@ describe('editor tool handlers', () => { }); }); + describe('run_script', () => { + it('sends an "execute" message to the instance and returns the collected logs', async () => { + const sendTo = vi.fn().mockResolvedValue({ + ok: true, + engineType: 'Javascript/js', + runtime: 5000, + truncated: false, + logs: [{ ts: 1, severity: 'info', message: 'hello' }], + output: '[info] hello', + }); + const socket = { sendTo } as any; + const res = JSON.parse( + await executeToolCall( + socket, + toolCall('run_script', { source: 'log("hello");' }), + [], + undefined, + 'javascript.0', + ), + ); + expect(sendTo).toHaveBeenCalledWith('javascript.0', 'execute', { + source: 'log("hello");', + engineType: undefined, + timeout: undefined, + logLevel: undefined, + }); + expect(res.logCount).toBe(1); + expect(res.output).toBe('[info] hello'); + expect(res.logs[0].message).toBe('hello'); + }); + + it('reports an error when no instance is available', async () => { + const res = JSON.parse( + await executeToolCall(stubSocket, toolCall('run_script', { source: 'log(1);' }), [], undefined), + ); + expect(res.error).toContain('No running javascript instance'); + }); + + it('reports an error when no source is provided', async () => { + const socket = { sendTo: vi.fn() } as any; + const res = JSON.parse( + await executeToolCall(socket, toolCall('run_script', {}), [], undefined, 'javascript.0'), + ); + expect(res.error).toContain('No source code'); + }); + + it('surfaces a backend execution error', async () => { + const socket = { + sendTo: vi.fn().mockResolvedValue({ ok: false, error: 'TypeScript compilation failed', logs: [] }), + } as any; + const res = JSON.parse( + await executeToolCall( + socket, + toolCall('run_script', { source: 'const x: =' }), + [], + undefined, + 'javascript.0', + ), + ); + expect(res.error).toContain('TypeScript compilation failed'); + }); + }); + describe('backward compatibility', () => { it('existing ioBroker tools still work without editorApi', async () => { const res = JSON.parse(await executeToolCall(stubSocket, toolCall('unknown_tool_name'), [])); diff --git a/src-editor/src/AiChat/useAiChat.ts b/src-editor/src/AiChat/useAiChat.ts index 6a4b77f84..4165d1e50 100644 --- a/src-editor/src/AiChat/useAiChat.ts +++ b/src-editor/src/AiChat/useAiChat.ts @@ -317,6 +317,8 @@ ioBroker object hierarchy: adapter.instance.device.channel.state - The channel/device often has the human-readable name (e.g. "Living Room Sensor") When looking up info about a datapoint, ALWAYS also check its parent channel/device for the device name and context. Use get_object_info which returns the full parent hierarchy automatically. +To verify code or diagnose runtime behaviour, you can use the run_script tool: it executes a JavaScript/TypeScript snippet in the live engine (verbose mode) and returns everything it logged, then auto-stops it. Log the values you want to inspect via log(...) / console.log(...). It runs against the live system, so prefer read-only diagnostics (getState, $, getObject) and only call setState when the user explicitly asked to change something. + Available API and syntax rules: ${docsRef.current}`; @@ -761,7 +763,7 @@ ${docsRef.current}`; // Execute each tool call and add results for (const toolCall of result.tool_calls) { - const toolResult = await executeToolCall(socket, toolCall, allScripts, editorApi); + const toolResult = await executeToolCall(socket, toolCall, allScripts, editorApi, instanceId); currentMessages.push({ role: 'tool', tool_call_id: toolCall.id, diff --git a/src-editor/src/types.d.ts b/src-editor/src/types.d.ts index cb034ec01..f07f96a32 100644 --- a/src-editor/src/types.d.ts +++ b/src-editor/src/types.d.ts @@ -27,7 +27,18 @@ export interface JavaScriptAdapterConfig { maxSetStatePerMinute: number; maxTriggersPerScript: number; gptKey: string; + claudeKey: string; + geminiKey: string; + deepseekKey: string; + gptBaseUrlKey: string; + gptBaseUrl: string; password?: string; + credentialType?: 'manual' | 'manager'; + credentialIdGptKey?: string; + credentialIdClaudeKey?: string; + credentialIdGeminiKey?: string; + credentialIdDeepseekKey?: string; + credentialIdGptBaseUrlKey?: string; } export type LogMessage = { diff --git a/src/lib/aiProviderResolver.ts b/src/lib/aiProviderResolver.ts index 33fb8364a..15ded4373 100644 --- a/src/lib/aiProviderResolver.ts +++ b/src/lib/aiProviderResolver.ts @@ -17,6 +17,18 @@ export interface AiConfigSlice { claudeKey?: string; geminiKey?: string; deepseekKey?: string; + /** + * Where the API keys come from: + * - `manual`: keys are stored directly in the adapter config (encryptedNative) + * - `manager`: the config only stores the ID of a credential in the central + * ioBroker credential store (`system.credentials.*`), resolved at runtime + */ + credentialType?: 'manual' | 'manager'; + credentialIdGptKey?: string; + credentialIdClaudeKey?: string; + credentialIdGeminiKey?: string; + credentialIdDeepseekKey?: string; + credentialIdGptBaseUrlKey?: string; } export type AiProvider = 'openai' | 'anthropic' | 'gemini' | 'deepseek' | 'custom'; @@ -30,6 +42,28 @@ export const PROVIDER_KEY_FIELD: Record = { custom: 'gptBaseUrlKey', }; +/** + * Maps each provider to the adapter-config field holding the ID of its credential + * in the central credential store (used in `manager` mode). + */ +export const PROVIDER_CREDENTIAL_ID_FIELD: Record = { + openai: 'credentialIdGptKey', + anthropic: 'credentialIdClaudeKey', + gemini: 'credentialIdGeminiKey', + deepseek: 'credentialIdDeepseekKey', + custom: 'credentialIdGptBaseUrlKey', +}; + +/** + * Returns the configured credential ID (e.g. `system.credentials.anthropic`) for a provider + * in `manager` mode, or an empty string if none/unknown provider. + */ +export function getProviderCredentialId(config: AiConfigSlice | undefined | null, provider: string): string { + const cfg = config || {}; + const field = PROVIDER_CREDENTIAL_ID_FIELD[provider as AiProvider]; + return field ? (cfg[field] || '').toString().trim() : ''; +} + /** * Resolve API key and base URL for a provider from adapter config. * Optional `messageBaseUrl` takes precedence over the stored `gptBaseUrl` @@ -82,18 +116,25 @@ export function listAvailableProviders( ): { provider: AiProvider; baseUrl?: string }[] { const cfg = config || {}; const providers: { provider: AiProvider; baseUrl?: string }[] = []; - if ((cfg.gptKey || '').trim()) { + const manager = cfg.credentialType === 'manager'; + // A key-based provider is "available" if it has a stored key (manual mode) + // or a selected credential ID (manager mode). + const has = (provider: AiProvider, key: string | undefined | null): boolean => + manager ? !!getProviderCredentialId(cfg, provider) : !!(key || '').trim(); + if (has('openai', cfg.gptKey)) { providers.push({ provider: 'openai' }); } - if ((cfg.claudeKey || '').trim()) { + if (has('anthropic', cfg.claudeKey)) { providers.push({ provider: 'anthropic' }); } - if ((cfg.geminiKey || '').trim()) { + if (has('gemini', cfg.geminiKey)) { providers.push({ provider: 'gemini' }); } - if ((cfg.deepseekKey || '').trim()) { + if (has('deepseek', cfg.deepseekKey)) { providers.push({ provider: 'deepseek' }); } + // The custom/OpenAI-compatible endpoint is identified by its base URL (the key is optional, + // e.g. local Ollama), so its availability does not depend on the credential mode. if ((cfg.gptBaseUrl || '').trim()) { providers.push({ provider: 'custom', baseUrl: cfg.gptBaseUrl }); } diff --git a/src/main.ts b/src/main.ts index 3f94ceb52..c1e628656 100644 --- a/src/main.ts +++ b/src/main.ts @@ -38,7 +38,13 @@ import * as axios from 'axios'; import * as wake_on_lan from 'wake_on_lan'; import * as nodeSchedule from 'node-schedule'; -import { getAbsoluteDefaultDataDir, Adapter, EXIT_CODES, type AdapterOptions } from '@iobroker/adapter-core'; +import { + getAbsoluteDefaultDataDir, + Adapter, + Credentials, + EXIT_CODES, + type AdapterOptions, +} from '@iobroker/adapter-core'; import type SentryPlugin from '@iobroker/plugin-sentry'; import type { GetTimesResult } from 'suncalc'; import type { CompileResult } from 'virtual-tsc/build/util'; @@ -48,7 +54,12 @@ import ProtectFs from './lib/protectFs'; import { setLanguage, getLanguage } from './lib/words'; import { sandBox, removeFromDispatchIndex } from './lib/sandbox'; import { requestModuleNameByUrl } from './lib/nodeModulesManagement'; -import { resolveProviderCredentials, resolveTestCredentials, listAvailableProviders } from './lib/aiProviderResolver'; +import { + resolveProviderCredentials, + resolveTestCredentials, + listAvailableProviders, + getProviderCredentialId, +} from './lib/aiProviderResolver'; import { translateToolsToAnthropic, translateMessagesToAnthropic, @@ -393,6 +404,15 @@ class JavaScript extends Adapter { private setStateCountCheckInterval: NodeJS.Timeout | null = null; + /** + * Decrypted AI API keys cached from the central credential store (manager mode), + * keyed by credential ID (e.g. `system.credentials.anthropic`). Kept fresh by the + * subscriptions set up in `subscribeAiCredentials`. + */ + private readonly aiCredentialCache: Map = new Map(); + /** Unsubscribe callbacks for the AI credential subscriptions (manager mode). */ + private aiCredentialUnsubscribers: (() => Promise)[] = []; + private globalScript = ''; /** Generated declarations for global TypeScripts */ private globalDeclarations = ''; @@ -400,6 +420,8 @@ class JavaScript extends Adapter { // have access to, because it depends on the compilation order private knownGlobalDeclarationsByScript: Record = {}; private globalScriptLines = 0; + /** Running counter to build unique names for ad-hoc scripts started via the "execute" message */ + private executeCounter = 0; // compiler instance for typescript private tsServer: Server; @@ -879,6 +901,7 @@ class JavaScript extends Adapter { clearInterval(this.setStateCountCheckInterval); this.setStateCountCheckInterval = null; } + await this.unsubscribeAiCredentials(); await this.stopAllScripts(); } catch (err: unknown) { this.log.error(`Error during unload: ${(err as Error).message}`); @@ -944,6 +967,132 @@ class JavaScript extends Adapter { await this.main(); } + /** Read and decrypt a single AI credential's key from the central store; returns '' (and logs) on error. */ + private async readAiCredentialKey(id: string): Promise { + if (!Credentials?.getCredentials) { + this.log.warn( + `Cannot read AI credential "${id}": Credentials API is only with 7.2 js-controller available`, + ); + return ''; + } + try { + const cred = await Credentials.getCredentials(this, id); + return (cred?.values?.key || '').trim(); + } catch (e) { + this.log.warn(`Cannot read AI credential "${id}": ${e instanceof Error ? e.message : String(e)}`); + return ''; + } + } + + /** + * Resolve the API key (and base URL) for an AI provider. + * + * In `manual` mode the key comes from the encryptedNative adapter config. + * In `manager` mode the config only stores the ID of a credential in the central + * ioBroker credential store (`system.credentials.*`); the actual key is taken from the + * `aiCredentialCache` (kept fresh by `subscribeAiCredentials`) or, for credentials we are + * not subscribed to (e.g. a not-yet-saved selection in the settings dialog), read directly. + * + * The settings-dialog Test button may pass form values that are not saved yet + * (`messageApiKey` / `messageCredentialId` / `credentialType`); those win over the stored config. + */ + private async resolveAiCredentials( + provider: string, + opts: { + messageBaseUrl?: string; + messageApiKey?: string; + messageCredentialId?: string; + credentialType?: 'manual' | 'manager'; + } = {}, + ): Promise<{ apiKey: string; baseUrl: string }> { + const mode = opts.credentialType || this.config.credentialType || 'manual'; + if (mode === 'manager') { + // The base URL is not a secret and is resolved the same way in both modes. + const { baseUrl } = resolveProviderCredentials(this.config, provider, opts.messageBaseUrl); + const id = (opts.messageCredentialId || getProviderCredentialId(this.config, provider)).trim(); + if (!id) { + return { apiKey: '', baseUrl }; + } + // Prefer the cached value kept fresh by the credential subscription. + const cached = this.aiCredentialCache.get(id); + const apiKey = cached !== undefined ? cached : await this.readAiCredentialKey(id); + return { apiKey, baseUrl }; + } + // Manual mode. The Test button sends the current form key (maybe empty) — let it win. + if (opts.messageApiKey !== undefined) { + return resolveTestCredentials(this.config, provider, opts.messageApiKey, opts.messageBaseUrl); + } + return resolveProviderCredentials(this.config, provider, opts.messageBaseUrl); + } + + /** + * In `manager` mode, subscribe to all configured AI credentials so that edits made in the + * admin credential manager (Settings → Credentials) are picked up live, without restarting + * the adapter (the `system.credentials.*` objects are global, not part of the instance config). + * The decrypted keys are cached and kept fresh by the subscription handlers. + */ + private async subscribeAiCredentials(): Promise { + // Always start from a clean state (idempotent — also used to re-subscribe). + await this.unsubscribeAiCredentials(); + if (this.config.credentialType !== 'manager') { + return; + } + if (!Credentials?.subscribeCredentials) { + this.log.warn(`Cannot subscribe AI credential: Credentials API is only with 7.2 js-controller available`); + return; + } + // Collect the distinct credential IDs configured across all AI providers. + const ids = new Set(); + for (const provider of ['openai', 'anthropic', 'gemini', 'deepseek', 'custom'] as const) { + const id = getProviderCredentialId(this.config, provider); + if (id) { + ids.add(id); + } + } + for (const id of ids) { + try { + const unsubscribe = await Credentials.subscribeCredentials( + this, + id, + (changedId, cred) => { + if (cred) { + this.aiCredentialCache.set(changedId, (cred.values?.key || '').trim()); + this.log.debug(`AI credential "${changedId}" updated`); + } else { + // The credential was deleted + this.aiCredentialCache.delete(changedId); + this.log.debug(`AI credential "${changedId}" was deleted`); + } + }, + ); + this.aiCredentialUnsubscribers.push(unsubscribe); + // Prime the cache with the current value (the handler may only fire on later changes). + this.aiCredentialCache.set(id, await this.readAiCredentialKey(id)); + } catch (e) { + this.log.warn( + `Cannot subscribe to AI credential "${id}": ${e instanceof Error ? e.message : String(e)}`, + ); + } + } + if (this.aiCredentialUnsubscribers.length) { + this.log.debug(`Subscribed to ${this.aiCredentialUnsubscribers.length} AI credential(s)`); + } + } + + /** Tear down all AI credential subscriptions and clear the cache. */ + private async unsubscribeAiCredentials(): Promise { + const unsubscribers = this.aiCredentialUnsubscribers; + this.aiCredentialUnsubscribers = []; + this.aiCredentialCache.clear(); + for (const unsubscribe of unsubscribers) { + try { + await unsubscribe(); + } catch (e) { + this.log.warn(`Cannot unsubscribe from AI credential: ${e instanceof Error ? e.message : String(e)}`); + } + } + } + onMessage(obj: ioBroker.Message): void { switch (obj?.command) { // process messageTo commands @@ -1245,25 +1394,30 @@ class JavaScript extends Adapter { case 'chatCompletion': { // Proxy chat completion requests to an OpenAI-compatible API endpoint. - // API keys are resolved server-side from encryptedNative config — they never - // leave the adapter (frontend only sends `provider`, not the key). - if (obj.callback) { + // API keys are resolved server-side from the encryptedNative config or the central + // credentials manager — they never leave the adapter (frontend only sends `provider`). + void (async () => { + if (!obj.callback) { + return; + } const chatModel = (obj.message?.model || '').trim(); const messages = obj.message?.messages; const tools = obj.message?.tools; const provider = (obj.message?.provider || 'openai').trim(); - const { apiKey, baseUrl } = resolveProviderCredentials(this.config, provider, obj.message?.baseUrl); + const { apiKey, baseUrl } = await this.resolveAiCredentials(provider, { + messageBaseUrl: obj.message?.baseUrl, + }); // Anthropic, Gemini, and DeepSeek always require an API key; OpenAI-compatible allows empty key with custom base URL if ( !apiKey && (provider === 'anthropic' || provider === 'gemini' || provider === 'deepseek' || !baseUrl) ) { this.sendTo(obj.from, obj.command, { error: 'No API key provided' }, obj.callback); - break; + return; } if (!chatModel || !messages) { this.sendTo(obj.from, obj.command, { error: 'Model and messages are required' }, obj.callback); - break; + return; } let url: string; @@ -1320,7 +1474,7 @@ class JavaScript extends Adapter { const resolved = resolveRequestModule(url); if (!resolved) { this.sendTo(obj.from, obj.command, { error: `Invalid API URL: ${url}` }, obj.callback); - break; + return; } const { module: requestModule, isHttps } = resolved; @@ -1425,7 +1579,7 @@ class JavaScript extends Adapter { obj.callback, ); } - } + })(); break; } @@ -1433,21 +1587,24 @@ class JavaScript extends Adapter { // Test connection to an OpenAI-compatible API endpoint. // The settings-dialog Test button sends the current form value as `apiKey` // (so users can test before saving); otherwise we fall back to the stored key. - if (obj.callback) { + void (async () => { + if (!obj.callback) { + return; + } const provider = (obj.message?.provider || 'openai').trim(); - const { apiKey, baseUrl } = resolveTestCredentials( - this.config, - provider, - obj.message?.apiKey, - obj.message?.baseUrl, - ); + const { apiKey, baseUrl } = await this.resolveAiCredentials(provider, { + messageApiKey: obj.message?.apiKey, + messageBaseUrl: obj.message?.baseUrl, + messageCredentialId: obj.message?.credentialId, + credentialType: obj.message?.credentialType, + }); // Anthropic, Gemini, and DeepSeek always require an API key; OpenAI-compatible allows empty key with custom base URL if ( !apiKey && (provider === 'anthropic' || provider === 'gemini' || provider === 'deepseek' || !baseUrl) ) { this.sendTo(obj.from, obj.command, { error: 'No API key provided' }, obj.callback); - break; + return; } let url: string; @@ -1477,7 +1634,7 @@ class JavaScript extends Adapter { const resolved = resolveRequestModule(url); if (!resolved) { this.sendTo(obj.from, obj.command, { error: `Invalid API URL: ${url}` }, obj.callback); - break; + return; } const { module: requestModule, isHttps } = resolved; @@ -1577,7 +1734,7 @@ class JavaScript extends Adapter { obj.callback, ); } - } + })(); break; } @@ -1629,6 +1786,27 @@ class JavaScript extends Adapter { } break; } + + case 'execute': { + if (obj.callback) { + void this.executeScript(obj.message) + .then(result => this.sendTo(obj.from, obj.command, result, obj.callback)) + .catch(err => + this.sendTo( + obj.from, + obj.command, + { + ok: false, + error: `Internal error: ${err as Error}`, + logs: [], + output: '', + }, + obj.callback, + ), + ); + } + break; + } } } @@ -1771,6 +1949,10 @@ class JavaScript extends Adapter { // without setting the global process.env.NODE_TLS_REJECT_UNAUTHORIZED (which affects all adapters in compact mode) this.context.allowSelfSignedCerts = this.config.allowSelfSignedCerts; + // In `manager` credential mode, subscribe to the configured AI credentials so changes in the + // central credential store are picked up live (the keys are cached for the AI sendTo handlers). + await this.subscribeAiCredentials(); + const doc = await this.getObjectViewAsync('script', 'javascript', {}); if (doc?.rows?.length) { // sort global scripts if configured @@ -2640,7 +2822,20 @@ class JavaScript extends Adapter { } } - execute(script: JsScript, name: string, engineType: ScriptType, verbose: boolean, debug: boolean): void { + execute( + script: JsScript, + name: string, + engineType: ScriptType, + verbose: boolean, + debug: boolean, + /** + * Optional sink for the "execute" message API. When provided, the script runs in an + * ephemeral diagnostic mode: every log line (the script's own `log()`/`console.*` output + * AND all verbose internal operations) is forwarded to this collector instead of the + * adapter log, and no `scriptProblem` state is written. + */ + logCollector?: ((severity: ioBroker.LogLevel, message: string) => void) | null, + ): void { script.intervals = new Set(); script.timeouts = new Set(); script.schedules = []; @@ -2652,14 +2847,29 @@ class JavaScript extends Adapter { script.subscribesFile = {}; script.setStatePerMinuteCounter = 0; script.setStatePerMinuteProblemCounter = 0; - void this.setState(`scriptProblem.${name.substring(SCRIPT_CODE_MARKER.length)}`, { - val: false, - ack: true, - expire: 1000, - }); + if (!logCollector) { + void this.setState(`scriptProblem.${name.substring(SCRIPT_CODE_MARKER.length)}`, { + val: false, + ack: true, + expire: 1000, + }); + } const sandbox = sandBox(script, name, verbose, debug, this.context); + // Redirect every log line into the collector. As `console.*`, the global `log()` and all + // `sandbox.verbose && sandbox.log(...)` calls go through `sandbox.log`, this captures the + // full picture for the caller while keeping the adapter log clean. + if (logCollector) { + sandbox.log = (msg: string, severity?: ioBroker.LogLevel): void => { + let text: unknown = msg; + if (text && typeof text !== 'string') { + text = util.format(text); + } + logCollector(severity || 'info', text as string); + }; + } + try { script.script.runInNewContext(sandbox, { filename: name, @@ -2667,13 +2877,162 @@ class JavaScript extends Adapter { // lineOffset: this.globalScriptLines }); } catch (err: unknown) { - void this.setState(`scriptProblem.${name.substring(SCRIPT_CODE_MARKER.length)}`, { - val: true, - ack: true, - c: 'execute', - }); - this.logError(name, 'Error by run:', err as Error); + if (logCollector) { + const e = err as Error; + const stack = (e?.stack ? e.stack.toString() : String(err)) + .split('\n') + .map(line => this.fixLineNo(line)) + .join('\n'); + logCollector('error', `Error by run: ${stack}`); + } else { + void this.setState(`scriptProblem.${name.substring(SCRIPT_CODE_MARKER.length)}`, { + val: true, + ack: true, + c: 'execute', + }); + this.logError(name, 'Error by run:', err as Error); + } + } + } + + /** + * Run an ad-hoc script sent via the `execute` message and return everything it logged. + * + * The script is compiled (JavaScript or TypeScript), executed with the same sandbox API as a + * regular script (verbose by default, so internal operations like setState/subscribe are logged + * too), left running for `timeout` ms to collect asynchronous output, and afterwards stopped and + * fully cleaned up (timers, subscriptions, schedules). It is ephemeral: no script object or + * states are created. + * + * Expected `message`: + * - `source` / `code` (string, required) – the script source + * - `engineType` (string, optional) – `TypeScript/ts` to compile as TypeScript, otherwise JavaScript + * - `verbose` (boolean, optional, default `true`) – log internal sandbox operations + * - `logLevel` (silly|debug|info|warn|error, optional, default `silly`) – minimum severity to return + * - `timeout` (number ms, optional, default 5000, clamped to 0…60000) – collection window + * - `maxLogs` (number, optional, default 5000) – cap on returned log lines + */ + async executeScript(message: { + source: string; + engineType?: 'Javascript/js' | 'TypeScript/ts'; + timeout?: number | string; + verbose?: boolean; + logLevel?: ioBroker.LogLevel; + maxLogs?: number | string; + }): Promise<{ + ok: boolean; + error?: string; + engineType: 'Javascript/js' | 'TypeScript/ts'; + runtime: number; + truncated: boolean; + logs: { ts: number; severity: ioBroker.LogLevel; message: string }[]; + output: string; + }> { + const LEVELS: ioBroker.LogLevel[] = ['silly', 'debug', 'info', 'warn', 'error']; + + const source: unknown = message?.source ?? (message as any)?.code; + const engineTypeStr = (message?.engineType || '').toString().toLowerCase(); + const isTypeScript = engineTypeStr.startsWith('typescript') || engineTypeStr === 'ts'; + const engineType: 'Javascript/js' | 'TypeScript/ts' = isTypeScript ? 'TypeScript/ts' : 'Javascript/js'; + + const empty = ( + error: string, + ): { + ok: boolean; + error: string; + engineType: 'Javascript/js' | 'TypeScript/ts'; + runtime: number; + truncated: boolean; + logs: { ts: number; severity: ioBroker.LogLevel; message: string }[]; + output: string; + } => ({ ok: false, error, engineType, runtime: 0, truncated: false, logs: [], output: '' }); + + if (typeof source !== 'string' || !source.trim()) { + return empty('No source code provided'); + } + + if (this.context.debugMode) { + return empty('Cannot execute a script while a debug session is active'); + } + + let timeout = parseInt(message?.timeout as string, 10); + if (isNaN(timeout)) { + timeout = 5000; + } + timeout = Math.max(0, Math.min(timeout, 60000)); + + const verbose = message?.verbose !== false; + const minLevel: ioBroker.LogLevel = message?.logLevel + ? LEVELS.includes(message?.logLevel) + ? message.logLevel + : 'silly' + : 'silly'; + let maxLogs = parseInt(message?.maxLogs as string, 10); + if (isNaN(maxLogs) || maxLogs <= 0) { + maxLogs = 5000; + } + + const name = `${SCRIPT_CODE_MARKER}__execute_${++this.executeCounter}`; + + // Compile the source the same way regular scripts are compiled + let createdScript: JsScript | false; + if (isTypeScript) { + const transformedSource = transformScriptBeforeCompilation(source, false); + const filename = scriptIdToTSFilename(name); + let tsCompiled: CompileResult; + try { + tsCompiled = this.tsServer.compile(filename, transformedSource); + } catch (err: unknown) { + return empty(`TypeScript compilation failed: ${err as Error}`); + } + if (!tsCompiled.success) { + const errors = tsCompiled.diagnostics.map(diag => diag.annotatedSource).join('\n'); + return empty(`TypeScript compilation failed:\n${errors}`); + } + createdScript = this.createVM(`${this.globalScript}\n${tsCompiled.result || ''}`, name, false); + } else { + createdScript = this.createVM(`${this.globalScript}\n${source}`, name, true); } + + if (!createdScript) { + return empty('Compilation failed'); + } + + const logs: { ts: number; severity: ioBroker.LogLevel; message: string }[] = []; + let truncated = false; + const collector = (severity: ioBroker.LogLevel, msg: string): void => { + if (logs.length >= maxLogs) { + truncated = true; + return; + } + logs.push({ ts: Date.now(), severity, message: msg }); + }; + + this.scripts[name] = createdScript; + this.execute(createdScript, name, engineType, verbose, false, collector); + + // Let asynchronous output (timeouts, awaited code, triggered subscriptions) accumulate + if (timeout) { + await new Promise(resolve => setTimeout(resolve, timeout)); + } + + // Stop and clean up the ephemeral script (timers, subscriptions, schedules, …) + await this.stopScript(name, true); + + const minIdx = LEVELS.indexOf(minLevel); + const filtered = logs.filter(entry => { + const idx = LEVELS.indexOf(entry.severity); + return idx < 0 || idx >= minIdx; + }); + + return { + ok: true, + engineType, + runtime: timeout, + truncated, + logs: filtered, + output: filtered.map(entry => `[${entry.severity}] ${entry.message}`).join('\n'), + }; } /** @@ -2776,14 +3135,18 @@ class JavaScript extends Adapter { } } - async stopScript(name: string): Promise { + async stopScript(name: string, silent?: boolean): Promise { if (!this.scripts[name]) { return false; } - this.log.info(`${name}: Stopping script`); + // `silent` is used for ephemeral scripts started via the "execute" message – they have no + // `scriptEnabled` state and should not appear in the adapter log. + if (!silent) { + this.log.info(`${name}: Stopping script`); - await this.setState(`scriptEnabled.${name.substring(SCRIPT_CODE_MARKER.length)}`, false, true); + await this.setState(`scriptEnabled.${name.substring(SCRIPT_CODE_MARKER.length)}`, false, true); + } if (this.messageBusHandlers[name]) { delete this.messageBusHandlers[name]; diff --git a/src/types.d.ts b/src/types.d.ts index c1ff150bb..1d07ca0a4 100644 --- a/src/types.d.ts +++ b/src/types.d.ts @@ -40,6 +40,12 @@ export interface JavaScriptAdapterConfig { geminiKey: string; deepseekKey: string; password?: string; + credentialType?: 'manual' | 'manager'; + credentialIdGptKey?: string; + credentialIdClaudeKey?: string; + credentialIdGeminiKey?: string; + credentialIdDeepseekKey?: string; + credentialIdGptBaseUrlKey?: string; } export type CommonAlias = { diff --git a/test/testAiProviderResolver.js b/test/testAiProviderResolver.js index d88bb5a4e..ba2115a25 100644 --- a/test/testAiProviderResolver.js +++ b/test/testAiProviderResolver.js @@ -1,6 +1,8 @@ const assert = require('node:assert').strict; const { PROVIDER_KEY_FIELD, + PROVIDER_CREDENTIAL_ID_FIELD, + getProviderCredentialId, resolveProviderCredentials, resolveTestCredentials, listAvailableProviders, @@ -17,6 +19,48 @@ describe('Test AI Provider Resolver', function () { }); }); + describe('PROVIDER_CREDENTIAL_ID_FIELD', function () { + it('maps every supported provider to its credential-id field', function () { + assert.equal(PROVIDER_CREDENTIAL_ID_FIELD.openai, 'credentialIdGptKey'); + assert.equal(PROVIDER_CREDENTIAL_ID_FIELD.anthropic, 'credentialIdClaudeKey'); + assert.equal(PROVIDER_CREDENTIAL_ID_FIELD.gemini, 'credentialIdGeminiKey'); + assert.equal(PROVIDER_CREDENTIAL_ID_FIELD.deepseek, 'credentialIdDeepseekKey'); + assert.equal(PROVIDER_CREDENTIAL_ID_FIELD.custom, 'credentialIdGptBaseUrlKey'); + }); + }); + + describe('getProviderCredentialId', function () { + const cfg = { + credentialIdGptKey: 'system.credentials.openai', + credentialIdClaudeKey: 'system.credentials.anthropic', + credentialIdGeminiKey: 'system.credentials.gemini', + credentialIdDeepseekKey: 'system.credentials.deepseek', + credentialIdGptBaseUrlKey: 'system.credentials.custom', + }; + + it('returns the configured credential ID per provider', function () { + assert.equal(getProviderCredentialId(cfg, 'openai'), 'system.credentials.openai'); + assert.equal(getProviderCredentialId(cfg, 'anthropic'), 'system.credentials.anthropic'); + assert.equal(getProviderCredentialId(cfg, 'gemini'), 'system.credentials.gemini'); + assert.equal(getProviderCredentialId(cfg, 'deepseek'), 'system.credentials.deepseek'); + assert.equal(getProviderCredentialId(cfg, 'custom'), 'system.credentials.custom'); + }); + + it('returns empty string for unknown provider', function () { + assert.equal(getProviderCredentialId(cfg, 'unknown'), ''); + }); + + it('handles missing/empty config gracefully', function () { + assert.equal(getProviderCredentialId(undefined, 'openai'), ''); + assert.equal(getProviderCredentialId(null, 'openai'), ''); + assert.equal(getProviderCredentialId({}, 'openai'), ''); + }); + + it('trims whitespace from the configured ID', function () { + assert.equal(getProviderCredentialId({ credentialIdGptKey: ' system.credentials.openai \n' }, 'openai'), 'system.credentials.openai'); + }); + }); + describe('resolveProviderCredentials', function () { const fullConfig = { gptKey: 'sk-openai-abc', @@ -232,5 +276,44 @@ describe('Test AI Provider Resolver', function () { assert.ok(!serialized.includes('sk-should-never-appear')); assert.ok(!serialized.includes('SECRET')); }); + + describe('manager mode (credentialType=manager)', function () { + it('lists providers by selected credential ID, ignoring manual keys', function () { + const res = listAvailableProviders({ + credentialType: 'manager', + // manual keys are present but must be ignored in manager mode + gptKey: 'sk-ignored', + claudeKey: 'sk-ignored', + credentialIdGptKey: 'system.credentials.openai', + credentialIdGeminiKey: 'system.credentials.gemini', + }); + assert.deepEqual(res, [{ provider: 'openai' }, { provider: 'gemini' }]); + }); + + it('does not list a provider whose manual key is set but credential ID is empty', function () { + const res = listAvailableProviders({ + credentialType: 'manager', + claudeKey: 'sk-ant-set-but-ignored', + credentialIdClaudeKey: '', + }); + assert.deepEqual(res, []); + }); + + it('custom provider still depends only on the base URL (key optional)', function () { + const res = listAvailableProviders({ + credentialType: 'manager', + gptBaseUrl: 'http://localhost:11434/v1', + }); + assert.deepEqual(res, [{ provider: 'custom', baseUrl: 'http://localhost:11434/v1' }]); + }); + + it('does not include the credential ID secrets are never resolved here', function () { + const res = listAvailableProviders({ + credentialType: 'manager', + credentialIdGptKey: 'system.credentials.openai', + }); + assert.deepEqual(res, [{ provider: 'openai' }]); + }); + }); }); });