iobroker.javascript 10.2.3 → 10.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/admin/assets/{AiChatPanel-DsQB1Hb5.js → AiChatPanel-AZko1BsN.js} +2 -2
- package/admin/assets/Debugger-CVDh3kgz.js +15 -0
- package/admin/assets/RulesEditor-D3kTbD_T.css +1 -0
- package/admin/assets/RulesEditor-DsO4cKIk.js +1 -0
- package/admin/assets/{ScriptEditor-BkuL2lZ1.js → ScriptEditor-BCGahS47.js} +1 -1
- package/admin/assets/{ScriptEditorVanillaMonaco-DYNr4-5w.js → ScriptEditorVanillaMonaco-BDAw2Bw6.js} +2 -2
- package/admin/assets/aiPromptBuilder-aJfHa-eU.js +1 -0
- package/admin/assets/{blocks_action-EYzXGRHi.js → blocks_action-DS28sNfo.js} +1 -1
- package/admin/assets/{blocks_convert-BewF036e.js → blocks_convert-CLb0DLyc.js} +1 -1
- package/admin/assets/{blocks_logic-BEcVdiZ4.js → blocks_logic-Dpp2fwlu.js} +1 -1
- package/admin/assets/{blocks_number-Cp7J-juL.js → blocks_number-N4IfHvYD.js} +1 -1
- package/admin/assets/{blocks_object-CCe0acSu.js → blocks_object-uK7FHVhS.js} +1 -1
- package/admin/assets/{blocks_procedures-BzFeWYcX.js → blocks_procedures-C_KD0Bm6.js} +1 -1
- package/admin/assets/{blocks_sendto-EBwcaHpm.js → blocks_sendto-BxCMg9X4.js} +1 -1
- package/admin/assets/{blocks_switch-CjohzLLS.js → blocks_switch-C8Rls5pK.js} +1 -1
- package/admin/assets/{blocks_system-D9V3f3Vv.js → blocks_system-CEQnj5fY.js} +1 -1
- package/admin/assets/{blocks_text-CnEbzx6V.js → blocks_text-BDEWxu0P.js} +1 -1
- package/admin/assets/{blocks_time-B5OcgKMo.js → blocks_time-aHQQK1Uz.js} +1 -1
- package/admin/assets/{blocks_timeout-ONu3mIX3.js → blocks_timeout-C2L93TLJ.js} +1 -1
- package/admin/assets/{blocks_trigger-3DujkROX.js → blocks_trigger-XivsIDE5.js} +1 -1
- package/admin/assets/{helpers-BiP5KGR8.js → helpers-DiwtLpXM.js} +1 -1
- package/admin/assets/{index-CRX4LAhD.js → index-B0FfAYMN.js} +6 -6
- package/admin/assets/{mf-entry-bootstrap-0-4b82aeb4.js → mf-entry-bootstrap-0-019228a5.js} +1 -1
- package/admin/mf-stats.json +1 -1
- package/admin/tab.html +2 -2
- package/build/lib/inspect.js +547 -632
- package/build/lib/inspect.js.map +1 -1
- package/build/main.js +8 -13
- package/build/main.js.map +1 -1
- package/io-package.json +14 -14
- package/package.json +1 -1
- package/admin/assets/Debugger-CcDNCkmw.js +0 -15
- package/admin/assets/RulesEditor-B6YQNZfq.js +0 -1
- package/admin/assets/RulesEditor-BwQ6Bo1V.css +0 -1
- package/admin/assets/aiPromptBuilder-db3Z4xhV.js +0 -1
- package/build/lib/debugger.js +0 -1135
- package/build/lib/debugger.js.map +0 -1
package/README.md
CHANGED
|
@@ -27,8 +27,9 @@ Executes JavaScript, TypeScript Scripts.
|
|
|
27
27
|
-->
|
|
28
28
|
|
|
29
29
|
## Changelog
|
|
30
|
-
### 10.2.
|
|
30
|
+
### 10.2.4 (2026-09-14)
|
|
31
31
|
* (@GermanBluefox) Rules: selection of state fixed
|
|
32
|
+
* (@GermanBluefox) Fixed debugger
|
|
32
33
|
|
|
33
34
|
### 10.2.0 (2026-09-11)
|
|
34
35
|
* (@GermanBluefox) Rules: an empty "and" band folds down to its heading. A rule without conditions runs its actions on every trigger, but that band was still the tallest thing in the rule - a drop area with a 64px floor, the "just check" selector and an "or" row per group, 292px for nothing. It is 41px now and says "without condition", clicking the heading opens it again, dragging a condition over it opens it by itself, and a band that has conditions in it never folds
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./vite-preload-helper-CaC3yEL3.js";import{$n as t,An as n,Bn as r,Bt as i,Cn as a,Dn as o,En as s,Ht as c,Lt as l,Qn as u,Un as d,Ut as f,Vt as p,Xt as m,Zt as h,_r as g,br as _,bt as v,fr as y,hr as b,kn as x,mn as S,p as C,pn as w,ut as T,vt as E,wr as D,xn as ee,yn as O,yr as k,yt as A,zt as j}from"./_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__113183188387379__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-D-gi6Mty.js";import{S as M,g as te,h as N,m as P,s as F}from"./index-CRX4LAhD.js";import{a as I,c as L,d as R,f as z,h as B,i as V,l as H,m as U,n as W,o as G,p as K,r as ne,s as q,t as J,u as Y}from"./AiChatService-Bsp_rhVx.js";var X=r(u(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m5 11h-4v4h-2v-4H7v-2h4V7h2v4h4z`}),`AddCircleOutlined`),re=r(u(`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`),ie=r(u(`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`),ae=r(u(`path`,{d:`M9.01 14H2v2h7.01v3L13 15l-3.99-4zm5.98-1v-3H22V8h-7.01V5L11 9z`}),`CompareArrows`),oe=r(u(`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`),se=r(u(`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`),ce=r(u(`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`);D();var le=[{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 Z(e){return e&&typeof e==`object`?e.en||e.de||``:e||``}function ue(e,t,n){let r=(n||``).toLowerCase();if(!r)return!1;if(e.toLowerCase().includes(r))return!0;let i=t==null?void 0:t.common;if(!i)return!1;let a=Z(i.name).toLowerCase();if(a&&a.includes(r))return!0;let o=(i.role||``).toLowerCase();return!!(o&&o.includes(r))}async function de(e,t,n=20,r){let i=await I(e),a=r==null?void 0:r.toLowerCase(),o=[],s=Object.keys(i),c=new Set;for(let e of s){let t=e.lastIndexOf(`.`);t>0&&c.add(e.substring(0,t))}for(let e of s){let r=i[e],s=r==null?void 0:r.type;if(!s||a&&s!==a||!ue(e,r,t))continue;let l=r.common,u={id:e,type:s,name:Z(l==null?void 0:l.name)};if(l!=null&&l.role&&(u.role=l.role),s===`state`?(u.stateType=(l==null?void 0:l.type)||``,l!=null&&l.unit&&(u.unit=l.unit)):c.has(e)&&(u.hasChildren=!0),o.push(u),o.length>=n)break}return o.length===0?JSON.stringify({message:`No objects found matching "${t}". Hint: try a role like "sensor.motion" or a partial path.`}):JSON.stringify(o)}async function fe(e,t){try{let n=await e.getState(t);return JSON.stringify(n?{val:n.val,ts:n.ts?new Date(n.ts).toISOString():null,ack:n.ack,from:n.from}:{error:`State '${t}' not found`})}catch{return JSON.stringify({error:`Failed to read state '${t}'`})}}var pe=new Set([`channel`,`device`,`folder`,`adapter`,`instance`,`enum`,`meta`]),me=50;async function he(e,t){try{let r=await e.getObject(t);if(!r)return JSON.stringify({error:`Object '${t}' not found`});let i={id:r._id,type:r.type,common:r.common},a=t.split(`.`),o=[];for(let t=a.length-1;t>=2;t--){let r=a.slice(0,t).join(`.`);try{let t=await e.getObject(r);if(t&&t.type!==`state`){var n;o.push({id:t._id,type:t.type,name:Z((n=t.common)==null?void 0:n.name),common:t.common})}}catch{}}if(o.length>0&&(i.parents=o),pe.has(r.type)){let n=await I(e),r=[],a=`${t}.`,o=!1;for(let e of Object.keys(n))if(e.startsWith(a)&&!e.substring(a.length).includes(`.`)){let t=n[e],i=t==null?void 0:t.common,a={id:e,name:Z(i==null?void 0:i.name),type:(t==null?void 0:t.type)||``};if(i!=null&&i.role&&(a.role=i.role),(t==null?void 0:t.type)===`state`&&i!=null&&i.unit&&(a.unit=i.unit),r.push(a),r.length>=me){o=!0;break}}r.length>0&&(i.children=r,o&&(i.childrenTruncated=!0,i.childrenHint=`Only the first ${me} 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 '${t}'`})}}function ge(e){return N(e)||e}function _e(e,t,n=10){let r=t.toLowerCase(),i=[];for(let t of e){let e=t.id.toLowerCase(),a=t.name.toLowerCase(),o=t.id.replace(/^script\.js\./,``).replace(/\./g,`/`),s=t.engineType===`Blockly`||t.engineType===`Rules`,c=e.includes(r)||a.includes(r),l=s?ge(t.source):t.source,u=l.toLowerCase().includes(r);if(c||u){let e={id:t.id,path:o,name:t.name,type:s?`Blockly`:t.engineType.includes(`TypeScript`)?`TypeScript`:`JavaScript`,enabled:t.enabled};if(u){let t=l.split(`
|
|
1
|
+
import{t as e}from"./vite-preload-helper-CaC3yEL3.js";import{$n as t,An as n,Bn as r,Bt as i,Cn as a,Dn as o,En as s,Ht as c,Lt as l,Qn as u,Un as d,Ut as f,Vt as p,Xt as m,Zt as h,_r as g,br as _,bt as v,fr as y,hr as b,kn as x,mn as S,p as C,pn as w,ut as T,vt as E,wr as D,xn as ee,yn as O,yr as k,yt as A,zt as j}from"./_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__113183188387379__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-D-gi6Mty.js";import{S as M,g as te,h as N,m as P,s as F}from"./index-B0FfAYMN.js";import{a as I,c as L,d as R,f as z,h as B,i as V,l as H,m as U,n as W,o as G,p as K,r as ne,s as q,t as J,u as Y}from"./AiChatService-Bsp_rhVx.js";var X=r(u(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m5 11h-4v4h-2v-4H7v-2h4V7h2v4h4z`}),`AddCircleOutlined`),re=r(u(`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`),ie=r(u(`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`),ae=r(u(`path`,{d:`M9.01 14H2v2h7.01v3L13 15l-3.99-4zm5.98-1v-3H22V8h-7.01V5L11 9z`}),`CompareArrows`),oe=r(u(`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`),se=r(u(`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`),ce=r(u(`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`);D();var le=[{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 Z(e){return e&&typeof e==`object`?e.en||e.de||``:e||``}function ue(e,t,n){let r=(n||``).toLowerCase();if(!r)return!1;if(e.toLowerCase().includes(r))return!0;let i=t==null?void 0:t.common;if(!i)return!1;let a=Z(i.name).toLowerCase();if(a&&a.includes(r))return!0;let o=(i.role||``).toLowerCase();return!!(o&&o.includes(r))}async function de(e,t,n=20,r){let i=await I(e),a=r==null?void 0:r.toLowerCase(),o=[],s=Object.keys(i),c=new Set;for(let e of s){let t=e.lastIndexOf(`.`);t>0&&c.add(e.substring(0,t))}for(let e of s){let r=i[e],s=r==null?void 0:r.type;if(!s||a&&s!==a||!ue(e,r,t))continue;let l=r.common,u={id:e,type:s,name:Z(l==null?void 0:l.name)};if(l!=null&&l.role&&(u.role=l.role),s===`state`?(u.stateType=(l==null?void 0:l.type)||``,l!=null&&l.unit&&(u.unit=l.unit)):c.has(e)&&(u.hasChildren=!0),o.push(u),o.length>=n)break}return o.length===0?JSON.stringify({message:`No objects found matching "${t}". Hint: try a role like "sensor.motion" or a partial path.`}):JSON.stringify(o)}async function fe(e,t){try{let n=await e.getState(t);return JSON.stringify(n?{val:n.val,ts:n.ts?new Date(n.ts).toISOString():null,ack:n.ack,from:n.from}:{error:`State '${t}' not found`})}catch{return JSON.stringify({error:`Failed to read state '${t}'`})}}var pe=new Set([`channel`,`device`,`folder`,`adapter`,`instance`,`enum`,`meta`]),me=50;async function he(e,t){try{let r=await e.getObject(t);if(!r)return JSON.stringify({error:`Object '${t}' not found`});let i={id:r._id,type:r.type,common:r.common},a=t.split(`.`),o=[];for(let t=a.length-1;t>=2;t--){let r=a.slice(0,t).join(`.`);try{let t=await e.getObject(r);if(t&&t.type!==`state`){var n;o.push({id:t._id,type:t.type,name:Z((n=t.common)==null?void 0:n.name),common:t.common})}}catch{}}if(o.length>0&&(i.parents=o),pe.has(r.type)){let n=await I(e),r=[],a=`${t}.`,o=!1;for(let e of Object.keys(n))if(e.startsWith(a)&&!e.substring(a.length).includes(`.`)){let t=n[e],i=t==null?void 0:t.common,a={id:e,name:Z(i==null?void 0:i.name),type:(t==null?void 0:t.type)||``};if(i!=null&&i.role&&(a.role=i.role),(t==null?void 0:t.type)===`state`&&i!=null&&i.unit&&(a.unit=i.unit),r.push(a),r.length>=me){o=!0;break}}r.length>0&&(i.children=r,o&&(i.childrenTruncated=!0,i.childrenHint=`Only the first ${me} 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 '${t}'`})}}function ge(e){return N(e)||e}function _e(e,t,n=10){let r=t.toLowerCase(),i=[];for(let t of e){let e=t.id.toLowerCase(),a=t.name.toLowerCase(),o=t.id.replace(/^script\.js\./,``).replace(/\./g,`/`),s=t.engineType===`Blockly`||t.engineType===`Rules`,c=e.includes(r)||a.includes(r),l=s?ge(t.source):t.source,u=l.toLowerCase().includes(r);if(c||u){let e={id:t.id,path:o,name:t.name,type:s?`Blockly`:t.engineType.includes(`TypeScript`)?`TypeScript`:`JavaScript`,enabled:t.enabled};if(u){let t=l.split(`
|
|
2
2
|
`),n=[];for(let e=0;e<t.length&&!(t[e].toLowerCase().includes(r)&&(n.push({line:e+1,text:t[e].trim()}),n.length>=5));e++);n.length>0&&(e.matchingLines=n)}if(i.push(e),i.length>=n)break}}return i.length===0?JSON.stringify({message:`No scripts found matching "${t}"`}):JSON.stringify(i)}function ve(e,t){let n=t.replace(/\//g,`.`).toLowerCase(),r=e.find(e=>{let t=e.id.toLowerCase();return t===n||t===`script.js.${n}`||t.endsWith(`.${n}`)});if(!r)return JSON.stringify({error:`Script '${t}' not found. Use search_scripts to find available scripts.`});let i=r.engineType===`Blockly`||r.engineType===`Rules`,a=i?ge(r.source):r.source,o=r.id.replace(/^script\.js\./,``).replace(/\./g,`/`);return JSON.stringify({id:r.id,path:o,name:r.name,type:i?`Blockly`:r.engineType.includes(`TypeScript`)?`TypeScript`:`JavaScript`,enabled:r.enabled,source:a})}function ye(e){let t=e.map(e=>({id:e.id,path:e.id.replace(/^script\.js\./,``).replace(/\./g,`/`),name:e.name,type:e.engineType===`Blockly`||e.engineType===`Rules`?`Blockly`:e.engineType.includes(`TypeScript`)?`TypeScript`:`JavaScript`,enabled:e.enabled}));return JSON.stringify(t)}function Q(){return JSON.stringify({error:`Editor is not available. This tool requires the script editor to be open.`})}async function be(e,t,n){if(!t)return JSON.stringify({error:`No running javascript instance found to execute the script.`});let r=n.source;if(!r||typeof r!=`string`)return JSON.stringify({error:`No source code provided.`});try{var i;let a=await e.sendTo(t,`execute`,{source:r,engineType:n.engineType,timeout:n.timeout,logLevel:n.logLevel});return!a||a.ok===!1?JSON.stringify({error:(a==null?void 0:a.error)||`Execution failed`,logs:(a==null?void 0:a.logs)||[]}):JSON.stringify({engineType:a.engineType,runtime:a.runtime,truncated:a.truncated||!1,logCount:((i=a.logs)==null?void 0:i.length)||0,logs:a.logs||[],output:a.output||``})}catch(e){return JSON.stringify({error:`Failed to execute script: ${e instanceof Error?e.message:String(e)}`})}}async function xe(e,t,n,r,i){let a;try{a=JSON.parse(t.function.arguments)}catch{return JSON.stringify({error:`Invalid arguments: ${t.function.arguments}`})}switch(t.function.name){case`search_datapoints`:return de(e,a.query,a.max_results||20,a.object_type);case`get_state_value`:return fe(e,a.id);case`get_object_info`:return he(e,a.id);case`search_scripts`:return _e(n||[],a.query,a.max_results||10);case`read_script`:return ve(n||[],a.id);case`list_scripts`:return ye(n||[]);case`run_script`:return be(e,i,a);case`get_editor_selection`:{if(!(r!=null&&r.getSelection))return Q();let e=r.getSelection();return JSON.stringify(e||{message:`No text is currently selected in the editor.`})}case`get_editor_content`:return r!=null&&r.getContent?JSON.stringify({content:r.getContent()}):Q();case`get_cursor_position`:{if(!(r!=null&&r.getCursorPosition))return Q();let e=r.getCursorPosition();return JSON.stringify(e||{message:`Editor has no cursor position (not focused).`})}case`highlight_text_in_editor`:{if(!(r!=null&&r.highlightText))return Q();let e=r.highlightText(a.text);return JSON.stringify({matches:e,message:e===0?`Text "${a.text}" was not found in the editor.`:`Highlighted ${e} occurrence(s) of "${a.text}".`})}case`highlight_line_range`:{if(!(r!=null&&r.highlightLineRange))return Q();let e=r.highlightLineRange(a.start_line,a.end_line);return JSON.stringify({success:e,message:e?`Selected lines ${a.start_line}-${a.end_line}.`:`Could not select the requested line range.`})}case`go_to_line`:{if(!(r!=null&&r.goToLine))return Q();let e=r.goToLine(a.line,a.column);return JSON.stringify({success:e,message:e?`Cursor moved to line ${a.line}.`:`Could not move the cursor.`})}case`insert_text_at_cursor`:{if(!(r!=null&&r.insertTextAtCursor))return Q();let e=r.insertTextAtCursor(a.text);return JSON.stringify({success:e,message:e?`Text inserted at cursor.`:`Editor rejected the insertion.`})}case`replace_selection`:{if(!(r!=null&&r.replaceSelection))return Q();let e=r.replaceSelection(a.text);return JSON.stringify({success:e,message:e?`Selection replaced.`:`No text was selected to replace.`})}case`get_diagnostics`:{if(!(r!=null&&r.getDiagnostics))return Q();let e=r.getDiagnostics();return JSON.stringify({count:e.length,diagnostics:e})}case`get_document_symbols`:{if(!(r!=null&&r.getSymbols))return Q();let e=await r.getSymbols();return JSON.stringify({count:e.length,symbols:e})}default:return JSON.stringify({error:`Unknown tool: ${t.function.name}`})}}var Se=0;function Ce(){return`msg_${Date.now()}_${++Se}`}function we(t){let{socket:n,runningInstances:r,currentCode:i,currentLanguage:a,allScripts:o,editorApi:s,currentScriptId:c}=t,l=y((e,t,n)=>e===`none`||!n?null:{range:t,scriptId:c||``,scriptVersion:(i||``).length,kind:e,originalText:n},[c,i]),[u,d]=_(()=>{try{let e=window.localStorage.getItem(`Editor.aiChatMessages`);return e?JSON.parse(e):[]}catch{return[]}}),f=y(e=>{d(t=>{let n=typeof e==`function`?e(t):e,r=n.length>100?n.slice(-100):n;try{window.localStorage.setItem(`Editor.aiChatMessages`,JSON.stringify(r))}catch{try{let e=r.slice(-20);window.localStorage.setItem(`Editor.aiChatMessages`,JSON.stringify(e))}catch{}}return r})},[]),[p,m]=_(!1),[h,g]=_(null),[v,x]=_(window.localStorage.getItem(`Editor.aiChatMode`)||`agent`),S=y(e=>{x(e),window.localStorage.setItem(`Editor.aiChatMode`,e)},[]),[w,T]=_(null),[E,D]=_(window.localStorage.getItem(`openai-model`)||``),[ee,O]=_([]),[A,j]=_({}),[M,N]=_(!0),[F,I]=_(null),W=k(null),J=k(null),X=k(null),re=k(null),ie=y(e=>{D(e),K(e,A[e])},[A]),ae=y(async()=>{N(!0),I(null);try{let e=await R(n,r);if(O(e.models),j(e.providerMap),e.models.length>0){let t=z().model,n=t&&e.models.includes(t)?t:e.models[0];D(n),K(n,e.providerMap[n])}e.errors.length>0&&I(e.errors.join(`; `))}catch(e){I(String(e))}N(!1)},[n,r]);b(()=>{ae()},[ae]);let oe=y(e=>{let t=!1,n=!1,r=[],i=!1,a=/@([\w/äöüÄÖÜß-]+)/g,s;for(;(s=a.exec(e))!==null;){let e=s[1].toLowerCase();if(e===`alle`||e===`all`)t=!0;else if(e===`geräte`||e===`devices`||e===`geraete`)n=!0;else if(i=!0,o&&o.length>0){let e=s[1].replace(/\//g,`.`).toLowerCase(),t=e.split(`.`),n=o.find(n=>{let r=n.id.toLowerCase(),i=r.replace(/^script\.js\./,``);if(i===e||i.endsWith(`.${e}`)||r===`script.js.${e}`)return!0;let a=0;for(let e of t){let t=i.indexOf(e,a);if(t===-1)return!1;a=t+e.length}return!0});if(n)r.push(n.id);else for(let e of t){if(e.length<3)continue;let t=o.filter(t=>t.id.toLowerCase().includes(`.${e}`)||t.name.toLowerCase().includes(e));for(let e of t)r.includes(e.id)||r.push(e.id)}}}return i&&r.length===0&&(t=!0),{cleanMessage:e.replace(/@[\w/äöüÄÖÜß]+\s*/g,``).trim(),mentionedScriptIds:r,includeAll:t,includeDevices:n}},[o]),se=y(async(e,t,s)=>{re.current||=await H(),W.current||=await G(n,r);let c=Y(),l=a===`blockly`,u=e||s.length>0,d=`You are an AI assistant for ioBroker JavaScript adapter scripting. Help the user write, debug, and understand ioBroker scripts. Write comments in ${c}. Use the ioBroker JavaScript API correctly.
|
|
3
3
|
|
|
4
4
|
ioBroker object hierarchy: adapter.instance.device.channel.state
|
|
@@ -15,7 +15,7 @@ ${re.current}`;if(l&&(d+="\n\nThe user is working in the Blockly visual editor.
|
|
|
15
15
|
`)}`)}t.length>0&&(O+=`\n\n[Automatic analysis results]\n${t.join(`
|
|
16
16
|
|
|
17
17
|
`)}`)}}let k=[...D,...u.filter(e=>e.role!==`system`).map(e=>({role:e.role,content:e.content})),{role:`user`,content:O}],j=v===`agent`;try{let e=[...k];for(let r=0;r<5;r++){let i=await U(n,a,{messages:e,model:E,provider:t,baseUrl:ee,...j?{tools:le}:{}});if(i.error){if(j&&r===0&&i.error.toLowerCase().includes(`tool`)){let r=await U(n,a,{messages:e,model:E,provider:t,baseUrl:ee});if(r.error)T(r.error),f(e=>e.slice(0,-1));else{let e=B(r.content||``);f(t=>{let n=[...t],r=n[n.length-1];return(r==null?void 0:r.role)===`assistant`&&(n[n.length-1]={...r,content:e}),n})}break}T(i.error),f(e=>e.slice(0,-1));break}let c=i.tool_calls;if((!c||c.length===0)&&j&&i.content){let e=i.content.trim();try{let t=JSON.parse(e);t.name&&t.arguments&&(c=[{id:`text_tool_${Date.now()}`,type:`function`,function:{name:t.name,arguments:JSON.stringify(t.arguments)}}])}catch{}}if(!c||c.length===0){let e=B(i.content||``);f(t=>{let n=[...t],r=n[n.length-1];return(r==null?void 0:r.role)===`assistant`&&(n[n.length-1]={...r,content:e}),n});break}i.tool_calls=c;let l=i.tool_calls.map(e=>{let t={};try{t=JSON.parse(e.function.arguments)}catch{}switch(e.function.name){case`search_datapoints`:return`🔍 ${C.t(`Searching datapoints`)}: "${String(t.query||``)}"`;case`get_state_value`:return`📊 ${C.t(`Reading value`)}: ${String(t.id||``)}`;case`get_object_info`:return`📋 ${C.t(`Loading object info`)}: ${String(t.id||``)}`;case`search_scripts`:return`🔍 ${C.t(`Searching scripts`)}: "${String(t.query||``)}"`;case`read_script`:return`📖 ${C.t(`Reading script`)}: ${String(t.id||``)}`;case`list_scripts`:return`📂 ${C.t(`Loading script list`)}`;default:return`⚙️ ${e.function.name}`}});f(e=>{let t=[...e],n=t[t.length-1];return(n==null?void 0:n.role)===`assistant`&&(t[t.length-1]={...n,content:l.join(`
|
|
18
|
-
`)}),t}),e.push({role:`assistant`,content:i.content||``,tool_calls:i.tool_calls});for(let t of i.tool_calls){let r=await xe(n,t,o,s,a);e.push({role:`tool`,tool_call_id:t.id,content:r})}}}catch(e){T(String(e)),f(e=>e.slice(0,-1))}m(!1)},[E,A,u,p,n,r,se,oe,o,v,ce,f,l,s]),ue=y(()=>{f([]),T(null),m(!1),g(null),ne(),window.localStorage.removeItem(`Editor.aiChatHistory`)},[f]),de=y(async(e,t)=>{let i=A[E];if(!i)return`Error: ${C.t(`Please select a valid model`)}`;let o=W.current||await G(n,r);if(W.current=o,!o)return`Error: ${C.t(`No API keys configured`)}`;let s=Object.keys(r)[0];if(!s)return`Error: ${C.t(`No running javascript instance found`)}`;let c=i===`custom`&&o.gptBaseUrl||``,l=a||`javascript`,u=`You are an assistant for writing ioBroker ${l} scripts. The user will ask a question about a snippet of their code. Match your answer to the question: \n- 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. \n- If they explicitly ask for a change, refactor, fix, or rewrite, reply with a single fenced \`\`\`${l===`blockly`?`xml`:l}\`\`\` code block containing the full replacement for the selection. You may add one short sentence before or after the block. \n- If they ask something ambiguous or meta (e.g. "is this correct?"), reply in prose first and only include code if proposing a change. \nioBroker globals available in scripts: on, setState, getState, schedule, sendTo, log, createState, setStateDelayed, existsState, httpGet, httpPost.`,d=t?`Code from my editor:\n\n\`\`\`${l===`blockly`?`xml`:l}\n${t}\n\`\`\`\n\n${e}`:e;try{let e=await U(n,s,{messages:[{role:`system`,content:u},{role:`user`,content:d}],model:E,provider:i,baseUrl:c});return e.error?`Error: ${e.error}`:e.content||``}catch(e){return`Error: ${e.message||String(e)}`}},[E,A,r,n,a]);return{messages:u,isLoading:p,error:w,model:E,availableModels:ee,modelProviderMap:A,modelsLoading:M,modelsError:F,lastContextInfo:h,mode:v,setMode:S,setModel:ie,sendMessage:Z,triggerAiAction:y(t=>{t.range&&t.code?J.current=l(t.kind||`codelens`,t.range,t.code):J.current=null,e(async()=>{let{buildActionPrompt:e}=await import(`./aiPromptBuilder-
|
|
18
|
+
`)}),t}),e.push({role:`assistant`,content:i.content||``,tool_calls:i.tool_calls});for(let t of i.tool_calls){let r=await xe(n,t,o,s,a);e.push({role:`tool`,tool_call_id:t.id,content:r})}}}catch(e){T(String(e)),f(e=>e.slice(0,-1))}m(!1)},[E,A,u,p,n,r,se,oe,o,v,ce,f,l,s]),ue=y(()=>{f([]),T(null),m(!1),g(null),ne(),window.localStorage.removeItem(`Editor.aiChatHistory`)},[f]),de=y(async(e,t)=>{let i=A[E];if(!i)return`Error: ${C.t(`Please select a valid model`)}`;let o=W.current||await G(n,r);if(W.current=o,!o)return`Error: ${C.t(`No API keys configured`)}`;let s=Object.keys(r)[0];if(!s)return`Error: ${C.t(`No running javascript instance found`)}`;let c=i===`custom`&&o.gptBaseUrl||``,l=a||`javascript`,u=`You are an assistant for writing ioBroker ${l} scripts. The user will ask a question about a snippet of their code. Match your answer to the question: \n- 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. \n- If they explicitly ask for a change, refactor, fix, or rewrite, reply with a single fenced \`\`\`${l===`blockly`?`xml`:l}\`\`\` code block containing the full replacement for the selection. You may add one short sentence before or after the block. \n- If they ask something ambiguous or meta (e.g. "is this correct?"), reply in prose first and only include code if proposing a change. \nioBroker globals available in scripts: on, setState, getState, schedule, sendTo, log, createState, setStateDelayed, existsState, httpGet, httpPost.`,d=t?`Code from my editor:\n\n\`\`\`${l===`blockly`?`xml`:l}\n${t}\n\`\`\`\n\n${e}`:e;try{let e=await U(n,s,{messages:[{role:`system`,content:u},{role:`user`,content:d}],model:E,provider:i,baseUrl:c});return e.error?`Error: ${e.error}`:e.content||``}catch(e){return`Error: ${e.message||String(e)}`}},[E,A,r,n,a]);return{messages:u,isLoading:p,error:w,model:E,availableModels:ee,modelProviderMap:A,modelsLoading:M,modelsError:F,lastContextInfo:h,mode:v,setMode:S,setModel:ie,sendMessage:Z,triggerAiAction:y(t=>{t.range&&t.code?J.current=l(t.kind||`codelens`,t.range,t.code):J.current=null,e(async()=>{let{buildActionPrompt:e}=await import(`./aiPromptBuilder-aJfHa-eU.js`);return{buildActionPrompt:e}},[],import.meta.url).then(({buildActionPrompt:e})=>{let n=e({action:t.action,code:t.code,language:a||`javascript`,diagnostic:t.diagnostic,question:t.question,rangeLabel:t.rangeLabel});n?Z(n):J.current=null}).catch(()=>{J.current=null,T(C.t(`Failed to build AI action prompt`))})},[Z,a,l]),askInline:de,clearChat:ue,retryLoadModels:ae}}D();var Te=({code:e,language:n,themeType:r,onInsertCode:i,onShowDiff:a,sourceRange:o})=>{let s=k(null);b(()=>{var t;let i=window.monaco;if(!s.current||!(i!=null&&(t=i.editor)!=null&&t.colorize))return;let a=n===`ts`||n===`typescript`?`typescript`:n||`javascript`;i.editor.colorize(e,a,{theme:r===`dark`?`vs-dark`:`vs`}).then(e=>{s.current&&(s.current.innerHTML=e)})},[e,n,r]);let c=y(()=>{navigator.clipboard.writeText(e)},[e]);return t(p,{sx:{position:`relative`,my:1,borderRadius:1,overflow:`hidden`,border:`1px solid`,borderColor:`divider`},children:[t(p,{sx:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,px:1,py:.5,bgcolor:`action.hover`,borderBottom:`1px solid`,borderColor:`divider`},children:[u(p,{sx:{fontSize:`0.75rem`,color:`text.secondary`,textTransform:`uppercase`},children:n||`javascript`}),t(p,{children:[u(j,{title:C.t(`Copy`),children:u(S,{size:`small`,onClick:c,children:u(E,{sx:{fontSize:16}})})}),i&&u(j,{title:C.t(`Insert into editor`),children:u(S,{size:`small`,onClick:()=>i(e),children:u(X,{sx:{fontSize:16}})})}),a&&u(j,{title:C.t(`Show as diff`),children:u(S,{size:`small`,onClick:()=>a(e,o),children:u(ae,{sx:{fontSize:16}})})})]})]}),u(`pre`,{ref:s,style:{margin:0,padding:`8px 12px`,overflow:`auto`,maxHeight:400,fontSize:`13px`,fontFamily:`'Cascadia Code', 'Fira Code', 'Consolas', monospace`,backgroundColor:r===`dark`?`#1e1e1e`:`#f8f8f8`,color:r===`dark`?`#d4d4d4`:`#333`},children:e})]})};D();var Ee=({xml:e})=>{let t=d(),n=k(null),r=k(null),[i,a]=_(60),o=k(!1);return b(()=>{o.current&&(o.current=!1,requestAnimationFrame(()=>{let e=window.Blockly,t=r.current;e&&t&&(e.svgResize(t),t.scrollCenter())}))},[i]),b(()=>{let i=window.Blockly;if(i&&n.current){r.current&&=(r.current.dispose(),null);try{let s=i.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:F(t),media:`google-blockly/media/`});r.current=s;let c=e.trim();c.startsWith(`<xml`)||(c=`<xml xmlns="https://developers.google.com/blockly/xml">${c}</xml>`);let l=i.utils.xml.textToDom(c),u=10,d=Array.from(l.querySelectorAll(`:scope > block`));for(let e of d)e.setAttribute(`x`,`10`),e.setAttribute(`y`,String(u)),u+=200;i.Xml.domToWorkspace(l,s);let f=s.getTopBlocks(!1);if(f.length>1){let e=10;for(let t of f){let n=t.getRelativeToSurfaceXY();t.moveBy(10-n.x,e-n.y),e+=t.getHeightWidth().height+20}}let p=s.getBlocksBoundingBox();if(p){let e=p.bottom-p.top+20,t=Math.max(60,Math.ceil(e));o.current=!0,a(t)}}catch{}return()=>{r.current&&=(r.current.dispose(),null)}}},[e,t]),u(p,{ref:n,sx:{width:`100%`,height:i,minHeight:60,borderRadius:1,overflow:`hidden`,border:`1px solid`,borderColor:`divider`}})};D();function De(e){let t=[],n=/```(\w*)\n?([\s\S]*?)```/g,r=0,i;for(;(i=n.exec(e))!==null;){if(i.index>r){let n=e.substring(r,i.index).trim();n&&t.push({type:`text`,content:n})}t.push({type:`code`,content:i[2].trim(),language:i[1]||`javascript`}),r=i.index+i[0].length}if(r<e.length){let n=e.substring(r).trim();n&&t.push({type:`text`,content:n})}return t.length===0&&t.push({type:`text`,content:e}),t}function $(e){let t=[],n=/(\*\*(.+?)\*\*|\*(.+?)\*|`(.+?)`)/g,r=0,i,a=0;for(;(i=n.exec(e))!==null;)i.index>r&&t.push(e.substring(r,i.index)),i[2]?t.push(u(`strong`,{children:i[2]},a++)):i[3]?t.push(u(`em`,{children:i[3]},a++)):i[4]&&t.push(u(`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]},a++)),r=i.index+i[0].length;return r<e.length&&t.push(e.substring(r)),t}function Oe(e){return e.trim().startsWith(`|`)&&e.trim().endsWith(`|`)}function ke(e){return/^\|[\s:]*-+[\s:|-]*\|$/.test(e.trim())}function Ae(e,n,r){let i=n.palette.mode===`dark`,a=e=>e.trim().replace(/^\||\|$/g,``).split(`|`).map(e=>e.trim()),o=a(e[0]),s=e.slice(2).map(a);return u(p,{sx:{overflowX:`auto`,my:1},children:t(`table`,{style:{borderCollapse:`collapse`,width:`100%`,fontSize:`0.8rem`,color:n.palette.text.primary},children:[u(`thead`,{children:u(`tr`,{children:o.map((e,t)=>u(`th`,{style:{border:`1px solid ${n.palette.divider}`,padding:`6px 10px`,backgroundColor:i?n.palette.grey[800]:n.palette.grey[100],color:n.palette.text.primary,fontWeight:600,textAlign:`left`},children:$(e)},t))})}),u(`tbody`,{children:s.map((e,t)=>u(`tr`,{style:{backgroundColor:t%2==1?i?n.palette.grey[900]:n.palette.grey[50]:void 0},children:e.map((e,t)=>u(`td`,{style:{border:`1px solid ${n.palette.divider}`,padding:`6px 10px`,color:n.palette.text.primary},children:$(e)},t))},t))})]})},r)}function je(e,t){let n=e.split(`
|
|
19
19
|
`),r=[],i=0,a=0;for(;a<n.length;){let e=n[a].trim();if(e===``){a++;continue}if(/^(-{3,}|\*{3,}|_{3,})$/.test(e)){r.push(u(`hr`,{style:{border:`none`,borderTop:`1px solid ${t.palette.divider}`,margin:`8px 0`}},i++)),a++;continue}let o=e.match(/^(#{1,4})\s+(.+)$/);if(o){let e=o[1].length;r.push(u(`div`,{style:{fontWeight:600,fontSize:[`1.2em`,`1.1em`,`1em`,`0.95em`][e-1],margin:`8px 0 4px`},children:$(o[2])},i++)),a++;continue}if(Oe(e)&&a+1<n.length&&ke(n[a+1].trim())&&a+2<n.length){let e=[n[a],n[a+1]],o=a+2;for(;o<n.length&&Oe(n[o]);)e.push(n[o]),o++;r.push(Ae(e,t,i++)),a=o;continue}if(/^[-*+]\s/.test(e)){let e=[];for(;a<n.length&&/^\s*[-*+]\s/.test(n[a]);)e.push(n[a].replace(/^\s*[-*+]\s/,``).trim()),a++;r.push(u(`ul`,{style:{margin:`4px 0`,paddingLeft:20},children:e.map((e,t)=>u(`li`,{children:$(e)},t))},i++));continue}if(/^\d+[.)]\s/.test(e)){let e=[];for(;a<n.length&&/^\s*\d+[.)]\s/.test(n[a]);)e.push(n[a].replace(/^\s*\d+[.)]\s/,``).trim()),a++;r.push(u(`ol`,{style:{margin:`4px 0`,paddingLeft:20},children:e.map((e,t)=>u(`li`,{children:$(e)},t))},i++));continue}r.push(u(`div`,{children:$(e)},i++)),a++}return r}var Me=({message:e,themeType:r,currentLanguage:i,onInsertCode:a,onShowDiff:o,onApplyCode:s})=>{let l=e.role===`user`,d=c(),m=l?r===`dark`?d.palette.primary.dark:d.palette.primary.main:r===`dark`?d.palette.secondary.dark:d.palette.secondary.main,h=d.palette.getContrastText(m),_=g(()=>De(e.content),[e.content]),v=(e,t)=>!!(e===`xml`||e===`blockly`||i===`blockly`&&t&&/<block\s+type=/.test(t));return t(p,{sx:{display:`flex`,gap:1,px:1.5,py:1,mx:.75,my:.5,bgcolor:l?r===`dark`?`rgba(144, 202, 249, 0.10)`:`rgba(25, 118, 210, 0.07)`:r===`dark`?`rgba(206, 147, 216, 0.10)`:`rgba(156, 39, 176, 0.06)`,borderRadius:1.5,borderLeft:`3px solid`,borderLeftColor:m,transition:`background-color 120ms`,"&:hover":{bgcolor:l?r===`dark`?`rgba(144, 202, 249, 0.16)`:`rgba(25, 118, 210, 0.12)`:r===`dark`?`rgba(206, 147, 216, 0.16)`:`rgba(156, 39, 176, 0.10)`}},children:[u(n,{sx:{width:28,height:28,bgcolor:m,color:h,flexShrink:0,mt:.5},children:u(l?oe:ce,{sx:{fontSize:18}})}),u(p,{sx:{flex:1,minWidth:0,fontSize:`0.875rem`,lineHeight:1.6},children:_.map((n,i)=>n.type===`code`?v(n.language,n.content)?t(p,{sx:{my:1},children:[u(Ee,{xml:n.content}),t(p,{sx:{display:`flex`,gap:.5,mt:.5},children:[s&&u(f,{size:`small`,variant:`contained`,color:`primary`,startIcon:u(se,{sx:{fontSize:14}}),onClick:()=>s(n.content),sx:{textTransform:`none`,fontSize:`0.75rem`},children:C.t(`Apply blocks`)}),a&&u(f,{size:`small`,variant:`outlined`,startIcon:u(X,{sx:{fontSize:14}}),onClick:()=>a(n.content),sx:{textTransform:`none`,fontSize:`0.75rem`},children:C.t(`Insert blocks`)})]})]},i):u(Te,{code:n.content,language:n.language||`javascript`,themeType:r,onInsertCode:a,onShowDiff:o,sourceRange:e.sourceRange||null},i):u(p,{sx:{wordBreak:`break-word`,color:d.palette.text.primary},children:je(n.content,d)},i))})]})};function Ne(e){let t=(e||``).toLowerCase();return t.includes(`blockly`)||t.includes(`rules`)?`blockly`:t.includes(`typescript`)?`typescript`:`javascript`}function Pe(e,t){return`\`\`\`${t===`blockly`?`xml`:t}\n${e}\n\`\`\``}function Fe(e){let t=(e.code||``).trim(),n=Ne(e.language),r=e.rangeLabel?` (${e.rangeLabel})`:``;switch(e.action){case`explain`:return t?[`Please explain what this ioBroker ${n} code does${r}.`,`Focus on: which datapoints it reads/writes, which triggers fire it, and any side-effects.`,``,Pe(t,n)].join(`
|
|
20
20
|
`):null;case`refactor`:return t?[`Refactor this ioBroker ${n} code${r} 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.`,``,Pe(t,n)].join(`
|
|
21
21
|
`):null;case`comment`:return t?[`Add clear, concise inline comments to this ioBroker ${n} code${r}.`,`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.`,``,Pe(t,n)].join(`
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{a as e,o as t,t as n}from"./rolldown-runtime-C0FnF6B9.js";import{$ as r,$n as i,C as a,Cn as o,Cr as s,F as c,Ft as l,I as u,It as d,L as f,N as p,Ot as m,Qn as h,Rt as g,T as _,U as v,Vt as y,W as b,X as x,_ as S,gn as C,hn as w,j as T,mn as E,nr as D,p as O,q as k,vn as A,w as j,wr as M,x as N,xn as P,yn as F,zn as I}from"./_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__113183188387379__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-D-gi6Mty.js";import{t as L}from"./Error-Ch2nx5uC.js";import{T as ee,w as R}from"./index-B0FfAYMN.js";import{t as z}from"./ScriptEditorVanillaMonaco-BDAw2Bw6.js";M();var B={editorDiv:{height:`100%`,width:`100%`,overflow:`hidden`,position:`relative`}},V=class extends D.Component{constructor(e){super(e),this.state={lines:(this.props.script||``).split(/\r\n|\n/)}}render(){return h(`div`,{style:B.editorDiv,children:h(z,{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:e=>this.props.onToggleBreakpoint(e)},`scriptEditor2`)},`scriptEditorDiv2`)}};M();var H=34,U={logBox:{width:`100%`,height:`100%`,position:`relative`,overflow:`hidden`},logBoxInner:e=>({display:`inline-block`,color:e.palette.mode===`dark`?`white`:`black`,width:`calc(100% - ${H}px)`,height:`100%`,overflow:`auto`,position:`relative`,verticalAlign:`top`}),info:e=>({background:e.palette.mode===`dark`?`darkgrey`:`lightgrey`,color:(e.palette.mode,`black`)}),error:e=>({background:`#FF0000`,color:e.palette.mode===`dark`?`black`:`white`}),warn:e=>({background:`#FF8000`,color:e.palette.mode===`dark`?`black`:`white`}),debug:e=>({background:`gray`,opacity:.8,color:e.palette.mode===`dark`?`black`:`white`}),silly:e=>({background:`gray`,opacity:.6,color:e.palette.mode===`dark`?`black`:`white`}),table:{fontFamily:`monospace`,width:`100%`},toolbox:{width:H,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 W(e){let t,n=e.getHours();return n<10&&(n=`0${n.toString()}`),t=`${n}:`,n=e.getMinutes(),n<10&&(n=`0${n.toString()}`),t+=`${n}:`,n=e.getSeconds(),n<10&&(n=`0${n.toString()}`),t+=`${n}.`,n=e.getMilliseconds(),n<10?n=`00${n.toString()}`:n<100&&(n=`0${n.toString()}`),t+=n,t}var G=class e extends D.Component{constructor(e){super(e),I(this,`messagesEnd`,void 0),this.state={goBottom:!0},this.messagesEnd=D.createRef()}static generateLine(e,t){return i(y,{component:`tr`,sx:U[e.severity],children:[h(`td`,{style:U.trTime,children:W(new Date(e.ts))}),h(`td`,{style:U.trSeverity,children:e.severity}),h(`td`,{children:e.text})]},`tr_${t}_${e.ts}`)}renderLogList(t){return t!=null&&t.length?i(y,{sx:U.logBoxInner,children:[h(`table`,{style:U.table,children:h(`tbody`,{children:t.map((t,n)=>e.generateLine(t,n))})},`logTable`),h(`div`,{ref:this.messagesEnd,style:{float:`left`,clear:`both`}},`logScrollPoint`)]},`logList`):h(y,{sx:U.logBoxInner,style:{paddingLeft:10},children:O.t(`Log outputs`)},`logList`)}onCopy(){S.copyToClipboard(this.props.console.map(e=>`${W(new Date(e.ts))} ${e.severity} ${e.text}`).join(`
|
|
2
|
+
`))}scrollToBottom(){var e;(e=this.messagesEnd)==null||(e=e.current)==null||e.scrollIntoView({behavior:`smooth`})}componentDidUpdate(){this.state.goBottom&&this.scrollToBottom()}render(){let e=this.props.console;return i(`div`,{style:U.logBox,children:[i(`div`,{style:U.toolbox,children:[h(E,{style:U.iconButtons,onClick:()=>this.setState({goBottom:!this.state.goBottom}),color:this.state.goBottom?`secondary`:void 0,size:`medium`,children:h(x,{})}),e!=null&&e.length?h(E,{style:U.iconButtons,onClick:()=>this.props.onClearAllLogs(),size:`medium`,children:h(f,{})}):null,e!=null&&e.length?h(E,{style:U.iconButtons,onClick:()=>this.onCopy(),size:`medium`,children:h(c,{})}):null]},`toolbox`),this.renderLogList(e)]})}},te=n(((t,n)=>{(function(r,i){typeof t==`object`&&typeof n==`object`?n.exports=i((M(),e(s))):typeof define==`function`&&define.amd?define([`react`],i):typeof t==`object`?t.reactJsonView=i((M(),e(s))):r.reactJsonView=i(r.React)})(t,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t||4&t&&typeof e==`object`&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&typeof e!=`string`)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=48)}([function(t,n){t.exports=e},function(e,t){var n=e.exports={version:`2.6.12`};typeof __e==`number`&&(__e=n)},function(e,t,n){var r=n(26)(`wks`),i=n(17),a=n(3).Symbol,o=typeof a==`function`;(e.exports=function(e){return r[e]||(r[e]=o&&a[e]||(o?a:i)(`Symbol.`+e))}).store=r},function(e,t){var n=e.exports=typeof window<`u`&&window.Math==Math?window:typeof self<`u`&&self.Math==Math?self:Function(`return this`)();typeof __g==`number`&&(__g=n)},function(e,t,n){e.exports=!n(8)((function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7}))},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(7),i=n(16);e.exports=n(4)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(10),i=n(35),a=n(23),o=Object.defineProperty;t.f=n(4)?Object.defineProperty:function(e,t,n){if(r(e),t=a(t,!0),r(n),i)try{return o(e,t,n)}catch{}if(`get`in n||`set`in n)throw TypeError(`Accessors not supported!`);return`value`in n&&(e[t]=n.value),e}},function(e,t){e.exports=function(e){try{return!!e()}catch{return!0}}},function(e,t,n){var r=n(40),i=n(22);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(11);e.exports=function(e){if(!r(e))throw TypeError(e+` is not an object!`);return e}},function(e,t){e.exports=function(e){return typeof e==`object`?e!==null:typeof e==`function`}},function(e,t){e.exports={}},function(e,t,n){var r=n(39),i=n(27);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t){e.exports=!0},function(e,t,n){var r=n(3),i=n(1),a=n(53),o=n(6),s=n(5),c=function(e,t,n){var l,u,d,f=e&c.F,p=e&c.G,m=e&c.S,h=e&c.P,g=e&c.B,_=e&c.W,v=p?i:i[t]||(i[t]={}),y=v.prototype,b=p?r:m?r[t]:(r[t]||{}).prototype;for(l in p&&(n=t),n)(u=!f&&b&&b[l]!==void 0)&&s(v,l)||(d=u?b[l]:n[l],v[l]=p&&typeof b[l]!=`function`?n[l]:g&&u?a(d,r):_&&b[l]==d?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(d):h&&typeof d==`function`?a(Function.call,d):d,h&&((v.virtual||={})[l]=d,e&c.R&&y&&!y[l]&&o(y,l,d)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return`Symbol(${e===void 0?``:e})_${(++n+r).toString(36)}`}},function(e,t,n){var r=n(22);e.exports=function(e){return Object(r(e))}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(52)(!0);n(34)(String,`String`,(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){e.exports=function(e){if(e==null)throw TypeError(`Can't call method on `+e);return e}},function(e,t,n){var r=n(11);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&typeof(n=e.toString)==`function`&&!r(i=n.call(e))||typeof(n=e.valueOf)==`function`&&!r(i=n.call(e))||!t&&typeof(n=e.toString)==`function`&&!r(i=n.call(e)))return i;throw TypeError(`Can't convert object to primitive value`)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(26)(`keys`),i=n(17);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t,n){var r=n(1),i=n(3),a=i[`__core-js_shared__`]||={};(e.exports=function(e,t){return a[e]||(a[e]=t===void 0?{}:t)})(`versions`,[]).push({version:r.version,mode:n(14)?`pure`:`global`,copyright:`© 2020 Denis Pushkarev (zloirock.ru)`})},function(e,t){e.exports=`constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf`.split(`,`)},function(e,t,n){var r=n(7).f,i=n(5),a=n(2)(`toStringTag`);e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,a)&&r(e,a,{configurable:!0,value:t})}},function(e,t,n){n(62);for(var r=n(3),i=n(6),a=n(12),o=n(2)(`toStringTag`),s=`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(`,`),c=0;c<s.length;c++){var l=s[c],u=r[l],d=u&&u.prototype;d&&!d[o]&&i(d,o,l),a[l]=a.Array}},function(e,t,n){t.f=n(2)},function(e,t,n){var r=n(3),i=n(1),a=n(14),o=n(30),s=n(7).f;e.exports=function(e){var t=i.Symbol||=a?{}:r.Symbol||{};e.charAt(0)==`_`||e in t||s(t,e,{value:o.f(e)})}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t){e.exports=function(e,t,n){return Math.min(Math.max(e,t),n)}},function(e,t,n){var r=n(14),i=n(15),a=n(37),o=n(6),s=n(12),c=n(55),l=n(28),u=n(61),d=n(2)(`iterator`),f=!([].keys&&`next`in[].keys()),p=function(){return this};e.exports=function(e,t,n,m,h,g,_){c(n,t,m);var v,y,b,x=function(e){if(!f&&e in T)return T[e];switch(e){case`keys`:case`values`:return function(){return new n(this,e)}}return function(){return new n(this,e)}},S=t+` Iterator`,C=h==`values`,w=!1,T=e.prototype,E=T[d]||T[`@@iterator`]||h&&T[h],D=E||x(h),O=h?C?x(`entries`):D:void 0,k=t==`Array`&&T.entries||E;if(k&&(b=u(k.call(new e)))!==Object.prototype&&b.next&&(l(b,S,!0),r||typeof b[d]==`function`||o(b,d,p)),C&&E&&E.name!==`values`&&(w=!0,D=function(){return E.call(this)}),r&&!_||!f&&!w&&T[d]||o(T,d,D),s[t]=D,s[S]=p,h){if(v={values:C?D:x(`values`),keys:g?D:x(`keys`),entries:O},_)for(y in v)y in T||a(T,y,v[y]);else i(i.P+i.F*(f||w),t,v)}return v}},function(e,t,n){e.exports=!n(4)&&!n(8)((function(){return Object.defineProperty(n(36)(`div`),"a",{get:function(){return 7}}).a!=7}))},function(e,t,n){var r=n(11),i=n(3).document,a=r(i)&&r(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){e.exports=n(6)},function(e,t,n){var r=n(10),i=n(56),a=n(27),o=n(25)(`IE_PROTO`),s=function(){},c=function(){var e,t=n(36)(`iframe`),r=a.length;for(t.style.display=`none`,n(60).appendChild(t),t.src=`javascript:`,(e=t.contentWindow.document).open(),e.write(`<script>document.F=Object<\/script>`),e.close(),c=e.F;r--;)delete c.prototype[a[r]];return c()};e.exports=Object.create||function(e,t){var n;return e===null?n=c():(s.prototype=r(e),n=new s,s.prototype=null,n[o]=e),t===void 0?n:i(n,t)}},function(e,t,n){var r=n(5),i=n(9),a=n(57)(!1),o=n(25)(`IE_PROTO`);e.exports=function(e,t){var n,s=i(e),c=0,l=[];for(n in s)n!=o&&r(s,n)&&l.push(n);for(;t.length>c;)r(s,n=t[c++])&&(~a(l,n)||l.push(n));return l}},function(e,t,n){var r=n(24);e.exports=Object(`z`).propertyIsEnumerable(0)?Object:function(e){return r(e)==`String`?e.split(``):Object(e)}},function(e,t,n){var r=n(39),i=n(27).concat(`length`,`prototype`);t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(24),i=n(2)(`toStringTag`),a=r(function(){return arguments}())==`Arguments`;e.exports=function(e){var t,n,o;return e===void 0?`Undefined`:e===null?`Null`:typeof(n=function(e,t){try{return e[t]}catch{}}(t=Object(e),i))==`string`?n:a?r(t):(o=r(t))==`Object`&&typeof t.callee==`function`?`Arguments`:o}},function(e,t){var n=function(){return this}();try{n||=Function(`return this`)()}catch{typeof window==`object`&&(n=window)}e.exports=n},function(e,t){var n=/-?\d+(\.\d+)?%?/g;e.exports=function(e){return e.match(n)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getBase16Theme=t.createStyling=t.invertTheme=void 0;var r=p(n(49)),i=p(n(76)),a=p(n(81)),o=p(n(89)),s=p(n(93)),c=function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(94)),l=p(n(132)),u=p(n(133)),d=p(n(138)),f=n(139);function p(e){return e&&e.__esModule?e:{default:e}}var m=c.default,h=(0,o.default)(m),g=(0,d.default)(u.default,f.rgb2yuv,(function(e){var t,n=(0,a.default)(e,3),r=n[0],i=n[1],o=n[2];return[(t=r,t<.25?1:t<.5?.9-t:1.1-t),i,o]}),f.yuv2rgb,l.default),_=function(e){return function(t){return{className:[t.className,e.className].filter(Boolean).join(` `),style:(0,i.default)({},t.style||{},e.style||{})}}},v=function(e,t){var n=(0,o.default)(t);for(var a in e)n.indexOf(a)===-1&&n.push(a);return n.reduce((function(n,a){return n[a]=function(e,t){if(e===void 0)return t;if(t===void 0)return e;var n=e===void 0?`undefined`:(0,r.default)(e),a=t===void 0?`undefined`:(0,r.default)(t);switch(n){case`string`:switch(a){case`string`:return[t,e].filter(Boolean).join(` `);case`object`:return _({className:e,style:t});case`function`:return function(n){var r=[...arguments].slice(1);return _({className:e})(t.apply(void 0,[n].concat(r)))}}case`object`:switch(a){case`string`:return _({className:t,style:e});case`object`:return(0,i.default)({},t,e);case`function`:return function(n){var r=[...arguments].slice(1);return _({style:e})(t.apply(void 0,[n].concat(r)))}}case`function`:switch(a){case`string`:return function(n){var r=[...arguments].slice(1);return e.apply(void 0,[_(n)({className:t})].concat(r))};case`object`:return function(n){var r=[...arguments].slice(1);return e.apply(void 0,[_(n)({style:t})].concat(r))};case`function`:return function(n){var r=[...arguments].slice(1);return e.apply(void 0,[t.apply(void 0,[n].concat(r))].concat(r))}}}}(e[a],t[a]),n}),{})},y=function(e,t){var n=[...arguments].slice(2);if(t===null)return e;Array.isArray(t)||(t=[t]);var a=t.map((function(t){return e[t]})).filter(Boolean).reduce((function(e,t){return typeof t==`string`?e.className=[e.className,t].filter(Boolean).join(` `):(t===void 0?`undefined`:(0,r.default)(t))===`object`?e.style=(0,i.default)({},e.style,t):typeof t==`function`&&(e=(0,i.default)({},e,t.apply(void 0,[e].concat(n)))),e}),{className:``,style:{}});return a.className||delete a.className,(0,o.default)(a.style).length===0&&delete a.style,a},b=t.invertTheme=function(e){return(0,o.default)(e).reduce((function(t,n){return t[n]=/^base/.test(n)?g(e[n]):n===`scheme`?e[n]+`:inverted`:e[n],t}),{})},x=(t.createStyling=(0,s.default)((function(e){var t=[...arguments].slice(3),n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=n.defaultBase16,c=a===void 0?m:a,l=n.base16Themes,u=x(r,l===void 0?null:l);u&&(r=(0,i.default)({},u,r));var d=h.reduce((function(e,t){return e[t]=r[t]||c[t],e}),{}),f=v((0,o.default)(r).reduce((function(e,t){return h.indexOf(t)===-1&&(e[t]=r[t]),e}),{}),e(d));return(0,s.default)(y,2).apply(void 0,[f].concat(t))}),3),t.getBase16Theme=function(e,t){if(e&&e.extend&&(e=e.extend),typeof e==`string`){var n=e.split(`:`),r=(0,a.default)(n,2),i=r[0],o=r[1];e=(t||{})[i]||c[i],o===`inverted`&&(e=b(e))}return e&&e.hasOwnProperty(`base00`)?e:void 0})},function(e,t,n){var r,i=typeof Reflect==`object`?Reflect:null,a=i&&typeof i.apply==`function`?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&typeof i.ownKeys==`function`?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(n,r){function i(){a!==void 0&&e.removeListener(`error`,a),n([].slice.call(arguments))}var a;t!==`error`&&(a=function(n){e.removeListener(t,i),r(n)},e.once(`error`,a)),e.once(t,i)}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function l(e){if(typeof e!=`function`)throw TypeError(`The "listener" argument must be of type Function. Received type `+typeof e)}function u(e){return e._maxListeners===void 0?s.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var i,a,o,s;if(l(n),(a=e._events)===void 0?(a=e._events=Object.create(null),e._eventsCount=0):(a.newListener!==void 0&&(e.emit(`newListener`,t,n.listener?n.listener:n),a=e._events),o=a[t]),o===void 0)o=a[t]=n,++e._eventsCount;else if(typeof o==`function`?o=a[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=u(e))>0&&o.length>i&&!o.warned){o.warned=!0;var c=Error(`Possible EventEmitter memory leak detected. `+o.length+` `+String(t)+` listeners added. Use emitter.setMaxListeners() to increase limit`);c.name=`MaxListenersExceededWarning`,c.emitter=e,c.type=t,c.count=o.length,s=c,console&&console.warn&&console.warn(s)}return e}function f(){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 p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}function m(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i==`function`?n?[i.listener||i]:[i]:n?function(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):g(i,i.length)}function h(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n==`function`)return 1;if(n!==void 0)return n.length}return 0}function g(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received `+e+`.`);c=e}}),s.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "n" is out of range. It must be a non-negative number. Received `+e+`.`);return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r=e===`error`,i=this._events;if(i!==void 0)r&&=i.error===void 0;else if(!r)return!1;if(r){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=Error(`Unhandled error.`+(o?` (`+o.message+`)`:``));throw s.context=o,s}var c=i[e];if(c===void 0)return!1;if(typeof c==`function`)a(c,this,t);else{var l=c.length,u=g(c,l);for(n=0;n<l;++n)a(u[n],this,t)}return!0},s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)},s.prototype.once=function(e,t){return l(t),this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,a,o;if(l(t),(r=this._events)===void 0||(n=r[e])===void 0)return this;if(n===t||n.listener===t)--this._eventsCount==0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit(`removeListener`,e,n.listener||t));else if(typeof n!=`function`){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit(`removeListener`,e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if((n=this._events)===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i,a=Object.keys(n);for(r=0;r<a.length;++r)(i=a[r])!==`removeListener`&&this.removeAllListeners(i);return this.removeAllListeners(`removeListener`),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(t=n[e])==`function`)this.removeListener(e,t);else if(t!==void 0)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return m(this,e,!0)},s.prototype.rawListeners=function(e){return m(this,e,!1)},s.listenerCount=function(e,t){return typeof e.listenerCount==`function`?e.listenerCount(t):h.call(e,t)},s.prototype.listenerCount=h,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){e.exports.Dispatcher=n(140)},function(e,t,n){e.exports=n(142)},function(e,t,n){t.__esModule=!0;var r=o(n(50)),i=o(n(65)),a=typeof i.default==`function`&&typeof r.default==`symbol`?function(e){return typeof e}:function(e){return e&&typeof i.default==`function`&&e.constructor===i.default&&e!==i.default.prototype?`symbol`:typeof e};function o(e){return e&&e.__esModule?e:{default:e}}t.default=typeof i.default==`function`&&a(r.default)===`symbol`?function(e){return e===void 0?`undefined`:a(e)}:function(e){return e&&typeof i.default==`function`&&e.constructor===i.default&&e!==i.default.prototype?`symbol`:e===void 0?`undefined`:a(e)}},function(e,t,n){e.exports={default:n(51),__esModule:!0}},function(e,t,n){n(20),n(29),e.exports=n(30).f(`iterator`)},function(e,t,n){var r=n(21),i=n(22);e.exports=function(e){return function(t,n){var a,o,s=String(i(t)),c=r(n),l=s.length;return c<0||c>=l?e?``:void 0:(a=s.charCodeAt(c))<55296||a>56319||c+1===l||(o=s.charCodeAt(c+1))<56320||o>57343?e?s.charAt(c):a:e?s.slice(c,c+2):o-56320+(a-55296<<10)+65536}}},function(e,t,n){var r=n(54);e.exports=function(e,t,n){if(r(e),t===void 0)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if(typeof e!=`function`)throw TypeError(e+` is not a function!`);return e}},function(e,t,n){var r=n(38),i=n(16),a=n(28),o={};n(6)(o,n(2)(`iterator`),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(o,{next:i(1,n)}),a(e,t+` Iterator`)}},function(e,t,n){var r=n(7),i=n(10),a=n(13);e.exports=n(4)?Object.defineProperties:function(e,t){i(e);for(var n,o=a(t),s=o.length,c=0;s>c;)r.f(e,n=o[c++],t[n]);return e}},function(e,t,n){var r=n(9),i=n(58),a=n(59);e.exports=function(e){return function(t,n,o){var s,c=r(t),l=i(c.length),u=a(o,l);if(e&&n!=n){for(;l>u;)if((s=c[u++])!=s)return!0}else for(;l>u;u++)if((e||u in c)&&c[u]===n)return e||u||0;return!e&&-1}}},function(e,t,n){var r=n(21),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t,n){var r=n(21),i=Math.max,a=Math.min;e.exports=function(e,t){return(e=r(e))<0?i(e+t,0):a(e,t)}},function(e,t,n){var r=n(3).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(5),i=n(18),a=n(25)(`IE_PROTO`),o=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,a)?e[a]:typeof e.constructor==`function`&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?o:null}},function(e,t,n){var r=n(63),i=n(64),a=n(12),o=n(9);e.exports=n(34)(Array,`Array`,(function(e,t){this._t=o(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):i(0,t==`keys`?n:t==`values`?e[n]:[n,e[n]])}),`values`),a.Arguments=a.Array,r(`keys`),r(`values`),r(`entries`)},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){e.exports={default:n(66),__esModule:!0}},function(e,t,n){n(67),n(73),n(74),n(75),e.exports=n(1).Symbol},function(e,t,n){var r=n(3),i=n(5),a=n(4),o=n(15),s=n(37),c=n(68).KEY,l=n(8),u=n(26),d=n(28),f=n(17),p=n(2),m=n(30),h=n(31),g=n(69),_=n(70),v=n(10),y=n(11),b=n(18),x=n(9),S=n(23),C=n(16),w=n(38),T=n(71),E=n(72),D=n(32),O=n(7),k=n(13),A=E.f,j=O.f,M=T.f,N=r.Symbol,P=r.JSON,F=P&&P.stringify,I=p(`_hidden`),L=p(`toPrimitive`),ee={}.propertyIsEnumerable,R=u(`symbol-registry`),z=u(`symbols`),B=u(`op-symbols`),V=Object.prototype,H=typeof N==`function`&&!!D.f,U=r.QObject,W=!U||!U.prototype||!U.prototype.findChild,G=a&&l((function(){return w(j({},`a`,{get:function(){return j(this,`a`,{value:7}).a}})).a!=7}))?function(e,t,n){var r=A(V,t);r&&delete V[t],j(e,t,n),r&&e!==V&&j(V,t,r)}:j,te=function(e){var t=z[e]=w(N.prototype);return t._k=e,t},K=H&&typeof N.iterator==`symbol`?function(e){return typeof e==`symbol`}:function(e){return e instanceof N},q=function(e,t,n){return e===V&&q(B,t,n),v(e),t=S(t,!0),v(n),i(z,t)?(n.enumerable?(i(e,I)&&e[I][t]&&(e[I][t]=!1),n=w(n,{enumerable:C(0,!1)})):(i(e,I)||j(e,I,C(1,{})),e[I][t]=!0),G(e,t,n)):j(e,t,n)},ne=function(e,t){v(e);for(var n,r=g(t=x(t)),i=0,a=r.length;a>i;)q(e,n=r[i++],t[n]);return e},re=function(e){var t=ee.call(this,e=S(e,!0));return!(this===V&&i(z,e)&&!i(B,e))&&(!(t||!i(this,e)||!i(z,e)||i(this,I)&&this[I][e])||t)},J=function(e,t){if(e=x(e),t=S(t,!0),e!==V||!i(z,t)||i(B,t)){var n=A(e,t);return!n||!i(z,t)||i(e,I)&&e[I][t]||(n.enumerable=!0),n}},Y=function(e){for(var t,n=M(x(e)),r=[],a=0;n.length>a;)i(z,t=n[a++])||t==I||t==c||r.push(t);return r},ie=function(e){for(var t,n=e===V,r=M(n?B:x(e)),a=[],o=0;r.length>o;)!i(z,t=r[o++])||n&&!i(V,t)||a.push(z[t]);return a};H||(s((N=function(){if(this instanceof N)throw TypeError(`Symbol is not a constructor!`);var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===V&&t.call(B,n),i(this,I)&&i(this[I],e)&&(this[I][e]=!1),G(this,e,C(1,n))};return a&&W&&G(V,e,{configurable:!0,set:t}),te(e)}).prototype,`toString`,(function(){return this._k})),E.f=J,O.f=q,n(41).f=T.f=Y,n(19).f=re,D.f=ie,a&&!n(14)&&s(V,`propertyIsEnumerable`,re,!0),m.f=function(e){return te(p(e))}),o(o.G+o.W+o.F*!H,{Symbol:N});for(var X=`hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables`.split(`,`),Z=0;X.length>Z;)p(X[Z++]);for(var ae=k(p.store),oe=0;ae.length>oe;)h(ae[oe++]);o(o.S+o.F*!H,`Symbol`,{for:function(e){return i(R,e+=``)?R[e]:R[e]=N(e)},keyFor:function(e){if(!K(e))throw TypeError(e+` is not a symbol!`);for(var t in R)if(R[t]===e)return t},useSetter:function(){W=!0},useSimple:function(){W=!1}}),o(o.S+o.F*!H,`Object`,{create:function(e,t){return t===void 0?w(e):ne(w(e),t)},defineProperty:q,defineProperties:ne,getOwnPropertyDescriptor:J,getOwnPropertyNames:Y,getOwnPropertySymbols:ie});var se=l((function(){D.f(1)}));o(o.S+o.F*se,`Object`,{getOwnPropertySymbols:function(e){return D.f(b(e))}}),P&&o(o.S+o.F*(!H||l((function(){var e=N();return F([e])!=`[null]`||F({a:e})!=`{}`||F(Object(e))!=`{}`}))),`JSON`,{stringify:function(e){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=t=r[1],(y(t)||e!==void 0)&&!K(e))return _(t)||(t=function(e,t){if(typeof n==`function`&&(t=n.call(this,e,t)),!K(t))return t}),r[1]=t,F.apply(P,r)}}),N.prototype[L]||n(6)(N.prototype,L,N.prototype.valueOf),d(N,`Symbol`),d(Math,`Math`,!0),d(r.JSON,`JSON`,!0)},function(e,t,n){var r=n(17)(`meta`),i=n(11),a=n(5),o=n(7).f,s=0,c=Object.isExtensible||function(){return!0},l=!n(8)((function(){return c(Object.preventExtensions({}))})),u=function(e){o(e,r,{value:{i:`O`+ ++s,w:{}}})},d=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!i(e))return typeof e==`symbol`?e:(typeof e==`string`?`S`:`P`)+e;if(!a(e,r)){if(!c(e))return`F`;if(!t)return`E`;u(e)}return e[r].i},getWeak:function(e,t){if(!a(e,r)){if(!c(e))return!0;if(!t)return!1;u(e)}return e[r].w},onFreeze:function(e){return l&&d.NEED&&c(e)&&!a(e,r)&&u(e),e}}},function(e,t,n){var r=n(13),i=n(32),a=n(19);e.exports=function(e){var t=r(e),n=i.f;if(n)for(var o,s=n(e),c=a.f,l=0;s.length>l;)c.call(e,o=s[l++])&&t.push(o);return t}},function(e,t,n){var r=n(24);e.exports=Array.isArray||function(e){return r(e)==`Array`}},function(e,t,n){var r=n(9),i=n(41).f,a={}.toString,o=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return o&&a.call(e)==`[object Window]`?function(e){try{return i(e)}catch{return o.slice()}}(e):i(r(e))}},function(e,t,n){var r=n(19),i=n(16),a=n(9),o=n(23),s=n(5),c=n(35),l=Object.getOwnPropertyDescriptor;t.f=n(4)?l:function(e,t){if(e=a(e),t=o(t,!0),c)try{return l(e,t)}catch{}if(s(e,t))return i(!r.f.call(e,t),e[t])}},function(e,t){},function(e,t,n){n(31)(`asyncIterator`)},function(e,t,n){n(31)(`observable`)},function(e,t,n){t.__esModule=!0;var r;t.default=((r=n(77))&&r.__esModule?r:{default:r}).default||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}},function(e,t,n){e.exports={default:n(78),__esModule:!0}},function(e,t,n){n(79),e.exports=n(1).Object.assign},function(e,t,n){var r=n(15);r(r.S+r.F,`Object`,{assign:n(80)})},function(e,t,n){var r=n(4),i=n(13),a=n(32),o=n(19),s=n(18),c=n(40),l=Object.assign;e.exports=!l||n(8)((function(){var e={},t={},n=Symbol(),r=`abcdefghijklmnopqrst`;return e[n]=7,r.split(``).forEach((function(e){t[e]=e})),l({},e)[n]!=7||Object.keys(l({},t)).join(``)!=r}))?function(e,t){for(var n=s(e),l=arguments.length,u=1,d=a.f,f=o.f;l>u;)for(var p,m=c(arguments[u++]),h=d?i(m).concat(d(m)):i(m),g=h.length,_=0;g>_;)p=h[_++],r&&!f.call(m,p)||(n[p]=m[p]);return n}:l},function(e,t,n){t.__esModule=!0;var r=a(n(82)),i=a(n(85));function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){if(Array.isArray(e))return e;if((0,r.default)(Object(e)))return function(e,t){var n=[],r=!0,a=!1,o=void 0;try{for(var s,c=(0,i.default)(e);!(r=(s=c.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{!r&&c.return&&c.return()}finally{if(a)throw o}}return n}(e,t);throw TypeError(`Invalid attempt to destructure non-iterable instance`)}},function(e,t,n){e.exports={default:n(83),__esModule:!0}},function(e,t,n){n(29),n(20),e.exports=n(84)},function(e,t,n){var r=n(42),i=n(2)(`iterator`),a=n(12);e.exports=n(1).isIterable=function(e){var t=Object(e);return t[i]!==void 0||`@@iterator`in t||a.hasOwnProperty(r(t))}},function(e,t,n){e.exports={default:n(86),__esModule:!0}},function(e,t,n){n(29),n(20),e.exports=n(87)},function(e,t,n){var r=n(10),i=n(88);e.exports=n(1).getIterator=function(e){var t=i(e);if(typeof t!=`function`)throw TypeError(e+` is not iterable!`);return r(t.call(e))}},function(e,t,n){var r=n(42),i=n(2)(`iterator`),a=n(12);e.exports=n(1).getIteratorMethod=function(e){if(e!=null)return e[i]||e[`@@iterator`]||a[r(e)]}},function(e,t,n){e.exports={default:n(90),__esModule:!0}},function(e,t,n){n(91),e.exports=n(1).Object.keys},function(e,t,n){var r=n(18),i=n(13);n(92)(`keys`,(function(){return function(e){return i(r(e))}}))},function(e,t,n){var r=n(15),i=n(1),a=n(8);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],o={};o[e]=t(n),r(r.S+r.F*a((function(){n(1)})),`Object`,o)}},function(e,t,n){(function(t){var n=[[`ary`,128],[`bind`,1],[`bindKey`,2],[`curry`,8],[`curryRight`,16],[`flip`,512],[`partial`,32],[`partialRight`,64],[`rearg`,256]],r=/^\s+|\s+$/g,i=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,a=/\{\n\/\* \[wrapped with (.+)\] \*/,o=/,? & /,s=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,l=/^\[object .+?Constructor\]$/,u=/^0o[0-7]+$/i,d=/^(?:0|[1-9]\d*)$/,f=parseInt,p=typeof t==`object`&&t&&t.Object===Object&&t,m=typeof self==`object`&&self&&self.Object===Object&&self,h=p||m||Function(`return this`)();function g(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function _(e,t){return!!(e&&e.length)&&function(e,t,n){if(t!=t)return function(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}(e,v,n);for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}(e,t,0)>-1}function v(e){return e!=e}function y(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&r++;return r}function b(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var o=e[n];o!==t&&o!==`__lodash_placeholder__`||(e[n]=`__lodash_placeholder__`,a[i++]=n)}return a}var x,S,C,w=Function.prototype,T=Object.prototype,E=h[`__core-js_shared__`],D=(x=/[^.]+$/.exec(E&&E.keys&&E.keys.IE_PROTO||``))?`Symbol(src)_1.`+x:``,O=w.toString,k=T.hasOwnProperty,A=T.toString,j=RegExp(`^`+O.call(k).replace(/[\\^$.*+?()[\]{}|]/g,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`),M=Object.create,N=Math.max,P=Math.min,F=(S=W(Object,`defineProperty`),(C=W.name)&&C.length>2?S:void 0);function I(e){return Y(e)?M(e):{}}function L(e){return!(!Y(e)||function(e){return!!D&&D in e}(e))&&(function(e){var t=Y(e)?A.call(e):``;return t==`[object Function]`||t==`[object GeneratorFunction]`}(e)||function(e){var t=!1;if(e!=null&&typeof e.toString!=`function`)try{t=!!(e+``)}catch{}return t}(e)?j:l).test(function(e){if(e!=null){try{return O.call(e)}catch{}try{return e+``}catch{}}return``}(e))}function ee(e,t,n,r){for(var i=-1,a=e.length,o=n.length,s=-1,c=t.length,l=N(a-o,0),u=Array(c+l),d=!r;++s<c;)u[s]=t[s];for(;++i<o;)(d||i<a)&&(u[n[i]]=e[i]);for(;l--;)u[s++]=e[i++];return u}function R(e,t,n,r){for(var i=-1,a=e.length,o=-1,s=n.length,c=-1,l=t.length,u=N(a-s,0),d=Array(u+l),f=!r;++i<u;)d[i]=e[i];for(var p=i;++c<l;)d[p+c]=t[c];for(;++o<s;)(f||i<a)&&(d[p+n[o]]=e[i++]);return d}function z(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=I(e.prototype),r=e.apply(n,t);return Y(r)?r:n}}function B(e,t,n,r,i,a,o,s,c,l){var u=128&t,d=1&t,f=2&t,p=24&t,m=512&t,g=f?void 0:z(e);return function _(){for(var v=arguments.length,x=Array(v),S=v;S--;)x[S]=arguments[S];if(p)var C=U(_),w=y(x,C);if(r&&(x=ee(x,r,i,p)),a&&(x=R(x,a,o,p)),v-=w,p&&v<l){var T=b(x,C);return V(e,t,B,_.placeholder,n,x,T,s,c,l-v)}var E=d?n:this,D=f?E[e]:e;return v=x.length,s?x=q(x,s):m&&v>1&&x.reverse(),u&&c<v&&(x.length=c),this&&this!==h&&this instanceof _&&(D=g||z(D)),D.apply(E,x)}}function V(e,t,n,r,i,a,o,s,c,l){var u=8&t;t|=u?32:64,4&(t&=~(u?64:32))||(t&=-4);var d=n(e,t,i,u?a:void 0,u?o:void 0,u?void 0:a,u?void 0:o,s,c,l);return d.placeholder=r,ne(d,e,t)}function H(e,t,n,r,i,a,o,s){var c=2&t;if(!c&&typeof e!=`function`)throw TypeError(`Expected a function`);var l=r?r.length:0;if(l||(t&=-97,r=i=void 0),o=o===void 0?o:N(X(o),0),s=s===void 0?s:X(s),l-=i?i.length:0,64&t){var u=r,d=i;r=i=void 0}var f=[e,t,n,r,i,u,d,a,o,s];if(e=f[0],t=f[1],n=f[2],r=f[3],i=f[4],!(s=f[9]=f[9]==null?c?0:e.length:N(f[9]-l,0))&&24&t&&(t&=-25),t&&t!=1)p=t==8||t==16?function(e,t,n){var r=z(e);return function i(){for(var a=arguments.length,o=Array(a),s=a,c=U(i);s--;)o[s]=arguments[s];var l=a<3&&o[0]!==c&&o[a-1]!==c?[]:b(o,c);return(a-=l.length)<n?V(e,t,B,i.placeholder,void 0,o,l,void 0,void 0,n-a):g(this&&this!==h&&this instanceof i?r:e,this,o)}}(e,t,s):t!=32&&t!=33||i.length?B.apply(void 0,f):function(e,t,n,r){var i=1&t,a=z(e);return function t(){for(var o=-1,s=arguments.length,c=-1,l=r.length,u=Array(l+s),d=this&&this!==h&&this instanceof t?a:e;++c<l;)u[c]=r[c];for(;s--;)u[c++]=arguments[++o];return g(d,i?n:this,u)}}(e,t,n,r);else var p=function(e,t,n){var r=1&t,i=z(e);return function t(){return(this&&this!==h&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,n);return ne(p,e,t)}function U(e){return e.placeholder}function W(e,t){var n=function(e,t){return e==null?void 0:e[t]}(e,t);return L(n)?n:void 0}function G(e){var t=e.match(a);return t?t[1].split(o):[]}function te(e,t){var n=t.length,r=n-1;return t[r]=(n>1?`& `:``)+t[r],t=t.join(n>2?`, `:` `),e.replace(i,`{
|
|
3
|
+
/* [wrapped with `+t+`] */
|
|
4
|
+
`)}function K(e,t){return!!(t??=9007199254740991)&&(typeof e==`number`||d.test(e))&&e>-1&&e%1==0&&e<t}function q(e,t){for(var n=e.length,r=P(t.length,n),i=function(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}(e);r--;){var a=t[r];e[r]=K(a,n)?i[a]:void 0}return e}var ne=F?function(e,t,n){var r,i=t+``;return F(e,`toString`,{configurable:!0,enumerable:!1,value:(r=te(i,re(G(i),n)),function(){return r})})}:function(e){return e};function re(e,t){return function(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););}(n,(function(n){var r=`_.`+n[0];t&n[1]&&!_(e,r)&&e.push(r)})),e.sort()}function J(e,t,n){var r=H(e,8,void 0,void 0,void 0,void 0,void 0,t=n?void 0:t);return r.placeholder=J.placeholder,r}function Y(e){var t=typeof e;return!!e&&(t==`object`||t==`function`)}function ie(e){return e?(e=function(e){if(typeof e==`number`)return e;if(function(e){return typeof e==`symbol`||function(e){return!!e&&typeof e==`object`}(e)&&A.call(e)==`[object Symbol]`}(e))return NaN;if(Y(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=Y(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=e.replace(r,``);var n=c.test(e);return n||u.test(e)?f(e.slice(2),n?2:8):s.test(e)?NaN:+e}(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:e===0?e:0}function X(e){var t=ie(e),n=t%1;return t==t?n?t-n:t:0}J.placeholder={},e.exports=J}).call(this,n(43))},function(e,t,n){function r(e){return e&&e.__esModule?e.default:e}t.__esModule=!0,t.threezerotwofour=r(n(95)),t.apathy=r(n(96)),t.ashes=r(n(97)),t.atelierDune=r(n(98)),t.atelierForest=r(n(99)),t.atelierHeath=r(n(100)),t.atelierLakeside=r(n(101)),t.atelierSeaside=r(n(102)),t.bespin=r(n(103)),t.brewer=r(n(104)),t.bright=r(n(105)),t.chalk=r(n(106)),t.codeschool=r(n(107)),t.colors=r(n(108)),t.default=r(n(109)),t.eighties=r(n(110)),t.embers=r(n(111)),t.flat=r(n(112)),t.google=r(n(113)),t.grayscale=r(n(114)),t.greenscreen=r(n(115)),t.harmonic=r(n(116)),t.hopscotch=r(n(117)),t.isotope=r(n(118)),t.marrakesh=r(n(119)),t.mocha=r(n(120)),t.monokai=r(n(121)),t.ocean=r(n(122)),t.paraiso=r(n(123)),t.pop=r(n(124)),t.railscasts=r(n(125)),t.shapeshifter=r(n(126)),t.solarized=r(n(127)),t.summerfruit=r(n(128)),t.tomorrow=r(n(129)),t.tube=r(n(130)),t.twilight=r(n(131))},function(e,t,n){t.__esModule=!0,t.default={scheme:`threezerotwofour`,author:`jan t. sott (http://github.com/idleberg)`,base00:`#090300`,base01:`#3a3432`,base02:`#4a4543`,base03:`#5c5855`,base04:`#807d7c`,base05:`#a5a2a2`,base06:`#d6d5d4`,base07:`#f7f7f7`,base08:`#db2d20`,base09:`#e8bbd0`,base0A:`#fded02`,base0B:`#01a252`,base0C:`#b5e4f4`,base0D:`#01a0e4`,base0E:`#a16a94`,base0F:`#cdab53`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`apathy`,author:`jannik siebert (https://github.com/janniks)`,base00:`#031A16`,base01:`#0B342D`,base02:`#184E45`,base03:`#2B685E`,base04:`#5F9C92`,base05:`#81B5AC`,base06:`#A7CEC8`,base07:`#D2E7E4`,base08:`#3E9688`,base09:`#3E7996`,base0A:`#3E4C96`,base0B:`#883E96`,base0C:`#963E4C`,base0D:`#96883E`,base0E:`#4C963E`,base0F:`#3E965B`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`ashes`,author:`jannik siebert (https://github.com/janniks)`,base00:`#1C2023`,base01:`#393F45`,base02:`#565E65`,base03:`#747C84`,base04:`#ADB3BA`,base05:`#C7CCD1`,base06:`#DFE2E5`,base07:`#F3F4F5`,base08:`#C7AE95`,base09:`#C7C795`,base0A:`#AEC795`,base0B:`#95C7AE`,base0C:`#95AEC7`,base0D:`#AE95C7`,base0E:`#C795AE`,base0F:`#C79595`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`atelier dune`,author:`bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune)`,base00:`#20201d`,base01:`#292824`,base02:`#6e6b5e`,base03:`#7d7a68`,base04:`#999580`,base05:`#a6a28c`,base06:`#e8e4cf`,base07:`#fefbec`,base08:`#d73737`,base09:`#b65611`,base0A:`#cfb017`,base0B:`#60ac39`,base0C:`#1fad83`,base0D:`#6684e1`,base0E:`#b854d4`,base0F:`#d43552`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`atelier forest`,author:`bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest)`,base00:`#1b1918`,base01:`#2c2421`,base02:`#68615e`,base03:`#766e6b`,base04:`#9c9491`,base05:`#a8a19f`,base06:`#e6e2e0`,base07:`#f1efee`,base08:`#f22c40`,base09:`#df5320`,base0A:`#d5911a`,base0B:`#5ab738`,base0C:`#00ad9c`,base0D:`#407ee7`,base0E:`#6666ea`,base0F:`#c33ff3`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`atelier heath`,author:`bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath)`,base00:`#1b181b`,base01:`#292329`,base02:`#695d69`,base03:`#776977`,base04:`#9e8f9e`,base05:`#ab9bab`,base06:`#d8cad8`,base07:`#f7f3f7`,base08:`#ca402b`,base09:`#a65926`,base0A:`#bb8a35`,base0B:`#379a37`,base0C:`#159393`,base0D:`#516aec`,base0E:`#7b59c0`,base0F:`#cc33cc`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`atelier lakeside`,author:`bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/)`,base00:`#161b1d`,base01:`#1f292e`,base02:`#516d7b`,base03:`#5a7b8c`,base04:`#7195a8`,base05:`#7ea2b4`,base06:`#c1e4f6`,base07:`#ebf8ff`,base08:`#d22d72`,base09:`#935c25`,base0A:`#8a8a0f`,base0B:`#568c3b`,base0C:`#2d8f6f`,base0D:`#257fad`,base0E:`#5d5db1`,base0F:`#b72dd2`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`atelier seaside`,author:`bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/)`,base00:`#131513`,base01:`#242924`,base02:`#5e6e5e`,base03:`#687d68`,base04:`#809980`,base05:`#8ca68c`,base06:`#cfe8cf`,base07:`#f0fff0`,base08:`#e6193c`,base09:`#87711d`,base0A:`#c3c322`,base0B:`#29a329`,base0C:`#1999b3`,base0D:`#3d62f5`,base0E:`#ad2bee`,base0F:`#e619c3`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`bespin`,author:`jan t. sott`,base00:`#28211c`,base01:`#36312e`,base02:`#5e5d5c`,base03:`#666666`,base04:`#797977`,base05:`#8a8986`,base06:`#9d9b97`,base07:`#baae9e`,base08:`#cf6a4c`,base09:`#cf7d34`,base0A:`#f9ee98`,base0B:`#54be0d`,base0C:`#afc4db`,base0D:`#5ea6ea`,base0E:`#9b859d`,base0F:`#937121`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`brewer`,author:`timothée poisot (http://github.com/tpoisot)`,base00:`#0c0d0e`,base01:`#2e2f30`,base02:`#515253`,base03:`#737475`,base04:`#959697`,base05:`#b7b8b9`,base06:`#dadbdc`,base07:`#fcfdfe`,base08:`#e31a1c`,base09:`#e6550d`,base0A:`#dca060`,base0B:`#31a354`,base0C:`#80b1d3`,base0D:`#3182bd`,base0E:`#756bb1`,base0F:`#b15928`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`bright`,author:`chris kempson (http://chriskempson.com)`,base00:`#000000`,base01:`#303030`,base02:`#505050`,base03:`#b0b0b0`,base04:`#d0d0d0`,base05:`#e0e0e0`,base06:`#f5f5f5`,base07:`#ffffff`,base08:`#fb0120`,base09:`#fc6d24`,base0A:`#fda331`,base0B:`#a1c659`,base0C:`#76c7b7`,base0D:`#6fb3d2`,base0E:`#d381c3`,base0F:`#be643c`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`chalk`,author:`chris kempson (http://chriskempson.com)`,base00:`#151515`,base01:`#202020`,base02:`#303030`,base03:`#505050`,base04:`#b0b0b0`,base05:`#d0d0d0`,base06:`#e0e0e0`,base07:`#f5f5f5`,base08:`#fb9fb1`,base09:`#eda987`,base0A:`#ddb26f`,base0B:`#acc267`,base0C:`#12cfc0`,base0D:`#6fc2ef`,base0E:`#e1a3ee`,base0F:`#deaf8f`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`codeschool`,author:`brettof86`,base00:`#232c31`,base01:`#1c3657`,base02:`#2a343a`,base03:`#3f4944`,base04:`#84898c`,base05:`#9ea7a6`,base06:`#a7cfa3`,base07:`#b5d8f6`,base08:`#2a5491`,base09:`#43820d`,base0A:`#a03b1e`,base0B:`#237986`,base0C:`#b02f30`,base0D:`#484d79`,base0E:`#c59820`,base0F:`#c98344`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`colors`,author:`mrmrs (http://clrs.cc)`,base00:`#111111`,base01:`#333333`,base02:`#555555`,base03:`#777777`,base04:`#999999`,base05:`#bbbbbb`,base06:`#dddddd`,base07:`#ffffff`,base08:`#ff4136`,base09:`#ff851b`,base0A:`#ffdc00`,base0B:`#2ecc40`,base0C:`#7fdbff`,base0D:`#0074d9`,base0E:`#b10dc9`,base0F:`#85144b`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`default`,author:`chris kempson (http://chriskempson.com)`,base00:`#181818`,base01:`#282828`,base02:`#383838`,base03:`#585858`,base04:`#b8b8b8`,base05:`#d8d8d8`,base06:`#e8e8e8`,base07:`#f8f8f8`,base08:`#ab4642`,base09:`#dc9656`,base0A:`#f7ca88`,base0B:`#a1b56c`,base0C:`#86c1b9`,base0D:`#7cafc2`,base0E:`#ba8baf`,base0F:`#a16946`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`eighties`,author:`chris kempson (http://chriskempson.com)`,base00:`#2d2d2d`,base01:`#393939`,base02:`#515151`,base03:`#747369`,base04:`#a09f93`,base05:`#d3d0c8`,base06:`#e8e6df`,base07:`#f2f0ec`,base08:`#f2777a`,base09:`#f99157`,base0A:`#ffcc66`,base0B:`#99cc99`,base0C:`#66cccc`,base0D:`#6699cc`,base0E:`#cc99cc`,base0F:`#d27b53`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`embers`,author:`jannik siebert (https://github.com/janniks)`,base00:`#16130F`,base01:`#2C2620`,base02:`#433B32`,base03:`#5A5047`,base04:`#8A8075`,base05:`#A39A90`,base06:`#BEB6AE`,base07:`#DBD6D1`,base08:`#826D57`,base09:`#828257`,base0A:`#6D8257`,base0B:`#57826D`,base0C:`#576D82`,base0D:`#6D5782`,base0E:`#82576D`,base0F:`#825757`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`flat`,author:`chris kempson (http://chriskempson.com)`,base00:`#2C3E50`,base01:`#34495E`,base02:`#7F8C8D`,base03:`#95A5A6`,base04:`#BDC3C7`,base05:`#e0e0e0`,base06:`#f5f5f5`,base07:`#ECF0F1`,base08:`#E74C3C`,base09:`#E67E22`,base0A:`#F1C40F`,base0B:`#2ECC71`,base0C:`#1ABC9C`,base0D:`#3498DB`,base0E:`#9B59B6`,base0F:`#be643c`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`google`,author:`seth wright (http://sethawright.com)`,base00:`#1d1f21`,base01:`#282a2e`,base02:`#373b41`,base03:`#969896`,base04:`#b4b7b4`,base05:`#c5c8c6`,base06:`#e0e0e0`,base07:`#ffffff`,base08:`#CC342B`,base09:`#F96A38`,base0A:`#FBA922`,base0B:`#198844`,base0C:`#3971ED`,base0D:`#3971ED`,base0E:`#A36AC7`,base0F:`#3971ED`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`grayscale`,author:`alexandre gavioli (https://github.com/alexx2/)`,base00:`#101010`,base01:`#252525`,base02:`#464646`,base03:`#525252`,base04:`#ababab`,base05:`#b9b9b9`,base06:`#e3e3e3`,base07:`#f7f7f7`,base08:`#7c7c7c`,base09:`#999999`,base0A:`#a0a0a0`,base0B:`#8e8e8e`,base0C:`#868686`,base0D:`#686868`,base0E:`#747474`,base0F:`#5e5e5e`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`green screen`,author:`chris kempson (http://chriskempson.com)`,base00:`#001100`,base01:`#003300`,base02:`#005500`,base03:`#007700`,base04:`#009900`,base05:`#00bb00`,base06:`#00dd00`,base07:`#00ff00`,base08:`#007700`,base09:`#009900`,base0A:`#007700`,base0B:`#00bb00`,base0C:`#005500`,base0D:`#009900`,base0E:`#00bb00`,base0F:`#005500`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`harmonic16`,author:`jannik siebert (https://github.com/janniks)`,base00:`#0b1c2c`,base01:`#223b54`,base02:`#405c79`,base03:`#627e99`,base04:`#aabcce`,base05:`#cbd6e2`,base06:`#e5ebf1`,base07:`#f7f9fb`,base08:`#bf8b56`,base09:`#bfbf56`,base0A:`#8bbf56`,base0B:`#56bf8b`,base0C:`#568bbf`,base0D:`#8b56bf`,base0E:`#bf568b`,base0F:`#bf5656`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`hopscotch`,author:`jan t. sott`,base00:`#322931`,base01:`#433b42`,base02:`#5c545b`,base03:`#797379`,base04:`#989498`,base05:`#b9b5b8`,base06:`#d5d3d5`,base07:`#ffffff`,base08:`#dd464c`,base09:`#fd8b19`,base0A:`#fdcc59`,base0B:`#8fc13e`,base0C:`#149b93`,base0D:`#1290bf`,base0E:`#c85e7c`,base0F:`#b33508`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`isotope`,author:`jan t. sott`,base00:`#000000`,base01:`#404040`,base02:`#606060`,base03:`#808080`,base04:`#c0c0c0`,base05:`#d0d0d0`,base06:`#e0e0e0`,base07:`#ffffff`,base08:`#ff0000`,base09:`#ff9900`,base0A:`#ff0099`,base0B:`#33ff00`,base0C:`#00ffff`,base0D:`#0066ff`,base0E:`#cc00ff`,base0F:`#3300ff`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`marrakesh`,author:`alexandre gavioli (http://github.com/alexx2/)`,base00:`#201602`,base01:`#302e00`,base02:`#5f5b17`,base03:`#6c6823`,base04:`#86813b`,base05:`#948e48`,base06:`#ccc37a`,base07:`#faf0a5`,base08:`#c35359`,base09:`#b36144`,base0A:`#a88339`,base0B:`#18974e`,base0C:`#75a738`,base0D:`#477ca1`,base0E:`#8868b3`,base0F:`#b3588e`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`mocha`,author:`chris kempson (http://chriskempson.com)`,base00:`#3B3228`,base01:`#534636`,base02:`#645240`,base03:`#7e705a`,base04:`#b8afad`,base05:`#d0c8c6`,base06:`#e9e1dd`,base07:`#f5eeeb`,base08:`#cb6077`,base09:`#d28b71`,base0A:`#f4bc87`,base0B:`#beb55b`,base0C:`#7bbda4`,base0D:`#8ab3b5`,base0E:`#a89bb9`,base0F:`#bb9584`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`monokai`,author:`wimer hazenberg (http://www.monokai.nl)`,base00:`#272822`,base01:`#383830`,base02:`#49483e`,base03:`#75715e`,base04:`#a59f85`,base05:`#f8f8f2`,base06:`#f5f4f1`,base07:`#f9f8f5`,base08:`#f92672`,base09:`#fd971f`,base0A:`#f4bf75`,base0B:`#a6e22e`,base0C:`#a1efe4`,base0D:`#66d9ef`,base0E:`#ae81ff`,base0F:`#cc6633`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`ocean`,author:`chris kempson (http://chriskempson.com)`,base00:`#2b303b`,base01:`#343d46`,base02:`#4f5b66`,base03:`#65737e`,base04:`#a7adba`,base05:`#c0c5ce`,base06:`#dfe1e8`,base07:`#eff1f5`,base08:`#bf616a`,base09:`#d08770`,base0A:`#ebcb8b`,base0B:`#a3be8c`,base0C:`#96b5b4`,base0D:`#8fa1b3`,base0E:`#b48ead`,base0F:`#ab7967`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`paraiso`,author:`jan t. sott`,base00:`#2f1e2e`,base01:`#41323f`,base02:`#4f424c`,base03:`#776e71`,base04:`#8d8687`,base05:`#a39e9b`,base06:`#b9b6b0`,base07:`#e7e9db`,base08:`#ef6155`,base09:`#f99b15`,base0A:`#fec418`,base0B:`#48b685`,base0C:`#5bc4bf`,base0D:`#06b6ef`,base0E:`#815ba4`,base0F:`#e96ba8`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`pop`,author:`chris kempson (http://chriskempson.com)`,base00:`#000000`,base01:`#202020`,base02:`#303030`,base03:`#505050`,base04:`#b0b0b0`,base05:`#d0d0d0`,base06:`#e0e0e0`,base07:`#ffffff`,base08:`#eb008a`,base09:`#f29333`,base0A:`#f8ca12`,base0B:`#37b349`,base0C:`#00aabb`,base0D:`#0e5a94`,base0E:`#b31e8d`,base0F:`#7a2d00`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`railscasts`,author:`ryan bates (http://railscasts.com)`,base00:`#2b2b2b`,base01:`#272935`,base02:`#3a4055`,base03:`#5a647e`,base04:`#d4cfc9`,base05:`#e6e1dc`,base06:`#f4f1ed`,base07:`#f9f7f3`,base08:`#da4939`,base09:`#cc7833`,base0A:`#ffc66d`,base0B:`#a5c261`,base0C:`#519f50`,base0D:`#6d9cbe`,base0E:`#b6b3eb`,base0F:`#bc9458`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`shapeshifter`,author:`tyler benziger (http://tybenz.com)`,base00:`#000000`,base01:`#040404`,base02:`#102015`,base03:`#343434`,base04:`#555555`,base05:`#ababab`,base06:`#e0e0e0`,base07:`#f9f9f9`,base08:`#e92f2f`,base09:`#e09448`,base0A:`#dddd13`,base0B:`#0ed839`,base0C:`#23edda`,base0D:`#3b48e3`,base0E:`#f996e2`,base0F:`#69542d`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`solarized`,author:`ethan schoonover (http://ethanschoonover.com/solarized)`,base00:`#002b36`,base01:`#073642`,base02:`#586e75`,base03:`#657b83`,base04:`#839496`,base05:`#93a1a1`,base06:`#eee8d5`,base07:`#fdf6e3`,base08:`#dc322f`,base09:`#cb4b16`,base0A:`#b58900`,base0B:`#859900`,base0C:`#2aa198`,base0D:`#268bd2`,base0E:`#6c71c4`,base0F:`#d33682`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`summerfruit`,author:`christopher corley (http://cscorley.github.io/)`,base00:`#151515`,base01:`#202020`,base02:`#303030`,base03:`#505050`,base04:`#B0B0B0`,base05:`#D0D0D0`,base06:`#E0E0E0`,base07:`#FFFFFF`,base08:`#FF0086`,base09:`#FD8900`,base0A:`#ABA800`,base0B:`#00C918`,base0C:`#1faaaa`,base0D:`#3777E6`,base0E:`#AD00A1`,base0F:`#cc6633`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`tomorrow`,author:`chris kempson (http://chriskempson.com)`,base00:`#1d1f21`,base01:`#282a2e`,base02:`#373b41`,base03:`#969896`,base04:`#b4b7b4`,base05:`#c5c8c6`,base06:`#e0e0e0`,base07:`#ffffff`,base08:`#cc6666`,base09:`#de935f`,base0A:`#f0c674`,base0B:`#b5bd68`,base0C:`#8abeb7`,base0D:`#81a2be`,base0E:`#b294bb`,base0F:`#a3685a`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`london tube`,author:`jan t. sott`,base00:`#231f20`,base01:`#1c3f95`,base02:`#5a5758`,base03:`#737171`,base04:`#959ca1`,base05:`#d9d8d8`,base06:`#e7e7e8`,base07:`#ffffff`,base08:`#ee2e24`,base09:`#f386a1`,base0A:`#ffd204`,base0B:`#00853e`,base0C:`#85cebc`,base0D:`#009ddc`,base0E:`#98005d`,base0F:`#b06110`},e.exports=t.default},function(e,t,n){t.__esModule=!0,t.default={scheme:`twilight`,author:`david hart (http://hart-dev.com)`,base00:`#1e1e1e`,base01:`#323537`,base02:`#464b50`,base03:`#5f5a60`,base04:`#838184`,base05:`#a7a7a7`,base06:`#c3c3c3`,base07:`#ffffff`,base08:`#cf6a4c`,base09:`#cda869`,base0A:`#f9ee98`,base0B:`#8f9d6a`,base0C:`#afc4db`,base0D:`#7587a6`,base0E:`#9b859d`,base0F:`#9b703f`},e.exports=t.default},function(e,t,n){var r=n(33);function i(e){var t=Math.round(r(e,0,255)).toString(16);return t.length==1?`0`+t:t}e.exports=function(e){var t=e.length===4?i(255*e[3]):``;return`#`+i(e[0])+i(e[1])+i(e[2])+t}},function(e,t,n){var r=n(134),i=n(135),a=n(136),o=n(137),s={"#":i,hsl:function(e){var t=r(e),n=o(t);return t.length===4&&n.push(t[3]),n},rgb:a};function c(e){for(var t in s)if(e.indexOf(t)===0)return s[t](e)}c.rgb=a,c.hsl=r,c.hex=i,e.exports=c},function(e,t,n){var r=n(44),i=n(33);function a(e,t){switch(e=parseFloat(e),t){case 0:return i(e,0,360);case 1:case 2:return i(e,0,100);case 3:return i(e,0,1)}}e.exports=function(e){return r(e).map(a)}},function(e,t){e.exports=function(e){e.length!==4&&e.length!==5||(e=function(e){for(var t=`#`,n=1;n<e.length;n++){var r=e.charAt(n);t+=r+r}return t}(e));var t=[parseInt(e.substring(1,3),16),parseInt(e.substring(3,5),16),parseInt(e.substring(5,7),16)];if(e.length===9){var n=parseFloat((parseInt(e.substring(7,9),16)/255).toFixed(2));t.push(n)}return t}},function(e,t,n){var r=n(44),i=n(33);function a(e,t){return t<3?e.indexOf(`%`)==-1?i(parseInt(e,10),0,255):Math.round(255*i(parseInt(e,10),0,100)/100):i(parseFloat(e),0,1)}e.exports=function(e){return r(e).map(a)}},function(e,t){e.exports=function(e){var t,n,r,i,a,o=e[0]/360,s=e[1]/100,c=e[2]/100;if(s==0)return[a=255*c,a,a];t=2*c-(n=c<.5?c*(1+s):c+s-c*s),i=[0,0,0];for(var l=0;l<3;l++)(r=o+1/3*-(l-1))<0&&r++,r>1&&r--,a=6*r<1?t+6*(n-t)*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,i[l]=255*a;return i}},function(e,t,n){(function(t){var n=typeof t==`object`&&t&&t.Object===Object&&t,r=typeof self==`object`&&self&&self.Object===Object&&self,i=n||r||Function(`return this`)();function a(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function o(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var s=Object.prototype,c=s.hasOwnProperty,l=s.toString,u=i.Symbol,d=s.propertyIsEnumerable,f=u?u.isConcatSpreadable:void 0,p=Math.max;function m(e){return h(e)||function(e){return function(e){return function(e){return!!e&&typeof e==`object`}(e)&&function(e){return e!=null&&function(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&(t==`object`||t==`function`)}(e)?l.call(e):``;return t==`[object Function]`||t==`[object GeneratorFunction]`}(e)}(e)}(e)&&c.call(e,`callee`)&&(!d.call(e,`callee`)||l.call(e)==`[object Arguments]`)}(e)||!!(f&&e&&e[f])}var h=Array.isArray,g,_,v;e.exports=(_=function(e){var t=(e=function e(t,n,r,i,a){var s=-1,c=t.length;for(r||=m,a||=[];++s<c;){var l=t[s];n>0&&r(l)?n>1?e(l,n-1,r,i,a):o(a,l):i||(a[a.length]=l)}return a}(e,1)).length,n=t;for(g&&e.reverse();n--;)if(typeof e[n]!=`function`)throw TypeError(`Expected a function`);return function(){for(var n=0,r=t?e[n].apply(this,arguments):arguments[0];++n<t;)r=e[n].call(this,r);return r}},v=p(v===void 0?_.length-1:v,0),function(){for(var e=arguments,t=-1,n=p(e.length-v,0),r=Array(n);++t<n;)r[t]=e[v+t];t=-1;for(var i=Array(v+1);++t<v;)i[t]=e[t];return i[v]=r,a(_,this,i)})}).call(this,n(43))},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.yuv2rgb=function(e){var t,n,r,i=e[0],a=e[1],o=e[2];return t=1*i+0*a+1.13983*o,n=1*i+-.39465*a+-.5806*o,r=1*i+2.02311*a+0*o,t=Math.min(Math.max(0,t),1),n=Math.min(Math.max(0,n),1),r=Math.min(Math.max(0,r),1),[255*t,255*n,255*r]},t.rgb2yuv=function(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255;return[.299*t+.587*n+.114*r,-.14713*t+-.28886*n+.436*r,.615*t+-.51499*n+-.10001*r]}},function(e,t,n){function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=n(141);e.exports=function(){function e(){r(this,`_callbacks`,void 0),r(this,`_isDispatching`,void 0),r(this,`_isHandled`,void 0),r(this,`_isPending`,void 0),r(this,`_lastID`,void 0),r(this,`_pendingPayload`,void 0),this._callbacks={},this._isDispatching=!1,this._isHandled={},this._isPending={},this._lastID=1}var t=e.prototype;return t.register=function(e){var t=`ID_`+this._lastID++;return this._callbacks[t]=e,t},t.unregister=function(e){this._callbacks[e]||i(!1),delete this._callbacks[e]},t.waitFor=function(e){this._isDispatching||i(!1);for(var t=0;t<e.length;t++){var n=e[t];this._isPending[n]?this._isHandled[n]||i(!1):(this._callbacks[n]||i(!1),this._invokeCallback(n))}},t.dispatch=function(e){this._isDispatching&&i(!1),this._startDispatching(e);try{for(var t in this._callbacks)this._isPending[t]||this._invokeCallback(t)}finally{this._stopDispatching()}},t.isDispatching=function(){return this._isDispatching},t._invokeCallback=function(e){this._isPending[e]=!0,this._callbacks[e](this._pendingPayload),this._isHandled[e]=!0},t._startDispatching=function(e){for(var t in this._callbacks)this._isPending[t]=!1,this._isHandled[t]=!1;this._pendingPayload=e,this._isDispatching=!0},t._stopDispatching=function(){delete this._pendingPayload,this._isDispatching=!1},e}()},function(e,t,n){e.exports=function(e,t){var n=[...arguments].slice(2);if(!e){var r;if(t===void 0)r=Error(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{var i=0;(r=Error(t.replace(/%s/g,(function(){return String(n[i++])})))).name=`Invariant Violation`}throw r.framesToPop=1,r}}},function(e,t,n){function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),e}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e){return(f=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e})(e)}function p(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function m(e,t){return!t||f(t)!==`object`&&typeof t!=`function`?p(e):t}function h(e){var t=function(){if(typeof Reflect>`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,r=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m(this,n)}}n.r(t);var g=n(0),_=n.n(g);function v(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function y(e){this.setState(function(t){return this.constructor.getDerivedStateFromProps(e,t)??null}.bind(this))}function b(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function x(e){var t=e.prototype;if(!t||!t.isReactComponent)throw Error(`Can only polyfill class components`);if(typeof e.getDerivedStateFromProps!=`function`&&typeof t.getSnapshotBeforeUpdate!=`function`)return e;var n=null,r=null,i=null;if(typeof t.componentWillMount==`function`?n=`componentWillMount`:typeof t.UNSAFE_componentWillMount==`function`&&(n=`UNSAFE_componentWillMount`),typeof t.componentWillReceiveProps==`function`?r=`componentWillReceiveProps`:typeof t.UNSAFE_componentWillReceiveProps==`function`&&(r=`UNSAFE_componentWillReceiveProps`),typeof t.componentWillUpdate==`function`?i=`componentWillUpdate`:typeof t.UNSAFE_componentWillUpdate==`function`&&(i=`UNSAFE_componentWillUpdate`),n!==null||r!==null||i!==null){var a=e.displayName||e.name,o=typeof e.getDerivedStateFromProps==`function`?`getDerivedStateFromProps()`:`getSnapshotBeforeUpdate()`;throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
5
|
+
|
|
6
|
+
`+a+` uses `+o+` but also contains the following legacy lifecycles:`+(n===null?``:`
|
|
7
|
+
`+n)+(r===null?``:`
|
|
8
|
+
`+r)+(i===null?``:`
|
|
9
|
+
`+i)+`
|
|
10
|
+
|
|
11
|
+
The above lifecycles should be removed. Learn more about this warning here:
|
|
12
|
+
https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps==`function`&&(t.componentWillMount=v,t.componentWillReceiveProps=y),typeof t.getSnapshotBeforeUpdate==`function`){if(typeof t.componentDidUpdate!=`function`)throw Error(`Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype`);t.componentWillUpdate=b;var s=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;s.call(this,e,t,r)}}return e}function S(e,t){if(e==null)return{};var n,r,i=function(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function C(e){var t=function(e){return{}.toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}(e);return t===`number`&&(t=isNaN(e)?`nan`:(0|e)==e?`integer`:`float`),t}v.__suppressDeprecationWarning=!0,y.__suppressDeprecationWarning=!0,b.__suppressDeprecationWarning=!0;var w={scheme:`rjv-default`,author:`mac gainor`,base00:`rgba(0, 0, 0, 0)`,base01:`rgb(245, 245, 245)`,base02:`rgb(235, 235, 235)`,base03:`#93a1a1`,base04:`rgba(0, 0, 0, 0.3)`,base05:`#586e75`,base06:`#073642`,base07:`#002b36`,base08:`#d33682`,base09:`#cb4b16`,base0A:`#dc322f`,base0B:`#859900`,base0C:`#6c71c4`,base0D:`#586e75`,base0E:`#2aa198`,base0F:`#268bd2`},T={scheme:`rjv-grey`,author:`mac gainor`,base00:`rgba(1, 1, 1, 0)`,base01:`rgba(1, 1, 1, 0.1)`,base02:`rgba(0, 0, 0, 0.2)`,base03:`rgba(1, 1, 1, 0.3)`,base04:`rgba(0, 0, 0, 0.4)`,base05:`rgba(1, 1, 1, 0.5)`,base06:`rgba(1, 1, 1, 0.6)`,base07:`rgba(1, 1, 1, 0.7)`,base08:`rgba(1, 1, 1, 0.8)`,base09:`rgba(1, 1, 1, 0.8)`,base0A:`rgba(1, 1, 1, 0.8)`,base0B:`rgba(1, 1, 1, 0.8)`,base0C:`rgba(1, 1, 1, 0.8)`,base0D:`rgba(1, 1, 1, 0.8)`,base0E:`rgba(1, 1, 1, 0.8)`,base0F:`rgba(1, 1, 1, 0.8)`},E={white:`#fff`,black:`#000`,transparent:`rgba(1, 1, 1, 0)`,globalFontFamily:`monospace`,globalCursor:`default`,indentBlockWidth:`5px`,braceFontWeight:`bold`,braceCursor:`pointer`,ellipsisFontSize:`18px`,ellipsisLineHeight:`10px`,ellipsisCursor:`pointer`,keyMargin:`0px 5px`,keyLetterSpacing:`0.5px`,keyFontStyle:`none`,keyBorderRadius:`3px`,keyColonWeight:`bold`,keyVerticalAlign:`top`,keyOpacity:`0.85`,keyOpacityHover:`1`,keyValPaddingTop:`3px`,keyValPaddingBottom:`3px`,keyValPaddingRight:`5px`,keyValBorderLeft:`1px solid`,keyValBorderHover:`2px solid`,keyValPaddingHover:`3px 5px 3px 4px`,pushedContentMarginLeft:`6px`,variableValuePaddingRight:`6px`,nullFontSize:`11px`,nullFontWeight:`bold`,nullPadding:`1px 2px`,nullBorderRadius:`3px`,nanFontSize:`11px`,nanFontWeight:`bold`,nanPadding:`1px 2px`,nanBorderRadius:`3px`,undefinedFontSize:`11px`,undefinedFontWeight:`bold`,undefinedPadding:`1px 2px`,undefinedBorderRadius:`3px`,dataTypeFontSize:`11px`,dataTypeMarginRight:`4px`,datatypeOpacity:`0.8`,objectSizeBorderRadius:`3px`,objectSizeFontStyle:`italic`,objectSizeMargin:`0px 6px 0px 0px`,clipboardCursor:`pointer`,clipboardCheckMarginLeft:`-12px`,metaDataPadding:`0px 0px 0px 10px`,arrayGroupMetaPadding:`0px 0px 0px 4px`,iconContainerWidth:`17px`,tooltipPadding:`4px`,editInputMinWidth:`130px`,editInputBorderRadius:`2px`,editInputPadding:`5px`,editInputMarginRight:`4px`,editInputFontFamily:`monospace`,iconCursor:`pointer`,iconFontSize:`15px`,iconPaddingRight:`1px`,dateValueMarginLeft:`2px`,iconMarginRight:`3px`,detectedRowPaddingTop:`3px`,addKeyCoverBackground:`rgba(255, 255, 255, 0.3)`,addKeyCoverPosition:`absolute`,addKeyCoverPositionPx:`0px`,addKeyModalWidth:`200px`,addKeyModalMargin:`auto`,addKeyModalPadding:`10px`,addKeyModalRadius:`3px`},D=n(45),O=function(e){var t=function(e){return{backgroundColor:e.base00,ellipsisColor:e.base09,braceColor:e.base07,expandedIcon:e.base0D,collapsedIcon:e.base0E,keyColor:e.base07,arrayKeyColor:e.base0C,objectSize:e.base04,copyToClipboard:e.base0F,copyToClipboardCheck:e.base0D,objectBorder:e.base02,dataTypes:{boolean:e.base0E,date:e.base0D,float:e.base0B,function:e.base0D,integer:e.base0F,string:e.base09,nan:e.base08,null:e.base0A,undefined:e.base05,regexp:e.base0A,background:e.base02},editVariable:{editIcon:e.base0E,cancelIcon:e.base09,removeIcon:e.base09,addIcon:e.base0E,checkIcon:e.base0E,background:e.base01,color:e.base0A,border:e.base07},addKeyModal:{background:e.base05,border:e.base04,color:e.base0A,labelColor:e.base01},validationFailure:{background:e.base09,iconColor:e.base01,fontColor:e.base01}}}(e);return{"app-container":{fontFamily:E.globalFontFamily,cursor:E.globalCursor,backgroundColor:t.backgroundColor,position:`relative`},ellipsis:{display:`inline-block`,color:t.ellipsisColor,fontSize:E.ellipsisFontSize,lineHeight:E.ellipsisLineHeight,cursor:E.ellipsisCursor},"brace-row":{display:`inline-block`,cursor:`pointer`},brace:{display:`inline-block`,cursor:E.braceCursor,fontWeight:E.braceFontWeight,color:t.braceColor},"expanded-icon":{color:t.expandedIcon},"collapsed-icon":{color:t.collapsedIcon},colon:{display:`inline-block`,margin:E.keyMargin,color:t.keyColor,verticalAlign:`top`},objectKeyVal:function(e,n){return{style:a({paddingTop:E.keyValPaddingTop,paddingRight:E.keyValPaddingRight,paddingBottom:E.keyValPaddingBottom,borderLeft:E.keyValBorderLeft+` `+t.objectBorder,":hover":{paddingLeft:n.paddingLeft-1+`px`,borderLeft:E.keyValBorderHover+` `+t.objectBorder}},n)}},"object-key-val-no-border":{padding:E.keyValPadding},"pushed-content":{marginLeft:E.pushedContentMarginLeft},variableValue:function(e,t){return{style:a({display:`inline-block`,paddingRight:E.variableValuePaddingRight,position:`relative`},t)}},"object-name":{display:`inline-block`,color:t.keyColor,letterSpacing:E.keyLetterSpacing,fontStyle:E.keyFontStyle,verticalAlign:E.keyVerticalAlign,opacity:E.keyOpacity,":hover":{opacity:E.keyOpacityHover}},"array-key":{display:`inline-block`,color:t.arrayKeyColor,letterSpacing:E.keyLetterSpacing,fontStyle:E.keyFontStyle,verticalAlign:E.keyVerticalAlign,opacity:E.keyOpacity,":hover":{opacity:E.keyOpacityHover}},"object-size":{color:t.objectSize,borderRadius:E.objectSizeBorderRadius,fontStyle:E.objectSizeFontStyle,margin:E.objectSizeMargin,cursor:`default`},"data-type-label":{fontSize:E.dataTypeFontSize,marginRight:E.dataTypeMarginRight,opacity:E.datatypeOpacity},boolean:{display:`inline-block`,color:t.dataTypes.boolean},date:{display:`inline-block`,color:t.dataTypes.date},"date-value":{marginLeft:E.dateValueMarginLeft},float:{display:`inline-block`,color:t.dataTypes.float},function:{display:`inline-block`,color:t.dataTypes.function,cursor:`pointer`,whiteSpace:`pre-line`},"function-value":{fontStyle:`italic`},integer:{display:`inline-block`,color:t.dataTypes.integer},string:{display:`inline-block`,color:t.dataTypes.string},nan:{display:`inline-block`,color:t.dataTypes.nan,fontSize:E.nanFontSize,fontWeight:E.nanFontWeight,backgroundColor:t.dataTypes.background,padding:E.nanPadding,borderRadius:E.nanBorderRadius},null:{display:`inline-block`,color:t.dataTypes.null,fontSize:E.nullFontSize,fontWeight:E.nullFontWeight,backgroundColor:t.dataTypes.background,padding:E.nullPadding,borderRadius:E.nullBorderRadius},undefined:{display:`inline-block`,color:t.dataTypes.undefined,fontSize:E.undefinedFontSize,padding:E.undefinedPadding,borderRadius:E.undefinedBorderRadius,backgroundColor:t.dataTypes.background},regexp:{display:`inline-block`,color:t.dataTypes.regexp},"copy-to-clipboard":{cursor:E.clipboardCursor},"copy-icon":{color:t.copyToClipboard,fontSize:E.iconFontSize,marginRight:E.iconMarginRight,verticalAlign:`top`},"copy-icon-copied":{color:t.copyToClipboardCheck,marginLeft:E.clipboardCheckMarginLeft},"array-group-meta-data":{display:`inline-block`,padding:E.arrayGroupMetaPadding},"object-meta-data":{display:`inline-block`,padding:E.metaDataPadding},"icon-container":{display:`inline-block`,width:E.iconContainerWidth},tooltip:{padding:E.tooltipPadding},removeVarIcon:{verticalAlign:`top`,display:`inline-block`,color:t.editVariable.removeIcon,cursor:E.iconCursor,fontSize:E.iconFontSize,marginRight:E.iconMarginRight},addVarIcon:{verticalAlign:`top`,display:`inline-block`,color:t.editVariable.addIcon,cursor:E.iconCursor,fontSize:E.iconFontSize,marginRight:E.iconMarginRight},editVarIcon:{verticalAlign:`top`,display:`inline-block`,color:t.editVariable.editIcon,cursor:E.iconCursor,fontSize:E.iconFontSize,marginRight:E.iconMarginRight},"edit-icon-container":{display:`inline-block`,verticalAlign:`top`},"check-icon":{display:`inline-block`,cursor:E.iconCursor,color:t.editVariable.checkIcon,fontSize:E.iconFontSize,paddingRight:E.iconPaddingRight},"cancel-icon":{display:`inline-block`,cursor:E.iconCursor,color:t.editVariable.cancelIcon,fontSize:E.iconFontSize,paddingRight:E.iconPaddingRight},"edit-input":{display:`inline-block`,minWidth:E.editInputMinWidth,borderRadius:E.editInputBorderRadius,backgroundColor:t.editVariable.background,color:t.editVariable.color,padding:E.editInputPadding,marginRight:E.editInputMarginRight,fontFamily:E.editInputFontFamily},"detected-row":{paddingTop:E.detectedRowPaddingTop},"key-modal-request":{position:E.addKeyCoverPosition,top:E.addKeyCoverPositionPx,left:E.addKeyCoverPositionPx,right:E.addKeyCoverPositionPx,bottom:E.addKeyCoverPositionPx,backgroundColor:E.addKeyCoverBackground},"key-modal":{width:E.addKeyModalWidth,backgroundColor:t.addKeyModal.background,marginLeft:E.addKeyModalMargin,marginRight:E.addKeyModalMargin,padding:E.addKeyModalPadding,borderRadius:E.addKeyModalRadius,marginTop:`15px`,position:`relative`},"key-modal-label":{color:t.addKeyModal.labelColor,marginLeft:`2px`,marginBottom:`5px`,fontSize:`11px`},"key-modal-input-container":{overflow:`hidden`},"key-modal-input":{width:`100%`,padding:`3px 6px`,fontFamily:`monospace`,color:t.addKeyModal.color,border:`none`,boxSizing:`border-box`,borderRadius:`2px`},"key-modal-cancel":{backgroundColor:t.editVariable.removeIcon,position:`absolute`,top:`0px`,right:`0px`,borderRadius:`0px 3px 0px 3px`,cursor:`pointer`},"key-modal-cancel-icon":{color:t.addKeyModal.labelColor,fontSize:E.iconFontSize,transform:`rotate(45deg)`},"key-modal-submit":{color:t.editVariable.addIcon,fontSize:E.iconFontSize,position:`absolute`,right:`2px`,top:`3px`,cursor:`pointer`},"function-ellipsis":{display:`inline-block`,color:t.ellipsisColor,fontSize:E.ellipsisFontSize,lineHeight:E.ellipsisLineHeight,cursor:E.ellipsisCursor},"validation-failure":{float:`right`,padding:`3px 6px`,borderRadius:`2px`,cursor:`pointer`,color:t.validationFailure.fontColor,backgroundColor:t.validationFailure.background},"validation-failure-label":{marginRight:`6px`},"validation-failure-clear":{position:`relative`,verticalAlign:`top`,cursor:`pointer`,color:t.validationFailure.iconColor,fontSize:E.iconFontSize,transform:`rotate(45deg)`}}};function k(e,t,n){return e||console.error(`theme has not been set`),function(e){var t=w;return!1!==e&&e!==`none`||(t=T),(0,D.createStyling)(O,{defaultBase16:t})(e)}(e)(t,n)}var A=function(e){u(n,e);var t=h(n);function n(){return o(this,n),t.apply(this,arguments)}return c(n,[{key:`render`,value:function(){var e=this.props,t=(e.rjvId,e.type_name),n=e.displayDataTypes,r=e.theme;return n?_.a.createElement(`span`,Object.assign({className:`data-type-label`},k(r,`data-type-label`)),t):null}}]),n}(_.a.PureComponent),j=function(e){u(n,e);var t=h(n);function n(){return o(this,n),t.apply(this,arguments)}return c(n,[{key:`render`,value:function(){var e=this.props;return _.a.createElement(`div`,k(e.theme,`boolean`),_.a.createElement(A,Object.assign({type_name:`bool`},e)),e.value?`true`:`false`)}}]),n}(_.a.PureComponent),M=function(e){u(n,e);var t=h(n);function n(){return o(this,n),t.apply(this,arguments)}return c(n,[{key:`render`,value:function(){var e=this.props;return _.a.createElement(`div`,k(e.theme,`date`),_.a.createElement(A,Object.assign({type_name:`date`},e)),_.a.createElement(`span`,Object.assign({className:`date-value`},k(e.theme,`date-value`)),e.value.toLocaleTimeString(`en-us`,{weekday:`short`,year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})))}}]),n}(_.a.PureComponent),N=function(e){u(n,e);var t=h(n);function n(){return o(this,n),t.apply(this,arguments)}return c(n,[{key:`render`,value:function(){var e=this.props;return _.a.createElement(`div`,k(e.theme,`float`),_.a.createElement(A,Object.assign({type_name:`float`},e)),this.props.value)}}]),n}(_.a.PureComponent);function P(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function F(e,t){if(e){if(typeof e==`string`)return P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P(e,t):void 0}}function I(e,t){var n;if(typeof Symbol>`u`||e[Symbol.iterator]==null){if(Array.isArray(e)||(n=F(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
13
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function L(e){return function(e){if(Array.isArray(e))return P(e)}(e)||function(e){if(typeof Symbol<`u`&&Symbol.iterator in Object(e))return Array.from(e)}(e)||F(e)||function(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
14
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}var ee=n(46),R=new(n(47)).Dispatcher,z=new(function(e){u(n,e);var t=h(n);function n(){var e;o(this,n);var r=[...arguments];return(e=t.call.apply(t,[this].concat(r))).objects={},e.set=function(t,n,r,i){e.objects[t]===void 0&&(e.objects[t]={}),e.objects[t][n]===void 0&&(e.objects[t][n]={}),e.objects[t][n][r]=i},e.get=function(t,n,r,i){return e.objects[t]===void 0||e.objects[t][n]===void 0||e.objects[t][n][r]==null?i:e.objects[t][n][r]},e.handleAction=function(t){var n=t.rjvId,r=t.data;switch(t.name){case`RESET`:e.emit(`reset-`+n);break;case`VARIABLE_UPDATED`:t.data.updated_src=e.updateSrc(n,r),e.set(n,`action`,`variable-update`,a(a({},r),{},{type:`variable-edited`})),e.emit(`variable-update-`+n);break;case`VARIABLE_REMOVED`:t.data.updated_src=e.updateSrc(n,r),e.set(n,`action`,`variable-update`,a(a({},r),{},{type:`variable-removed`})),e.emit(`variable-update-`+n);break;case`VARIABLE_ADDED`:t.data.updated_src=e.updateSrc(n,r),e.set(n,`action`,`variable-update`,a(a({},r),{},{type:`variable-added`})),e.emit(`variable-update-`+n);break;case`ADD_VARIABLE_KEY_REQUEST`:e.set(n,`action`,`new-key-request`,r),e.emit(`add-key-request-`+n)}},e.updateSrc=function(t,n){var r=n.name,i=n.namespace,a=n.new_value,o=(n.existing_value,n.variable_removed);i.shift();var s,c=e.get(t,`global`,`src`),l=e.deepCopy(c,L(i)),u=l,d=I(i);try{for(d.s();!(s=d.n()).done;)u=u[s.value]}catch(e){d.e(e)}finally{d.f()}return o?C(u)==`array`?u.splice(r,1):delete u[r]:r===null?l=a:u[r]=a,e.set(t,`global`,`src`,l),l},e.deepCopy=function(t,n){var r,i=C(t),o=n.shift();return i==`array`?r=L(t):i==`object`&&(r=a({},t)),o!==void 0&&(r[o]=e.deepCopy(t[o],n)),r},e}return n}(ee.EventEmitter));R.register(z.handleAction.bind(z));var B=z,V=function(e){u(n,e);var t=h(n);function n(e){var r;return o(this,n),(r=t.call(this,e)).toggleCollapsed=function(){r.setState({collapsed:!r.state.collapsed},(function(){B.set(r.props.rjvId,r.props.namespace,`collapsed`,r.state.collapsed)}))},r.getFunctionDisplay=function(e){var t=p(r).props;return e?_.a.createElement(`span`,null,r.props.value.toString().slice(9,-1).replace(/\{[\s\S]+/,``),_.a.createElement(`span`,{className:`function-collapsed`,style:{fontWeight:`bold`}},_.a.createElement(`span`,null,`{`),_.a.createElement(`span`,k(t.theme,`ellipsis`),`...`),_.a.createElement(`span`,null,`}`))):r.props.value.toString().slice(9,-1)},r.state={collapsed:B.get(e.rjvId,e.namespace,`collapsed`,!0)},r}return c(n,[{key:`render`,value:function(){var e=this.props,t=this.state.collapsed;return _.a.createElement(`div`,k(e.theme,`function`),_.a.createElement(A,Object.assign({type_name:`function`},e)),_.a.createElement(`span`,Object.assign({},k(e.theme,`function-value`),{className:`rjv-function-container`,onClick:this.toggleCollapsed}),this.getFunctionDisplay(t)))}}]),n}(_.a.PureComponent),H=function(e){u(n,e);var t=h(n);function n(){return o(this,n),t.apply(this,arguments)}return c(n,[{key:`render`,value:function(){return _.a.createElement(`div`,k(this.props.theme,`nan`),`NaN`)}}]),n}(_.a.PureComponent),U=function(e){u(n,e);var t=h(n);function n(){return o(this,n),t.apply(this,arguments)}return c(n,[{key:`render`,value:function(){return _.a.createElement(`div`,k(this.props.theme,`null`),`NULL`)}}]),n}(_.a.PureComponent),W=function(e){u(n,e);var t=h(n);function n(){return o(this,n),t.apply(this,arguments)}return c(n,[{key:`render`,value:function(){var e=this.props;return _.a.createElement(`div`,k(e.theme,`integer`),_.a.createElement(A,Object.assign({type_name:`int`},e)),this.props.value)}}]),n}(_.a.PureComponent),G=function(e){u(n,e);var t=h(n);function n(){return o(this,n),t.apply(this,arguments)}return c(n,[{key:`render`,value:function(){var e=this.props;return _.a.createElement(`div`,k(e.theme,`regexp`),_.a.createElement(A,Object.assign({type_name:`regexp`},e)),this.props.value.toString())}}]),n}(_.a.PureComponent),te=function(e){u(n,e);var t=h(n);function n(e){var r;return o(this,n),(r=t.call(this,e)).toggleCollapsed=function(){r.setState({collapsed:!r.state.collapsed},(function(){B.set(r.props.rjvId,r.props.namespace,`collapsed`,r.state.collapsed)}))},r.state={collapsed:B.get(e.rjvId,e.namespace,`collapsed`,!0)},r}return c(n,[{key:`render`,value:function(){this.state.collapsed;var e=this.props,t=e.collapseStringsAfterLength,n=e.theme,r=e.value,i={style:{cursor:`default`}};return C(t)===`integer`&&r.length>t&&(i.style.cursor=`pointer`,this.state.collapsed&&(r=_.a.createElement(`span`,null,r.substring(0,t),_.a.createElement(`span`,k(n,`ellipsis`),` ...`)))),_.a.createElement(`div`,k(n,`string`),_.a.createElement(A,Object.assign({type_name:`string`},e)),_.a.createElement(`span`,Object.assign({className:`string-value`},i,{onClick:this.toggleCollapsed}),`"`,r,`"`))}}]),n}(_.a.PureComponent),K=function(e){u(n,e);var t=h(n);function n(){return o(this,n),t.apply(this,arguments)}return c(n,[{key:`render`,value:function(){return _.a.createElement(`div`,k(this.props.theme,`undefined`),`undefined`)}}]),n}(_.a.PureComponent);function q(){return(q=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ne=g.useLayoutEffect,re=function(e){var t=(0,g.useRef)(e);return ne((function(){t.current=e})),t},J=function(e,t){typeof e==`function`?e(t):e.current=t},Y=function(e,t){var n=(0,g.useRef)();return(0,g.useCallback)((function(r){e.current=r,n.current&&J(n.current,null),n.current=t,t&&J(t,r)}),[t])},ie={"min-height":`0`,"max-height":`none`,height:`0`,visibility:`hidden`,overflow:`hidden`,position:`absolute`,"z-index":`-1000`,top:`0`,right:`0`},X=function(e){Object.keys(ie).forEach((function(t){e.style.setProperty(t,ie[t],`important`)}))},Z=null,ae=function(){},oe=[`borderBottomWidth`,`borderLeftWidth`,`borderRightWidth`,`borderTopWidth`,`boxSizing`,`fontFamily`,`fontSize`,`fontStyle`,`fontWeight`,`letterSpacing`,`lineHeight`,`paddingBottom`,`paddingLeft`,`paddingRight`,`paddingTop`,`tabSize`,`textIndent`,`textRendering`,`textTransform`,`width`],se=!!document.documentElement.currentStyle,ce=(0,g.forwardRef)(function(e,t){var n=e.cacheMeasurements,r=e.maxRows,i=e.minRows,a=e.onChange,o=a===void 0?ae:a,s=e.onHeightChange,c=s===void 0?ae:s,l=function(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,[`cacheMeasurements`,`maxRows`,`minRows`,`onChange`,`onHeightChange`]),u,d=l.value!==void 0,f=(0,g.useRef)(null),p=Y(f,t),m=(0,g.useRef)(0),h=(0,g.useRef)(),_=function(){var e=f.current,t=n&&h.current?h.current:function(e){var t=window.getComputedStyle(e);if(t===null)return null;var n,r=(n=t,oe.reduce((function(e,t){return e[t]=n[t],e}),{})),i=r.boxSizing;return i===``?null:(se&&i===`border-box`&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+`px`),{sizingStyle:r,paddingSize:parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),borderSize:parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth)})}(e);if(t){h.current=t;var a=function(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),Z||((Z=document.createElement(`textarea`)).setAttribute(`tab-index`,`-1`),Z.setAttribute(`aria-hidden`,`true`),X(Z)),Z.parentNode===null&&document.body.appendChild(Z);var i=e.paddingSize,a=e.borderSize,o=e.sizingStyle,s=o.boxSizing;Object.keys(o).forEach((function(e){var t=e;Z.style[t]=o[t]})),X(Z),Z.value=t;var c=function(e,t){var n=e.scrollHeight;return t.sizingStyle.boxSizing===`border-box`?n+t.borderSize:n-t.paddingSize}(Z,e);Z.value=`x`;var l=Z.scrollHeight-i,u=l*n;s===`border-box`&&(u=u+i+a),c=Math.max(u,c);var d=l*r;return s===`border-box`&&(d=d+i+a),[c=Math.min(d,c),l]}(t,e.value||e.placeholder||`x`,i,r),o=a[0],s=a[1];m.current!==o&&(m.current=o,e.style.setProperty(`height`,o+`px`,`important`),c(o,{rowHeight:s}))}};return(0,g.useLayoutEffect)(_),u=re(_),(0,g.useLayoutEffect)((function(){var e=function(e){u.current(e)};return window.addEventListener(`resize`,e),function(){window.removeEventListener(`resize`,e)}}),[]),(0,g.createElement)(`textarea`,q({},l,{onChange:function(e){d||_(),o(e)},ref:p}))});function le(e){e=e.trim();try{if((e=JSON.stringify(JSON.parse(e)))[0]===`[`)return Q(`array`,JSON.parse(e));if(e[0]===`{`)return Q(`object`,JSON.parse(e));if(e.match(/\-?\d+\.\d+/)&&e.match(/\-?\d+\.\d+/)[0]===e)return Q(`float`,parseFloat(e));if(e.match(/\-?\d+e-\d+/)&&e.match(/\-?\d+e-\d+/)[0]===e)return Q(`float`,Number(e));if(e.match(/\-?\d+/)&&e.match(/\-?\d+/)[0]===e)return Q(`integer`,parseInt(e));if(e.match(/\-?\d+e\+\d+/)&&e.match(/\-?\d+e\+\d+/)[0]===e)return Q(`integer`,Number(e))}catch{}switch(e=e.toLowerCase()){case`undefined`:return Q(`undefined`,void 0);case`nan`:return Q(`nan`,NaN);case`null`:return Q(`null`,null);case`true`:return Q(`boolean`,!0);case`false`:return Q(`boolean`,!1);default:if(e=Date.parse(e))return Q(`date`,new Date(e))}return Q(!1,null)}function Q(e,t){return{type:e,value:t}}var ue=function(e){u(n,e);var t=h(n);function n(){return o(this,n),t.apply(this,arguments)}return c(n,[{key:`render`,value:function(){var e=this.props,t=e.style,n=S(e,[`style`]);return _.a.createElement(`span`,n,_.a.createElement(`svg`,Object.assign({},$(t),{viewBox:`0 0 24 24`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_.a.createElement(`path`,{d:`M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M7,13H17V11H7`})))}}]),n}(_.a.PureComponent),de=function(e){u(n,e);var t=h(n);function n(){return o(this,n),t.apply(this,arguments)}return c(n,[{key:`render`,value:function(){var e=this.props,t=e.style,n=S(e,[`style`]);return _.a.createElement(`span`,n,_.a.createElement(`svg`,Object.assign({},$(t),{viewBox:`0 0 24 24`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_.a.createElement(`path`,{d:`M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M13,7H11V11H7V13H11V17H13V13H17V11H13V7Z`})))}}]),n}(_.a.PureComponent),fe=function(e){u(n,e);var t=h(n);function n(){return o(this,n),t.apply(this,arguments)}return c(n,[{key:`render`,value:function(){var e=this.props,t=e.style,n=S(e,[`style`]),r=$(t).style;return _.a.createElement(`span`,n,_.a.createElement(`svg`,{fill:r.color,width:r.height,height:r.width,style:r,viewBox:`0 0 1792 1792`},_.a.createElement(`path`,{d:`M1344 800v64q0 14-9 23t-23 9h-832q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h832q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z`})))}}]),n}(_.a.PureComponent),pe=function(e){u(n,e);var t=h(n);function n(){return o(this,n),t.apply(this,arguments)}return c(n,[{key:`render`,value:function(){var e=this.props,t=e.style,n=S(e,[`style`]),r=$(t).style;return _.a.createElement(`span`,n,_.a.createElement(`svg`,{fill:r.color,width:r.height,height:r.width,style:r,viewBox:`0 0 1792 1792`},_.a.createElement(`path`,{d:`M1344 800v64q0 14-9 23t-23 9h-352v352q0 14-9 23t-23 9h-64q-14 0-23-9t-9-23v-352h-352q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h352v-352q0-14 9-23t23-9h64q14 0 23 9t9 23v352h352q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z`})))}}]),n}(_.a.PureComponent),me=function(e){u(n,e);var t=h(n);function n(){return o(this,n),t.apply(this,arguments)}return c(n,[{key:`render`,value:function(){var e=this.props,t=e.style,n=S(e,[`style`]);return _.a.createElement(`span`,n,_.a.createElement(`svg`,{style:a(a({},$(t).style),{},{paddingLeft:`2px`,verticalAlign:`top`}),viewBox:`0 0 15 15`,fill:`currentColor`},_.a.createElement(`path`,{d:`M0 14l6-6-6-6z`})))}}]),n}(_.a.PureComponent),he=function(e){u(n,e);var t=h(n);function n(){return o(this,n),t.apply(this,arguments)}return c(n,[{key:`render`,value:function(){var e=this.props,t=e.style,n=S(e,[`style`]);return _.a.createElement(`span`,n,_.a.createElement(`svg`,{style:a(a({},$(t).style),{},{paddingLeft:`2px`,verticalAlign:`top`}),viewBox:`0 0 15 15`,fill:`currentColor`},_.a.createElement(`path`,{d:`M0 5l6 6 6-6z`})))}}]),n}(_.a.PureComponent),ge=function(e){u(n,e);var t=h(n);function n(){return o(this,n),t.apply(this,arguments)}return c(n,[{key:`render`,value:function(){var e=this.props,t=e.style,n=S(e,[`style`]);return _.a.createElement(`span`,n,_.a.createElement(`svg`,Object.assign({},$(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_.a.createElement(`g`,null,_.a.createElement(`path`,{d:`m30 35h-25v-22.5h25v7.5h2.5v-12.5c0-1.4-1.1-2.5-2.5-2.5h-7.5c0-2.8-2.2-5-5-5s-5 2.2-5 5h-7.5c-1.4 0-2.5 1.1-2.5 2.5v27.5c0 1.4 1.1 2.5 2.5 2.5h25c1.4 0 2.5-1.1 2.5-2.5v-5h-2.5v5z m-20-27.5h2.5s2.5-1.1 2.5-2.5 1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5 1.3 2.5 2.5 2.5h2.5s2.5 1.1 2.5 2.5h-20c0-1.5 1.1-2.5 2.5-2.5z m-2.5 20h5v-2.5h-5v2.5z m17.5-5v-5l-10 7.5 10 7.5v-5h12.5v-5h-12.5z m-17.5 10h7.5v-2.5h-7.5v2.5z m12.5-17.5h-12.5v2.5h12.5v-2.5z m-7.5 5h-5v2.5h5v-2.5z`}))))}}]),n}(_.a.PureComponent),_e=function(e){u(n,e);var t=h(n);function n(){return o(this,n),t.apply(this,arguments)}return c(n,[{key:`render`,value:function(){var e=this.props,t=e.style,n=S(e,[`style`]);return _.a.createElement(`span`,n,_.a.createElement(`svg`,Object.assign({},$(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_.a.createElement(`g`,null,_.a.createElement(`path`,{d:`m28.6 25q0-0.5-0.4-1l-4-4 4-4q0.4-0.5 0.4-1 0-0.6-0.4-1.1l-2-2q-0.4-0.4-1-0.4-0.6 0-1 0.4l-4.1 4.1-4-4.1q-0.4-0.4-1-0.4-0.6 0-1 0.4l-2 2q-0.5 0.5-0.5 1.1 0 0.5 0.5 1l4 4-4 4q-0.5 0.5-0.5 1 0 0.7 0.5 1.1l2 2q0.4 0.4 1 0.4 0.6 0 1-0.4l4-4.1 4.1 4.1q0.4 0.4 1 0.4 0.6 0 1-0.4l2-2q0.4-0.4 0.4-1z m8.7-5q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z`}))))}}]),n}(_.a.PureComponent),ve=function(e){u(n,e);var t=h(n);function n(){return o(this,n),t.apply(this,arguments)}return c(n,[{key:`render`,value:function(){var e=this.props,t=e.style,n=S(e,[`style`]);return _.a.createElement(`span`,n,_.a.createElement(`svg`,Object.assign({},$(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_.a.createElement(`g`,null,_.a.createElement(`path`,{d:`m30.1 21.4v-2.8q0-0.6-0.4-1t-1-0.5h-5.7v-5.7q0-0.6-0.4-1t-1-0.4h-2.9q-0.6 0-1 0.4t-0.4 1v5.7h-5.7q-0.6 0-1 0.5t-0.5 1v2.8q0 0.6 0.5 1t1 0.5h5.7v5.7q0 0.5 0.4 1t1 0.4h2.9q0.6 0 1-0.4t0.4-1v-5.7h5.7q0.6 0 1-0.5t0.4-1z m7.2-1.4q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z`}))))}}]),n}(_.a.PureComponent),ye=function(e){u(n,e);var t=h(n);function n(){return o(this,n),t.apply(this,arguments)}return c(n,[{key:`render`,value:function(){var e=this.props,t=e.style,n=S(e,[`style`]);return _.a.createElement(`span`,n,_.a.createElement(`svg`,Object.assign({},$(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_.a.createElement(`g`,null,_.a.createElement(`path`,{d:`m31.6 21.6h-10v10h-3.2v-10h-10v-3.2h10v-10h3.2v10h10v3.2z`}))))}}]),n}(_.a.PureComponent),be=function(e){u(n,e);var t=h(n);function n(){return o(this,n),t.apply(this,arguments)}return c(n,[{key:`render`,value:function(){var e=this.props,t=e.style,n=S(e,[`style`]);return _.a.createElement(`span`,n,_.a.createElement(`svg`,Object.assign({},$(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_.a.createElement(`g`,null,_.a.createElement(`path`,{d:`m19.8 26.4l2.6-2.6-3.4-3.4-2.6 2.6v1.3h2.2v2.1h1.2z m9.8-16q-0.3-0.4-0.7 0l-7.8 7.8q-0.4 0.4 0 0.7t0.7 0l7.8-7.8q0.4-0.4 0-0.7z m1.8 13.2v4.3q0 2.6-1.9 4.5t-4.5 1.9h-18.6q-2.6 0-4.5-1.9t-1.9-4.5v-18.6q0-2.7 1.9-4.6t4.5-1.8h18.6q1.4 0 2.6 0.5 0.3 0.2 0.4 0.5 0.1 0.4-0.2 0.7l-1.1 1.1q-0.3 0.3-0.7 0.1-0.5-0.1-1-0.1h-18.6q-1.4 0-2.5 1.1t-1 2.5v18.6q0 1.4 1 2.5t2.5 1h18.6q1.5 0 2.5-1t1.1-2.5v-2.9q0-0.2 0.2-0.4l1.4-1.5q0.3-0.3 0.8-0.1t0.4 0.6z m-2.1-16.5l6.4 6.5-15 15h-6.4v-6.5z m9.9 3l-2.1 2-6.4-6.4 2.1-2q0.6-0.7 1.5-0.7t1.5 0.7l3.4 3.4q0.6 0.6 0.6 1.5t-0.6 1.5z`}))))}}]),n}(_.a.PureComponent),xe=function(e){u(n,e);var t=h(n);function n(){return o(this,n),t.apply(this,arguments)}return c(n,[{key:`render`,value:function(){var e=this.props,t=e.style,n=S(e,[`style`]);return _.a.createElement(`span`,n,_.a.createElement(`svg`,Object.assign({},$(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_.a.createElement(`g`,null,_.a.createElement(`path`,{d:`m31.7 16.4q0-0.6-0.4-1l-2.1-2.1q-0.4-0.4-1-0.4t-1 0.4l-9.1 9.1-5-5q-0.5-0.4-1-0.4t-1 0.4l-2.1 2q-0.4 0.4-0.4 1 0 0.6 0.4 1l8.1 8.1q0.4 0.4 1 0.4 0.6 0 1-0.4l12.2-12.1q0.4-0.4 0.4-1z m5.6 3.6q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z`}))))}}]),n}(_.a.PureComponent);function $(e){return e||={},{style:a(a({verticalAlign:`middle`},e),{},{color:e.color?e.color:`#000000`,height:`1em`,width:`1em`})}}var Se=function(e){u(n,e);var t=h(n);function n(e){var r;return o(this,n),(r=t.call(this,e)).copiedTimer=null,r.handleCopy=function(){var e=document.createElement(`textarea`),t=r.props,n=t.clickCallback,i=t.src,a=t.namespace;e.innerHTML=JSON.stringify(r.clipboardValue(i),null,` `),document.body.appendChild(e),e.select(),document.execCommand(`copy`),document.body.removeChild(e),r.copiedTimer=setTimeout((function(){r.setState({copied:!1})}),5500),r.setState({copied:!0},(function(){typeof n==`function`&&n({src:i,namespace:a,name:a[a.length-1]})}))},r.getClippyIcon=function(){var e=r.props.theme;return r.state.copied?_.a.createElement(`span`,null,_.a.createElement(ge,Object.assign({className:`copy-icon`},k(e,`copy-icon`))),_.a.createElement(`span`,k(e,`copy-icon-copied`),`✔`)):_.a.createElement(ge,Object.assign({className:`copy-icon`},k(e,`copy-icon`)))},r.clipboardValue=function(e){switch(C(e)){case`function`:case`regexp`:return e.toString();default:return e}},r.state={copied:!1},r}return c(n,[{key:`componentWillUnmount`,value:function(){this.copiedTimer&&=(clearTimeout(this.copiedTimer),null)}},{key:`render`,value:function(){var e=this.props,t=(e.src,e.theme),n=e.hidden,r=e.rowHovered,i=k(t,`copy-to-clipboard`).style,o=`inline`;return n&&(o=`none`),_.a.createElement(`span`,{className:`copy-to-clipboard-container`,title:`Copy to clipboard`,style:{verticalAlign:`top`,display:r?`inline-block`:`none`}},_.a.createElement(`span`,{style:a(a({},i),{},{display:o}),onClick:this.handleCopy},this.getClippyIcon()))}}]),n}(_.a.PureComponent),Ce=function(e){u(n,e);var t=h(n);function n(e){var r;return o(this,n),(r=t.call(this,e)).getEditIcon=function(){var e=r.props,t=e.variable,n=e.theme;return _.a.createElement(`div`,{className:`click-to-edit`,style:{verticalAlign:`top`,display:r.state.hovered?`inline-block`:`none`}},_.a.createElement(be,Object.assign({className:`click-to-edit-icon`},k(n,`editVarIcon`),{onClick:function(){r.prepopInput(t)}})))},r.prepopInput=function(e){if(!1!==r.props.onEdit){var t=function(e){var t;switch(C(e)){case`undefined`:t=`undefined`;break;case`nan`:t=`NaN`;break;case`string`:t=e;break;case`date`:case`function`:case`regexp`:t=e.toString();break;default:try{t=JSON.stringify(e,null,` `)}catch{t=``}}return t}(e.value),n=le(t);r.setState({editMode:!0,editValue:t,parsedInput:{type:n.type,value:n.value}})}},r.getRemoveIcon=function(){var e=r.props,t=e.variable,n=e.namespace,i=e.theme,a=e.rjvId;return _.a.createElement(`div`,{className:`click-to-remove`,style:{verticalAlign:`top`,display:r.state.hovered?`inline-block`:`none`}},_.a.createElement(_e,Object.assign({className:`click-to-remove-icon`},k(i,`removeVarIcon`),{onClick:function(){R.dispatch({name:`VARIABLE_REMOVED`,rjvId:a,data:{name:t.name,namespace:n,existing_value:t.value,variable_removed:!0}})}})))},r.getValue=function(e,t){var n=!t&&e.type,i=p(r).props;switch(n){case!1:return r.getEditInput();case`string`:return _.a.createElement(te,Object.assign({value:e.value},i));case`integer`:return _.a.createElement(W,Object.assign({value:e.value},i));case`float`:return _.a.createElement(N,Object.assign({value:e.value},i));case`boolean`:return _.a.createElement(j,Object.assign({value:e.value},i));case`function`:return _.a.createElement(V,Object.assign({value:e.value},i));case`null`:return _.a.createElement(U,i);case`nan`:return _.a.createElement(H,i);case`undefined`:return _.a.createElement(K,i);case`date`:return _.a.createElement(M,Object.assign({value:e.value},i));case`regexp`:return _.a.createElement(G,Object.assign({value:e.value},i));default:return _.a.createElement(`div`,{className:`object-value`},JSON.stringify(e.value))}},r.getEditInput=function(){var e=r.props.theme,t=r.state.editValue;return _.a.createElement(`div`,null,_.a.createElement(ce,Object.assign({type:`text`,inputRef:function(e){return e&&e.focus()},value:t,className:`variable-editor`,onChange:function(e){var t=e.target.value,n=le(t);r.setState({editValue:t,parsedInput:{type:n.type,value:n.value}})},onKeyDown:function(e){switch(e.key){case`Escape`:r.setState({editMode:!1,editValue:``});break;case`Enter`:(e.ctrlKey||e.metaKey)&&r.submitEdit(!0)}e.stopPropagation()},placeholder:`update this value`,minRows:2},k(e,`edit-input`))),_.a.createElement(`div`,k(e,`edit-icon-container`),_.a.createElement(_e,Object.assign({className:`edit-cancel`},k(e,`cancel-icon`),{onClick:function(){r.setState({editMode:!1,editValue:``})}})),_.a.createElement(xe,Object.assign({className:`edit-check string-value`},k(e,`check-icon`),{onClick:function(){r.submitEdit()}})),_.a.createElement(`div`,null,r.showDetected())))},r.submitEdit=function(e){var t=r.props,n=t.variable,i=t.namespace,a=t.rjvId,o=r.state,s=o.editValue,c=o.parsedInput,l=s;e&&c.type&&(l=c.value),r.setState({editMode:!1}),R.dispatch({name:`VARIABLE_UPDATED`,rjvId:a,data:{name:n.name,namespace:i,existing_value:n.value,new_value:l,variable_removed:!1}})},r.showDetected=function(){var e=r.props,t=e.theme,n=(e.variable,e.namespace,e.rjvId,r.state.parsedInput),i=(n.type,n.value,r.getDetectedInput());if(i)return _.a.createElement(`div`,null,_.a.createElement(`div`,k(t,`detected-row`),i,_.a.createElement(xe,{className:`edit-check detected`,style:a({verticalAlign:`top`,paddingLeft:`3px`},k(t,`check-icon`).style),onClick:function(){r.submitEdit(!0)}})))},r.getDetectedInput=function(){var e=r.state.parsedInput,t=e.type,n=e.value,i=p(r).props,o=i.theme;if(!1!==t)switch(t.toLowerCase()){case`object`:return _.a.createElement(`span`,null,_.a.createElement(`span`,{style:a(a({},k(o,`brace`).style),{},{cursor:`default`})},`{`),_.a.createElement(`span`,{style:a(a({},k(o,`ellipsis`).style),{},{cursor:`default`})},`...`),_.a.createElement(`span`,{style:a(a({},k(o,`brace`).style),{},{cursor:`default`})},`}`));case`array`:return _.a.createElement(`span`,null,_.a.createElement(`span`,{style:a(a({},k(o,`brace`).style),{},{cursor:`default`})},`[`),_.a.createElement(`span`,{style:a(a({},k(o,`ellipsis`).style),{},{cursor:`default`})},`...`),_.a.createElement(`span`,{style:a(a({},k(o,`brace`).style),{},{cursor:`default`})},`]`));case`string`:return _.a.createElement(te,Object.assign({value:n},i));case`integer`:return _.a.createElement(W,Object.assign({value:n},i));case`float`:return _.a.createElement(N,Object.assign({value:n},i));case`boolean`:return _.a.createElement(j,Object.assign({value:n},i));case`function`:return _.a.createElement(V,Object.assign({value:n},i));case`null`:return _.a.createElement(U,i);case`nan`:return _.a.createElement(H,i);case`undefined`:return _.a.createElement(K,i);case`date`:return _.a.createElement(M,Object.assign({value:new Date(n)},i))}},r.state={editMode:!1,editValue:``,hovered:!1,renameKey:!1,parsedInput:{type:!1,value:null}},r}return c(n,[{key:`render`,value:function(){var e=this,t=this.props,n=t.variable,r=t.singleIndent,i=t.type,o=t.theme,s=t.namespace,c=t.indentWidth,l=t.enableClipboard,u=t.onEdit,d=t.onDelete,f=t.onSelect,p=t.displayArrayKey,m=t.quotesOnKeys,h=this.state.editMode;return _.a.createElement(`div`,Object.assign({},k(o,`objectKeyVal`,{paddingLeft:c*r}),{onMouseEnter:function(){return e.setState(a(a({},e.state),{},{hovered:!0}))},onMouseLeave:function(){return e.setState(a(a({},e.state),{},{hovered:!1}))},className:`variable-row`,key:n.name}),i==`array`?p?_.a.createElement(`span`,Object.assign({},k(o,`array-key`),{key:n.name+`_`+s}),n.name,_.a.createElement(`div`,k(o,`colon`),`:`)):null:_.a.createElement(`span`,null,_.a.createElement(`span`,Object.assign({},k(o,`object-name`),{className:`object-key`,key:n.name+`_`+s}),!!m&&_.a.createElement(`span`,{style:{verticalAlign:`top`}},`"`),_.a.createElement(`span`,{style:{display:`inline-block`}},n.name),!!m&&_.a.createElement(`span`,{style:{verticalAlign:`top`}},`"`)),_.a.createElement(`span`,k(o,`colon`),`:`)),_.a.createElement(`div`,Object.assign({className:`variable-value`,onClick:!1===f&&!1===u?null:function(t){var r=L(s);(t.ctrlKey||t.metaKey)&&!1!==u?e.prepopInput(n):!1!==f&&(r.shift(),f(a(a({},n),{},{namespace:r})))}},k(o,`variableValue`,{cursor:!1===f?`default`:`pointer`})),this.getValue(n,h)),l?_.a.createElement(Se,{rowHovered:this.state.hovered,hidden:h,src:n.value,clickCallback:l,theme:o,namespace:[].concat(L(s),[n.name])}):null,!1!==u&&h==0?this.getEditIcon():null,!1!==d&&h==0?this.getRemoveIcon():null)}}]),n}(_.a.PureComponent),we=function(e){u(n,e);var t=h(n);function n(){var e;o(this,n);var r=[...arguments];return(e=t.call.apply(t,[this].concat(r))).getObjectSize=function(){var t=e.props,n=t.size,r=t.theme;if(t.displayObjectSize)return _.a.createElement(`span`,Object.assign({className:`object-size`},k(r,`object-size`)),n,` item`,n===1?``:`s`)},e.getAddAttribute=function(t){var n=e.props,r=n.theme,i=n.namespace,o=n.name,s=n.src,c=n.rjvId,l=n.depth;return _.a.createElement(`span`,{className:`click-to-add`,style:{verticalAlign:`top`,display:t?`inline-block`:`none`}},_.a.createElement(ve,Object.assign({className:`click-to-add-icon`},k(r,`addVarIcon`),{onClick:function(){var e={name:l>0?o:null,namespace:i.splice(0,i.length-1),existing_value:s,variable_removed:!1,key_name:null};C(s)===`object`?R.dispatch({name:`ADD_VARIABLE_KEY_REQUEST`,rjvId:c,data:e}):R.dispatch({name:`VARIABLE_ADDED`,rjvId:c,data:a(a({},e),{},{new_value:[].concat(L(s),[null])})})}})))},e.getRemoveObject=function(t){var n=e.props,r=n.theme,i=(n.hover,n.namespace),a=n.name,o=n.src,s=n.rjvId;if(i.length!==1)return _.a.createElement(`span`,{className:`click-to-remove`,style:{display:t?`inline-block`:`none`}},_.a.createElement(_e,Object.assign({className:`click-to-remove-icon`},k(r,`removeVarIcon`),{onClick:function(){R.dispatch({name:`VARIABLE_REMOVED`,rjvId:s,data:{name:a,namespace:i.splice(0,i.length-1),existing_value:o,variable_removed:!0}})}})))},e.render=function(){var t=e.props,n=t.theme,r=t.onDelete,i=t.onAdd,a=t.enableClipboard,o=t.src,s=t.namespace,c=t.rowHovered;return _.a.createElement(`div`,Object.assign({},k(n,`object-meta-data`),{className:`object-meta-data`,onClick:function(e){e.stopPropagation()}}),e.getObjectSize(),a?_.a.createElement(Se,{rowHovered:c,clickCallback:a,src:o,theme:n,namespace:s}):null,!1===i?null:e.getAddAttribute(c),!1===r?null:e.getRemoveObject(c))},e}return n}(_.a.PureComponent);function Te(e){var t=e.parent_type,n=e.namespace,r=e.quotesOnKeys,i=e.theme,a=e.jsvRoot,o=e.name,s=e.displayArrayKey,c=e.name?e.name:``;return!a||!1!==o&&o!==null?t==`array`?s?_.a.createElement(`span`,Object.assign({},k(i,`array-key`),{key:n}),_.a.createElement(`span`,{className:`array-key`},c),_.a.createElement(`span`,k(i,`colon`),`:`)):_.a.createElement(`span`,null):_.a.createElement(`span`,Object.assign({},k(i,`object-name`),{key:n}),_.a.createElement(`span`,{className:`object-key`},r&&_.a.createElement(`span`,{style:{verticalAlign:`top`}},`"`),_.a.createElement(`span`,null,c),r&&_.a.createElement(`span`,{style:{verticalAlign:`top`}},`"`)),_.a.createElement(`span`,k(i,`colon`),`:`)):_.a.createElement(`span`,null)}function Ee(e){var t=e.theme;switch(e.iconStyle){case`triangle`:return _.a.createElement(he,Object.assign({},k(t,`expanded-icon`),{className:`expanded-icon`}));case`square`:return _.a.createElement(fe,Object.assign({},k(t,`expanded-icon`),{className:`expanded-icon`}));default:return _.a.createElement(ue,Object.assign({},k(t,`expanded-icon`),{className:`expanded-icon`}))}}function De(e){var t=e.theme;switch(e.iconStyle){case`triangle`:return _.a.createElement(me,Object.assign({},k(t,`collapsed-icon`),{className:`collapsed-icon`}));case`square`:return _.a.createElement(pe,Object.assign({},k(t,`collapsed-icon`),{className:`collapsed-icon`}));default:return _.a.createElement(de,Object.assign({},k(t,`collapsed-icon`),{className:`collapsed-icon`}))}}var Oe=function(e){u(n,e);var t=h(n);function n(e){var r;return o(this,n),(r=t.call(this,e)).toggleCollapsed=function(e){var t=[];for(var n in r.state.expanded)t.push(r.state.expanded[n]);t[e]=!t[e],r.setState({expanded:t})},r.state={expanded:[]},r}return c(n,[{key:`getExpandedIcon`,value:function(e){var t=this.props,n=t.theme,r=t.iconStyle;return this.state.expanded[e]?_.a.createElement(Ee,{theme:n,iconStyle:r}):_.a.createElement(De,{theme:n,iconStyle:r})}},{key:`render`,value:function(){var e=this,t=this.props,n=t.src,r=t.groupArraysAfterLength,i=(t.depth,t.name),a=t.theme,o=t.jsvRoot,s=t.namespace,c=(t.parent_type,S(t,[`src`,`groupArraysAfterLength`,`depth`,`name`,`theme`,`jsvRoot`,`namespace`,`parent_type`])),l=0,u=5*this.props.indentWidth;o||(l=5*this.props.indentWidth);var d=r,f=Math.ceil(n.length/d);return _.a.createElement(`div`,Object.assign({className:`object-key-val`},k(a,o?`jsv-root`:`objectKeyVal`,{paddingLeft:l})),_.a.createElement(Te,this.props),_.a.createElement(`span`,null,_.a.createElement(we,Object.assign({size:n.length},this.props))),L(Array(f)).map((function(t,r){return _.a.createElement(`div`,Object.assign({key:r,className:`object-key-val array-group`},k(a,`objectKeyVal`,{marginLeft:6,paddingLeft:u})),_.a.createElement(`span`,k(a,`brace-row`),_.a.createElement(`div`,Object.assign({className:`icon-container`},k(a,`icon-container`),{onClick:function(t){e.toggleCollapsed(r)}}),e.getExpandedIcon(r)),e.state.expanded[r]?_.a.createElement(je,Object.assign({key:i+r,depth:0,name:!1,collapsed:!1,groupArraysAfterLength:d,index_offset:r*d,src:n.slice(r*d,r*d+d),namespace:s,type:`array`,parent_type:`array_group`,theme:a},c)):_.a.createElement(`span`,Object.assign({},k(a,`brace`),{onClick:function(t){e.toggleCollapsed(r)},className:`array-group-brace`}),`[`,_.a.createElement(`div`,Object.assign({},k(a,`array-group-meta-data`),{className:`array-group-meta-data`}),_.a.createElement(`span`,Object.assign({className:`object-size`},k(a,`object-size`)),r*d,` - `,r*d+d>n.length?n.length:r*d+d)),`]`)))})))}}]),n}(_.a.PureComponent),ke=function(e){u(n,e);var t=h(n);function n(e){var r;o(this,n),(r=t.call(this,e)).toggleCollapsed=function(){r.setState({expanded:!r.state.expanded},(function(){B.set(r.props.rjvId,r.props.namespace,`expanded`,r.state.expanded)}))},r.getObjectContent=function(e,t,n){return _.a.createElement(`div`,{className:`pushed-content object-container`},_.a.createElement(`div`,Object.assign({className:`object-content`},k(r.props.theme,`pushed-content`)),r.renderObjectContents(t,n)))},r.getEllipsis=function(){return r.state.size===0?null:_.a.createElement(`div`,Object.assign({},k(r.props.theme,`ellipsis`),{className:`node-ellipsis`,onClick:r.toggleCollapsed}),`...`)},r.getObjectMetaData=function(e){var t=r.props,n=(t.rjvId,t.theme,r.state),i=n.size,a=n.hovered;return _.a.createElement(we,Object.assign({rowHovered:a,size:i},r.props))},r.renderObjectContents=function(e,t){var n,i=r.props,a=i.depth,o=i.parent_type,s=i.index_offset,c=i.groupArraysAfterLength,l=i.namespace,u=r.state.object_type,d=[],f=Object.keys(e||{});return r.props.sortKeys&&u!==`array`&&(f=f.sort()),f.forEach((function(i){if(n=new Ae(i,e[i]),o===`array_group`&&s&&(n.name=parseInt(n.name)+s),e.hasOwnProperty(i)){if(n.type===`object`)d.push(_.a.createElement(je,Object.assign({key:n.name,depth:a+1,name:n.name,src:n.value,namespace:l.concat(n.name),parent_type:u},t)));else if(n.type===`array`){var f=je;c&&n.value.length>c&&(f=Oe),d.push(_.a.createElement(f,Object.assign({key:n.name,depth:a+1,name:n.name,src:n.value,namespace:l.concat(n.name),type:`array`,parent_type:u},t)))}else d.push(_.a.createElement(Ce,Object.assign({key:n.name+`_`+l,variable:n,singleIndent:5,namespace:l,type:r.props.type},t)))}})),d};var i=n.getState(e);return r.state=a(a({},i),{},{prevProps:{}}),r}return c(n,[{key:`getBraceStart`,value:function(e,t){var n=this,r=this.props,i=r.src,a=r.theme,o=r.iconStyle;if(r.parent_type===`array_group`)return _.a.createElement(`span`,null,_.a.createElement(`span`,k(a,`brace`),e===`array`?`[`:`{`),t?this.getObjectMetaData(i):null);var s=t?Ee:De;return _.a.createElement(`span`,null,_.a.createElement(`span`,Object.assign({onClick:function(e){n.toggleCollapsed()}},k(a,`brace-row`)),_.a.createElement(`div`,Object.assign({className:`icon-container`},k(a,`icon-container`)),_.a.createElement(s,{theme:a,iconStyle:o})),_.a.createElement(Te,this.props),_.a.createElement(`span`,k(a,`brace`),e===`array`?`[`:`{`)),t?this.getObjectMetaData(i):null)}},{key:`render`,value:function(){var e=this,t=this.props,n=t.depth,r=t.src,i=(t.namespace,t.name,t.type,t.parent_type),o=t.theme,s=t.jsvRoot,c=t.iconStyle,l=S(t,[`depth`,`src`,`namespace`,`name`,`type`,`parent_type`,`theme`,`jsvRoot`,`iconStyle`]),u=this.state,d=u.object_type,f=u.expanded,p={};return s||i===`array_group`?i===`array_group`&&(p.borderLeft=0,p.display=`inline`):p.paddingLeft=5*this.props.indentWidth,_.a.createElement(`div`,Object.assign({className:`object-key-val`,onMouseEnter:function(){return e.setState(a(a({},e.state),{},{hovered:!0}))},onMouseLeave:function(){return e.setState(a(a({},e.state),{},{hovered:!1}))}},k(o,s?`jsv-root`:`objectKeyVal`,p)),this.getBraceStart(d,f),f?this.getObjectContent(n,r,a({theme:o,iconStyle:c},l)):this.getEllipsis(),_.a.createElement(`span`,{className:`brace-row`},_.a.createElement(`span`,{style:a(a({},k(o,`brace`).style),{},{paddingLeft:f?`3px`:`0px`})},d===`array`?`]`:`}`),f?null:this.getObjectMetaData(r)))}}],[{key:`getDerivedStateFromProps`,value:function(e,t){var r=t.prevProps;return e.src!==r.src||e.collapsed!==r.collapsed||e.name!==r.name||e.namespace!==r.namespace||e.rjvId!==r.rjvId?a(a({},n.getState(e)),{},{prevProps:e}):null}}]),n}(_.a.PureComponent);ke.getState=function(e){var t=Object.keys(e.src).length,n=(!1===e.collapsed||!0!==e.collapsed&&e.collapsed>e.depth)&&(!e.shouldCollapse||!1===e.shouldCollapse({name:e.name,src:e.src,type:C(e.src),namespace:e.namespace}))&&t!==0;return{expanded:B.get(e.rjvId,e.namespace,`expanded`,n),object_type:e.type===`array`?`array`:`object`,parent_type:e.type===`array`?`array`:`object`,size:t,hovered:!1}};var Ae=function e(t,n){o(this,e),this.name=t,this.value=n,this.type=C(n)};x(ke);var je=ke,Me=function(e){u(n,e);var t=h(n);function n(){var e;o(this,n);var r=[...arguments];return(e=t.call.apply(t,[this].concat(r))).render=function(){var t=p(e).props,n=[t.name],r=je;return Array.isArray(t.src)&&t.groupArraysAfterLength&&t.src.length>t.groupArraysAfterLength&&(r=Oe),_.a.createElement(`div`,{className:`pretty-json-container object-container`},_.a.createElement(`div`,{className:`object-content`},_.a.createElement(r,Object.assign({namespace:n,depth:0,jsvRoot:!0},t))))},e}return n}(_.a.PureComponent),Ne=function(e){u(n,e);var t=h(n);function n(e){var r;return o(this,n),(r=t.call(this,e)).closeModal=function(){R.dispatch({rjvId:r.props.rjvId,name:`RESET`})},r.submit=function(){r.props.submit(r.state.input)},r.state={input:e.input?e.input:``},r}return c(n,[{key:`render`,value:function(){var e=this,t=this.props,n=t.theme,r=t.rjvId,i=t.isValid,a=this.state.input,o=i(a);return _.a.createElement(`div`,Object.assign({className:`key-modal-request`},k(n,`key-modal-request`),{onClick:this.closeModal}),_.a.createElement(`div`,Object.assign({},k(n,`key-modal`),{onClick:function(e){e.stopPropagation()}}),_.a.createElement(`div`,k(n,`key-modal-label`),`Key Name:`),_.a.createElement(`div`,{style:{position:`relative`}},_.a.createElement(`input`,Object.assign({},k(n,`key-modal-input`),{className:`key-modal-input`,ref:function(e){return e&&e.focus()},spellCheck:!1,value:a,placeholder:`...`,onChange:function(t){e.setState({input:t.target.value})},onKeyPress:function(t){o&&t.key===`Enter`?e.submit():t.key===`Escape`&&e.closeModal()}})),o?_.a.createElement(xe,Object.assign({},k(n,`key-modal-submit`),{className:`key-modal-submit`,onClick:function(t){return e.submit()}})):null),_.a.createElement(`span`,k(n,`key-modal-cancel`),_.a.createElement(ye,Object.assign({},k(n,`key-modal-cancel-icon`),{className:`key-modal-cancel`,onClick:function(){R.dispatch({rjvId:r,name:`RESET`})}})))))}}]),n}(_.a.PureComponent),Pe=function(e){u(n,e);var t=h(n);function n(){var e;o(this,n);var r=[...arguments];return(e=t.call.apply(t,[this].concat(r))).isValid=function(t){var n=e.props.rjvId,r=B.get(n,`action`,`new-key-request`);return t!=``&&Object.keys(r.existing_value).indexOf(t)===-1},e.submit=function(t){var n=e.props.rjvId,r=B.get(n,`action`,`new-key-request`);r.new_value=a({},r.existing_value),r.new_value[t]=e.props.defaultValue,R.dispatch({name:`VARIABLE_ADDED`,rjvId:n,data:r})},e}return c(n,[{key:`render`,value:function(){var e=this.props,t=e.active,n=e.theme,r=e.rjvId;return t?_.a.createElement(Ne,{rjvId:r,theme:n,isValid:this.isValid,submit:this.submit}):null}}]),n}(_.a.PureComponent),Fe=function(e){u(n,e);var t=h(n);function n(){return o(this,n),t.apply(this,arguments)}return c(n,[{key:`render`,value:function(){var e=this.props,t=e.message,n=e.active,r=e.theme,i=e.rjvId;return n?_.a.createElement(`div`,Object.assign({className:`validation-failure`},k(r,`validation-failure`),{onClick:function(){R.dispatch({rjvId:i,name:`RESET`})}}),_.a.createElement(`span`,k(r,`validation-failure-label`),t),_.a.createElement(ye,k(r,`validation-failure-clear`))):null}}]),n}(_.a.PureComponent),Ie=function(e){u(n,e);var t=h(n);function n(e){var r;return o(this,n),(r=t.call(this,e)).rjvId=Date.now().toString(),r.getListeners=function(){return{reset:r.resetState,"variable-update":r.updateSrc,"add-key-request":r.addKeyRequest}},r.updateSrc=function(){var e,t=B.get(r.rjvId,`action`,`variable-update`),n=t.name,i=t.namespace,a=t.new_value,o=t.existing_value,s=(t.variable_removed,t.updated_src),c=t.type,l=r.props,u=l.onEdit,d=l.onDelete,f=l.onAdd,p={existing_src:r.state.src,new_value:a,updated_src:s,name:n,namespace:i,existing_value:o};switch(c){case`variable-added`:e=f(p);break;case`variable-edited`:e=u(p);break;case`variable-removed`:e=d(p)}!1===e?r.setState({validationFailure:!0}):(B.set(r.rjvId,`global`,`src`,s),r.setState({src:s}))},r.addKeyRequest=function(){r.setState({addKeyRequest:!0})},r.resetState=function(){r.setState({validationFailure:!1,addKeyRequest:!1})},r.state={addKeyRequest:!1,editKeyRequest:!1,validationFailure:!1,src:n.defaultProps.src,name:n.defaultProps.name,theme:n.defaultProps.theme,validationMessage:n.defaultProps.validationMessage,prevSrc:n.defaultProps.src,prevName:n.defaultProps.name,prevTheme:n.defaultProps.theme},r}return c(n,[{key:`componentDidMount`,value:function(){B.set(this.rjvId,`global`,`src`,this.state.src);var e=this.getListeners();for(var t in e)B.on(t+`-`+this.rjvId,e[t]);this.setState({addKeyRequest:!1,editKeyRequest:!1})}},{key:`componentDidUpdate`,value:function(e,t){!1!==t.addKeyRequest&&this.setState({addKeyRequest:!1}),!1!==t.editKeyRequest&&this.setState({editKeyRequest:!1}),e.src!==this.state.src&&B.set(this.rjvId,`global`,`src`,this.state.src)}},{key:`componentWillUnmount`,value:function(){var e=this.getListeners();for(var t in e)B.removeListener(t+`-`+this.rjvId,e[t])}},{key:`render`,value:function(){var e=this.state,t=e.validationFailure,n=e.validationMessage,r=e.addKeyRequest,i=e.theme,o=e.src,s=e.name,c=this.props,l=c.style,u=c.defaultValue;return _.a.createElement(`div`,{className:`react-json-view`,style:a(a({},k(i,`app-container`).style),l)},_.a.createElement(Fe,{message:n,active:t,theme:i,rjvId:this.rjvId}),_.a.createElement(Me,Object.assign({},this.props,{src:o,name:s,theme:i,type:C(o),rjvId:this.rjvId})),_.a.createElement(Pe,{active:r,theme:i,rjvId:this.rjvId,defaultValue:u}))}}],[{key:`getDerivedStateFromProps`,value:function(e,t){if(e.src!==t.prevSrc||e.name!==t.prevName||e.theme!==t.prevTheme){var r={src:e.src,name:e.name,theme:e.theme,validationMessage:e.validationMessage,prevSrc:e.src,prevName:e.name,prevTheme:e.theme};return n.validateState(r)}return null}}]),n}(_.a.PureComponent);Ie.defaultProps={src:{},name:`root`,theme:`rjv-default`,collapsed:!1,collapseStringsAfterLength:!1,shouldCollapse:!1,sortKeys:!1,quotesOnKeys:!0,groupArraysAfterLength:100,indentWidth:4,enableClipboard:!0,displayObjectSize:!0,displayDataTypes:!0,onEdit:!1,onDelete:!1,onAdd:!1,onSelect:!1,iconStyle:`triangle`,style:{},validationMessage:`Validation Error`,defaultValue:null,displayArrayKey:!0},Ie.validateState=function(e){var t={};return C(e.theme)!==`object`||function(e){var t=[`base00`,`base01`,`base02`,`base03`,`base04`,`base05`,`base06`,`base07`,`base08`,`base09`,`base0A`,`base0B`,`base0C`,`base0D`,`base0E`,`base0F`];if(C(e)===`object`){for(var n=0;n<t.length;n++)if(!(t[n]in e))return!1;return!0}return!1}(e.theme)||(console.error(`react-json-view error:`,`theme prop must be a theme name or valid base-16 theme object.`,`defaulting to "rjv-default" theme`),t.theme=`rjv-default`),C(e.src)!==`object`&&C(e.src)!==`array`&&(console.error(`react-json-view error:`,`src property must be a valid json object`),t.name=`ERROR`,t.src={message:`src property must be a valid json object`}),a(a({},e),t)},x(Ie),t.default=Ie}])}))}));M();var K=t(te(),1),q={frameRoot:{paddingTop:0,paddingBottom:0},frameTextRoot:{m:0},frameTextPrimary:e=>({color:e.palette.mode===`dark`?`#CCC`:`#333`}),frameTextSecondary:{fontStyle:`italic`,fontSize:12,opacity:.6,pl:1},listRoot:{padding:0,fontSize:`small`},scopeType:{verticalAlign:`top`,textTransform:`uppercase`,width:50},scopeType_local:{color:`#53a944`},scopeType_closure:{color:`#365b80`},scopeType_block:{color:`#53a944`},scopeType_catch:{color:`#53a944`},scopeType_script:{color:`#365b80`},scopeType_user:{color:`#a48a15`},scopeName:{color:`#bc5b5b`,width:`calc(100% - 82px)`,whiteSpace:`nowrap`,textOverflow:`ellipsis`},scopeButton:{width:32},scopeValueEditable:{cursor:`pointer`},selectedFrame:{backgroundColor:`#777`,color:`white`},splitter:{width:`100%`,height:`calc(100% - 36px)`,overflow:`hidden`,fontSize:12},toolbarScopes:e=>({width:24,display:`inline-block`,height:`100%`,background:e.palette.mode===`dark`?`#222`:`#EEE`,verticalAlign:`top`}),scopesAfterToolbar:{width:`calc(100% - 24px)`,display:`inline-block`,height:`100%`,verticalAlign:`top`},scopeNameName:{fontWeight:`bold`,display:`inline-block`,verticalAlign:`top`},scopeNameEqual:e=>({display:`inline-block`,color:e.palette.mode===`dark`?`#EEE`:`#222`,verticalAlign:`top`}),scopeNameValue:{verticalAlign:`top`,display:`inline-block`,color:`#3b709f`,whiteSpace:`nowrap`},scopeButtonDel:{padding:0,float:`right`},valueNull:{color:`#a44a24`},valueUndefined:{color:`#a44a24`},valueString:{color:`#1e8816`},valueNumber:{color:`#163c88`},valueBoolean:{color:`#a44a24`},valueObject:{color:`#721b70`},valueNone:{color:`#8a8a8a`},valueFunc:{color:`#ac4343`},error:e=>({color:e.palette.mode===`dark`?`#FF8080`:`#FF0000`,fontStyle:`italic`})};function ne(e){var t;let n={};return e.subtype===`error`||e.className===`ReferenceError`?e.description:((t=e.preview)==null||(t=t.properties)==null||t.forEach(e=>{(e==null?void 0:e.type)===`object`?e.subtype===`null`?n[e.name]=null:n[e.name]=`{ ${e.value===`Object`?`...`:e.value} }`:e.type===`boolean`?n[e.name||e.description]=e.value===`true`:e.type===`number`?n[e.name||e.description]=parseFloat(e.value):e.type===`function`?n[e.name||e.description]=`function(){}`:e.type===`undefined`?n[e.name||e.description]=void 0:n[e.name||e.description]=e.value}),n)}var re=class extends D.Component{constructor(e){super(e),I(this,`editRef`,void 0),I(this,`scopeValue`,null);let t=window.localStorage.getItem(`JS.framesSizes`),n=[30,70];if(t)try{n=JSON.parse(t)}catch{}this.state={editValue:null,callFrames:this.props.callFrames,framesSizes:n},this.editRef=D.createRef()}onExpressionNameUpdate(){this.state.editValue&&this.props.onExpressionNameUpdate(this.state.editValue.index,this.scopeValue,()=>{this.setState({editValue:null}),this.scopeValue=null})}renderExpression(e,t){let n=this.state.editValue&&this.state.editValue.type===`expression`&&this.state.editValue.index===t?h(w,{inputRef:this.editRef,fullWidth:!0,margin:`dense`,onBlur:()=>this.state.editValue&&this.setState({editValue:null}),defaultValue:e.name,onKeyUp:e=>{e.key===`Enter`?this.onExpressionNameUpdate():e.key===`Escape`&&this.setState({editValue:null})},onChange:e=>this.scopeValue=e.target.value,endAdornment:h(C,{position:`end`,children:h(E,{onClick:()=>this.onExpressionNameUpdate(),size:`medium`,children:h(T,{})})})}):[h(`div`,{style:q.scopeNameName,title:O.t(`Double click to edit expression`),children:e.name},`name`),i(y,{sx:q.scopeNameEqual,children:[` `,`=`,` `]},`=`),h(`div`,{style:q.scopeNameValue,children:this.formatValue(e.value)},`val`)];return i(`tr`,{children:[h(`td`,{style:{...q.scopeType,...q.scopeType_user},children:`user`}),h(`td`,{style:q.scopeName,onDoubleClick:()=>{this.scopeValue=e.name||``,this.setState({editValue:{type:`expression`,valueType:`string`,index:t,name:e.name,value:e.name||``}})},children:n}),h(`td`,{style:q.scopeButton,children:h(E,{style:q.scopeButtonDel,size:`small`,disabled:!!this.state.editValue,onClick:()=>this.props.onExpressionDelete(t),children:h(u,{})})})]},`user_${t}${e.name}`)}renderExpressions(){return this.props.expressions.map((e,t)=>this.renderExpression(e,t))}renderOneFrameTitle(e,t){if(this.props.mainScriptId===this.props.currentScriptId&&e.location.scriptId!==this.props.mainScriptId)return null;let n=((e.url||``).split(`/`).pop()||``).replace(/^script\.js\./,``);return h(P,{onClick:()=>this.props.onChangeCurrentFrame(t),dense:!0,selected:this.props.currentFrame===t,style:q.frameRoot,children:h(o,{sx:{...q.frameTextRoot,"& .MuiListItemText-primary":q.frameTextPrimary,"& .MuiListItemText-secondary":q.frameTextSecondary},title:e.url,primary:e.functionName||`anonymous`,secondary:`${n} (${e.location.lineNumber+1}:${(e.location.columnNumber||0)+1})`})},e.callFrameId)}formatValue(e,t){if(!e)return t?`none`:h(`span`,{style:q.valueNone,children:`none`});let n=e.unserializableValue;if(n!==void 0)return t?n:h(`span`,{style:q.valueNumber,children:n});if(e.type===`undefined`)return t?`undefined`:h(`span`,{style:q.valueUndefined,children:`undefined`});if(e.type===`null`)return t?`null`:h(`span`,{style:q.valueNull,children:`null`});if(e.type===`function`){let n=e.description?e.description.length>100?`${e.description.substring(0,100)}...`:e.description:`function`;return t?n:h(`span`,{style:q.valueFunc,title:e.description,children:n})}if(e.type===`object`&&e.subtype===`null`)return t?`null`:h(`span`,{style:q.valueNull,children:`null`});if(e.type===`object`){let n=ne(e);return t?JSON.stringify(n):typeof n==`string`?h(y,{component:`span`,sx:q.error,children:n}):h(K.default,{name:!1,enableClipboard:!1,style:{backgroundColor:`inherit`,marginTop:3},src:n,collapsed:!0,theme:this.props.themeType===`dark`?`brewer`:`rjv-default`,displayDataTypes:!1})}if(e.value===void 0)return t?`undefined`:h(`span`,{style:q.valueUndefined,children:`undefined`});if(e.value===null)return t?`null`:h(`span`,{style:q.valueNull,children:`null`});if(e.type===`string`){if(t)return e.value;let n=`"${e.value?e.value.length>100?`${e.value.substring(0,100)}...`:e.value:``}"`;return h(`span`,{style:q.valueString,title:n,children:n})}return e.type===`boolean`?t?e.value.toString():h(`span`,{style:q.valueBoolean,children:e.value.toString()}):e.value.toString()}onWriteScopeValue(){var e,t,n;this.scopeValue===`true`?this.scopeValue=!0:this.scopeValue===`false`?this.scopeValue=!1:this.scopeValue===`null`?this.scopeValue=null:this.scopeValue===`undefined`?this.scopeValue=void 0:parseFloat(this.scopeValue).toString()===this.scopeValue&&(this.scopeValue=parseFloat(this.scopeValue)),this.props.onWriteScopeValue({variableName:((e=this.state.editValue)==null?void 0:e.name)||``,scopeNumber:((t=this.state.editValue)==null?void 0:t.scopeNumber)||0,newValue:{value:this.scopeValue,valueType:typeof this.scopeValue},callFrameId:(n=this.props.callFrames)==null?void 0:n[this.props.currentFrame].callFrameId}),this.setState({editValue:null}),this.scopeValue=null}componentDidUpdate(){var e;(e=this.editRef.current)==null||e.focus()}renderScope(e,t){var n,r;let a=t.value&&(t.value.type===`undefined`||t.value.type===`string`||t.value.type===`number`||t.value.type===`boolean`||((n=t.value)==null?void 0:n.value)===null),o=((r=this.state.editValue)==null?void 0:r.type)===`scope`&&this.state.editValue.scopeNumber===e.index&&this.state.editValue.name===t.name?[h(`div`,{style:q.scopeNameName,children:t.name},`name`),i(y,{sx:q.scopeNameEqual,children:[` `,`=`,` `]},`=`),h(w,{inputRef:this.editRef,margin:`dense`,onBlur:()=>this.state.editValue&&this.setState({editValue:null}),defaultValue:this.formatValue(t.value,!0),onKeyUp:e=>{e.key===`Enter`?this.onWriteScopeValue():e.key===`Escape`&&this.setState({editValue:null})},onChange:e=>this.scopeValue=e.target.value,endAdornment:h(C,{position:`end`,children:h(E,{onClick:()=>this.onWriteScopeValue(),size:`medium`,children:h(T,{})})})},`input`)]:[h(`div`,{style:q.scopeNameName,title:O.t(`Double click to write value`),children:t.name},`name`),i(y,{sx:q.scopeNameEqual,children:[` `,`=`,` `]},`=`),i(`div`,{style:q.scopeNameValue,children:[this.formatValue(t.value),` `,t.value?`(${t.value.type})`:``]},`val`)];return i(`tr`,{children:[h(`td`,{style:{...q.scopeType,...q[`scopeType_${e.type}`]},children:e.type}),h(`td`,{style:{...q.scopeName,...a?q.scopeValueEditable:void 0},onDoubleClick:()=>{a&&(this.scopeValue=t.value.value,this.setState({editValue:{scopeNumber:e.index,type:`scope`,index:0,valueType:t.value.type,name:t.name,value:t.value.value}}))},children:o})]},`${e.index}_${t.name}`)}renderScopes(e){if(!e)return null;let t=this.renderExpressions();return this.props.scopes.forEach(e=>{var n;return(n=e.properties)==null||(n=n.result)==null?void 0:n.forEach(n=>t.push(this.renderScope(e,n)))}),h(`table`,{style:{width:`100%`,fontSize:`small`},children:h(`tbody`,{children:t})})}render(){var e,t;return i(R,{direction:ee.Horizontal,initialSizes:this.state.framesSizes,minWidths:[100,200],onResizeFinished:(e,t)=>{this.setState({framesSizes:t}),window.localStorage.setItem(`JS.framesSizes`,JSON.stringify(t))},gutterClassName:this.props.themeType===`dark`?`Dark visGutter`:`Light visGutter`,children:[h(`div`,{style:{width:`100%`,height:`100%`,overflow:`auto`},children:h(F,{style:q.listRoot,children:((e=this.props.callFrames)==null?void 0:e.map((e,t)=>this.renderOneFrameTitle(e,t)))||null})}),i(`div`,{style:{width:`100%`,height:`100%`,overflow:`auto`},children:[h(y,{sx:q.toolbarScopes,children:h(E,{size:`small`,onClick:()=>this.props.onExpressionAdd((e,t)=>{this.scopeValue=t.name||``,this.setState({editValue:{type:`expression`,valueType:`string`,index:e,name:t.name,value:t.name||``}})}),children:h(N,{})})}),h(`div`,{style:q.scopesAfterToolbar,children:(t=this.props.callFrames)!=null&&t.length?this.renderScopes(this.props.callFrames[this.props.currentFrame]):null})]})]})}};M();var J={root:e=>({width:`100%`,height:`calc(100% - ${parseInt(e.toolbar.height,10)+38+5}px)`,overflow:`hidden`,position:`relative`,display:`flex`,flexDirection:`column`}),toolbar:{flexShrink:0,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)`},buttonRun:{color:`green`},buttonPause:{color:`orange`},buttonRestart:{color:`darkgreen`},buttonStop:{color:`red`},buttonNext:{color:`blue`},buttonStep:{color:`blue`},buttonOut:{color:`blue`},buttonException:{},tabFile:e=>({textTransform:`inherit`,color:e.palette.mode===`dark`?`#DDD`:`inherit`}),tabText:{maxWidth:130,textOverflow:`ellipsis`,whiteSpace:`nowrap`,overflow:`hidden`,display:`inline-block`,verticalAlign:`middle`},closeButton:{position:`absolute`,top:8,right:0,zIndex:10,padding:8,cursor:`pointer`},tabsRoot:e=>({minHeight:24,background:e.palette.mode===`dark`?`#333`:`#e6e6e6`,color:e.palette.mode===`dark`?`white`:`inherit`}),tabRoot:{minHeight:24},splitter:{flexGrow:1,minHeight:0,width:`100%`,position:`relative`}},Y=class e extends D.Component{constructor(t){super(t),I(this,`console`,null),I(this,`scripts`,{}),I(this,`mainScriptId`,null),I(this,`fromInstance`,(t,n)=>{if(n!=null&&n.val&&this.state.instance!==void 0)try{let t=JSON.parse(n.val);if(t.cmd===`subscribed`)this.props.socket.sendTo(this.state.instance,`debug`,this.props.debugInstance||{scriptName:this.props.src});else if(t.cmd===`readyToDebug`){var r;let n=this.mainScriptId;this.mainScriptId=t.scriptId,this.scripts={},this.scripts[t.scriptId]=t.script,t.script.startsWith(`(async () => {debugger;
|
|
15
|
+
`)?this.scripts[t.scriptId]=`(async () => {\n${t.script.substring(24)}`:t.script.startsWith(`debugger;`)&&(this.scripts[t.scriptId]=t.script.substring(9));let i={[t.scriptId]:this.props.debugInstance?t.url:this.props.src.replace(`script.js.`,``)},a=`${Date.now()}.${Math.random()*1e4}`;(r=t.context)==null||(r=r.callFrames)==null||r.forEach((e,t)=>e.id=a+t),this.setState({starting:!1,finished:!1,selected:this.mainScriptId,script:this.scripts[t.scriptId],tabs:i,currentFrame:0,started:!0,paused:!0,location:e.getLocation(t.context),context:t.context},()=>this.reinitBreakpoints(n,()=>{this.readCurrentScope(),this.readExpressions()}))}else if(t.cmd===`paused`){var i;let n=`${Date.now()}.${Math.random()*1e4}`;(i=t.context)==null||(i=i.callFrames)==null||i.forEach((e,t)=>e.id=n+t);let r=e.getLocation(t.context),a={paused:!0,location:r,currentFrame:0,context:t.context};r&&(this.state.tabs[r.scriptId]||(a.tabs={...this.state.tabs,[r.scriptId]:e.getTabLabel(t.context.callFrames[0].url,r.scriptId)}),a.selected=r.scriptId,a.script=this.scripts[r.scriptId]===void 0?O.t(`loading...`):this.scripts[r.scriptId]),this.setState(a,()=>{this.readCurrentScope(),this.readExpressions(),r&&this.scripts[r.scriptId]===void 0&&this.sendToInstance({cmd:`source`,scriptId:r.scriptId})})}else if(t.cmd===`script`)this.scripts[t.scriptId]=t.text,this.state.selected===t.scriptId&&this.setState({script:this.scripts[t.scriptId]});else if(t.cmd===`resumed`)this.setState({paused:!1});else if(t.cmd===`log`){if(this.state.toolsTab===`console`){this.console=null;let e=[...this.state.console];e.push({text:t.text,severity:t.severity,ts:t.ts}),this.setState({console:e})}else t.severity===`error`?this.setState({logErrors:this.state.logErrors+1}):t.severity===`warn`?this.setState({logWarnings:this.state.logWarnings+1}):this.setState({logs:this.state.logs+1}),this.console=this.console||[...this.state.console],this.console.push({text:t.text,severity:t.severity,ts:t.ts})}else if(t.cmd===`error`)this.setState({error:t.error});else if(t.cmd===`finished`||t.cmd===`debugStopped`)this.setState({finished:!0,starting:!1,started:!0,paused:!1});else if(t.cmd===`sb`){let e=[...this.state.breakpoints],n=!1;t.breakpoints.filter(e=>e==null?void 0:e.location).forEach(t=>{e.find(e=>e.location.scriptId===t.location.scriptId&&e.location.lineNumber===t.location.lineNumber)||(n=!0,e.push(t))}),n&&(this.saveBreakpoints(e),this.setState({breakpoints:e}))}else if(t.cmd===`cb`){let e=this.state.breakpoints.filter(e=>!t.breakpoints.includes(e.id));e.length!==this.state.breakpoints.length&&(this.saveBreakpoints(e),this.setState({breakpoints:e}))}else if(t.cmd===`scope`)this.setState({scopes:t.scopes.filter(e=>e).sort((e,t)=>e.index-t.index)});else if(t.cmd===`setValue`)this.readCurrentScope(),this.readExpressions();else if(t.cmd===`expressions`){let e=JSON.parse(JSON.stringify(this.state.expressions)),n=!1;t.expressions.forEach(t=>{let r=e.find(e=>e.name===t.name);r&&(n=!0,r.value=t.result)}),n&&this.setState({expressions:e})}else if(t.cmd===`getPossibleBreakpoints`){var a;(a=t.breakpoints)!=null&&a.length?this.sendToInstance({breakpoints:[t.breakpoints[0]],cmd:`sb`}):this.setState({error:O.t(`No breakpoint possible on this line`)})}else console.error(`Unknown command: ${JSON.stringify(t)}`)}catch(e){console.error(`Cannot process message from debugger: ${e}`)}});let n=window.localStorage.getItem(`javascript.tools.bp.${this.props.src}`),r;try{r=n?JSON.parse(n):[]}catch{r=[]}let i=window.localStorage.getItem(`javascript.tools.exps.${this.props.src}`),a;try{a=(i?JSON.parse(i):[]).map(e=>({name:e,value:{type:`undefined`,description:``,value:`undefined`,name:`name`}}))}catch{a=[]}let o=window.localStorage.getItem(`JS.toolSizes`),s=[80,20];if(o)try{s=JSON.parse(o)}catch{}this.state={starting:!0,selected:null,tabs:{},script:``,breakpoints:r,expressions:a,running:!1,error:``,started:!1,paused:!0,location:null,toolsTab:window.localStorage.getItem(`javascript.tools.tab`)||`console`,stopOnException:window.localStorage.getItem(`javascript.tools.stopOnException`)===`true`,console:[],finished:!1,currentFrame:0,scopes:[],logErrors:0,logWarnings:0,logs:0,toolSizes:s,instance:void 0,context:null}}async componentDidMount(){let e;if(this.props.debugInstance)e=this.props.debugInstance.instance;else{var t;let n=await this.props.socket.getObject(this.props.src);e=(n==null||(t=n.common)==null||(t=t.engine)==null?void 0:t.replace(`system.adapter.`,``))||``}if(!e){this.setState({error:`Unknown instance`});return}await new Promise(t=>this.setState({instance:e},t));try{await this.props.socket.setState(`${e}.debug.from`,{val:`{"cmd": "subscribed"}`,ack:!0}),await this.props.socket.subscribeState(`${e}.debug.from`,this.fromInstance)}catch(e){this.setState({error:`Cannot start debugging: ${e}`})}}componentWillUnmount(){this.state.instance&&(this.props.socket.unsubscribeState(`${this.state.instance}.debug.from`,this.fromInstance),this.props.socket.sendTo(this.state.instance,`debugStop`))}sendToInstance(e){this.props.socket.setState(`${this.state.instance}.debug.to`,{val:JSON.stringify(e),ack:!1})}reinitBreakpoints(e,t){let n=this.state.breakpoints.filter(t=>!e||t.location.scriptId===e).map(e=>({...e.location,scriptId:this.mainScriptId||``}));this.setState({breakpoints:[]},()=>{n.length&&this.sendToInstance({breakpoints:n,cmd:`sb`}),this.state.stopOnException&&this.sendToInstance({cmd:`stopOnException`,state:!0}),t()})}saveBreakpoints(e){window.localStorage.setItem(`javascript.tools.bp.${this.props.src}`,JSON.stringify(e.filter(e=>e.location.scriptId===this.mainScriptId)))}static getLocation(e){var t;return(e==null||(t=e.callFrames)==null||(t=t[0])==null?void 0:t.location)||null}static getTabLabel(e,t){if(!e)return t;let n=e.split(/iobroker\.javascript/i);return(n[1]||n[0]).replace(`script.js.`,``)}readCurrentScope(){var e;let t=(e=this.state.context)==null||(e=e.callFrames)==null?void 0:e[this.state.currentFrame];if(t){let e=t.scopeChain.map((e,t)=>({...e,index:t})).filter(e=>e.type!==`global`);e.length?this.sendToInstance({cmd:`scope`,scopes:e}):this.state.scopes.length&&this.setState({scopes:[]})}}readExpressions(e){var t;this.state.expressions.length&&(t=this.state.context)!=null&&t.callFrames&&this.state.context.callFrames[this.state.currentFrame]&&(e===void 0?this.sendToInstance({cmd:`expressions`,expressions:this.state.expressions,callFrameId:this.state.context.callFrames[this.state.currentFrame].callFrameId}):this.sendToInstance({cmd:`expressions`,expressions:[this.state.expressions[e]],callFrameId:this.state.context.callFrames[this.state.currentFrame].callFrameId}))}selectFrame(t){var n;let r=(n=this.state.context)==null||(n=n.callFrames)==null?void 0:n[t];if(!r)return;let i=r.location,a=this.scripts[i.scriptId]!==void 0,o={currentFrame:t,scopes:[],location:i,selected:i.scriptId,script:a?this.scripts[i.scriptId]:O.t(`loading...`)};this.state.tabs[i.scriptId]||(o.tabs={...this.state.tabs,[i.scriptId]:e.getTabLabel(r.url,i.scriptId)}),this.setState(o,()=>{this.readCurrentScope(),this.readExpressions(),a||this.sendToInstance({cmd:`source`,scriptId:i.scriptId})})}renderError(){return this.state.error?h(L,{onClose:()=>this.setState({error:``}),text:this.state.error},`dialogError`):null}closeTab(e,t){t==null||t.stopPropagation();let n=JSON.parse(JSON.stringify(this.state.tabs));delete n[e];let r={tabs:n,script:this.mainScriptId?this.scripts[this.mainScriptId]:`...`,selected:this.mainScriptId};this.state.location&&this.state.location.scriptId!==this.mainScriptId&&(r.location=null),this.setState(r)}renderTabs(){let e=!this.state.tabs||!this.state.started;return h(l,{component:`div`,indicatorColor:`primary`,style:{position:`relative`,width:`calc(100% - 300px)`,display:`inline-block`},value:this.state.selected,onChange:(e,t)=>{this.scripts[t]?this.setState({selected:t,script:this.scripts[t]}):this.setState({selected:t,script:`loading...`},()=>this.sendToInstance({cmd:`source`,scriptId:t}))},scrollButtons:`auto`,children:Object.keys(this.state.tabs||[]).map(t=>{let n=t,r=this.state.tabs[t]||``;this.state.tabs[t]&&(n=this.state.tabs[t].split(`/`).pop()||``);let i=[h(`div`,{style:J.tabText,children:n},`text`),t===this.mainScriptId?null:h(`span`,{style:J.closeButton,children:h(p,{onClick:e=>this.closeTab(t,e),fontSize:`small`},`close`)},`icon`)];return h(m,{disabled:e,sx:J.tabFile,label:i,title:r,value:t},t)})})}onResume(){this.sendToInstance({cmd:`cont`})}onPause(){this.sendToInstance({cmd:`pause`})}onNext(){this.sendToInstance({cmd:`next`})}onStepIn(){this.sendToInstance({cmd:`step`})}onStepOut(){this.sendToInstance({cmd:`out`})}onRestart(){this.setState({started:!1,starting:!0},()=>this.state.instance!==void 0&&this.props.socket.sendTo(this.state.instance,`debug`,this.props.debugInstance||{scriptName:this.props.src}))}onToggleException(){let e=!this.state.stopOnException;window.localStorage.setItem(`javascript.tools.stopOnException`,e?`true`:`false`),this.setState({stopOnException:e},()=>this.sendToInstance({cmd:`stopOnException`,state:e}))}renderToolbar(){let e=!this.state.started;return i(g,{variant:`dense`,style:J.toolbar,children:[h(E,{style:J.buttonRestart,disabled:e,onClick:()=>this.onRestart(),title:O.t(`Restart`),size:`medium`,children:h(k,{})}),!this.state.finished&&this.state.paused?h(E,{style:J.buttonRun,disabled:e,onClick:()=>this.onResume(),title:O.t(`Resume execution`),size:`medium`,children:h(b,{})}):!this.state.finished&&h(E,{disabled:e,style:J.buttonPause,onClick:()=>this.onPause(),title:O.t(`Pause execution`),size:`medium`,children:h(v,{})}),!this.state.finished&&h(E,{style:J.buttonNext,disabled:e||!this.state.paused,onClick:()=>this.onNext(),title:O.t(`Go to next line`),size:`medium`,children:h(j,{})}),!this.state.finished&&h(E,{style:J.buttonStep,disabled:e||!this.state.paused,onClick:()=>this.onStepIn(),title:O.t(`Step into function`),size:`medium`,children:h(a,{})}),!this.state.finished&&h(E,{style:J.buttonOut,disabled:e||!this.state.paused,onClick:()=>this.onStepOut(),title:O.t(`Step out from function`),size:`medium`,children:h(_,{})}),!this.state.finished&&h(E,{style:J.buttonException,color:this.state.stopOnException?`primary`:`default`,disabled:e,onClick:()=>this.onToggleException(),title:O.t(`Stop on exception`),size:`medium`,children:h(r,{})}),this.renderTabs()]},`toolbar1`)}getPossibleBreakpoints(e){let t={...e,columnNumber:1e3};this.sendToInstance({cmd:`getPossibleBreakpoints`,start:e,end:t})}toggleBreakpoint(e){let t=this.state.breakpoints.find(t=>t.location.scriptId===this.state.selected&&t.location.lineNumber===e);if(t){let e=JSON.parse(JSON.stringify(this.state.breakpoints));this.setState({breakpoints:e},()=>this.sendToInstance({breakpoints:[t.id],cmd:`cb`}))}else this.getPossibleBreakpoints({scriptId:this.state.selected,lineNumber:e,columnNumber:0})}renderCode(){if(this.state.script&&this.state.started){var e;let t=this.state.breakpoints.filter(e=>e.location.scriptId===this.state.selected);return h(V,{runningInstances:this.props.runningInstances,socket:this.props.socket,adapterName:this.props.adapterName,scriptName:this.state.selected?this.state.tabs[this.state.selected]:``,sourceId:this.state.selected,script:this.state.script,paused:this.state.paused,breakpoints:t,location:((e=this.state.location)==null?void 0:e.scriptId)===this.state.selected?this.state.location:null,themeType:this.props.themeType,themeName:this.props.themeName,onToggleBreakpoint:e=>this.toggleBreakpoint(e)})}return null}renderFrames(){var e;return this.state.paused?h(re,{currentScriptId:this.state.selected,scopes:this.state.scopes,expressions:this.state.expressions,themeType:this.props.themeType,callFrames:(e=this.state.context)==null?void 0:e.callFrames,currentFrame:this.state.currentFrame,onChangeCurrentFrame:e=>this.selectFrame(e),onWriteScopeValue:e=>{this.sendToInstance({cmd:`setValue`,variableName:e.variableName,scopeNumber:e.scopeNumber,newValue:e.newValue,callFrameId:e.callFrameId})},onExpressionDelete:e=>{let t=JSON.parse(JSON.stringify(this.state.expressions));t.splice(e,1),this.setState({expressions:t}),window.localStorage.setItem(`javascript.tools.exps.${this.props.src}`,JSON.stringify(t.map(e=>e.name)))},onExpressionAdd:e=>{let t=JSON.parse(JSON.stringify(this.state.expressions));t.push({name:``,value:{value:``}}),this.setState({expressions:t},()=>e&&e(t.length-1,this.state.expressions[t.length-1]))},onExpressionNameUpdate:(e,t,n)=>{let r=JSON.parse(JSON.stringify(this.state.expressions));if(!t)r.splice(e,1);else if(r.find(e=>e.name===t))return n&&n();else r[e].name=t;this.setState({expressions:r},()=>{t&&this.readExpressions(e),n&&n()}),window.localStorage.setItem(`javascript.tools.exps.${this.props.src}`,JSON.stringify(r.map(e=>e.name)))}}):null}renderConsole(){return h(G,{console:this.state.console,onClearAllLogs:()=>this.setState({console:[],logErrors:0,logWarnings:0,logs:0})})}renderTools(){let e=!this.state.tabs||!this.state.started,t;return t=this.state.logErrors?h(d,{badgeContent:this.state.logErrors,color:`error`,children:h(`span`,{children:O.t(`Console`)})}):this.state.logWarnings?h(d,{badgeContent:this.state.logWarnings,color:`secondary`,children:h(`span`,{children:O.t(`Console`)})}):this.state.logs?h(d,{badgeContent:this.state.logs,color:`default`,children:h(`span`,{children:O.t(`Console`)})}):O.t(`Console`),i(`div`,{style:{width:`100%`,height:`100%`,overflow:`hidden`,display:`flex`,flexDirection:`column`},children:[i(l,{sx:J.tabsRoot,component:`div`,indicatorColor:`primary`,style:{position:`relative`,width:`100%`},value:this.state.toolsTab,onChange:(e,t)=>{let n={toolsTab:t};this.console&&t===`console`&&(n.console=this.console,this.console=null,n.logs=0,n.logWarnings=0,n.logErrors=0),window.localStorage.setItem(`javascript.tools.tab`,t),this.setState(n)},scrollButtons:`auto`,children:[h(m,{style:J.tabRoot,disabled:e,label:O.t(`Stack`),value:`stack`}),h(m,{style:J.tabRoot,disabled:e,label:t,value:`console`})]}),i(`div`,{style:{width:`100%`,flexGrow:1,minHeight:0,overflow:`hidden`},children:[this.state.toolsTab===`stack`&&!e?this.renderFrames():null,this.state.toolsTab===`console`&&!e?this.renderConsole():null]})]})}render(){return i(y,{sx:J.root,children:[this.state.starting?h(A,{}):null,this.renderToolbar(),h(`div`,{style:J.splitter,children:i(R,{direction:ee.Vertical,initialSizes:this.state.toolSizes,minHeights:[100,100],onResizeFinished:(e,t)=>{this.setState({toolSizes:t}),window.localStorage.setItem(`JS.toolSizes`,JSON.stringify(t))},gutterClassName:this.props.themeType===`dark`?`Dark visGutter`:`Light visGutter`,children:[h(`div`,{style:{width:`100%`,height:`100%`,overflow:`hidden`},children:this.renderCode()}),h(`div`,{style:{width:`100%`,height:`100%`,overflow:`hidden`},children:this.renderTools()})]})}),this.renderError()]},`debugger`)}};export{Y as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._wrapperRules_147jt_8{background:var(--backgroundGlobal);height:100%;display:flex}._rootWrapper_147jt_14{width:100%;display:flex}._bands_147jt_26{flex-direction:column;flex:1;min-width:0;display:flex;overflow:auto}._emptyRule_147jt_39{border:1px dashed var(--lineColor);border-radius:8px;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;margin:12px 12px 0 56px;padding:14px 16px;display:flex}._emptyRuleText_147jt_51{color:var(--colorBlock);font-size:14px}@media screen and (max-width:835px){._rootWrapper_147jt_14{flex-direction:column;height:auto;overflow:auto}}._switchesItem_b8h5i_6{width:auto;max-width:100%;color:var(--colorInput);border:1px solid #fff0;align-items:center;margin:1px 0;padding:4px 0;transition:border .2s,color .2s,background .2s;display:flex}._switchesItem_b8h5i_6 span{text-overflow:ellipsis;width:100%;color:var(--bandColor,var(--lineColorActive));white-space:nowrap;margin-left:8px;font-size:13px;overflow:hidden}._switchesItem_b8h5i_6:hover,._switchesItemActive_b8h5i_35{border:1px solid var(--lineColor);color:var(--lineColorHover);background:var(--backgroundColor);cursor:pointer;border-radius:6px}._iconTheme_b8h5i_43{flex:none;margin-left:4px;width:20px!important;height:20px!important}._iconTheme_b8h5i_43 *{color:var(--bandColor,var(--lineColorActive))!important}._cardStyle_15e7l_1{cursor:pointer;background:var(--backgroundCurrentItem);border-left:3px solid #0000;border-radius:6px;align-items:flex-start;width:min(380px,100% - 24px);min-width:200px;height:fit-content;margin:6px 12px;padding:8px 34px 8px 10px;transition:border-color .2s;display:flex;position:relative;box-shadow:0 2px 1px -1px #0003,0 1px 1px #00000024,0 1px 3px #0000001f}._railTriggers_15e7l_25{border-left-color:var(--railTrigger)}._railConditions_15e7l_29{border-left-color:var(--railCondition)}._railActions_15e7l_33{border-left-color:var(--railAction)}._cardStyleActive_15e7l_37{z-index:100;width:300px}._cardStyle_15e7l_1:has([data-rules-expanded=true]){width:calc(100% - 24px)}._controlMenu_15e7l_46{z-index:2;opacity:0;pointer-events:none;width:22px;transition:opacity .3s;display:flex;position:absolute;top:4px;right:4px}._cardStyle_15e7l_1:hover ._controlMenu_15e7l_46{opacity:1;pointer-events:auto}._closeBtn_15e7l_64{z-index:1;cursor:pointer;border-radius:20px;width:20px;height:20px;margin:5px auto;position:relative}._closeBtn_15e7l_64:before{content:"+";color:#f7060684;z-index:2;font-size:30px;line-height:1;transition:all .3s cubic-bezier(.77,0,.2,.85);position:absolute;top:-6px;left:2px;transform:rotate(45deg)}._closeBtn_15e7l_64:after{content:"";background:var(--backgroundColorHumburger);z-index:1;border-radius:100%;width:100%;height:100%;transition:all .3s cubic-bezier(.77,0,.2,.85);position:absolute;top:0;left:0;transform:scale(.01)}._closeBtn_15e7l_64:hover:after{transform:scale(1)}._closeBtn_15e7l_64:hover:before{color:#fff;transform:scale(.8)rotate(45deg)}._isDelete_15e7l_106{opacity:.8;background:#fff;height:0;min-height:0;margin:0 12px;padding:0 10px;transition:all .25s;overflow:hidden;box-shadow:0 0 10px #6accff}@media screen and (max-width:835px){._controlMenu_15e7l_46{opacity:1;pointer-events:auto}}._drag_mobile_15e7l_125{display:none}@media screen and (max-width:600px){._cardStyle_15e7l_1{width:calc(100% - 24px)}._drag_mobile_15e7l_125{background:repeating-linear-gradient(180deg, var(--lineColorActive), var(--lineColorActive) 4px, var(--backgroundColorHumburger) 4px, var(--backgroundColorHumburger) 8px);border:1px solid var(--lineColorActive);cursor:pointer;border-radius:5px 0 0;width:30px;height:20px;display:flex;position:absolute;top:0;left:0}}._emptyBlockStyle_1p9c1_1{cursor:pointer;background:var(--backgroundEmptyBlock);border-radius:4px;align-items:center;width:auto;margin:10px 40px 10px 10px;display:flex}._emptyBlock_1p9c1_1{margin-top:10px;padding:10px;animation:.12s _marginTop_1p9c1_1}._selectOnChange_1p9c1_17{width:calc(100% - 42px);margin-left:12px;color:var(--lineColor)!important}._selectOnChangeHelp_1p9c1_23{color:var(--lineColor);vertical-align:middle;cursor:pointer}._selectOnChangeHelpIcon_1p9c1_29{color:var(--lineColor)}@keyframes _marginTop_1p9c1_1{0%{height:0;margin-top:70px;padding:0}to{margin-top:10px;padding:10px}}._emptyBlockNone_1p9c1_44{height:0;transition:height 20ms;animation:none}._bandTriggers_1p9c1_57{--bandColor:var(--railTrigger)}._bandConditions_1p9c1_61{--bandColor:var(--railCondition)}._bandActions_1p9c1_65{--bandColor:var(--railAction)}._mainBlockItemRules_1p9c1_69{overflow:initial;flex-direction:column;flex:none;padding-bottom:8px;padding-left:44px;display:flex;position:relative}._mainBlockItemRules_1p9c1_69:before{content:"";background:var(--bandColor);opacity:.06;pointer-events:none;position:absolute;inset:0}._mainBlockItemRules_1p9c1_69 ._nameBlockItems_1p9c1_93{color:var(--bandColor);letter-spacing:.08em;text-transform:uppercase;justify-content:flex-start;align-items:center;gap:6px;width:100%;height:fit-content;margin:12px 0 2px;padding-left:14px;font-size:12px;font-weight:600;display:flex}._mainBlockItemRules_1p9c1_69 ._nameBlockItems_1p9c1_93 svg{color:var(--bandColor);font-size:18px}._mainBlockItemRules_1p9c1_69+._mainBlockItemRules_1p9c1_69{border-top:1px solid var(--lineColor)}._nameBlockItemsFoldable_1p9c1_120{cursor:pointer;user-select:none}._nameBlockItemsFoldable_1p9c1_120:hover ._foldIcon_1p9c1_124,._nameBlockItemsFoldable_1p9c1_120:hover ._foldHint_1p9c1_124{opacity:1}._foldIcon_1p9c1_124{opacity:.6;transition:opacity .2s;font-size:18px!important}._foldHint_1p9c1_124{color:var(--lineColor);letter-spacing:normal;text-transform:none;opacity:.75;font-size:12px;font-weight:400;transition:opacity .2s}._contentBlockItem_1p9c1_145{flex-direction:column;min-height:64px;transition:height .3s,background .5s;display:flex}._wrapperMargin_1p9c1_153{flex-direction:column;max-width:900px;display:flex}._contentHeightOn_1p9c1_160{animation:.3s _heightBlock_1p9c1_1}@keyframes _heightBlock_1p9c1_1{0%{height:0}to{height:100%}}._contentHeightOff_1p9c1_179{height:0;min-height:0;animation:none;overflow:hidden}._cardAdd_1p9c1_186{text-align:center;width:100%;color:var(--lineColor);align-items:center;margin:0 10px;display:flex}._cardAdd_1p9c1_186:after,._cardAdd_1p9c1_186:before{content:"";border-bottom:1px solid;flex:1}._cardAdd_1p9c1_186:after{margin-left:.25em}._cardAdd_1p9c1_186:before{margin-right:.25em}._blockCardAdd_1p9c1_206{color:var(--colorAddBlock);cursor:pointer;align-items:center;padding:0 10px 6px;display:flex}._blockCardAdd_1p9c1_206 *{color:var(--colorAddBlock);opacity:.7}@media screen and (max-width:835px){._contentHeightOff_1p9c1_179,._contentHeightOn_1p9c1_160{transition:min-height .3s}}._drag_7xfhc_1{z-index:1;cursor:pointer;width:32px;height:22px;position:absolute;top:23px;left:12px}._root_7xfhc_11{position:relative}._menuRules_1ijaq_1{background:var(--backgroundColor);border-right:1px solid var(--lineColor);opacity:1;flex-direction:column;width:168px;padding:6px;transition:width .5s,opacity .2s,padding .5s,background .2s,border-right .2s;display:flex;overflow-x:hidden}._wizardButton_1ijaq_13{white-space:nowrap;flex:none;color:var(--lineColorActive)!important;border-color:var(--lineColor)!important;margin-bottom:4px!important;padding:2px 8px!important;font-size:13px!important}._wizardButton_1ijaq_13 [class*=MuiButton-startIcon] svg{font-size:18px}._switchesRenderWrapper_1ijaq_26{direction:rtl;overflow:hidden auto}._switchesRenderWrapper_1ijaq_26 span{direction:ltr}._menuOff_1ijaq_35{opacity:0;width:0;padding:0}._menuTitle_1ijaq_41{text-align:center;color:var(--lineColor);white-space:nowrap;align-items:center;transition:color .2s;display:flex}._menuTitle_1ijaq_41:after,._menuTitle_1ijaq_41:before{content:"";border-bottom:1px solid;flex:1}._marginAuto_1ijaq_55{margin-top:auto;margin-bottom:6px}._inputWidth_1ijaq_60{margin-top:0!important;margin-bottom:2px!important}._inputWidth_1ijaq_60 input{padding:6px 8px;font-size:13px}._inputWidth_1ijaq_60 label{font-size:13px}._menuWrapper_1ijaq_72{height:100%;display:flex;position:relative}._hamburgerWrapper_1ijaq_80{background:var(--backgroundColorHumburger);width:24px;height:40px;color:var(--lineColorActive);border:1px solid var(--lineColor);cursor:pointer;z-index:10;border-left:none;border-radius:0 6px 6px 0;justify-content:center;align-items:center;transition:left .5s,border-radius .7s,width .7s,height .7s,background .2s,border .2s,color .2s;display:flex;position:absolute;top:4px;left:100%}._hamburgerWrapper_1ijaq_80 svg{font-size:20px}._hamburgerOff_1ijaq_113{border-radius:0 20px 20px 0;width:30px;height:34px}._nothingFound_1ijaq_121{color:var(--lineColor);margin:10px 6px;font-size:14px;transition:color .2s}._resetSearch_1ijaq_128{color:var(--lineColor);cursor:pointer;margin:6px 0;font-weight:700;transition:color .3s}._resetSearch_1ijaq_128:hover{color:var(--lineColorHover);text-decoration:underline}._controlPanel_1ijaq_140{align-items:center;width:100%;display:flex}._controlPanel_1ijaq_140 [class*=MuiTabs-root]{width:100%;min-height:0}._controlPanel_1ijaq_140 button{width:33.3333%;min-width:auto;min-height:0;color:var(--bandColor,var(--lineColor));opacity:.6;padding:4px 0;transition:color .2s,opacity .2s}._controlPanel_1ijaq_140 button svg{font-size:20px}._controlPanel_1ijaq_140 ._controlPanelAppBar_1ijaq_164{box-shadow:none;background:0 0}._controlPanel_1ijaq_140 [class*=Mui-selected]{opacity:1;color:var(--bandColor,var(--lineColorActive))!important}._controlPanel_1ijaq_140 [class*=MuiTabs-indicator]{background-color:var(--bandColor,var(--lineColorActive))}._controlPanel_1ijaq_140 [class*=Mui-disabled]{color:var(--disabledColor)!important}._tabTriggers_1ijaq_180{--bandColor:var(--railTrigger)}._tabConditions_1ijaq_184{--bandColor:var(--railCondition)}._tabActions_1ijaq_188{--bandColor:var(--railAction)}._addClassMenu_1ijaq_192{z-index:12;position:absolute;top:0}._addClassBackground_1ijaq_198{background:var(--backgroundMobile)}._addClassPosition_1ijaq_202{z-index:2222;position:sticky;top:0;left:0}@media screen and (max-width:1035px){._menuWrapper_1ijaq_72{z-index:12;position:absolute;top:0}._menuRules_1ijaq_1{background:var(--backgroundMobile)}}@media screen and (max-width:835px){._menuRules_1ijaq_1{z-index:2222;position:sticky;top:0;left:0}}._bandTriggers_91vrz_5{--bandColor:var(--railTrigger)}._bandConditions_91vrz_9{--bandColor:var(--railCondition)}._bandActions_91vrz_13{--bandColor:var(--railAction)}._paper_91vrz_17{min-height:70vh}._title_91vrz_22{align-items:center;gap:8px;padding-right:48px;display:flex}._close_91vrz_29{top:12px;right:12px;position:absolute!important}._content_91vrz_35{flex-direction:column;display:flex}._stepper_91vrz_40{background:0 0!important;padding:8px 0 20px!important}._step_91vrz_40{flex-direction:column;gap:10px;display:flex}._step_91vrz_40[hidden]{display:none}._hint_91vrz_56{color:var(--colorBlockHover);font-size:13px}._warning_91vrz_61{color:var(--debugColor);font-size:13px;font-weight:600}._blockCard_91vrz_68{border-left:3px solid var(--bandColor);background:var(--backgroundCurrentItem);border-radius:6px;align-items:flex-start;padding:8px 40px 8px 10px;display:flex;position:relative;box-shadow:0 2px 1px -1px #0003,0 1px 1px #00000024,0 1px 3px #0000001f}._blockBody_91vrz_79{flex:1;align-items:flex-start;min-width:0;display:flex}._remove_91vrz_86{top:4px;right:4px;color:var(--colorBlockHover)!important;position:absolute!important}._notFound_91vrz_93{color:var(--debugColor);font-size:13px}._chooser_91vrz_99{grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:8px;display:grid}._choice_91vrz_105{border:1px solid var(--lineColor);min-height:84px;color:var(--colorBlock);font:inherit;text-align:center;cursor:pointer;background:0 0;border-radius:6px;flex-direction:column;justify-content:center;align-items:center;gap:6px;padding:12px 8px;font-size:13px;transition:border-color .2s,background .2s;display:flex}._choice_91vrz_105:hover{border-color:var(--lineColorActive);background:var(--backgroundCurrentItem)}._choiceIcon_91vrz_128{width:28px!important;height:28px!important}._choiceIcon_91vrz_128 *{color:var(--colorBlock)!important}._choiceName_91vrz_136{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}._addMore_91vrz_144{align-self:flex-start;color:var(--lineColorActive)!important}._summaryBand_91vrz_150{flex-direction:column;gap:6px;display:flex}._summaryLabel_91vrz_156{color:var(--bandColor);letter-spacing:.08em;text-transform:uppercase;font-size:12px;font-weight:600}._preview_91vrz_164{pointer-events:none}._actions_91vrz_169{padding:12px 24px!important}._spacer_91vrz_173{flex:1}:root,:root.blue,:root.colored{--backgroundColor:#3052813b;--lineColor:#4caaf47d;--lineColorHover:#ccceff;--lineColorActive:#4caaf4;--backgroundColorHumburger:#436a93b8;--colorBlock:#02124b;--colorBlockHover:#02124b8c;--colorInput:#02124b;--backgroundBlock:#c9e7ffab;--railTrigger:#b4600f;--railCondition:#6b4fb5;--railAction:#0f7268;--backgroundGlobal:linear-gradient(160deg, #111f33 0%, #1c3350 100%);--backgroundMobile:#041c35d4;--backgroundCurrentItem:#ffffff6b;--disabledColor:#210025cc;--backgroundEmptyBlock:#ffffff1f;--colorAddBlock:#fff;--debugColor:#c6511b}:root.dark{--backgroundColor:#1f1f1f3b;--lineColor:#f3f3f37d;--lineColorHover:#a0a0a0;--lineColorActive:#dedede;--backgroundColorHumburger:#3e3e3eb8;--colorBlock:#080808;--colorBlockHover:#0808088c;--colorInput:#ddd;--backgroundBlock:#c1c1c1ab;--railTrigger:#e0904f;--railCondition:#a894e4;--railAction:#4fb9aa;--backgroundGlobal:linear-gradient(160deg, #1a1a1c 0%, #232326 100%);--backgroundMobile:#040303eb;--backgroundCurrentItem:#ffffff6b;--disabledColor:#210025cc;--backgroundEmptyBlock:#ffffff1f;--colorAddBlock:#fff;--debugColor:#c6511b}:root.light{--backgroundColor:#3131313b;--lineColor:#0001257d;--lineColorHover:#a0a0a0;--lineColorActive:#07002f;--backgroundColorHumburger:#333542a3;--colorBlock:#090929;--colorBlockHover:#c7c6c68c;--colorInput:#090929;--backgroundBlock:#000;--railTrigger:#b4600f;--railCondition:#6b4fb5;--railAction:#0f7268;--backgroundGlobal:linear-gradient(160deg, #e8ecf2 0%, #dae1ea 100%);--backgroundMobile:#b4b2c7bf;--backgroundCurrentItem:#ffffff6b;--disabledColor:#210025cc;--backgroundEmptyBlock:#ffffff1f;--colorAddBlock:#fff;--debugColor:#c6511b}:root.modernDark{--backgroundColor:#141c29cc;--lineColor:#8b97a8;--lineColorHover:#e8edf5;--lineColorActive:#4b9bfa;--backgroundColorHumburger:#1a2434f2;--colorBlock:#e8edf5;--colorBlockHover:#4b9bfa;--colorInput:#e8edf5;--backgroundBlock:#121a26f2;--railTrigger:#e0904f;--railCondition:#a894e4;--railAction:#4fb9aa;--backgroundGlobal:linear-gradient(160deg, #0a121d 0%, #111e30 100%);--backgroundMobile:#141c29f7;--backgroundCurrentItem:#1a24348c;--disabledColor:#586576;--backgroundEmptyBlock:#ffffff0f;--colorAddBlock:#e8edf5;--debugColor:#e8a33d}:root.modernLight{--backgroundColor:#fffc;--lineColor:#5b6878;--lineColorHover:#101827;--lineColorActive:#0b62d6;--backgroundColorHumburger:#eef2f7f2;--colorBlock:#101827;--colorBlockHover:#0b62d6;--colorInput:#101827;--backgroundBlock:#fffffff2;--railTrigger:#b4600f;--railCondition:#6b4fb5;--railAction:#0f7268;--backgroundGlobal:linear-gradient(160deg, #f4f7fb 0%, #e7eef7 100%);--backgroundMobile:#fffffff7;--backgroundCurrentItem:#ffffff8c;--disabledColor:#98a4b3;--backgroundEmptyBlock:#1018270a;--colorAddBlock:#101827;--debugColor:#c77700}
|