iobroker.javascript 9.1.0 → 9.1.1
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/{OpenAiDialog-Dx-XNET0.js → OpenAiDialog-rhLuRLIM.js} +1 -1
- package/admin/assets/{ScriptEditor-BVaX7Hcs.js → ScriptEditor-C-fO5h68.js} +1 -1
- package/admin/assets/ScriptEditorVanillaMonaco-DSYvOslZ.js +1 -0
- package/admin/assets/{index-D8iYqogF.js → index-BVPl8hv0.js} +1 -1
- package/admin/assets/index-C49cpVll.js +5 -0
- package/admin/assets/index-DFZipply.js +1 -0
- package/admin/assets/{index-COZhHfBn.js → index-XSrHkgLE.js} +53 -53
- package/admin/assets/{index-Dnbw7_L3.js → index-q6iFaoFb.js} +1 -1
- package/admin/assets/{localSharedImportMap-AxgBkrOR.js → localSharedImportMap-xmSu9Qkg.js} +1 -1
- package/admin/assets/{virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-C9suQF96.js → virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-D-eF6r8M.js} +2 -2
- package/admin/custom/assets/{Components-FfVbavBM.js → Components-B8x6wOMD.js} +1 -1
- package/admin/custom/assets/{index-DNdWk-cT.js → index-DbXK0odl.js} +1 -1
- package/admin/custom/assets/{index-Be7j5wvd.js → index-N2n19KrF.js} +1 -1
- package/admin/custom/assets/{localSharedImportMap-BRxFonIn.js → localSharedImportMap-2Enh8EZe.js} +1 -1
- package/admin/custom/assets/{virtualExposes-DyedJotb.js → virtualExposes-CqrW7o8v.js} +1 -1
- package/admin/custom/assets/{virtual_mf-REMOTE_ENTRY_ID_ConfigCustomJavascriptSet__customComponents_js-BtJxKB87.js → virtual_mf-REMOTE_ENTRY_ID_ConfigCustomJavascriptSet__customComponents_js-BZZsMeVW.js} +2 -2
- package/admin/custom/customComponents.js +1 -1
- package/admin/mf-manifest.json +1 -1
- package/admin/remoteEntry.js +1 -1
- package/admin/tab.html +3 -3
- package/io-package.json +14 -14
- package/package.json +1 -1
- package/admin/assets/ScriptEditorVanillaMonaco-yq11eIYC.js +0 -1
- package/admin/assets/index-CLJ6-h9Q.js +0 -1
- package/admin/assets/index-Cu-TydZj.js +0 -5
package/README.md
CHANGED
|
@@ -26,7 +26,8 @@ Executes Javascript, Typescript Scripts.
|
|
|
26
26
|
<!--
|
|
27
27
|
### **WORK IN PROGRESS**
|
|
28
28
|
-->
|
|
29
|
-
### 9.1.
|
|
29
|
+
### 9.1.1 (2026-03-19)
|
|
30
|
+
* (GermanBluefox) Small GUI optimizations
|
|
30
31
|
* Added support for custom OpenAI-compatible API endpoints (e.g. Ollama, LM Studio, Google Gemini, DeepSeek, OpenRouter)
|
|
31
32
|
* Added configurable base URL in adapter settings
|
|
32
33
|
* Models are now fetched dynamically from the configured API endpoint
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as ie,j as n}from"./createSvgIcon-DPvF8xqu.js";import{j as S,b as H,k as J,c as re}from"./iobroker_javascript__loadShare__react__loadShare__.mjs-CTZOFJS2.js";import{_ as F,a as Q,b as Z,i as $,h as X,c as oe,$ as ae,d as ce,e as le,f as de,g as ee}from"./iobroker_javascript__loadShare___mf_0_mui_mf_1_material__loadShare__.mjs-QWG5Arqe.js";import{_ as l}from"./iobroker_javascript__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.mjs-DkBjPSMw.js";import{_ as me}from"./preload-helper-BDBacUwf.js";import{C as he,b as ue,R as fe}from"./index-gIA8x-8f.js";import pe from"./ScriptEditorVanillaMonaco-yq11eIYC.js";import{c as te,I as ge}from"./index-Cu-TydZj.js";import{h as ye}from"./index-COZhHfBn.js";import"./iobroker_javascript__loadShare__react__loadShare__.mjs_commonjs-proxy-CE9lvhW8.js";import"./iobroker_javascript__loadShare__prop_mf_2_types__loadShare__.mjs-BCtSFofY.js";import"./virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-C9suQF96.js";import"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-RQRRZMX5.js";import"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs-DeVAS-oa.js";import"./inheritsLoose-B0Ba5G9z.js";const ve=ie(n.jsx("path",{d:"M11.07 12.85c.77-1.39 2.25-2.21 3.11-3.44.91-1.29.4-3.7-2.18-3.7-1.69 0-2.52 1.28-2.87 2.34L6.54 6.96C7.25 4.83 9.18 3 11.99 3c2.35 0 3.96 1.07 4.78 2.41.7 1.15 1.11 3.3.03 4.9-1.2 1.77-2.35 2.31-2.97 3.45-.25.46-.35.76-.35 2.24h-2.89c-.01-.78-.13-2.05.48-3.15M14 20c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2"}),"QuestionMark"),je=me(()=>import("./docs-BrInh2Pn.js"),[],import.meta.url);let G=null;async function xe(s){if(G)return G;const f=await s.getObjectViewSystem("state","","香"),r=await s.getObjectViewSystem("channel","","香"),v=await s.getObjectViewSystem("device","","香"),d=await s.getObjectViewSystem("folder","","香"),k=await s.getObjectViewSystem("enum","","香");return G=Object.assign(f,r,v,d,k),G}function V(s,f){return s&&typeof s=="object"?s[f]||s.en:s||""}async function Ie(s){var P,N,L,K;const f=l.I18n.getLanguage(),r=await xe(s),v=Object.keys(r).sort(),d=new he,k=[],A=["UNREACH_STICKY"],W=[ue.Types.info],_=[],b=[],R=[],D=[];v.forEach(m=>{var a,h,c;((a=r[m])==null?void 0:a.type)==="enum"?_.push(m):(c=(h=r[m])==null?void 0:h.common)!=null&&c.smartName&&D.push(m)}),_.forEach(m=>{m.startsWith("enum.rooms.")?b.push(m):m.startsWith("enum.functions.")&&R.push(m);const a=r[m].common.members;a!=null&&a.length&&a.forEach(h=>{r[h]&&(D.includes(h)||D.push(h))})});const M={id:"",objects:r,_keysOptional:v,_usedIdsOptional:k,ignoreIndicators:A,excludedTypes:W},E=[];D.forEach(m=>{M.id=m;const a=d.detect(M);a&&a.forEach(h=>{var w;const c=(w=h.states.find(i=>i.id))==null?void 0:w.id;if(!c||E.find(i=>i.id===c))return;const j=r[c],z={id:c,name:V(j.common.name,f),type:j.type,deviceType:h.type,states:h.states.filter(i=>i.id).map(i=>({id:i.id,name:i.name,role:i.defaultRole,type:r[i.id].common.type,unit:r[i.id].common.unit,read:r[i.id].common.read===void 0?!0:r[i.id].common.read,write:r[i.id].common.write===void 0?!0:r[i.id].common.write}))},T=c.split(".");let e,o;(j.type==="channel"||j.type==="state")&&(T.pop(),e=T.join("."),r[e]&&(r[e].type==="channel"||r[e].type==="folder")?(T.pop(),o=T.join("."),(!r[o]||r[o].type!=="device"&&r[e].type!=="folder")&&(o=void 0)):e=void 0);const I=b.find(i=>{var x,p,t;return(x=r[i].common.members)!=null&&x.includes(c)||e&&((p=r[i].common.members)!=null&&p.includes(e))?!0:o&&((t=r[i].common.members)==null?void 0:t.includes(o))});I&&(z.room=V(r[I].common.name,f));const g=R.find(i=>{var x,p,t;return(x=r[i].common.members)!=null&&x.includes(c)||e&&((p=r[i].common.members)!=null&&p.includes(e))?!0:o&&((t=r[i].common.members)==null?void 0:t.includes(o))});g&&(z.function=V(r[g].common.name,f)),E.push(z)})});for(let m=0;m<E.length;m++){const a=E[m];if(a.type==="state"||a.type==="channel"){const h=a.id.split(".");h.pop();const c=r[h.join(".")];if(c&&(c.type==="channel"||c.type==="device"||c.type==="folder")){a.name=V(((P=c.common)==null?void 0:P.name)||a.name,f),h.pop();const j=r[h.join(".")];(j==null?void 0:j.type)==="device"&&((N=j.common)!=null&&N.icon)&&(a.name=V(((L=j.common)==null?void 0:L.name)||a.name,f))}else a.name=V(((K=c==null?void 0:c.common)==null?void 0:K.name)||a.name,f)}}return E}const _e=async()=>(await je).default,we={ru:"Russian",en:"English",de:"German",es:"Spanish",fr:"French",it:"Italian",pl:"Polish",nl:"Dutch",pt:"Portuguese",uk:"Ukrainian","zh-cn":"Chinese"},Y={flexShrink:0,opacity:.7},ne={openai:n.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",style:Y,children:n.jsx("path",{d:"M22.282 9.821a5.985 5.985 0 0 0-.516-4.91 6.046 6.046 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.18a5.985 5.985 0 0 0-3.998 2.9 6.046 6.046 0 0 0 .743 7.097 5.98 5.98 0 0 0 .51 4.911 6.051 6.051 0 0 0 6.515 2.9A5.985 5.985 0 0 0 13.26 24a6.056 6.056 0 0 0 5.772-4.206 5.99 5.99 0 0 0 3.997-2.9 6.056 6.056 0 0 0-.747-7.073zM13.26 22.43a4.476 4.476 0 0 1-2.876-1.04l.141-.081 4.779-2.758a.795.795 0 0 0 .392-.681v-6.737l2.02 1.168a.071.071 0 0 1 .038.052v5.583a4.504 4.504 0 0 1-4.494 4.494zM3.6 18.304a4.47 4.47 0 0 1-.535-3.014l.142.085 4.783 2.759a.771.771 0 0 0 .78 0l5.843-3.369v2.332a.08.08 0 0 1-.033.062L9.74 19.95a4.5 4.5 0 0 1-6.14-1.646zM2.34 7.896a4.485 4.485 0 0 1 2.366-1.973V11.6a.766.766 0 0 0 .388.676l5.815 3.355-2.02 1.168a.076.076 0 0 1-.071 0l-4.83-2.786A4.504 4.504 0 0 1 2.34 7.872zm16.597 3.855-5.833-3.387L15.119 7.2a.076.076 0 0 1 .071 0l4.83 2.791a4.494 4.494 0 0 1-.676 8.105v-5.678a.79.79 0 0 0-.407-.667zm2.01-3.023-.141-.085-4.774-2.782a.776.776 0 0 0-.785 0L9.409 9.23V6.897a.066.066 0 0 1 .028-.061l4.83-2.787a4.5 4.5 0 0 1 6.68 4.66zm-12.64 4.135-2.02-1.164a.08.08 0 0 1-.038-.057V6.075a4.5 4.5 0 0 1 7.375-3.453l-.142.08L8.704 5.46a.795.795 0 0 0-.393.681zm1.097-2.365 2.602-1.5 2.607 1.5v2.999l-2.597 1.5-2.607-1.5z"})}),anthropic:n.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",style:Y,children:n.jsx("path",{d:"M17.304 3.54h-3.604L7.128 20.46h3.604l1.345-3.462h6.932l1.345 3.462H24L17.304 3.54zm-3.45 10.696 2.647-6.812 2.647 6.812h-5.295zM6.696 3.54H3.092L0 20.46h3.604L6.696 3.54z"})}),gemini:n.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",style:Y,children:n.jsx("path",{d:"M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0z"})}),deepseek:n.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",style:Y,children:n.jsx("path",{d:"M5 3h6a9 9 0 0 1 0 18H5V3zm4 14V7h2a5 5 0 0 1 0 10H9z"})})};async function se(s,f){const r=Object.keys(f);for(let v=0;v<r.length;v++){const d=await s.getObject(r[v]),k=((d==null?void 0:d.native.gptKey)||"").trim(),A=((d==null?void 0:d.native.claudeKey)||"").trim(),W=((d==null?void 0:d.native.geminiKey)||"").trim(),_=((d==null?void 0:d.native.deepseekKey)||"").trim(),b=((d==null?void 0:d.native.gptBaseUrl)||"").trim()||void 0;if(k||A||W||_||b)return{gptKey:k,claudeKey:A,geminiKey:W,deepseekKey:_,gptBaseUrl:b}}return null}const De=s=>{const[f,r]=S(window.localStorage.getItem("openai-question")||""),[v,d]=S(""),[k,A]=S(!1),[W,_]=S(!1),[b,R]=S(window.localStorage.getItem("openai-model")||""),[D,M]=S(!1),[E,P]=S([]),[N,L]=S(!0),[K,m]=S(null),a=H(null),h=H(null),c=H({}),j=H(null),z=J(async e=>{L(!0),m(null);try{const o=await se(s.socket,s.runningInstances);if(e!=null&&e.current)return;if(!o){L(!1);return}h.current=o;const I=Object.keys(s.runningInstances)[0];if(!I){m(l.I18n.t("No running javascript instance found")),L(!1);return}const g=[],w={},i=[],x=[],p=(t,B)=>{for(const O of t){const C=O.toLowerCase();C.includes("embedding")||C.includes("moderation")||C.startsWith("dall-e")||C.startsWith("tts-")||C.startsWith("whisper")||C.startsWith("babbage")||C.startsWith("davinci")||C.startsWith("sora")||C.startsWith("omni-moderation")||w[O]||(g.push(O),w[O]=B)}};if((o.gptKey||o.gptBaseUrl)&&x.push(s.socket.sendTo(I,"testApiConnection",{apiKey:o.gptKey,baseUrl:o.gptBaseUrl||"",provider:"openai"}).then(t=>{t.models?p(t.models,"openai"):t.error&&i.push(`OpenAI: ${t.error}`)}).catch(t=>{i.push(`OpenAI: ${String(t)}`)})),o.claudeKey&&x.push(s.socket.sendTo(I,"testApiConnection",{apiKey:o.claudeKey,provider:"anthropic"}).then(t=>{t.models?p(t.models,"anthropic"):t.error&&i.push(`Anthropic: ${t.error}`)}).catch(t=>{i.push(`Anthropic: ${String(t)}`)})),o.geminiKey&&x.push(s.socket.sendTo(I,"testApiConnection",{apiKey:o.geminiKey,provider:"gemini"}).then(t=>{t.models?p(t.models,"gemini"):t.error&&i.push(`Gemini: ${t.error}`)}).catch(t=>{i.push(`Gemini: ${String(t)}`)})),o.deepseekKey&&x.push(s.socket.sendTo(I,"testApiConnection",{apiKey:o.deepseekKey,provider:"deepseek"}).then(t=>{t.models?p(t.models,"deepseek"):t.error&&i.push(`DeepSeek: ${t.error}`)}).catch(t=>{i.push(`DeepSeek: ${String(t)}`)})),await Promise.all(x),e!=null&&e.current)return;if(c.current=w,g.length>0){g.sort(),P(g);const t=window.localStorage.getItem("openai-model");t&&g.includes(t)?R(t):R(g[0])}i.length>0&&m(i.join("; "))}catch(o){console.error("Failed to fetch models:",o),e!=null&&e.current||m(l.I18n.t("Request failed: %s",String(o)))}e!=null&&e.current||L(!1)},[s.socket,s.runningInstances]);re(()=>{const e={current:!1};return z(e),()=>{e.current=!0}},[z]);const T=J(async()=>{let e;a.current?e=a.current:(e=await Ie(s.socket),a.current=e,console.log(`devices: ${JSON.stringify(e,null,2)}`));let o=h.current;o||(o=await se(s.socket,s.runningInstances),h.current=o);let I;if(j.current?I=j.current:(I=await _e(),j.current=I),!o){M(!0);return}const g=c.current[b];if(!g){_(l.I18n.t("Please select a valid model"));return}let w,i;g==="anthropic"?(w=o.claudeKey,i=""):g==="gemini"?(w=o.geminiKey,i=""):g==="deepseek"?(w=o.deepseekKey,i=""):(w=o.gptKey,i=o.gptBaseUrl||"");const x=Object.keys(s.runningInstances)[0];if(!x){_(l.I18n.t("No running javascript instance found"));return}A(!0),_(!1);try{const p=await s.socket.sendTo(x,"chatCompletion",{apiKey:w,baseUrl:i,model:b,provider:g,messages:[{role:"system",content:`You are programmer. Here is a documentation:
|
|
1
|
+
import{c as ie,j as n}from"./createSvgIcon-DPvF8xqu.js";import{j as S,b as H,k as J,c as re}from"./iobroker_javascript__loadShare__react__loadShare__.mjs-CTZOFJS2.js";import{_ as F,a as Q,b as Z,i as $,h as X,c as oe,$ as ae,d as ce,e as le,f as de,g as ee}from"./iobroker_javascript__loadShare___mf_0_mui_mf_1_material__loadShare__.mjs-QWG5Arqe.js";import{_ as l}from"./iobroker_javascript__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.mjs-DkBjPSMw.js";import{_ as me}from"./preload-helper-BDBacUwf.js";import{C as he,b as ue,R as fe}from"./index-gIA8x-8f.js";import pe from"./ScriptEditorVanillaMonaco-DSYvOslZ.js";import{c as te,I as ge}from"./index-C49cpVll.js";import{h as ye}from"./index-XSrHkgLE.js";import"./iobroker_javascript__loadShare__react__loadShare__.mjs_commonjs-proxy-CE9lvhW8.js";import"./iobroker_javascript__loadShare__prop_mf_2_types__loadShare__.mjs-BCtSFofY.js";import"./virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-D-eF6r8M.js";import"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-RQRRZMX5.js";import"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs-DeVAS-oa.js";import"./inheritsLoose-B0Ba5G9z.js";const ve=ie(n.jsx("path",{d:"M11.07 12.85c.77-1.39 2.25-2.21 3.11-3.44.91-1.29.4-3.7-2.18-3.7-1.69 0-2.52 1.28-2.87 2.34L6.54 6.96C7.25 4.83 9.18 3 11.99 3c2.35 0 3.96 1.07 4.78 2.41.7 1.15 1.11 3.3.03 4.9-1.2 1.77-2.35 2.31-2.97 3.45-.25.46-.35.76-.35 2.24h-2.89c-.01-.78-.13-2.05.48-3.15M14 20c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2"}),"QuestionMark"),je=me(()=>import("./docs-BrInh2Pn.js"),[],import.meta.url);let G=null;async function xe(s){if(G)return G;const f=await s.getObjectViewSystem("state","","香"),r=await s.getObjectViewSystem("channel","","香"),v=await s.getObjectViewSystem("device","","香"),d=await s.getObjectViewSystem("folder","","香"),k=await s.getObjectViewSystem("enum","","香");return G=Object.assign(f,r,v,d,k),G}function V(s,f){return s&&typeof s=="object"?s[f]||s.en:s||""}async function Ie(s){var P,N,L,K;const f=l.I18n.getLanguage(),r=await xe(s),v=Object.keys(r).sort(),d=new he,k=[],A=["UNREACH_STICKY"],W=[ue.Types.info],_=[],b=[],R=[],D=[];v.forEach(m=>{var a,h,c;((a=r[m])==null?void 0:a.type)==="enum"?_.push(m):(c=(h=r[m])==null?void 0:h.common)!=null&&c.smartName&&D.push(m)}),_.forEach(m=>{m.startsWith("enum.rooms.")?b.push(m):m.startsWith("enum.functions.")&&R.push(m);const a=r[m].common.members;a!=null&&a.length&&a.forEach(h=>{r[h]&&(D.includes(h)||D.push(h))})});const M={id:"",objects:r,_keysOptional:v,_usedIdsOptional:k,ignoreIndicators:A,excludedTypes:W},E=[];D.forEach(m=>{M.id=m;const a=d.detect(M);a&&a.forEach(h=>{var w;const c=(w=h.states.find(i=>i.id))==null?void 0:w.id;if(!c||E.find(i=>i.id===c))return;const j=r[c],z={id:c,name:V(j.common.name,f),type:j.type,deviceType:h.type,states:h.states.filter(i=>i.id).map(i=>({id:i.id,name:i.name,role:i.defaultRole,type:r[i.id].common.type,unit:r[i.id].common.unit,read:r[i.id].common.read===void 0?!0:r[i.id].common.read,write:r[i.id].common.write===void 0?!0:r[i.id].common.write}))},T=c.split(".");let e,o;(j.type==="channel"||j.type==="state")&&(T.pop(),e=T.join("."),r[e]&&(r[e].type==="channel"||r[e].type==="folder")?(T.pop(),o=T.join("."),(!r[o]||r[o].type!=="device"&&r[e].type!=="folder")&&(o=void 0)):e=void 0);const I=b.find(i=>{var x,p,t;return(x=r[i].common.members)!=null&&x.includes(c)||e&&((p=r[i].common.members)!=null&&p.includes(e))?!0:o&&((t=r[i].common.members)==null?void 0:t.includes(o))});I&&(z.room=V(r[I].common.name,f));const g=R.find(i=>{var x,p,t;return(x=r[i].common.members)!=null&&x.includes(c)||e&&((p=r[i].common.members)!=null&&p.includes(e))?!0:o&&((t=r[i].common.members)==null?void 0:t.includes(o))});g&&(z.function=V(r[g].common.name,f)),E.push(z)})});for(let m=0;m<E.length;m++){const a=E[m];if(a.type==="state"||a.type==="channel"){const h=a.id.split(".");h.pop();const c=r[h.join(".")];if(c&&(c.type==="channel"||c.type==="device"||c.type==="folder")){a.name=V(((P=c.common)==null?void 0:P.name)||a.name,f),h.pop();const j=r[h.join(".")];(j==null?void 0:j.type)==="device"&&((N=j.common)!=null&&N.icon)&&(a.name=V(((L=j.common)==null?void 0:L.name)||a.name,f))}else a.name=V(((K=c==null?void 0:c.common)==null?void 0:K.name)||a.name,f)}}return E}const _e=async()=>(await je).default,we={ru:"Russian",en:"English",de:"German",es:"Spanish",fr:"French",it:"Italian",pl:"Polish",nl:"Dutch",pt:"Portuguese",uk:"Ukrainian","zh-cn":"Chinese"},Y={flexShrink:0,opacity:.7},ne={openai:n.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",style:Y,children:n.jsx("path",{d:"M22.282 9.821a5.985 5.985 0 0 0-.516-4.91 6.046 6.046 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.18a5.985 5.985 0 0 0-3.998 2.9 6.046 6.046 0 0 0 .743 7.097 5.98 5.98 0 0 0 .51 4.911 6.051 6.051 0 0 0 6.515 2.9A5.985 5.985 0 0 0 13.26 24a6.056 6.056 0 0 0 5.772-4.206 5.99 5.99 0 0 0 3.997-2.9 6.056 6.056 0 0 0-.747-7.073zM13.26 22.43a4.476 4.476 0 0 1-2.876-1.04l.141-.081 4.779-2.758a.795.795 0 0 0 .392-.681v-6.737l2.02 1.168a.071.071 0 0 1 .038.052v5.583a4.504 4.504 0 0 1-4.494 4.494zM3.6 18.304a4.47 4.47 0 0 1-.535-3.014l.142.085 4.783 2.759a.771.771 0 0 0 .78 0l5.843-3.369v2.332a.08.08 0 0 1-.033.062L9.74 19.95a4.5 4.5 0 0 1-6.14-1.646zM2.34 7.896a4.485 4.485 0 0 1 2.366-1.973V11.6a.766.766 0 0 0 .388.676l5.815 3.355-2.02 1.168a.076.076 0 0 1-.071 0l-4.83-2.786A4.504 4.504 0 0 1 2.34 7.872zm16.597 3.855-5.833-3.387L15.119 7.2a.076.076 0 0 1 .071 0l4.83 2.791a4.494 4.494 0 0 1-.676 8.105v-5.678a.79.79 0 0 0-.407-.667zm2.01-3.023-.141-.085-4.774-2.782a.776.776 0 0 0-.785 0L9.409 9.23V6.897a.066.066 0 0 1 .028-.061l4.83-2.787a4.5 4.5 0 0 1 6.68 4.66zm-12.64 4.135-2.02-1.164a.08.08 0 0 1-.038-.057V6.075a4.5 4.5 0 0 1 7.375-3.453l-.142.08L8.704 5.46a.795.795 0 0 0-.393.681zm1.097-2.365 2.602-1.5 2.607 1.5v2.999l-2.597 1.5-2.607-1.5z"})}),anthropic:n.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",style:Y,children:n.jsx("path",{d:"M17.304 3.54h-3.604L7.128 20.46h3.604l1.345-3.462h6.932l1.345 3.462H24L17.304 3.54zm-3.45 10.696 2.647-6.812 2.647 6.812h-5.295zM6.696 3.54H3.092L0 20.46h3.604L6.696 3.54z"})}),gemini:n.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",style:Y,children:n.jsx("path",{d:"M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0z"})}),deepseek:n.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",style:Y,children:n.jsx("path",{d:"M5 3h6a9 9 0 0 1 0 18H5V3zm4 14V7h2a5 5 0 0 1 0 10H9z"})})};async function se(s,f){const r=Object.keys(f);for(let v=0;v<r.length;v++){const d=await s.getObject(r[v]),k=((d==null?void 0:d.native.gptKey)||"").trim(),A=((d==null?void 0:d.native.claudeKey)||"").trim(),W=((d==null?void 0:d.native.geminiKey)||"").trim(),_=((d==null?void 0:d.native.deepseekKey)||"").trim(),b=((d==null?void 0:d.native.gptBaseUrl)||"").trim()||void 0;if(k||A||W||_||b)return{gptKey:k,claudeKey:A,geminiKey:W,deepseekKey:_,gptBaseUrl:b}}return null}const De=s=>{const[f,r]=S(window.localStorage.getItem("openai-question")||""),[v,d]=S(""),[k,A]=S(!1),[W,_]=S(!1),[b,R]=S(window.localStorage.getItem("openai-model")||""),[D,M]=S(!1),[E,P]=S([]),[N,L]=S(!0),[K,m]=S(null),a=H(null),h=H(null),c=H({}),j=H(null),z=J(async e=>{L(!0),m(null);try{const o=await se(s.socket,s.runningInstances);if(e!=null&&e.current)return;if(!o){L(!1);return}h.current=o;const I=Object.keys(s.runningInstances)[0];if(!I){m(l.I18n.t("No running javascript instance found")),L(!1);return}const g=[],w={},i=[],x=[],p=(t,B)=>{for(const O of t){const C=O.toLowerCase();C.includes("embedding")||C.includes("moderation")||C.startsWith("dall-e")||C.startsWith("tts-")||C.startsWith("whisper")||C.startsWith("babbage")||C.startsWith("davinci")||C.startsWith("sora")||C.startsWith("omni-moderation")||w[O]||(g.push(O),w[O]=B)}};if((o.gptKey||o.gptBaseUrl)&&x.push(s.socket.sendTo(I,"testApiConnection",{apiKey:o.gptKey,baseUrl:o.gptBaseUrl||"",provider:"openai"}).then(t=>{t.models?p(t.models,"openai"):t.error&&i.push(`OpenAI: ${t.error}`)}).catch(t=>{i.push(`OpenAI: ${String(t)}`)})),o.claudeKey&&x.push(s.socket.sendTo(I,"testApiConnection",{apiKey:o.claudeKey,provider:"anthropic"}).then(t=>{t.models?p(t.models,"anthropic"):t.error&&i.push(`Anthropic: ${t.error}`)}).catch(t=>{i.push(`Anthropic: ${String(t)}`)})),o.geminiKey&&x.push(s.socket.sendTo(I,"testApiConnection",{apiKey:o.geminiKey,provider:"gemini"}).then(t=>{t.models?p(t.models,"gemini"):t.error&&i.push(`Gemini: ${t.error}`)}).catch(t=>{i.push(`Gemini: ${String(t)}`)})),o.deepseekKey&&x.push(s.socket.sendTo(I,"testApiConnection",{apiKey:o.deepseekKey,provider:"deepseek"}).then(t=>{t.models?p(t.models,"deepseek"):t.error&&i.push(`DeepSeek: ${t.error}`)}).catch(t=>{i.push(`DeepSeek: ${String(t)}`)})),await Promise.all(x),e!=null&&e.current)return;if(c.current=w,g.length>0){g.sort(),P(g);const t=window.localStorage.getItem("openai-model");t&&g.includes(t)?R(t):R(g[0])}i.length>0&&m(i.join("; "))}catch(o){console.error("Failed to fetch models:",o),e!=null&&e.current||m(l.I18n.t("Request failed: %s",String(o)))}e!=null&&e.current||L(!1)},[s.socket,s.runningInstances]);re(()=>{const e={current:!1};return z(e),()=>{e.current=!0}},[z]);const T=J(async()=>{let e;a.current?e=a.current:(e=await Ie(s.socket),a.current=e,console.log(`devices: ${JSON.stringify(e,null,2)}`));let o=h.current;o||(o=await se(s.socket,s.runningInstances),h.current=o);let I;if(j.current?I=j.current:(I=await _e(),j.current=I),!o){M(!0);return}const g=c.current[b];if(!g){_(l.I18n.t("Please select a valid model"));return}let w,i;g==="anthropic"?(w=o.claudeKey,i=""):g==="gemini"?(w=o.geminiKey,i=""):g==="deepseek"?(w=o.deepseekKey,i=""):(w=o.gptKey,i=o.gptBaseUrl||"");const x=Object.keys(s.runningInstances)[0];if(!x){_(l.I18n.t("No running javascript instance found"));return}A(!0),_(!1);try{const p=await s.socket.sendTo(x,"chatCompletion",{apiKey:w,baseUrl:i,model:b,provider:g,messages:[{role:"system",content:`You are programmer. Here is a documentation:
|
|
2
2
|
|
|
3
3
|
${I}`},{role:"system",content:`Here is list of devices:
|
|
4
4
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as e}from"./createSvgIcon-DPvF8xqu.js";import{a as n}from"./iobroker_javascript__loadShare__react__loadShare__.mjs-CTZOFJS2.js";import{_ as l,a as c,b as h,z as o,h as d,i}from"./iobroker_javascript__loadShare___mf_0_mui_mf_1_material__loadShare__.mjs-QWG5Arqe.js";import{_ as a}from"./iobroker_javascript__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.mjs-DkBjPSMw.js";import p from"./ScriptEditorVanillaMonaco-
|
|
1
|
+
import{j as e}from"./createSvgIcon-DPvF8xqu.js";import{a as n}from"./iobroker_javascript__loadShare__react__loadShare__.mjs-CTZOFJS2.js";import{_ as l,a as c,b as h,z as o,h as d,i}from"./iobroker_javascript__loadShare___mf_0_mui_mf_1_material__loadShare__.mjs-QWG5Arqe.js";import{_ as a}from"./iobroker_javascript__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.mjs-DkBjPSMw.js";import p from"./ScriptEditorVanillaMonaco-DSYvOslZ.js";import{S as m}from"./Save-Cld9qv9i.js";import{a as g}from"./index-C49cpVll.js";import"./iobroker_javascript__loadShare__react__loadShare__.mjs_commonjs-proxy-CE9lvhW8.js";import"./iobroker_javascript__loadShare__prop_mf_2_types__loadShare__.mjs-BCtSFofY.js";const s={textArea:{width:"calc(100% - 10px)",resize:"none"},dialog:{height:"95%"},fullHeight:{height:"100%",overflow:"hidden"},args:r=>({color:r.palette.mode==="dark"?"white":"black",height:30,width:"100%",fontSize:16}),argsTitle:r=>({color:r.palette.mode==="dark"?"white":"black",fontWeight:"bold"})};class b extends n.Component{constructor(t){super(t),this.state={changed:!1,source:!t.source&&t.isReturn?`
|
|
2
2
|
return false`:t.source}}componentDidMount(){setTimeout(()=>{var t;try{(t=window.document.getElementById("source-text-area"))==null||t.focus()}catch{}},100)}handleCancel(){this.props.onClose(!1)}handleOk(){(!this.props.isReturn||this.state.source.includes("return "))&&this.props.onClose(this.state.source)}onChange(t){this.setState({changed:!0,source:t})}render(){return e.jsxs(l,{onClose:()=>!1,maxWidth:"lg",sx:{"& .MuiDialog-paper":s.dialog},fullWidth:!0,open:!0,"aria-labelledby":"source-dialog-title",children:[e.jsx(c,{id:"source-dialog-title",children:a.I18n.t("Function editor")}),e.jsxs(h,{style:s.fullHeight,children:[this.props.args&&e.jsxs(o,{sx:s.args,children:[e.jsx(o,{component:"span",sx:s.argsTitle,children:a.I18n.t("function (")}),this.props.args,e.jsx(o,{component:"span",sx:s.argsTitle,children:")"})]},"arguments"),e.jsx(p,{triggerPrettier:1,adapterName:this.props.adapterName,runningInstances:this.props.runningInstances,style:{...s.textArea,height:this.props.args?"calc(100% - 30px)":"100%"},name:"blockly",socket:this.props.socket,readOnly:!1,checkJs:!1,changed:this.state.changed,code:this.state.source,isDark:this.props.themeType==="dark",onChange:t=>this.onChange(t),language:"javascript"},"scriptEditor")]}),e.jsxs(d,{children:[e.jsx(i,{variant:"contained",onClick:()=>this.handleOk(),color:"primary",startIcon:e.jsx(m,{}),children:a.I18n.t("Save")}),e.jsx(i,{color:"grey",variant:"contained",onClick:()=>this.handleCancel(),startIcon:e.jsx(g,{}),children:a.I18n.t("Cancel")})]})]})}}export{b as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r}from"./createSvgIcon-DPvF8xqu.js";import{a as f}from"./iobroker_javascript__loadShare__react__loadShare__.mjs-CTZOFJS2.js";import{_ as S,a as w,b,h as C,i as y,Q as T,o as k,a0 as E}from"./iobroker_javascript__loadShare___mf_0_mui_mf_1_material__loadShare__.mjs-QWG5Arqe.js";import{n as D,X as O}from"./index-C49cpVll.js";import{_ as u}from"./iobroker_javascript__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.mjs-DkBjPSMw.js";import"./iobroker_javascript__loadShare__react__loadShare__.mjs_commonjs-proxy-CE9lvhW8.js";import"./iobroker_javascript__loadShare__prop_mf_2_types__loadShare__.mjs-BCtSFofY.js";function v(m){return/^script\.js\.global\./.test(m)}let N=0;function L(m){const t=/\x1b\[[0-9;]*m/g;return m.replace(t,"")}class V extends f.Component{monacoDiv=null;editor=null;monaco=window.monaco;get monacoTS(){var t,i;return(i=(t=this.monaco)==null?void 0:t.languages)==null?void 0:i.typescript}insert="";originalCode;runningInstancesStr;monacoCounter=0;location;breakpoints;lastSearch="";typings={};decorations=[];triggerPrettier;contentChangeDisposable=null;mouseDownDisposable=null;constructor(t){super(t),this.state={name:"current",isDark:t.isDark||!1,language:t.language||"javascript",readOnly:t.readOnly||!1,alive:!0,check:!1,searchText:this.props.searchText||"",typingsLoaded:!1,showError:null},this.triggerPrettier=t.triggerPrettier,this.runningInstancesStr=JSON.stringify(this.props.runningInstances),this.originalCode=t.code||"",this.monacoDiv=f.createRef()}waitForMonaco(t){var e,s,o,n;let i=!!((s=(e=this.monacoTS)==null?void 0:e.typescriptDefaults)!=null&&s.getCompilerOptions);if(!i||!this.props.runningInstances){if(this.monaco=window.monaco,i=!!((n=(o=this.monacoTS)==null?void 0:o.typescriptDefaults)!=null&&n.getCompilerOptions),this.monacoCounter++,!i&&this.monacoCounter<20){console.log("wait for monaco loaded"),setTimeout(()=>this.waitForMonaco(t),200);return}this.monacoCounter>=20&&console.error("Cannot load monaco!")}else t&&t()}loadTypings(t){if(!this.editor)return;t||=this.props.runningInstances;const i=t&&Object.keys(t).find(e=>t==null?void 0:t[e]);i&&this.props.socket.sendTo(i.replace("system.adapter.",""),"loadTypings",null).then(e=>{this.setState({alive:!0,check:!0,typingsLoaded:!0}),this.setTypeCheck(!0),e.typings?(this.typings=e.typings,this.setEditorTypings(this.state.name)):console.error(`failed to load typings: ${e.error}`)})}componentDidMount(){var e,s,o,n,c,l,a,d;let t=!!((s=(e=this.monacoTS)==null?void 0:e.typescriptDefaults)!=null&&s.getCompilerOptions);if((!t||!this.props.runningInstances)&&(this.monaco=window.monaco,t=!!((n=(o=this.monacoTS)==null?void 0:o.typescriptDefaults)!=null&&n.getCompilerOptions),!t)){console.log("wait for monaco loaded..."),this.waitForMonaco(()=>this.componentDidMount());return}if(!this.editor&&t&&this.monaco){console.log("Init editor"),(l=(c=this.props).onRegisterSelect)==null||l.call(c,()=>{var p;if(this.editor){const g=this.editor.getSelection();if(g)return(p=this.editor.getModel())==null?void 0:p.getValueInRange(g)}});const h=this.monacoTS.typescriptDefaults.getCompilerOptions();h.allowJs=!0,h.checkJs=this.props.checkJs!==!1,h.noLib=!0,h.lib=[],h.useUnknownInCatchVariables=!1,h.moduleResolution=this.monacoTS.ModuleResolutionKind.NodeJs,h.target=this.monacoTS.ScriptTarget.ESNext,h.module=this.monacoTS.ModuleKind.ESNext,h.allowNonTsExtensions=!0,this.monacoTS.typescriptDefaults.setCompilerOptions(h),this.setTypeCheck(!1),(a=this.monacoDiv)!=null&&a.current&&(this.editor=this.monaco.editor.create((d=this.monacoDiv)==null?void 0:d.current,{lineNumbers:"on",scrollBeyondLastLine:!1,automaticLayout:!0,glyphMargin:!!this.props.breakpoints,colorDecorators:!0}),this.contentChangeDisposable=this.editor.onDidChangeModelContent(()=>this.onChange()),this.loadTypings(),this.props.onForceSave&&this.editor.addCommand(this.monaco.KeyMod.CtrlCmd|this.monaco.KeyCode.KeyS,()=>this.props.onForceSave&&this.props.onForceSave()),setTimeout(()=>{this.highlightText(this.state.searchText),this.location=this.props.location||void 0,this.breakpoints=this.props.breakpoints,this.showDecorators()}))}const i={selectOnLineNumbers:!0,scrollBeyondLastLine:!1,automaticLayout:!0,readOnly:this.state.readOnly,language:this.state.language,isDark:this.state.isDark};this.setEditorOptions(i),this.editor&&(this.editor.focus(),this.editor.setValue(this.originalCode),this.props.onToggleBreakpoint&&(this.mouseDownDisposable=this.editor.onMouseDown(h=>{var g;const p=h.target;this.props.onToggleBreakpoint&&((g=p.detail)==null?void 0:g.glyphMarginLeft)!==void 0&&p.position&&this.props.onToggleBreakpoint(p.position.lineNumber-1)})))}setEditorOptions(t){var i;t&&(t.language&&this.setEditorLanguage(t.language),this.editor&&(t.readOnly!==void 0&&this.editor.updateOptions({readOnly:t.readOnly}),t.lineWrap!==void 0&&this.editor.updateOptions({wordWrap:t.lineWrap?"on":"off"})),t.typeCheck!==void 0&&this.setTypeCheck(t.typeCheck),t.isDark!==void 0&&((i=this.monaco)==null||i.editor.setTheme(t.isDark?"vs-dark":"vs")))}componentWillUnmount(){var t,i,e,s;(t=this.contentChangeDisposable)==null||t.dispose(),this.contentChangeDisposable=null,(i=this.mouseDownDisposable)==null||i.dispose(),this.mouseDownDisposable=null,this.editor&&((s=(e=this.props).onRegisterSelect)==null||s.call(e,null),this.editor.dispose(),this.editor=null)}async doPrettier(){var e,s,o,n;const t=this.props.runningInstances&&Object.keys(this.props.runningInstances).find(c=>{var l;return(l=this.props.runningInstances)==null?void 0:l[c]});if(!t){window.alert(u.I18n.t("No script adapter instance found to format the code"));return}const i=await this.props.socket.sendTo(t.replace("system.adapter.",""),"prettier",{code:(e=this.editor)==null?void 0:e.getValue(),type:this.state.language});i.error?this.setState({showError:{title:u.I18n.t("Error formatting code"),message:L(i.error)}}):i.code&&((s=this.editor)==null||s.setValue(i.code),(n=(o=this.props).onChange)==null||n.call(o,i.code),this.showDecorators())}setEditorLanguage(t){var e,s;if(!this.editor)return;const i=this.editor.getModel();if(i){const o=i.getValue(),n=i.uri.path,c=typeof n=="string"&&n.includes(".")?n.substring(0,n.lastIndexOf(".")):"index",l=t==="javascript"?"js":t==="typescript"?"ts":t;i.dispose();const a=t==="javascript"||t==="typescript"?"typescript":t,d=(e=this.monaco)==null?void 0:e.editor.createModel(o,a,this.monaco.Uri.from({scheme:window.location.protocol.replace(":",""),path:`${c}${N++}.${l}`}));d&&(this.editor.setModel(d),(s=this.contentChangeDisposable)==null||s.dispose(),this.contentChangeDisposable=this.editor.onDidChangeModelContent(()=>this.onChange()))}}setTypeCheck(t){var e,s;const i={noSemanticValidation:!this.state.alive||!t,noSyntaxValidation:!this.state.alive};(e=this.monacoTS)==null||e.typescriptDefaults.setDiagnosticsOptions(i),(s=this.monacoTS)==null||s.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!this.state.alive||!t,noSyntaxValidation:!this.state.alive})}setEditorTypings(t=""){var o,n,c,l;const i=v(t),e=`${t}.d.ts`,s=[];for(const a of Object.keys(this.typings))i&&(a==="global.d.ts"||a.startsWith("script.js.global")&&a!==e)||s.push({filePath:a,content:this.typings[a]});if((n=(o=this.monacoTS)==null?void 0:o.typescriptDefaults)!=null&&n.setExtraLibs)this.monacoTS.typescriptDefaults.setExtraLibs(s);else if((l=(c=this.monacoTS)==null?void 0:c.typescriptDefaults)!=null&&l.addExtraLib){const a=this.monacoTS.typescriptDefaults.getExtraLibs();s.forEach(d=>{!a[d.filePath]&&this.monaco&&this.monacoTS.typescriptDefaults.addExtraLib(d.content,d.filePath)})}}insertTextIntoEditor(t){if(!this.editor||!this.monaco)return;const i=this.editor.getSelection();if(i){const e=new this.monaco.Range(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn);this.editor.executeEdits("",[{range:e,text:t,forceMoveMarkers:!0}])}this.editor.focus()}highlightText(t){var e;if(!this.editor||!this.monaco)return;const i=t?(e=this.editor.getModel())==null?void 0:e.findMatches(t,!0,!1,!1,null,!0):void 0;if(i!=null&&i.length)i.forEach(s=>{var o;return(o=this.editor)==null?void 0:o.setSelection(s.range)}),this.editor.revealLine(i[0].range.startLineNumber);else{const s=this.editor.getPosition();if(s){const o=s.lineNumber,n=s.column;this.editor.setSelection(new this.monaco.Range(o,n,o,n))}}}showDecorators(){var i;const t=[];if(this.location&&this.monaco&&(t.push({range:new this.monaco.Range(this.location.lineNumber+1,(this.location.columnNumber||0)+1,this.location.lineNumber+1,1e3),options:{isWholeLine:!1,className:this.props.isDark?"monacoCurrentLineDark":"monacoCurrentLine"}}),t.push({range:new this.monaco.Range(this.location.lineNumber+1,0,this.location.lineNumber+1,0),options:{isWholeLine:!0,className:this.props.isDark?"monacoCurrentFullLineDark":"monacoCurrentFullLine"}})),(i=this.breakpoints)==null||i.forEach(e=>{this.monaco&&t.push({range:new this.monaco.Range(e.location.lineNumber+1,0,e.location.lineNumber+1,100),options:{isWholeLine:!0,glyphMarginClassName:this.props.isDark?"monacoBreakPointDark":"monacoBreakPoint"}})}),this.editor){const e=this.editor.getModel();e&&(this.decorations=e.deltaDecorations(this.decorations,t))}}initNewScript(t,i){var e;this.setState({name:t}),this.originalCode=i||"",(e=this.editor)==null||e.setValue(i||""),this.highlightText(this.lastSearch),this.showDecorators(),this.setEditorTypings(t)}scrollToLineIfNeeded(t){if(this.editor){const i=this.editor.getVisibleRanges();(!i||!i[0]||i[0].startLineNumber>t||t>i[0].endLineNumber)&&this.editor.revealLineInCenter(t)}}UNSAFE_componentWillReceiveProps(t){const i={};this.state.name!==t.name&&this.initNewScript(t.name,t.code),JSON.stringify(t.runningInstances)!==this.runningInstancesStr&&(this.runningInstancesStr=JSON.stringify(t.runningInstances),this.state.typingsLoaded||this.loadTypings(t.runningInstances)),this.editor&&!t.changed&&(t.code!==this.originalCode||t.code!==this.editor.getValue())&&(this.originalCode=t.code||"",this.editor.setValue(this.originalCode),this.showDecorators(),this.location&&this.scrollToLineIfNeeded(this.location.lineNumber+1)),t.searchText!==this.lastSearch&&(this.lastSearch=t.searchText||"",this.highlightText(this.lastSearch)),JSON.stringify(t.location)!==JSON.stringify(this.location)&&JSON.stringify(t.breakpoints)!==JSON.stringify(this.breakpoints)?(this.location=t.location||void 0,this.breakpoints=t.breakpoints,this.showDecorators(),this.editor&&this.location&&this.scrollToLineIfNeeded(this.location.lineNumber+1)):JSON.stringify(t.breakpoints)!==JSON.stringify(this.breakpoints)?(this.breakpoints=t.breakpoints,this.showDecorators()):JSON.stringify(t.location)!==JSON.stringify(this.location)&&(this.location=t.location||void 0,this.showDecorators(),this.editor&&this.location&&this.scrollToLineIfNeeded(this.location.lineNumber+1)),this.state.language!==(t.language||"javascript")?(this.setState({language:t.language||"javascript"}),i.language=t.language||"javascript"):this.state.readOnly!==(t.readOnly||!1)?(this.setState({readOnly:t.readOnly||!1}),i.readOnly=t.readOnly):this.state.isDark!==(t.isDark||!1)&&(this.setState({isDark:t.isDark||!1}),i.isDark=t.isDark),this.setEditorOptions(i),this.insert!==t.insert&&(this.insert=t.insert||"",this.insert&&(console.log(`Insert text: ${this.insert}`),setTimeout(e=>{this.insertTextIntoEditor(e),setTimeout(()=>this.props.onInserted&&this.props.onInserted(),100)},100,this.insert)))}onChange(){var t,i;!this.props.readOnly&&this.editor&&((i=(t=this.props).onChange)==null||i.call(t,this.editor.getValue()))}renderErrorDialog(){return this.state.showError?this.state.showError.full?r.jsxs(S,{open:!0,maxWidth:"md",onClose:()=>this.setState({showError:null}),children:[r.jsx(w,{children:this.state.showError.title||u.I18n.t("Error")}),r.jsx(b,{children:r.jsx("pre",{children:r.jsx("code",{children:this.state.showError.message})})}),r.jsx(C,{children:r.jsxs(y,{variant:"contained",startIcon:r.jsx(D,{}),onClick:()=>this.setState({showError:null}),children:[u.I18n.t("Close")," "]})})]}):r.jsx(T,{open:!0,autoHideDuration:5e3,onClose:()=>this.setState({showError:null}),message:this.state.showError.title,action:r.jsxs(f.Fragment,{children:[r.jsx(y,{color:"secondary",size:"small",onClick:()=>this.setState({showError:{...this.state.showError,full:!0}}),children:u.I18n.t("More")}),r.jsx(k,{size:"small","aria-label":"close",color:"inherit",onClick:()=>this.setState({showError:null}),children:r.jsx(D,{fontSize:"small"})})]})}):null}render(){var t;return!((t=this.monacoTS)!=null&&t.typescriptDefaults)||!this.props.runningInstances?(setTimeout(()=>{this.monaco=window.monaco,this.forceUpdate()},200),null):(this.props.triggerPrettier!==this.triggerPrettier&&(this.triggerPrettier=this.props.triggerPrettier,setTimeout(()=>this.doPrettier().catch(i=>console.error("Error formatting code:",i)),50)),r.jsxs("div",{ref:this.monacoDiv,style:{...this.props.style,width:"100%",height:"100%",overflow:"hidden",position:"relative"},children:[this.renderErrorDialog(),!this.state.check&&r.jsx(E,{size:"small",title:u.I18n.t("Check is not active, because javascript adapter is disabled"),style:{bottom:10,right:10,opacity:.5,position:"absolute",zIndex:1,background:"red",color:"white"},color:"secondary",children:r.jsx(O,{})})]}))}}export{V as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as M}from"./createSvgIcon-DPvF8xqu.js";import{a as ft}from"./iobroker_javascript__loadShare__react__loadShare__.mjs-CTZOFJS2.js";import{m as Rt,z as Bt,g as Ut}from"./index-
|
|
1
|
+
import{j as M}from"./createSvgIcon-DPvF8xqu.js";import{a as ft}from"./iobroker_javascript__loadShare__react__loadShare__.mjs-CTZOFJS2.js";import{m as Rt,z as Bt,g as Ut}from"./index-XSrHkgLE.js";import{z as Ze,o as Te,v as Nt,w as Mt,s as Lt,u as Vt,r as zt,_ as Ht,a as Gt,C as Pt,D as _t,F as Yt,G as wt,H as Qt}from"./iobroker_javascript__loadShare___mf_0_mui_mf_1_material__loadShare__.mjs-QWG5Arqe.js";import{M as Zt,k as Xt,l as ea,O as Tt,S as ta,J as aa,n as ra,t as na,v as sa,u as oa,T as ia,U as la,V as ca,W as ua}from"./index-C49cpVll.js";import{_ as we}from"./iobroker_javascript__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.mjs-DkBjPSMw.js";import pa from"./ScriptEditorVanillaMonaco-DSYvOslZ.js";import{r as fa}from"./iobroker_javascript__loadShare__react__loadShare__.mjs_commonjs-proxy-CE9lvhW8.js";function da(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}import"./iobroker_javascript__loadShare__prop_mf_2_types__loadShare__.mjs-BCtSFofY.js";import"./virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-D-eF6r8M.js";import"./preload-helper-BDBacUwf.js";import"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-RQRRZMX5.js";import"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs-DeVAS-oa.js";import"./inheritsLoose-B0Ba5G9z.js";const ba={editorDiv:{height:"100%",width:"100%",overflow:"hidden",position:"relative"}};class ha extends ft.Component{constructor(v){super(v),this.state={lines:(this.props.script||"").split(/\r\n|\n/)}}render(){return M.jsx("div",{style:ba.editorDiv,children:M.jsx(pa,{triggerPrettier:1,name:this.props.scriptName,adapterName:this.props.adapterName,readOnly:!0,code:this.props.script||"",isDark:this.props.themeType==="dark",socket:this.props.socket,runningInstances:this.props.runningInstances,language:"javascript",breakpoints:this.props.breakpoints,location:this.props.paused?this.props.location:null,onToggleBreakpoint:v=>this.props.onToggleBreakpoint(v)},"scriptEditor2")},"scriptEditorDiv2")}}const Dt=34,Ke={logBox:{width:"100%",height:"100%",position:"relative",overflow:"hidden"},logBoxInner:Z=>({display:"inline-block",color:Z.palette.mode==="dark"?"white":"black",width:`calc(100% - ${Dt}px)`,height:"100%",overflow:"auto",position:"relative",verticalAlign:"top"}),info:Z=>({background:Z.palette.mode==="dark"?"darkgrey":"lightgrey",color:(Z.palette.mode==="dark","black")}),error:Z=>({background:"#FF0000",color:Z.palette.mode==="dark"?"black":"white"}),warn:Z=>({background:"#FF8000",color:Z.palette.mode==="dark"?"black":"white"}),debug:Z=>({background:"gray",opacity:.8,color:Z.palette.mode==="dark"?"black":"white"}),silly:Z=>({background:"gray",opacity:.6,color:Z.palette.mode==="dark"?"black":"white"}),table:{fontFamily:"monospace",width:"100%"},toolbox:{width:Dt,height:"100%",boxShadow:"2px 0px 4px -1px rgba(0, 0, 0, 0.2), 4px 0px 5px 0px rgba(0, 0, 0, 0.14), 1px 0px 10px 0px rgba(0, 0, 0, 0.12)",display:"inline-block",verticalAlign:"top",overflow:"hidden"},trTime:{width:90},trSeverity:{width:40,fontWeight:"bold"},iconButtons:{width:32,height:32,padding:4}};function ma(Z){let v,g=Z.getHours();return g<10&&(g=`0${g.toString()}`),v=`${g}:`,g=Z.getMinutes(),g<10&&(g=`0${g.toString()}`),v+=`${g}:`,g=Z.getSeconds(),g<10&&(g=`0${g.toString()}`),v+=`${g}.`,g=Z.getMilliseconds(),g<10?g=`00${g.toString()}`:g<100&&(g=`0${g.toString()}`),v+=g,v}class Ct extends ft.Component{messagesEnd;constructor(v){super(v),this.state={goBottom:!0},this.messagesEnd=ft.createRef()}static generateLine(v){return M.jsxs(Ze,{component:"tr",sx:Ke[v.severity],children:[M.jsx("td",{style:Ke.trTime,children:ma(new Date(v.ts))}),M.jsx("td",{style:Ke.trSeverity,children:v.severity}),M.jsx("td",{children:v.text})]},`tr_${v.ts}_${v.text.substring(v.text.length-10,v.text.length)}`)}renderLogList(v){return v!=null&&v.length?M.jsxs(Ze,{sx:Ke.logBoxInner,children:[M.jsx("table",{style:Ke.table,children:M.jsx("tbody",{children:v.map(g=>Ct.generateLine(g))})},"logTable"),M.jsx("div",{ref:this.messagesEnd,style:{float:"left",clear:"both"}},"logScrollPoint")]},"logList"):M.jsx(Ze,{sx:Ke.logBoxInner,style:{paddingLeft:10},children:we.I18n.t("Log outputs")},"logList")}onCopy(){we.Utils.copyToClipboard(this.props.console.join(`
|
|
2
2
|
`))}scrollToBottom(){var v,g;(g=(v=this.messagesEnd)==null?void 0:v.current)==null||g.scrollIntoView({behavior:"smooth"})}componentDidUpdate(){this.state.goBottom&&this.scrollToBottom()}render(){const v=this.props.console;return M.jsxs("div",{style:Ke.logBox,children:[M.jsxs("div",{style:Ke.toolbox,children:[M.jsx(Te,{style:Ke.iconButtons,onClick:()=>this.setState({goBottom:!this.state.goBottom}),color:this.state.goBottom?"secondary":void 0,size:"medium",children:M.jsx(Zt,{})}),v!=null&&v.length?M.jsx(Te,{style:Ke.iconButtons,onClick:()=>this.props.onClearAllLogs(),size:"medium",children:M.jsx(Xt,{})}):null,v!=null&&v.length?M.jsx(Te,{style:Ke.iconButtons,onClick:()=>this.onCopy(),size:"medium",children:M.jsx(ea,{})}):null]},"toolbox"),this.renderLogList(v)]})}}var It={exports:{}},va=It.exports;(function(Z,v){(function(g,a){Z.exports=a(fa)})(va,(function(g){return(function(a){var t={};function e(s){if(t[s])return t[s].exports;var c=t[s]={i:s,l:!1,exports:{}};return a[s].call(c.exports,c,c.exports,e),c.l=!0,c.exports}return e.m=a,e.c=t,e.d=function(s,c,d){e.o(s,c)||Object.defineProperty(s,c,{enumerable:!0,get:d})},e.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},e.t=function(s,c){if(1&c&&(s=e(s)),8&c||4&c&&typeof s=="object"&&s&&s.__esModule)return s;var d=Object.create(null);if(e.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:s}),2&c&&typeof s!="string")for(var p in s)e.d(d,p,function(f){return s[f]}.bind(null,p));return d},e.n=function(s){var c=s&&s.__esModule?function(){return s.default}:function(){return s};return e.d(c,"a",c),c},e.o=function(s,c){return Object.prototype.hasOwnProperty.call(s,c)},e.p="",e(e.s=48)})([function(a,t){a.exports=g},function(a,t){var e=a.exports={version:"2.6.12"};typeof __e=="number"&&(__e=e)},function(a,t,e){var s=e(26)("wks"),c=e(17),d=e(3).Symbol,p=typeof d=="function";(a.exports=function(f){return s[f]||(s[f]=p&&d[f]||(p?d:c)("Symbol."+f))}).store=s},function(a,t){var e=a.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=e)},function(a,t,e){a.exports=!e(8)((function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7}))},function(a,t){var e={}.hasOwnProperty;a.exports=function(s,c){return e.call(s,c)}},function(a,t,e){var s=e(7),c=e(16);a.exports=e(4)?function(d,p,f){return s.f(d,p,c(1,f))}:function(d,p,f){return d[p]=f,d}},function(a,t,e){var s=e(10),c=e(35),d=e(23),p=Object.defineProperty;t.f=e(4)?Object.defineProperty:function(f,h,S){if(s(f),h=d(h,!0),s(S),c)try{return p(f,h,S)}catch{}if("get"in S||"set"in S)throw TypeError("Accessors not supported!");return"value"in S&&(f[h]=S.value),f}},function(a,t){a.exports=function(e){try{return!!e()}catch{return!0}}},function(a,t,e){var s=e(40),c=e(22);a.exports=function(d){return s(c(d))}},function(a,t,e){var s=e(11);a.exports=function(c){if(!s(c))throw TypeError(c+" is not an object!");return c}},function(a,t){a.exports=function(e){return typeof e=="object"?e!==null:typeof e=="function"}},function(a,t){a.exports={}},function(a,t,e){var s=e(39),c=e(27);a.exports=Object.keys||function(d){return s(d,c)}},function(a,t){a.exports=!0},function(a,t,e){var s=e(3),c=e(1),d=e(53),p=e(6),f=e(5),h=function(S,b,w){var I,R,H,L=S&h.F,X=S&h.G,r=S&h.S,D=S&h.P,V=S&h.B,z=S&h.W,q=X?c:c[b]||(c[b]={}),k=q.prototype,A=X?s:r?s[b]:(s[b]||{}).prototype;for(I in X&&(w=b),w)(R=!L&&A&&A[I]!==void 0)&&f(q,I)||(H=R?A[I]:w[I],q[I]=X&&typeof A[I]!="function"?w[I]:V&&R?d(H,s):z&&A[I]==H?(function(T){var W=function(E,ee,J){if(this instanceof T){switch(arguments.length){case 0:return new T;case 1:return new T(E);case 2:return new T(E,ee)}return new T(E,ee,J)}return T.apply(this,arguments)};return W.prototype=T.prototype,W})(H):D&&typeof H=="function"?d(Function.call,H):H,D&&((q.virtual||(q.virtual={}))[I]=H,S&h.R&&k&&!k[I]&&p(k,I,H)))};h.F=1,h.G=2,h.S=4,h.P=8,h.B=16,h.W=32,h.U=64,h.R=128,a.exports=h},function(a,t){a.exports=function(e,s){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:s}}},function(a,t){var e=0,s=Math.random();a.exports=function(c){return"Symbol(".concat(c===void 0?"":c,")_",(++e+s).toString(36))}},function(a,t,e){var s=e(22);a.exports=function(c){return Object(s(c))}},function(a,t){t.f={}.propertyIsEnumerable},function(a,t,e){var s=e(52)(!0);e(34)(String,"String",(function(c){this._t=String(c),this._i=0}),(function(){var c,d=this._t,p=this._i;return p>=d.length?{value:void 0,done:!0}:(c=s(d,p),this._i+=c.length,{value:c,done:!1})}))},function(a,t){var e=Math.ceil,s=Math.floor;a.exports=function(c){return isNaN(c=+c)?0:(c>0?s:e)(c)}},function(a,t){a.exports=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e}},function(a,t,e){var s=e(11);a.exports=function(c,d){if(!s(c))return c;var p,f;if(d&&typeof(p=c.toString)=="function"&&!s(f=p.call(c))||typeof(p=c.valueOf)=="function"&&!s(f=p.call(c))||!d&&typeof(p=c.toString)=="function"&&!s(f=p.call(c)))return f;throw TypeError("Can't convert object to primitive value")}},function(a,t){var e={}.toString;a.exports=function(s){return e.call(s).slice(8,-1)}},function(a,t,e){var s=e(26)("keys"),c=e(17);a.exports=function(d){return s[d]||(s[d]=c(d))}},function(a,t,e){var s=e(1),c=e(3),d=c["__core-js_shared__"]||(c["__core-js_shared__"]={});(a.exports=function(p,f){return d[p]||(d[p]=f!==void 0?f:{})})("versions",[]).push({version:s.version,mode:e(14)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(a,t){a.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(a,t,e){var s=e(7).f,c=e(5),d=e(2)("toStringTag");a.exports=function(p,f,h){p&&!c(p=h?p:p.prototype,d)&&s(p,d,{configurable:!0,value:f})}},function(a,t,e){e(62);for(var s=e(3),c=e(6),d=e(12),p=e(2)("toStringTag"),f="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),h=0;h<f.length;h++){var S=f[h],b=s[S],w=b&&b.prototype;w&&!w[p]&&c(w,p,S),d[S]=d.Array}},function(a,t,e){t.f=e(2)},function(a,t,e){var s=e(3),c=e(1),d=e(14),p=e(30),f=e(7).f;a.exports=function(h){var S=c.Symbol||(c.Symbol=d?{}:s.Symbol||{});h.charAt(0)=="_"||h in S||f(S,h,{value:p.f(h)})}},function(a,t){t.f=Object.getOwnPropertySymbols},function(a,t){a.exports=function(e,s,c){return Math.min(Math.max(e,s),c)}},function(a,t,e){var s=e(14),c=e(15),d=e(37),p=e(6),f=e(12),h=e(55),S=e(28),b=e(61),w=e(2)("iterator"),I=!([].keys&&"next"in[].keys()),R=function(){return this};a.exports=function(H,L,X,r,D,V,z){h(X,L,r);var q,k,A,T=function(U){if(!I&&U in J)return J[U];switch(U){case"keys":case"values":return function(){return new X(this,U)}}return function(){return new X(this,U)}},W=L+" Iterator",E=D=="values",ee=!1,J=H.prototype,C=J[w]||J["@@iterator"]||D&&J[D],Y=C||T(D),be=D?E?T("entries"):Y:void 0,ce=L=="Array"&&J.entries||C;if(ce&&(A=b(ce.call(new H)))!==Object.prototype&&A.next&&(S(A,W,!0),s||typeof A[w]=="function"||p(A,w,R)),E&&C&&C.name!=="values"&&(ee=!0,Y=function(){return C.call(this)}),s&&!z||!I&&!ee&&J[w]||p(J,w,Y),f[L]=Y,f[W]=R,D)if(q={values:E?Y:T("values"),keys:V?Y:T("keys"),entries:be},z)for(k in q)k in J||d(J,k,q[k]);else c(c.P+c.F*(I||ee),L,q);return q}},function(a,t,e){a.exports=!e(4)&&!e(8)((function(){return Object.defineProperty(e(36)("div"),"a",{get:function(){return 7}}).a!=7}))},function(a,t,e){var s=e(11),c=e(3).document,d=s(c)&&s(c.createElement);a.exports=function(p){return d?c.createElement(p):{}}},function(a,t,e){a.exports=e(6)},function(a,t,e){var s=e(10),c=e(56),d=e(27),p=e(25)("IE_PROTO"),f=function(){},h=function(){var S,b=e(36)("iframe"),w=d.length;for(b.style.display="none",e(60).appendChild(b),b.src="javascript:",(S=b.contentWindow.document).open(),S.write("<script>document.F=Object<\/script>"),S.close(),h=S.F;w--;)delete h.prototype[d[w]];return h()};a.exports=Object.create||function(S,b){var w;return S!==null?(f.prototype=s(S),w=new f,f.prototype=null,w[p]=S):w=h(),b===void 0?w:c(w,b)}},function(a,t,e){var s=e(5),c=e(9),d=e(57)(!1),p=e(25)("IE_PROTO");a.exports=function(f,h){var S,b=c(f),w=0,I=[];for(S in b)S!=p&&s(b,S)&&I.push(S);for(;h.length>w;)s(b,S=h[w++])&&(~d(I,S)||I.push(S));return I}},function(a,t,e){var s=e(24);a.exports=Object("z").propertyIsEnumerable(0)?Object:function(c){return s(c)=="String"?c.split(""):Object(c)}},function(a,t,e){var s=e(39),c=e(27).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(d){return s(d,c)}},function(a,t,e){var s=e(24),c=e(2)("toStringTag"),d=s((function(){return arguments})())=="Arguments";a.exports=function(p){var f,h,S;return p===void 0?"Undefined":p===null?"Null":typeof(h=(function(b,w){try{return b[w]}catch{}})(f=Object(p),c))=="string"?h:d?s(f):(S=s(f))=="Object"&&typeof f.callee=="function"?"Arguments":S}},function(a,t){var e;e=(function(){return this})();try{e=e||new Function("return this")()}catch{typeof window=="object"&&(e=window)}a.exports=e},function(a,t){var e=/-?\d+(\.\d+)?%?/g;a.exports=function(s){return s.match(e)}},function(a,t,e){Object.defineProperty(t,"__esModule",{value:!0}),t.getBase16Theme=t.createStyling=t.invertTheme=void 0;var s=R(e(49)),c=R(e(76)),d=R(e(81)),p=R(e(89)),f=R(e(93)),h=(function(k){if(k&&k.__esModule)return k;var A={};if(k!=null)for(var T in k)Object.prototype.hasOwnProperty.call(k,T)&&(A[T]=k[T]);return A.default=k,A})(e(94)),S=R(e(132)),b=R(e(133)),w=R(e(138)),I=e(139);function R(k){return k&&k.__esModule?k:{default:k}}var H=h.default,L=(0,p.default)(H),X=(0,w.default)(b.default,I.rgb2yuv,(function(k){var A,T=(0,d.default)(k,3),W=T[0],E=T[1],ee=T[2];return[(A=W,A<.25?1:A<.5?.9-A:1.1-A),E,ee]}),I.yuv2rgb,S.default),r=function(k){return function(A){return{className:[A.className,k.className].filter(Boolean).join(" "),style:(0,c.default)({},A.style||{},k.style||{})}}},D=function(k,A){var T=(0,p.default)(A);for(var W in k)T.indexOf(W)===-1&&T.push(W);return T.reduce((function(E,ee){return E[ee]=(function(J,C){if(J===void 0)return C;if(C===void 0)return J;var Y=J===void 0?"undefined":(0,s.default)(J),be=C===void 0?"undefined":(0,s.default)(C);switch(Y){case"string":switch(be){case"string":return[C,J].filter(Boolean).join(" ");case"object":return r({className:J,style:C});case"function":return function(ce){for(var U=arguments.length,le=Array(U>1?U-1:0),Q=1;Q<U;Q++)le[Q-1]=arguments[Q];return r({className:J})(C.apply(void 0,[ce].concat(le)))}}case"object":switch(be){case"string":return r({className:C,style:J});case"object":return(0,c.default)({},C,J);case"function":return function(ce){for(var U=arguments.length,le=Array(U>1?U-1:0),Q=1;Q<U;Q++)le[Q-1]=arguments[Q];return r({style:J})(C.apply(void 0,[ce].concat(le)))}}case"function":switch(be){case"string":return function(ce){for(var U=arguments.length,le=Array(U>1?U-1:0),Q=1;Q<U;Q++)le[Q-1]=arguments[Q];return J.apply(void 0,[r(ce)({className:C})].concat(le))};case"object":return function(ce){for(var U=arguments.length,le=Array(U>1?U-1:0),Q=1;Q<U;Q++)le[Q-1]=arguments[Q];return J.apply(void 0,[r(ce)({style:C})].concat(le))};case"function":return function(ce){for(var U=arguments.length,le=Array(U>1?U-1:0),Q=1;Q<U;Q++)le[Q-1]=arguments[Q];return J.apply(void 0,[C.apply(void 0,[ce].concat(le))].concat(le))}}}})(k[ee],A[ee]),E}),{})},V=function(k,A){for(var T=arguments.length,W=Array(T>2?T-2:0),E=2;E<T;E++)W[E-2]=arguments[E];if(A===null)return k;Array.isArray(A)||(A=[A]);var ee=A.map((function(C){return k[C]})).filter(Boolean),J=ee.reduce((function(C,Y){return typeof Y=="string"?C.className=[C.className,Y].filter(Boolean).join(" "):(Y===void 0?"undefined":(0,s.default)(Y))==="object"?C.style=(0,c.default)({},C.style,Y):typeof Y=="function"&&(C=(0,c.default)({},C,Y.apply(void 0,[C].concat(W)))),C}),{className:"",style:{}});return J.className||delete J.className,(0,p.default)(J.style).length===0&&delete J.style,J},z=t.invertTheme=function(k){return(0,p.default)(k).reduce((function(A,T){return A[T]=/^base/.test(T)?X(k[T]):T==="scheme"?k[T]+":inverted":k[T],A}),{})},q=(t.createStyling=(0,f.default)((function(k){for(var A=arguments.length,T=Array(A>3?A-3:0),W=3;W<A;W++)T[W-3]=arguments[W];var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},J=E.defaultBase16,C=J===void 0?H:J,Y=E.base16Themes,be=Y===void 0?null:Y,ce=q(ee,be);ce&&(ee=(0,c.default)({},ce,ee));var U=L.reduce((function(ve,Ne){return ve[Ne]=ee[Ne]||C[Ne],ve}),{}),le=(0,p.default)(ee).reduce((function(ve,Ne){return L.indexOf(Ne)===-1&&(ve[Ne]=ee[Ne]),ve}),{}),Q=k(U),he=D(le,Q);return(0,f.default)(V,2).apply(void 0,[he].concat(T))}),3),t.getBase16Theme=function(k,A){if(k&&k.extend&&(k=k.extend),typeof k=="string"){var T=k.split(":"),W=(0,d.default)(T,2),E=W[0],ee=W[1];k=(A||{})[E]||h[E],ee==="inverted"&&(k=z(k))}return k&&k.hasOwnProperty("base00")?k:void 0})},function(a,t,e){var s,c=typeof Reflect=="object"?Reflect:null,d=c&&typeof c.apply=="function"?c.apply:function(r,D,V){return Function.prototype.apply.call(r,D,V)};s=c&&typeof c.ownKeys=="function"?c.ownKeys:Object.getOwnPropertySymbols?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:function(r){return Object.getOwnPropertyNames(r)};var p=Number.isNaN||function(r){return r!=r};function f(){f.init.call(this)}a.exports=f,a.exports.once=function(r,D){return new Promise((function(V,z){function q(){k!==void 0&&r.removeListener("error",k),V([].slice.call(arguments))}var k;D!=="error"&&(k=function(A){r.removeListener(D,q),z(A)},r.once("error",k)),r.once(D,q)}))},f.EventEmitter=f,f.prototype._events=void 0,f.prototype._eventsCount=0,f.prototype._maxListeners=void 0;var h=10;function S(r){if(typeof r!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r)}function b(r){return r._maxListeners===void 0?f.defaultMaxListeners:r._maxListeners}function w(r,D,V,z){var q,k,A,T;if(S(V),(k=r._events)===void 0?(k=r._events=Object.create(null),r._eventsCount=0):(k.newListener!==void 0&&(r.emit("newListener",D,V.listener?V.listener:V),k=r._events),A=k[D]),A===void 0)A=k[D]=V,++r._eventsCount;else if(typeof A=="function"?A=k[D]=z?[V,A]:[A,V]:z?A.unshift(V):A.push(V),(q=b(r))>0&&A.length>q&&!A.warned){A.warned=!0;var W=new Error("Possible EventEmitter memory leak detected. "+A.length+" "+String(D)+" listeners added. Use emitter.setMaxListeners() to increase limit");W.name="MaxListenersExceededWarning",W.emitter=r,W.type=D,W.count=A.length,T=W,console&&console.warn&&console.warn(T)}return r}function I(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function R(r,D,V){var z={fired:!1,wrapFn:void 0,target:r,type:D,listener:V},q=I.bind(z);return q.listener=V,z.wrapFn=q,q}function H(r,D,V){var z=r._events;if(z===void 0)return[];var q=z[D];return q===void 0?[]:typeof q=="function"?V?[q.listener||q]:[q]:V?(function(k){for(var A=new Array(k.length),T=0;T<A.length;++T)A[T]=k[T].listener||k[T];return A})(q):X(q,q.length)}function L(r){var D=this._events;if(D!==void 0){var V=D[r];if(typeof V=="function")return 1;if(V!==void 0)return V.length}return 0}function X(r,D){for(var V=new Array(D),z=0;z<D;++z)V[z]=r[z];return V}Object.defineProperty(f,"defaultMaxListeners",{enumerable:!0,get:function(){return h},set:function(r){if(typeof r!="number"||r<0||p(r))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+r+".");h=r}}),f.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},f.prototype.setMaxListeners=function(r){if(typeof r!="number"||r<0||p(r))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+r+".");return this._maxListeners=r,this},f.prototype.getMaxListeners=function(){return b(this)},f.prototype.emit=function(r){for(var D=[],V=1;V<arguments.length;V++)D.push(arguments[V]);var z=r==="error",q=this._events;if(q!==void 0)z=z&&q.error===void 0;else if(!z)return!1;if(z){var k;if(D.length>0&&(k=D[0]),k instanceof Error)throw k;var A=new Error("Unhandled error."+(k?" ("+k.message+")":""));throw A.context=k,A}var T=q[r];if(T===void 0)return!1;if(typeof T=="function")d(T,this,D);else{var W=T.length,E=X(T,W);for(V=0;V<W;++V)d(E[V],this,D)}return!0},f.prototype.addListener=function(r,D){return w(this,r,D,!1)},f.prototype.on=f.prototype.addListener,f.prototype.prependListener=function(r,D){return w(this,r,D,!0)},f.prototype.once=function(r,D){return S(D),this.on(r,R(this,r,D)),this},f.prototype.prependOnceListener=function(r,D){return S(D),this.prependListener(r,R(this,r,D)),this},f.prototype.removeListener=function(r,D){var V,z,q,k,A;if(S(D),(z=this._events)===void 0)return this;if((V=z[r])===void 0)return this;if(V===D||V.listener===D)--this._eventsCount==0?this._events=Object.create(null):(delete z[r],z.removeListener&&this.emit("removeListener",r,V.listener||D));else if(typeof V!="function"){for(q=-1,k=V.length-1;k>=0;k--)if(V[k]===D||V[k].listener===D){A=V[k].listener,q=k;break}if(q<0)return this;q===0?V.shift():(function(T,W){for(;W+1<T.length;W++)T[W]=T[W+1];T.pop()})(V,q),V.length===1&&(z[r]=V[0]),z.removeListener!==void 0&&this.emit("removeListener",r,A||D)}return this},f.prototype.off=f.prototype.removeListener,f.prototype.removeAllListeners=function(r){var D,V,z;if((V=this._events)===void 0)return this;if(V.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):V[r]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete V[r]),this;if(arguments.length===0){var q,k=Object.keys(V);for(z=0;z<k.length;++z)(q=k[z])!=="removeListener"&&this.removeAllListeners(q);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(D=V[r])=="function")this.removeListener(r,D);else if(D!==void 0)for(z=D.length-1;z>=0;z--)this.removeListener(r,D[z]);return this},f.prototype.listeners=function(r){return H(this,r,!0)},f.prototype.rawListeners=function(r){return H(this,r,!1)},f.listenerCount=function(r,D){return typeof r.listenerCount=="function"?r.listenerCount(D):L.call(r,D)},f.prototype.listenerCount=L,f.prototype.eventNames=function(){return this._eventsCount>0?s(this._events):[]}},function(a,t,e){a.exports.Dispatcher=e(140)},function(a,t,e){a.exports=e(142)},function(a,t,e){t.__esModule=!0;var s=p(e(50)),c=p(e(65)),d=typeof c.default=="function"&&typeof s.default=="symbol"?function(f){return typeof f}:function(f){return f&&typeof c.default=="function"&&f.constructor===c.default&&f!==c.default.prototype?"symbol":typeof f};function p(f){return f&&f.__esModule?f:{default:f}}t.default=typeof c.default=="function"&&d(s.default)==="symbol"?function(f){return f===void 0?"undefined":d(f)}:function(f){return f&&typeof c.default=="function"&&f.constructor===c.default&&f!==c.default.prototype?"symbol":f===void 0?"undefined":d(f)}},function(a,t,e){a.exports={default:e(51),__esModule:!0}},function(a,t,e){e(20),e(29),a.exports=e(30).f("iterator")},function(a,t,e){var s=e(21),c=e(22);a.exports=function(d){return function(p,f){var h,S,b=String(c(p)),w=s(f),I=b.length;return w<0||w>=I?d?"":void 0:(h=b.charCodeAt(w))<55296||h>56319||w+1===I||(S=b.charCodeAt(w+1))<56320||S>57343?d?b.charAt(w):h:d?b.slice(w,w+2):S-56320+(h-55296<<10)+65536}}},function(a,t,e){var s=e(54);a.exports=function(c,d,p){if(s(c),d===void 0)return c;switch(p){case 1:return function(f){return c.call(d,f)};case 2:return function(f,h){return c.call(d,f,h)};case 3:return function(f,h,S){return c.call(d,f,h,S)}}return function(){return c.apply(d,arguments)}}},function(a,t){a.exports=function(e){if(typeof e!="function")throw TypeError(e+" is not a function!");return e}},function(a,t,e){var s=e(38),c=e(16),d=e(28),p={};e(6)(p,e(2)("iterator"),(function(){return this})),a.exports=function(f,h,S){f.prototype=s(p,{next:c(1,S)}),d(f,h+" Iterator")}},function(a,t,e){var s=e(7),c=e(10),d=e(13);a.exports=e(4)?Object.defineProperties:function(p,f){c(p);for(var h,S=d(f),b=S.length,w=0;b>w;)s.f(p,h=S[w++],f[h]);return p}},function(a,t,e){var s=e(9),c=e(58),d=e(59);a.exports=function(p){return function(f,h,S){var b,w=s(f),I=c(w.length),R=d(S,I);if(p&&h!=h){for(;I>R;)if((b=w[R++])!=b)return!0}else for(;I>R;R++)if((p||R in w)&&w[R]===h)return p||R||0;return!p&&-1}}},function(a,t,e){var s=e(21),c=Math.min;a.exports=function(d){return d>0?c(s(d),9007199254740991):0}},function(a,t,e){var s=e(21),c=Math.max,d=Math.min;a.exports=function(p,f){return(p=s(p))<0?c(p+f,0):d(p,f)}},function(a,t,e){var s=e(3).document;a.exports=s&&s.documentElement},function(a,t,e){var s=e(5),c=e(18),d=e(25)("IE_PROTO"),p=Object.prototype;a.exports=Object.getPrototypeOf||function(f){return f=c(f),s(f,d)?f[d]:typeof f.constructor=="function"&&f instanceof f.constructor?f.constructor.prototype:f instanceof Object?p:null}},function(a,t,e){var s=e(63),c=e(64),d=e(12),p=e(9);a.exports=e(34)(Array,"Array",(function(f,h){this._t=p(f),this._i=0,this._k=h}),(function(){var f=this._t,h=this._k,S=this._i++;return!f||S>=f.length?(this._t=void 0,c(1)):c(0,h=="keys"?S:h=="values"?f[S]:[S,f[S]])}),"values"),d.Arguments=d.Array,s("keys"),s("values"),s("entries")},function(a,t){a.exports=function(){}},function(a,t){a.exports=function(e,s){return{value:s,done:!!e}}},function(a,t,e){a.exports={default:e(66),__esModule:!0}},function(a,t,e){e(67),e(73),e(74),e(75),a.exports=e(1).Symbol},function(a,t,e){var s=e(3),c=e(5),d=e(4),p=e(15),f=e(37),h=e(68).KEY,S=e(8),b=e(26),w=e(28),I=e(17),R=e(2),H=e(30),L=e(31),X=e(69),r=e(70),D=e(10),V=e(11),z=e(18),q=e(9),k=e(23),A=e(16),T=e(38),W=e(71),E=e(72),ee=e(32),J=e(7),C=e(13),Y=E.f,be=J.f,ce=W.f,U=s.Symbol,le=s.JSON,Q=le&&le.stringify,he=R("_hidden"),ve=R("toPrimitive"),Ne={}.propertyIsEnumerable,Ee=b("symbol-registry"),Oe=b("symbols"),fe=b("op-symbols"),ge=Object.prototype,De=typeof U=="function"&&!!ee.f,Ue=s.QObject,Xe=!Ue||!Ue.prototype||!Ue.prototype.findChild,et=d&&S((function(){return T(be({},"a",{get:function(){return be(this,"a",{value:7}).a}})).a!=7}))?function(j,N,B){var K=Y(ge,N);K&&delete ge[N],be(j,N,B),K&&j!==ge&&be(ge,N,K)}:be,tt=function(j){var N=Oe[j]=T(U.prototype);return N._k=j,N},at=De&&typeof U.iterator=="symbol"?function(j){return typeof j=="symbol"}:function(j){return j instanceof U},He=function(j,N,B){return j===ge&&He(fe,N,B),D(j),N=k(N,!0),D(B),c(Oe,N)?(B.enumerable?(c(j,he)&&j[he][N]&&(j[he][N]=!1),B=T(B,{enumerable:A(0,!1)})):(c(j,he)||be(j,he,A(1,{})),j[he][N]=!0),et(j,N,B)):be(j,N,B)},st=function(j,N){D(j);for(var B,K=X(N=q(N)),re=0,te=K.length;te>re;)He(j,B=K[re++],N[B]);return j},ot=function(j){var N=Ne.call(this,j=k(j,!0));return!(this===ge&&c(Oe,j)&&!c(fe,j))&&(!(N||!c(this,j)||!c(Oe,j)||c(this,he)&&this[he][j])||N)},rt=function(j,N){if(j=q(j),N=k(N,!0),j!==ge||!c(Oe,N)||c(fe,N)){var B=Y(j,N);return!B||!c(Oe,N)||c(j,he)&&j[he][N]||(B.enumerable=!0),B}},it=function(j){for(var N,B=ce(q(j)),K=[],re=0;B.length>re;)c(Oe,N=B[re++])||N==he||N==h||K.push(N);return K},Ge=function(j){for(var N,B=j===ge,K=ce(B?fe:q(j)),re=[],te=0;K.length>te;)!c(Oe,N=K[te++])||B&&!c(ge,N)||re.push(Oe[N]);return re};De||(f((U=function(){if(this instanceof U)throw TypeError("Symbol is not a constructor!");var j=I(arguments.length>0?arguments[0]:void 0),N=function(B){this===ge&&N.call(fe,B),c(this,he)&&c(this[he],j)&&(this[he][j]=!1),et(this,j,A(1,B))};return d&&Xe&&et(ge,j,{configurable:!0,set:N}),tt(j)}).prototype,"toString",(function(){return this._k})),E.f=rt,J.f=He,e(41).f=W.f=it,e(19).f=ot,ee.f=Ge,d&&!e(14)&&f(ge,"propertyIsEnumerable",ot,!0),H.f=function(j){return tt(R(j))}),p(p.G+p.W+p.F*!De,{Symbol:U});for(var Ve="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Ce=0;Ve.length>Ce;)R(Ve[Ce++]);for(var nt=C(R.store),F=0;nt.length>F;)L(nt[F++]);p(p.S+p.F*!De,"Symbol",{for:function(j){return c(Ee,j+="")?Ee[j]:Ee[j]=U(j)},keyFor:function(j){if(!at(j))throw TypeError(j+" is not a symbol!");for(var N in Ee)if(Ee[N]===j)return N},useSetter:function(){Xe=!0},useSimple:function(){Xe=!1}}),p(p.S+p.F*!De,"Object",{create:function(j,N){return N===void 0?T(j):st(T(j),N)},defineProperty:He,defineProperties:st,getOwnPropertyDescriptor:rt,getOwnPropertyNames:it,getOwnPropertySymbols:Ge});var x=S((function(){ee.f(1)}));p(p.S+p.F*x,"Object",{getOwnPropertySymbols:function(j){return ee.f(z(j))}}),le&&p(p.S+p.F*(!De||S((function(){var j=U();return Q([j])!="[null]"||Q({a:j})!="{}"||Q(Object(j))!="{}"}))),"JSON",{stringify:function(j){for(var N,B,K=[j],re=1;arguments.length>re;)K.push(arguments[re++]);if(B=N=K[1],(V(N)||j!==void 0)&&!at(j))return r(N)||(N=function(te,ue){if(typeof B=="function"&&(ue=B.call(this,te,ue)),!at(ue))return ue}),K[1]=N,Q.apply(le,K)}}),U.prototype[ve]||e(6)(U.prototype,ve,U.prototype.valueOf),w(U,"Symbol"),w(Math,"Math",!0),w(s.JSON,"JSON",!0)},function(a,t,e){var s=e(17)("meta"),c=e(11),d=e(5),p=e(7).f,f=0,h=Object.isExtensible||function(){return!0},S=!e(8)((function(){return h(Object.preventExtensions({}))})),b=function(I){p(I,s,{value:{i:"O"+ ++f,w:{}}})},w=a.exports={KEY:s,NEED:!1,fastKey:function(I,R){if(!c(I))return typeof I=="symbol"?I:(typeof I=="string"?"S":"P")+I;if(!d(I,s)){if(!h(I))return"F";if(!R)return"E";b(I)}return I[s].i},getWeak:function(I,R){if(!d(I,s)){if(!h(I))return!0;if(!R)return!1;b(I)}return I[s].w},onFreeze:function(I){return S&&w.NEED&&h(I)&&!d(I,s)&&b(I),I}}},function(a,t,e){var s=e(13),c=e(32),d=e(19);a.exports=function(p){var f=s(p),h=c.f;if(h)for(var S,b=h(p),w=d.f,I=0;b.length>I;)w.call(p,S=b[I++])&&f.push(S);return f}},function(a,t,e){var s=e(24);a.exports=Array.isArray||function(c){return s(c)=="Array"}},function(a,t,e){var s=e(9),c=e(41).f,d={}.toString,p=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];a.exports.f=function(f){return p&&d.call(f)=="[object Window]"?(function(h){try{return c(h)}catch{return p.slice()}})(f):c(s(f))}},function(a,t,e){var s=e(19),c=e(16),d=e(9),p=e(23),f=e(5),h=e(35),S=Object.getOwnPropertyDescriptor;t.f=e(4)?S:function(b,w){if(b=d(b),w=p(w,!0),h)try{return S(b,w)}catch{}if(f(b,w))return c(!s.f.call(b,w),b[w])}},function(a,t){},function(a,t,e){e(31)("asyncIterator")},function(a,t,e){e(31)("observable")},function(a,t,e){t.__esModule=!0;var s,c=e(77),d=(s=c)&&s.__esModule?s:{default:s};t.default=d.default||function(p){for(var f=1;f<arguments.length;f++){var h=arguments[f];for(var S in h)Object.prototype.hasOwnProperty.call(h,S)&&(p[S]=h[S])}return p}},function(a,t,e){a.exports={default:e(78),__esModule:!0}},function(a,t,e){e(79),a.exports=e(1).Object.assign},function(a,t,e){var s=e(15);s(s.S+s.F,"Object",{assign:e(80)})},function(a,t,e){var s=e(4),c=e(13),d=e(32),p=e(19),f=e(18),h=e(40),S=Object.assign;a.exports=!S||e(8)((function(){var b={},w={},I=Symbol(),R="abcdefghijklmnopqrst";return b[I]=7,R.split("").forEach((function(H){w[H]=H})),S({},b)[I]!=7||Object.keys(S({},w)).join("")!=R}))?function(b,w){for(var I=f(b),R=arguments.length,H=1,L=d.f,X=p.f;R>H;)for(var r,D=h(arguments[H++]),V=L?c(D).concat(L(D)):c(D),z=V.length,q=0;z>q;)r=V[q++],s&&!X.call(D,r)||(I[r]=D[r]);return I}:S},function(a,t,e){t.__esModule=!0;var s=d(e(82)),c=d(e(85));function d(p){return p&&p.__esModule?p:{default:p}}t.default=function(p,f){if(Array.isArray(p))return p;if((0,s.default)(Object(p)))return(function(h,S){var b=[],w=!0,I=!1,R=void 0;try{for(var H,L=(0,c.default)(h);!(w=(H=L.next()).done)&&(b.push(H.value),!S||b.length!==S);w=!0);}catch(X){I=!0,R=X}finally{try{!w&&L.return&&L.return()}finally{if(I)throw R}}return b})(p,f);throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(a,t,e){a.exports={default:e(83),__esModule:!0}},function(a,t,e){e(29),e(20),a.exports=e(84)},function(a,t,e){var s=e(42),c=e(2)("iterator"),d=e(12);a.exports=e(1).isIterable=function(p){var f=Object(p);return f[c]!==void 0||"@@iterator"in f||d.hasOwnProperty(s(f))}},function(a,t,e){a.exports={default:e(86),__esModule:!0}},function(a,t,e){e(29),e(20),a.exports=e(87)},function(a,t,e){var s=e(10),c=e(88);a.exports=e(1).getIterator=function(d){var p=c(d);if(typeof p!="function")throw TypeError(d+" is not iterable!");return s(p.call(d))}},function(a,t,e){var s=e(42),c=e(2)("iterator"),d=e(12);a.exports=e(1).getIteratorMethod=function(p){if(p!=null)return p[c]||p["@@iterator"]||d[s(p)]}},function(a,t,e){a.exports={default:e(90),__esModule:!0}},function(a,t,e){e(91),a.exports=e(1).Object.keys},function(a,t,e){var s=e(18),c=e(13);e(92)("keys",(function(){return function(d){return c(s(d))}}))},function(a,t,e){var s=e(15),c=e(1),d=e(8);a.exports=function(p,f){var h=(c.Object||{})[p]||Object[p],S={};S[p]=f(h),s(s.S+s.F*d((function(){h(1)})),"Object",S)}},function(a,t,e){(function(s){var c=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],d=/^\s+|\s+$/g,p=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,f=/\{\n\/\* \[wrapped with (.+)\] \*/,h=/,? & /,S=/^[-+]0x[0-9a-f]+$/i,b=/^0b[01]+$/i,w=/^\[object .+?Constructor\]$/,I=/^0o[0-7]+$/i,R=/^(?:0|[1-9]\d*)$/,H=parseInt,L=typeof s=="object"&&s&&s.Object===Object&&s,X=typeof self=="object"&&self&&self.Object===Object&&self,r=L||X||Function("return this")();function D(F,x,j){switch(j.length){case 0:return F.call(x);case 1:return F.call(x,j[0]);case 2:return F.call(x,j[0],j[1]);case 3:return F.call(x,j[0],j[1],j[2])}return F.apply(x,j)}function V(F,x){return!!(F&&F.length)&&(function(j,N,B){if(N!=N)return(function(te,ue,ye,xe){for(var Ie=te.length,me=ye+-1;++me<Ie;)if(ue(te[me],me,te))return me;return-1})(j,z,B);for(var K=B-1,re=j.length;++K<re;)if(j[K]===N)return K;return-1})(F,x,0)>-1}function z(F){return F!=F}function q(F,x){for(var j=F.length,N=0;j--;)F[j]===x&&N++;return N}function k(F,x){for(var j=-1,N=F.length,B=0,K=[];++j<N;){var re=F[j];re!==x&&re!=="__lodash_placeholder__"||(F[j]="__lodash_placeholder__",K[B++]=j)}return K}var A,T,W,E=Function.prototype,ee=Object.prototype,J=r["__core-js_shared__"],C=(A=/[^.]+$/.exec(J&&J.keys&&J.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"",Y=E.toString,be=ee.hasOwnProperty,ce=ee.toString,U=RegExp("^"+Y.call(be).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),le=Object.create,Q=Math.max,he=Math.min,ve=(T=tt(Object,"defineProperty"),(W=tt.name)&&W.length>2?T:void 0);function Ne(F){return Ve(F)?le(F):{}}function Ee(F){return!(!Ve(F)||(function(x){return!!C&&C in x})(F))&&((function(x){var j=Ve(x)?ce.call(x):"";return j=="[object Function]"||j=="[object GeneratorFunction]"})(F)||(function(x){var j=!1;if(x!=null&&typeof x.toString!="function")try{j=!!(x+"")}catch{}return j})(F)?U:w).test((function(x){if(x!=null){try{return Y.call(x)}catch{}try{return x+""}catch{}}return""})(F))}function Oe(F,x,j,N){for(var B=-1,K=F.length,re=j.length,te=-1,ue=x.length,ye=Q(K-re,0),xe=Array(ue+ye),Ie=!N;++te<ue;)xe[te]=x[te];for(;++B<re;)(Ie||B<K)&&(xe[j[B]]=F[B]);for(;ye--;)xe[te++]=F[B++];return xe}function fe(F,x,j,N){for(var B=-1,K=F.length,re=-1,te=j.length,ue=-1,ye=x.length,xe=Q(K-te,0),Ie=Array(xe+ye),me=!N;++B<xe;)Ie[B]=F[B];for(var Pe=B;++ue<ye;)Ie[Pe+ue]=x[ue];for(;++re<te;)(me||B<K)&&(Ie[Pe+j[re]]=F[B++]);return Ie}function ge(F){return function(){var x=arguments;switch(x.length){case 0:return new F;case 1:return new F(x[0]);case 2:return new F(x[0],x[1]);case 3:return new F(x[0],x[1],x[2]);case 4:return new F(x[0],x[1],x[2],x[3]);case 5:return new F(x[0],x[1],x[2],x[3],x[4]);case 6:return new F(x[0],x[1],x[2],x[3],x[4],x[5]);case 7:return new F(x[0],x[1],x[2],x[3],x[4],x[5],x[6])}var j=Ne(F.prototype),N=F.apply(j,x);return Ve(N)?N:j}}function De(F,x,j,N,B,K,re,te,ue,ye){var xe=128&x,Ie=1&x,me=2&x,Pe=24&x,Re=512&x,$e=me?void 0:ge(F);return function ze(){for(var Se=arguments.length,se=Array(Se),Ae=Se;Ae--;)se[Ae]=arguments[Ae];if(Pe)var Me=et(ze),Je=q(se,Me);if(N&&(se=Oe(se,N,B,Pe)),K&&(se=fe(se,K,re,Pe)),Se-=Je,Pe&&Se<ye){var qe=k(se,Me);return Ue(F,x,De,ze.placeholder,j,se,qe,te,ue,ye-Se)}var Be=Ie?j:this,We=me?Be[F]:F;return Se=se.length,te?se=ot(se,te):Re&&Se>1&&se.reverse(),xe&&ue<Se&&(se.length=ue),this&&this!==r&&this instanceof ze&&(We=$e||ge(We)),We.apply(Be,se)}}function Ue(F,x,j,N,B,K,re,te,ue,ye){var xe=8&x;x|=xe?32:64,4&(x&=~(xe?64:32))||(x&=-4);var Ie=j(F,x,B,xe?K:void 0,xe?re:void 0,xe?void 0:K,xe?void 0:re,te,ue,ye);return Ie.placeholder=N,rt(Ie,F,x)}function Xe(F,x,j,N,B,K,re,te){var ue=2&x;if(!ue&&typeof F!="function")throw new TypeError("Expected a function");var ye=N?N.length:0;if(ye||(x&=-97,N=B=void 0),re=re===void 0?re:Q(nt(re),0),te=te===void 0?te:nt(te),ye-=B?B.length:0,64&x){var xe=N,Ie=B;N=B=void 0}var me=[F,x,j,N,B,xe,Ie,K,re,te];if(F=me[0],x=me[1],j=me[2],N=me[3],B=me[4],!(te=me[9]=me[9]==null?ue?0:F.length:Q(me[9]-ye,0))&&24&x&&(x&=-25),x&&x!=1)Pe=x==8||x==16?(function(Re,$e,ze){var Se=ge(Re);return function se(){for(var Ae=arguments.length,Me=Array(Ae),Je=Ae,qe=et(se);Je--;)Me[Je]=arguments[Je];var Be=Ae<3&&Me[0]!==qe&&Me[Ae-1]!==qe?[]:k(Me,qe);if((Ae-=Be.length)<ze)return Ue(Re,$e,De,se.placeholder,void 0,Me,Be,void 0,void 0,ze-Ae);var We=this&&this!==r&&this instanceof se?Se:Re;return D(We,this,Me)}})(F,x,te):x!=32&&x!=33||B.length?De.apply(void 0,me):(function(Re,$e,ze,Se){var se=1&$e,Ae=ge(Re);return function Me(){for(var Je=-1,qe=arguments.length,Be=-1,We=Se.length,lt=Array(We+qe),bt=this&&this!==r&&this instanceof Me?Ae:Re;++Be<We;)lt[Be]=Se[Be];for(;qe--;)lt[Be++]=arguments[++Je];return D(bt,se?ze:this,lt)}})(F,x,j,N);else var Pe=(function(Re,$e,ze){var Se=1&$e,se=ge(Re);return function Ae(){var Me=this&&this!==r&&this instanceof Ae?se:Re;return Me.apply(Se?ze:this,arguments)}})(F,x,j);return rt(Pe,F,x)}function et(F){return F.placeholder}function tt(F,x){var j=(function(N,B){return N==null?void 0:N[B]})(F,x);return Ee(j)?j:void 0}function at(F){var x=F.match(f);return x?x[1].split(h):[]}function He(F,x){var j=x.length,N=j-1;return x[N]=(j>1?"& ":"")+x[N],x=x.join(j>2?", ":" "),F.replace(p,`{
|
|
3
3
|
/* [wrapped with `+x+`] */
|
|
4
4
|
`)}function st(F,x){return!!(x=x??9007199254740991)&&(typeof F=="number"||R.test(F))&&F>-1&&F%1==0&&F<x}function ot(F,x){for(var j=F.length,N=he(x.length,j),B=(function(re,te){var ue=-1,ye=re.length;for(te||(te=Array(ye));++ue<ye;)te[ue]=re[ue];return te})(F);N--;){var K=x[N];F[N]=st(K,j)?B[K]:void 0}return F}var rt=ve?function(F,x,j){var N,B=x+"";return ve(F,"toString",{configurable:!0,enumerable:!1,value:(N=He(B,it(at(B),j)),function(){return N})})}:function(F){return F};function it(F,x){return(function(j,N){for(var B=-1,K=j?j.length:0;++B<K&&N(j[B],B,j)!==!1;);})(c,(function(j){var N="_."+j[0];x&j[1]&&!V(F,N)&&F.push(N)})),F.sort()}function Ge(F,x,j){var N=Xe(F,8,void 0,void 0,void 0,void 0,void 0,x=j?void 0:x);return N.placeholder=Ge.placeholder,N}function Ve(F){var x=typeof F;return!!F&&(x=="object"||x=="function")}function Ce(F){return F?(F=(function(x){if(typeof x=="number")return x;if((function(B){return typeof B=="symbol"||(function(K){return!!K&&typeof K=="object"})(B)&&ce.call(B)=="[object Symbol]"})(x))return NaN;if(Ve(x)){var j=typeof x.valueOf=="function"?x.valueOf():x;x=Ve(j)?j+"":j}if(typeof x!="string")return x===0?x:+x;x=x.replace(d,"");var N=b.test(x);return N||I.test(x)?H(x.slice(2),N?2:8):S.test(x)?NaN:+x})(F))===1/0||F===-1/0?17976931348623157e292*(F<0?-1:1):F==F?F:0:F===0?F:0}function nt(F){var x=Ce(F),j=x%1;return x==x?j?x-j:x:0}Ge.placeholder={},a.exports=Ge}).call(this,e(43))},function(a,t,e){function s(fe){return fe&&fe.__esModule?fe.default:fe}t.__esModule=!0;var c=e(95);t.threezerotwofour=s(c);var d=e(96);t.apathy=s(d);var p=e(97);t.ashes=s(p);var f=e(98);t.atelierDune=s(f);var h=e(99);t.atelierForest=s(h);var S=e(100);t.atelierHeath=s(S);var b=e(101);t.atelierLakeside=s(b);var w=e(102);t.atelierSeaside=s(w);var I=e(103);t.bespin=s(I);var R=e(104);t.brewer=s(R);var H=e(105);t.bright=s(H);var L=e(106);t.chalk=s(L);var X=e(107);t.codeschool=s(X);var r=e(108);t.colors=s(r);var D=e(109);t.default=s(D);var V=e(110);t.eighties=s(V);var z=e(111);t.embers=s(z);var q=e(112);t.flat=s(q);var k=e(113);t.google=s(k);var A=e(114);t.grayscale=s(A);var T=e(115);t.greenscreen=s(T);var W=e(116);t.harmonic=s(W);var E=e(117);t.hopscotch=s(E);var ee=e(118);t.isotope=s(ee);var J=e(119);t.marrakesh=s(J);var C=e(120);t.mocha=s(C);var Y=e(121);t.monokai=s(Y);var be=e(122);t.ocean=s(be);var ce=e(123);t.paraiso=s(ce);var U=e(124);t.pop=s(U);var le=e(125);t.railscasts=s(le);var Q=e(126);t.shapeshifter=s(Q);var he=e(127);t.solarized=s(he);var ve=e(128);t.summerfruit=s(ve);var Ne=e(129);t.tomorrow=s(Ne);var Ee=e(130);t.tube=s(Ee);var Oe=e(131);t.twilight=s(Oe)},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){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"},a.exports=t.default},function(a,t,e){var s=e(33);function c(d){var p=Math.round(s(d,0,255)).toString(16);return p.length==1?"0"+p:p}a.exports=function(d){var p=d.length===4?c(255*d[3]):"";return"#"+c(d[0])+c(d[1])+c(d[2])+p}},function(a,t,e){var s=e(134),c=e(135),d=e(136),p=e(137),f={"#":c,hsl:function(S){var b=s(S),w=p(b);return b.length===4&&w.push(b[3]),w},rgb:d};function h(S){for(var b in f)if(S.indexOf(b)===0)return f[b](S)}h.rgb=d,h.hsl=s,h.hex=c,a.exports=h},function(a,t,e){var s=e(44),c=e(33);function d(p,f){switch(p=parseFloat(p),f){case 0:return c(p,0,360);case 1:case 2:return c(p,0,100);case 3:return c(p,0,1)}}a.exports=function(p){return s(p).map(d)}},function(a,t){a.exports=function(e){e.length!==4&&e.length!==5||(e=(function(d){for(var p="#",f=1;f<d.length;f++){var h=d.charAt(f);p+=h+h}return p})(e));var s=[parseInt(e.substring(1,3),16),parseInt(e.substring(3,5),16),parseInt(e.substring(5,7),16)];if(e.length===9){var c=parseFloat((parseInt(e.substring(7,9),16)/255).toFixed(2));s.push(c)}return s}},function(a,t,e){var s=e(44),c=e(33);function d(p,f){return f<3?p.indexOf("%")!=-1?Math.round(255*c(parseInt(p,10),0,100)/100):c(parseInt(p,10),0,255):c(parseFloat(p),0,1)}a.exports=function(p){return s(p).map(d)}},function(a,t){a.exports=function(e){var s,c,d,p,f,h=e[0]/360,S=e[1]/100,b=e[2]/100;if(S==0)return[f=255*b,f,f];s=2*b-(c=b<.5?b*(1+S):b+S-b*S),p=[0,0,0];for(var w=0;w<3;w++)(d=h+1/3*-(w-1))<0&&d++,d>1&&d--,f=6*d<1?s+6*(c-s)*d:2*d<1?c:3*d<2?s+(c-s)*(2/3-d)*6:s,p[w]=255*f;return p}},function(a,t,e){(function(s){var c=typeof s=="object"&&s&&s.Object===Object&&s,d=typeof self=="object"&&self&&self.Object===Object&&self,p=c||d||Function("return this")();function f(k,A,T){switch(T.length){case 0:return k.call(A);case 1:return k.call(A,T[0]);case 2:return k.call(A,T[0],T[1]);case 3:return k.call(A,T[0],T[1],T[2])}return k.apply(A,T)}function h(k,A){for(var T=-1,W=A.length,E=k.length;++T<W;)k[E+T]=A[T];return k}var S=Object.prototype,b=S.hasOwnProperty,w=S.toString,I=p.Symbol,R=S.propertyIsEnumerable,H=I?I.isConcatSpreadable:void 0,L=Math.max;function X(k){return r(k)||(function(A){return(function(T){return(function(W){return!!W&&typeof W=="object"})(T)&&(function(W){return W!=null&&(function(E){return typeof E=="number"&&E>-1&&E%1==0&&E<=9007199254740991})(W.length)&&!(function(E){var ee=(function(J){var C=typeof J;return!!J&&(C=="object"||C=="function")})(E)?w.call(E):"";return ee=="[object Function]"||ee=="[object GeneratorFunction]"})(W)})(T)})(A)&&b.call(A,"callee")&&(!R.call(A,"callee")||w.call(A)=="[object Arguments]")})(k)||!!(H&&k&&k[H])}var r=Array.isArray,D,V,z,q=(V=function(k){var A=(k=(function(E,ee,J,C,Y){var be=-1,ce=E.length;for(J||(J=X),Y||(Y=[]);++be<ce;){var U=E[be];J(U)?h(Y,U):Y[Y.length]=U}return Y})(k)).length,T=A;for(D;T--;)if(typeof k[T]!="function")throw new TypeError("Expected a function");return function(){for(var W=0,E=A?k[W].apply(this,arguments):arguments[0];++W<A;)E=k[W].call(this,E);return E}},z=L(z===void 0?V.length-1:z,0),function(){for(var k=arguments,A=-1,T=L(k.length-z,0),W=Array(T);++A<T;)W[A]=k[z+A];A=-1;for(var E=Array(z+1);++A<z;)E[A]=k[A];return E[z]=W,f(V,this,E)});a.exports=q}).call(this,e(43))},function(a,t,e){Object.defineProperty(t,"__esModule",{value:!0}),t.yuv2rgb=function(s){var c,d,p,f=s[0],h=s[1],S=s[2];return c=1*f+0*h+1.13983*S,d=1*f+-.39465*h+-.5806*S,p=1*f+2.02311*h+0*S,c=Math.min(Math.max(0,c),1),d=Math.min(Math.max(0,d),1),p=Math.min(Math.max(0,p),1),[255*c,255*d,255*p]},t.rgb2yuv=function(s){var c=s[0]/255,d=s[1]/255,p=s[2]/255;return[.299*c+.587*d+.114*p,-.14713*c+-.28886*d+.436*p,.615*c+-.51499*d+-.10001*p]}},function(a,t,e){function s(p,f,h){return f in p?Object.defineProperty(p,f,{value:h,enumerable:!0,configurable:!0,writable:!0}):p[f]=h,p}var c=e(141),d=(function(){function p(){s(this,"_callbacks",void 0),s(this,"_isDispatching",void 0),s(this,"_isHandled",void 0),s(this,"_isPending",void 0),s(this,"_lastID",void 0),s(this,"_pendingPayload",void 0),this._callbacks={},this._isDispatching=!1,this._isHandled={},this._isPending={},this._lastID=1}var f=p.prototype;return f.register=function(h){var S="ID_"+this._lastID++;return this._callbacks[S]=h,S},f.unregister=function(h){this._callbacks[h]||c(!1),delete this._callbacks[h]},f.waitFor=function(h){this._isDispatching||c(!1);for(var S=0;S<h.length;S++){var b=h[S];this._isPending[b]?this._isHandled[b]||c(!1):(this._callbacks[b]||c(!1),this._invokeCallback(b))}},f.dispatch=function(h){this._isDispatching&&c(!1),this._startDispatching(h);try{for(var S in this._callbacks)this._isPending[S]||this._invokeCallback(S)}finally{this._stopDispatching()}},f.isDispatching=function(){return this._isDispatching},f._invokeCallback=function(h){this._isPending[h]=!0,this._callbacks[h](this._pendingPayload),this._isHandled[h]=!0},f._startDispatching=function(h){for(var S in this._callbacks)this._isPending[S]=!1,this._isHandled[S]=!1;this._pendingPayload=h,this._isDispatching=!0},f._stopDispatching=function(){delete this._pendingPayload,this._isDispatching=!1},p})();a.exports=d},function(a,t,e){a.exports=function(s,c){for(var d=arguments.length,p=new Array(d>2?d-2:0),f=2;f<d;f++)p[f-2]=arguments[f];if(!s){var h;if(c===void 0)h=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var S=0;(h=new Error(c.replace(/%s/g,(function(){return String(p[S++])})))).name="Invariant Violation"}throw h.framesToPop=1,h}}},function(a,t,e){function s(l,u,n){return u in l?Object.defineProperty(l,u,{value:n,enumerable:!0,configurable:!0,writable:!0}):l[u]=n,l}function c(l,u){var n=Object.keys(l);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(l);u&&(o=o.filter((function(i){return Object.getOwnPropertyDescriptor(l,i).enumerable}))),n.push.apply(n,o)}return n}function d(l){for(var u=1;u<arguments.length;u++){var n=arguments[u]!=null?arguments[u]:{};u%2?c(Object(n),!0).forEach((function(o){s(l,o,n[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(o){Object.defineProperty(l,o,Object.getOwnPropertyDescriptor(n,o))}))}return l}function p(l,u){if(!(l instanceof u))throw new TypeError("Cannot call a class as a function")}function f(l,u){for(var n=0;n<u.length;n++){var o=u[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(l,o.key,o)}}function h(l,u,n){return u&&f(l.prototype,u),n&&f(l,n),l}function S(l,u){return(S=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n})(l,u)}function b(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(u&&u.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),u&&S(l,u)}function w(l){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)})(l)}function I(l){return(I=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u})(l)}function R(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l}function H(l,u){return!u||I(u)!=="object"&&typeof u!="function"?R(l):u}function L(l){var u=(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,o=w(l);if(u){var i=w(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return H(this,n)}}e.r(t);var X=e(0),r=e.n(X);function D(){var l=this.constructor.getDerivedStateFromProps(this.props,this.state);l!=null&&this.setState(l)}function V(l){this.setState(function(u){var n=this.constructor.getDerivedStateFromProps(l,u);return n??null}.bind(this))}function z(l,u){try{var n=this.props,o=this.state;this.props=l,this.state=u,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function q(l){var u=l.prototype;if(!u||!u.isReactComponent)throw new Error("Can only polyfill class components");if(typeof l.getDerivedStateFromProps!="function"&&typeof u.getSnapshotBeforeUpdate!="function")return l;var n=null,o=null,i=null;if(typeof u.componentWillMount=="function"?n="componentWillMount":typeof u.UNSAFE_componentWillMount=="function"&&(n="UNSAFE_componentWillMount"),typeof u.componentWillReceiveProps=="function"?o="componentWillReceiveProps":typeof u.UNSAFE_componentWillReceiveProps=="function"&&(o="UNSAFE_componentWillReceiveProps"),typeof u.componentWillUpdate=="function"?i="componentWillUpdate":typeof u.UNSAFE_componentWillUpdate=="function"&&(i="UNSAFE_componentWillUpdate"),n!==null||o!==null||i!==null){var y=l.displayName||l.name,O=typeof l.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|