iobroker.javascript
Version:
Rules Engine for ioBroker
2 lines (1 loc) • 7.54 kB
JavaScript
import{d as H,l as Q,t as X}from"./ConfigCustomJavascriptSet__loadShare__react__loadShare__.mjs-0SjJESw9.js";import{j as F}from"./jsx-runtime-DfVU3AZG.js";import{i as _,a as Z,s as ee,u as te}from"./DefaultPropsProvider-CGb21NGY.js";import{d as oe}from"./defaultTheme-F2iJF2G2.js";import{e as ne,s as B,Y as re,T as se,d as O}from"./createTheme-Wd4QxQE0.js";const U=e=>e,ie=()=>{let e=U;return{configure(o){e=o},generate(o){return e(o)},reset(){e=U}}},ae=ie();function q(e){var o,n,t="";if(typeof e=="string"||typeof e=="number")t+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(o=0;o<r;o++)e[o]&&(n=q(e[o]))&&(t&&(t+=" "),t+=n)}else for(n in e)e[n]&&(t&&(t+=" "),t+=n);return t}function le(){for(var e,o,n=0,t="",r=arguments.length;n<r;n++)(e=arguments[n])&&(o=q(e))&&(t&&(t+=" "),t+=o);return t}const ce={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function W(e,o,n="Mui"){const t=ce[o];return t?`${n}-${t}`:`${ae.generate(e)}-${o}`}function ue(e,o,n="Mui"){const t={};return o.forEach(r=>{t[r]=W(e,r,n)}),t}function K(e){const{variants:o,...n}=e,t={variants:o,style:_(n),isProcessed:!0};return t.style===n||o&&o.forEach(r=>{typeof r.style!="function"&&(r.style=_(r.style))}),t}const fe=ne();function k(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function T(e,o){return o&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${o}{${String(e.styles)}}`),e}function de(e){return e?(o,n)=>n[e]:null}function me(e,o,n){e.theme=Se(e.theme)?n:e.theme[o]||e.theme}function $(e,o,n){const t=typeof o=="function"?o(e):o;if(Array.isArray(t))return t.flatMap(r=>$(e,r,n));if(Array.isArray(t==null?void 0:t.variants)){let r;if(t.isProcessed)r=n?T(t.style,n):t.style;else{const{variants:i,...l}=t;r=n?T(_(l),n):l}return N(e,t.variants,[r],n)}return t!=null&&t.isProcessed?n?T(_(t.style),n):t.style:n?T(_(t),n):t}function N(e,o,n=[],t=void 0){var i;let r;e:for(let l=0;l<o.length;l+=1){const s=o[l];if(typeof s.props=="function"){if(r??={...e,...e.ownerState,ownerState:e.ownerState},!s.props(r))continue}else for(const c in s.props)if(e[c]!==s.props[c]&&((i=e.ownerState)==null?void 0:i[c])!==s.props[c])continue e;typeof s.style=="function"?(r??={...e,...e.ownerState,ownerState:e.ownerState},n.push(t?T(_(s.style(r)),t):s.style(r))):n.push(t?T(_(s.style),t):s.style)}return n}function he(e={}){const{themeId:o,defaultTheme:n=fe,rootShouldForwardProp:t=k,slotShouldForwardProp:r=k}=e;function i(s){me(s,o,n)}return(s,c={})=>{Z(s,d=>d.filter(m=>m!==B));const{name:a,slot:u,skipVariantsResolver:y,skipSx:g,overridesResolver:w=de(ve(u)),...v}=c,f=a&&a.startsWith("Mui")||u?"components":"custom",C=y!==void 0?y:u&&u!=="Root"&&u!=="root"||!1,z=g||!1;let R=k;u==="Root"||u==="root"?R=t:u?R=r:pe(s)&&(R=void 0);const j=ee(s,{shouldForwardProp:R,label:ye(),...v}),Y=d=>{if(d.__emotion_real===d)return d;if(typeof d=="function")return function(x){return $(x,d,x.theme.modularCssLayers?f:void 0)};if(re(d)){const m=K(d);return function(p){return m.variants?$(p,m,p.theme.modularCssLayers?f:void 0):p.theme.modularCssLayers?T(m.style,f):m.style}}return d},L=(...d)=>{const m=[],x=d.map(Y),p=[];if(m.push(i),a&&w&&p.push(function(h){var I,E;const S=(E=(I=h.theme.components)==null?void 0:I[a])==null?void 0:E.styleOverrides;if(!S)return null;const A={};for(const D in S)A[D]=$(h,S[D],h.theme.modularCssLayers?"theme":void 0);return w(h,A)}),a&&!C&&p.push(function(h){var A,I;const b=h.theme,S=(I=(A=b==null?void 0:b.components)==null?void 0:A[a])==null?void 0:I.variants;return S?N(h,S,[],h.theme.modularCssLayers?"theme":void 0):null}),z||p.push(B),Array.isArray(x[0])){const P=x.shift(),h=new Array(m.length).fill(""),b=new Array(p.length).fill("");let S;S=[...h,...P,...b],S.raw=[...h,...P.raw,...b],m.unshift(S)}const J=[...m,...x,...p],V=j(...J);return s.muiName&&(V.muiName=s.muiName),V};return j.withConfig&&(L.withConfig=j.withConfig),L}}function ye(e,o){return void 0}function Se(e){for(const o in e)return!1;return!0}function pe(e){return typeof e=="string"&&e.charCodeAt(0)>96}function ve(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function ge(e,o,n=void 0){const t={};for(const r in e){const i=e[r];let l="",s=!0;for(let c=0;c<i.length;c+=1){const a=i[c];a&&(l+=(s===!0?"":" ")+o(a),s=!1,n&&n[a]&&(l+=" "+n[a]))}t[r]=l}return t}const G={theme:void 0};function we(e){let o,n;return function(r){let i=o;return(i===void 0||r.theme!==n)&&(G.theme=r.theme,i=K(e(G)),o=i,n=r.theme),i}}function Ce(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const xe=e=>Ce(e)&&e!=="classes",be=he({themeId:se,defaultTheme:oe,rootShouldForwardProp:xe}),Te=we;function _e(e){return te(e)}function ze(e){return W("MuiSvgIcon",e)}const ke=ue("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]),Ae=e=>{const{color:o,fontSize:n,classes:t}=e,r={root:["root",o!=="inherit"&&`color${O(o)}`,`fontSize${O(n)}`]};return ge(r,ze,t)},Ie=be("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:n}=e;return[o.root,n.color!=="inherit"&&o[`color${O(n.color)}`],o[`fontSize${O(n.fontSize)}`]]}})(Te(({theme:e})=>{var o,n,t,r,i,l,s,c,a,u,y,g,w,v;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(r=(o=e.transitions)==null?void 0:o.create)==null?void 0:r.call(o,"fill",{duration:(t=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:t.shorter}),variants:[{props:f=>!f.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((l=(i=e.typography)==null?void 0:i.pxToRem)==null?void 0:l.call(i,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((c=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:c.call(s,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((u=(a=e.typography)==null?void 0:a.pxToRem)==null?void 0:u.call(a,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,f])=>f&&f.main).map(([f])=>{var C,z;return{props:{color:f},style:{color:(z=(C=(e.vars??e).palette)==null?void 0:C[f])==null?void 0:z.main}}}),{props:{color:"action"},style:{color:(g=(y=(e.vars??e).palette)==null?void 0:y.action)==null?void 0:g.active}},{props:{color:"disabled"},style:{color:(v=(w=(e.vars??e).palette)==null?void 0:w.action)==null?void 0:v.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),M=H(function(o,n){const t=_e({props:o,name:"MuiSvgIcon"}),{children:r,className:i,color:l="inherit",component:s="svg",fontSize:c="medium",htmlColor:a,inheritViewBox:u=!1,titleAccess:y,viewBox:g="0 0 24 24",...w}=t,v=Q(r)&&r.type==="svg",f={...t,color:l,component:s,fontSize:c,instanceFontSize:o.fontSize,inheritViewBox:u,viewBox:g,hasSvgAsChild:v},C={};u||(C.viewBox=g);const z=Ae(f);return F.jsxs(Ie,{as:s,className:le(z.root,i),focusable:"false",color:a,"aria-hidden":y?void 0:!0,role:y?"img":void 0,ref:n,...C,...w,...v&&r.props,ownerState:f,children:[v?r.props.children:r,y?F.jsx("title",{children:y}):null]})});M.muiName="SvgIcon";function Fe(e,o){function n(t,r){return F.jsx(M,{"data-testid":`${o}Icon`,ref:r,...t,children:e})}return n.muiName=M.muiName,X(H(n))}export{ae as C,M as S,le as a,he as b,Fe as c,ge as d,ue as e,Ce as f,W as g,ke as h,ze as i,Te as m,xe as r,be as s,_e as u};